Blockland Forums > Modification Help

Checking if an object is a vehicle

Pages: << < (4/5) > >>

otto-san:

You used $ instead of &. :o

Unicide:

Changed that, didn't work. I've updated the previous post with the current code.

What it DOES do is spit back the points value earned, but it doesn't say anything about hitting a vehicle.

Destiny/Zack0Wack0:

My mistake, ProjectileData is the correct one you should be using. You've got to mistakes:
1) %col.getClassName() & $TypeMasks::VehicleObjectType - it should be %col.getType(), not %col.getClassName()
2) There are no multi-line comments in TorqueScript, so it's causing a syntax error.

Unicide:

I have fixed both of those issues and updated the code with them. However, I still have run into the same issue - it prints the points value but neither adjusts damage for armor or prints "Vehicle hit" when I shoot a vehicle.

Unicide:

Oh WOW. I had written the points part of the script before V20. All this time I'd been sending my changes to C:/Blockland rather than My Documents/Blockland. As you may guess, everything works now.

Pages: << < (4/5) > >>

Go to full version