Hello I have a rather annoying problem with a script:
? !(local Server) : exit
_person = _this select 0
_group = group _person
_triggerstring = _this select 1
goto "start"
#loop
~0.01
@!alive ((units _group) select 0)
@alive ((units _group) select 0)
~1
#start
_person = ((units _group) select 0);[_person,_triggerstring] exec "AI WIP.sqs"
goto "loop"
The script is called once per soldier at the beginning of a multiplayer game.
The prpose of the script is to make sure another script, "AI WIP.sqs" , runs again and again whenever the soldier dies and respawns. Each soldier is in a separate group, which is why i can use
@!alive ((units _group) select 0)
as the soldier is always the first (and only) unit in his group.
The problem is that the script runs fine for about 10-15 respawns but after this, i start seeing a few soldiers respawning without running AI WIP.sqs. The longer i leave the game going, the more soldiers eventually respawn without it.
Adding the line
hint "Running"
to the beginning of ai wip.sqs confirms that the script is not running when the soldiers respawn.
Any ideas welcome