DarkBall123 39 Posted August 20, 2020 Hello, I need to randomly select any unit from the EAST side and give this unit a bomb (object). There is a code (running from initServer) _units = allUnits select {side _x == EAST}; _unit = selectRandom _units; _unit addItem "UMI_Weed_Bale"; _unit setVariable['bombUnit', true, true]; But here is the problem, as I did not try, the bomb is always added to the player-server (no matter what side he is). We tested the mission on the host server. I will be grateful for any hint. Share this post Link to post Share on other sites
Grumpy Old Man 3548 Posted August 20, 2020 Where exactly are you running it from? Do you mean initServer.sqf? Is there a similar snippet running from a trigger or similar that might cause this? Also try running this spawned with a time conditional to make sure it only runs with the mission already running: _addBomb= [] spawn { waitUntil {time>1}; waitUntil {count allUnits>=1}; _units = allUnits select {side _x == EAST}; _unit = selectRandom _units; _unit addItem "UMI_Weed_Bale"; _unit setVariable['bombUnit', true, true]; }; Might not make a difference though, all I can think of without further detail, heh. Cheers 1 Share this post Link to post Share on other sites
DarkBall123 39 Posted August 20, 2020 26 minutes ago, Grumpy Old Man said: Where exactly are you running it from? Do you mean initServer.sqf? Is there a similar snippet running from a trigger or similar that might cause this? Also try running this spawned with a time conditional to make sure it only runs with the mission already running: _addBomb= [] spawn { waitUntil {time>1}; waitUntil {count allUnits>=1}; _units = allUnits select {side _x == EAST}; _unit = selectRandom _units; _unit addItem "UMI_Weed_Bale"; _unit setVariable['bombUnit', true, true]; }; Might not make a difference though, all I can think of without further detail, heh. Cheers Thanks, I'll check it out Share this post Link to post Share on other sites