Jump to content
Sign in to follow this  
bangabob

Set variable as side

Recommended Posts

I have been making a script that allows you to choose which side you want AI to spawn

However when trying to replace EAST with my variable the game doesnt spawn the units

For example:

_grpSide = "EAST";
_grpType = "OPF_F";
_sideAdjust = East;
_grp1 = [_spawnPosition, _sideAdjust, (configfile >> "CfgGroups" >> _grpSide >> _grpType >> "Infantry" >> _heavySelection),[],[],[0.25,0.4]] call BIS_fnc_spawnGroup;

Default code

_grp1 = [_spwnpos, East, (configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfTeam"),[],[],[0.25,0.4]] call BIS_fnc_spawnGroup;

So my question is how can i get the letters EAST into my variable _sideAdjust without using speechmarks

UPDATE: I realised that my variable wasnt stored as private. Doh. Incase your interested

_sideAdjust = East;

works just fine

Edited by BangaBob

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  

×