Jump to content
Sign in to follow this  
Harkonin

Command for "armor"

Recommended Posts

Trying to do a script similar to the OFPEC Blood addon but for Armor and vehicles only. Looked through Comref and can't find anything that specifies "Armor" or "Vehicle".

Any help appreciated.

Share this post


Link to post
Share on other sites

You can determine if a class is among the ancestors of a unit class by using the CountType function.

For example,

"Tank" CountType [unit]

will return 0 if the unit is a soldier, but 1 if the unit is an APC (I think APC qualifies as a tank) or Tank. Note that the M2 static MG qualifies as a tank as well, so it's not going to be perfect. (You could then sort out the M2Static class).

The old OFPEC unofficial command reference had the hierarchy of classes charted; you can also go to the commented.config and reconstruct it yourself.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×