PDA

View Full Version : Creating a loop



Spkka
Jul 16 2009, 09:55
I got this for updating the player actions he can perform. It only adds things multiple times into the list which it shouldn't. Like if there are 2 support trucks it will display "Vehicle support menu" twice.

I got no idea how to loop trough all the action and how to get rid off actions that already exist.


{ _id = _unit AddAction [_x, "Player\ActionStructure.sqs"]; _actionIDs = _actionIDs + [_id] } foreach _actionNames