Hi my next question is i have set a dialog to create units n stuff
however after the last unit is created i wanted the map to remove all the unused slots that did play in the begging this is my trigger
event - dialog: button click for last dialog
conditions: ((Random player from (all players matching((((Matching player)controller)equal to User)and(((matching player)slot status)Equal to is unused))))slot status)Equal to is unused.
Action: unit group: pick everyunits (units own by (triggering player)) and do actions loop- unit remove picked unit.
now that trigger will only get rid of player 1 and that is because player 1 is the triggering player cos i click the dilog button.
so i changed the action trigger to
unit group: pick everyunits (units own by (Matching Player)matching(((Matching player)slot status) Equal to unused)) and do actions
loop- unit remove picked unit.
i have the trigger also pop up a message so i know the trigger has been activated but none of the units are removed in the 'unused' slots.
it's a common mistake to think random X from Xgroup will refer to every X there is in Xgroup
I don't know if I made myself clear
you want your trigger to ckeck if a player didn't show up so his/her units will be removed
I think this is the right version of your trigger:
event - dialog: button click for DialogX (assign your dialog a variable after creating it... unless it's the only dialog in your map)
Conditions: ............. nop! no conditions
Actions:
Player Group: pick every player in (All players matching(((Matching player)controller) equal to user)and(((Matching Player)slot status)equal to unused)) and do actions
Unit Group - Pick every units (Units owned by (picked player)) and do actions:
Unit - Remove (picked unit)
Ell I hope that's clear enough... tell me if it solved your problem