Jump to content
Sign in to follow this  
Andy455

Getting side through config

Recommended Posts

Well the title says it all; how can I get the side of a unit via config? The reason for this is that I need to know the side of dead units / renegades / captive units and when using: "SIDE unitName" it will return civilian or something that the unit clearly isnt.

I know I have to use the getText command or something similar I just have no idea how to navigate through the config files to the value that I want.

Thanks in advance :)

Share this post


Link to post
Share on other sites

_side = getNumber (configFile >> "cfgVehicles" >> (typeof _unit) >> "side");

The side isn't defined as text but as number.

EAST = 0

WEST = 1

GUERRILA = 2

CIVILIAN = 3

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  

×