radiusDamage.cs - Where's the distance finding function? Anyone
by Matt W · in Torque Game Engine · 12/31/2001 (12:11 am) · 1 replies
The script file (I found it in the demo for "Crimeforce", but refers to being direct from Garage games... strange. I dont have it! needless to say... I borrowed it)
containerSearchCurrRadiusDist() is called to determine the distance from some points, and it is not found.
I'm assuming it's somewhere out there (otherwise, why did GG have it?)
The rest of the code works great (does damage to anyone in area) but without this function I can't tell the distance from the initial explosion and my object that is hit. That means an object that is hit head on takes same damage as an object just partially in blast range.
The latter part of the areaDamage function claims to be for "Impulse" Which I can asssume would by like the force that occurs on objects that are near explosions (rocket jumping... concussion grenades in TFC, etc)
So anyone else know where this file came from and any idea where this distance function is (or a simple way for me to figure out locations of each objects and find difference)
Anyway, any help is welcome.
containerSearchCurrRadiusDist() is called to determine the distance from some points, and it is not found.
I'm assuming it's somewhere out there (otherwise, why did GG have it?)
The rest of the code works great (does damage to anyone in area) but without this function I can't tell the distance from the initial explosion and my object that is hit. That means an object that is hit head on takes same damage as an object just partially in blast range.
The latter part of the areaDamage function claims to be for "Impulse" Which I can asssume would by like the force that occurs on objects that are near explosions (rocket jumping... concussion grenades in TFC, etc)
So anyone else know where this file came from and any idea where this distance function is (or a simple way for me to figure out locations of each objects and find difference)
Anyway, any help is welcome.
Torque Owner Chris "Dark" Evans
In the function add an error under the declaration of %dist:
%dist = containerSearchCurrRadiusDist(); error("Dist: " @ %sourceObject @ " : " @ %targetObject @ " : " @ %dist);Then look in the console to see what it says.
It sounds like you might have an old version that doesn't have that function.
Dark