Author Topic: Vehicle onImpact  (Read 854 times)

I want to know the function I use to adjust all parented onImpact functions, specifically for vehicles.

Oddly enough, there is none. There's no such thing as "all vehicle" in the way that there is "all player object" (Armor::onTrigger).

You have to package TWO onImpact functions: WheeledVehicleData::onImpact(%data, %obj, %col, %pos, %speed) and FlyingVehicleData::onImpact(%data, %obj, %col, %pos, %speed).


One would assume that a VehicleData would exist from the naming conventions that exist, but it does not - and indeed, there is also no such thing as a Vehicle.

tried wheeledvehicledata and it didn't work on jeep or any other vehicle.

Try parenting ::onImpact on a specific vehicle datablock. It may be protected / nonexistant on the parent class.
« Last Edit: October 31, 2013, 10:29:34 AM by $trinick »

WheeledVehicleData::onImpact(%db,%vehicle,%col,%pos,%speed)

FlyingVehicleData::onImpact(%db,%vehicle,%col,%pos,%speed)


the above will work
keep in mind however vehicles have stuff collisioning

They added VehicleData in the version of Torque released after ours, unfortunately. (1.5)

FlyingWheeledVehicleData?

FlyingWheeledVehicleData?
Correct, I didn't notice they had the wrong one.