Blockland Forums > Modification Help
Checking if an object is a vehicle
<< < (5/5)
Destiny/Zack0Wack0:
g loving j
Greek2me:

--- Quote from: Amade on December 06, 2011, 04:47:44 PM ---If you wanted to check if it was any vehicle - not just a wheeled one - you would use if(%col.getType() & $Typemasks::VehicleObjectType)

--- End quote ---
I'd like to know whether this can work for all vehicles, including the horse. Right now it only works for physics vehicles. I know that I can do if(%col.getType() & ($Typemasks::VehicleObjectType | $Typemasks::PlayerObjectType)) but that also works for players, which I don't want.
Destiny/Zack0Wack0:
Your best bet is to get the datablock and if the datablock has the "canMount" (I think that's what it's called) value set to 1, assume it's a vehicle.
Navigation
Message Index
Previous page

Go to full version