Maciver 0 Posted November 12, 2010 if ( player side == west ) then { [player] joinSilent alpha; } else { [player] joinSilent bravo; }; Been trying to get this to work. It seems so simple, and I've accomplished what seems like far more complicated things. However, I just cant get this to work! lol I've tried several different ways, and structures of the if variable, anything i could find searching or with wiki. Even declaring variables before the if statement and using those. No matter what I've done, the player always joins bravo. The script is activated from an action menu item. Rest of the script is working cept this bit. Any help would be much appreciated! Share this post Link to post Share on other sites
celery 8 Posted November 12, 2010 side player instead of player side. Share this post Link to post Share on other sites
Maciver 0 Posted November 12, 2010 He still joins bravo, sadly :( Im just to the point of going in circles with trial and error now lol. Share this post Link to post Share on other sites
shuko 59 Posted November 12, 2010 Where are you running that? In init.sqf? If so, try waiting for player to init: [] spawn { waituntil {!isnull player}; if ( side side == west ) then { [player] joinSilent alpha; } else { [player] joinSilent bravo; }; }; Share this post Link to post Share on other sites
Maciver 0 Posted November 13, 2010 The script is activated from an item with add action on it. I tried adding that code anyway, same thing happens. It's a USMC soldier, who is obviously already west. Something is wrong with the declaring the unit as west. Whats trying to happen is if blufor uses this action on the item, they join alpha. If Independant uses the action they join bravo. The squads exist already, so not sure whats going on. Share this post Link to post Share on other sites
snkman 351 Posted November 13, 2010 Well under some conditions the player side may will switch. So to make sure 100% you could get the side number from the config. 0 = EAST 1 = WEST 2 = GUER 3 = CIV _side = getNumber (configFile >> "CfgVehicles" >> (typeOf _player) >> "side"); if (_side == 1) then // This means if side player == WEST { [player] joinSilent alpha; } else { [player] joinSilent bravo; }; Share this post Link to post Share on other sites
Maciver 0 Posted November 13, 2010 Still no go. Think I may have to pick another route to the end of this script lol. Share this post Link to post Share on other sites