Blockland Forums > Modification Help
How to get "every" vehicle datablock
<< < (3/4) > >>
Port:
if ( %obj.getType() & $TypeMasks::VehicleObjectType )
Greek2me:

--- Quote from: Port on May 24, 2012, 02:11:58 AM ---if ( %obj.getType() & $TypeMasks::VehicleObjectType )

--- End quote ---
Nope, that doesn't work for what we're talking about. This is for any vehicle, including playertype vehicles. You could use $TypeMasks::PlayerObjectType in addition to it to get playertype vehicles as well, but that would also cause it to return true for players.
Slicks555:

--- Quote from: Port on May 24, 2012, 02:11:58 AM ---if ( %obj.getType() & $TypeMasks::VehicleObjectType )

--- End quote ---
I like the way you think. This is what I use, as well.


--- Quote from: Greek2me on May 24, 2012, 05:57:42 PM ---This is for any vehicle, including playertype vehicles.

--- End quote ---
What in the hell is a playertype vehicle? If it's a vehicle, it will fall under $TypeMasks::VehicleObjectType. If it's a player, it will fall under $TypeMasks::PlayerObject Type. They're two different object types.

Treynolds416:
Bot vehicles, such as the horse
Port:

--- Quote from: Treynolds416 on May 24, 2012, 09:29:21 PM ---Bot vehicles, such as the horse

--- End quote ---

They don't necessarily have “Vehicle“ in their datablock name.
For example, horseArmor.
Navigation
Message Index
Next page
Previous page

Go to full version