i know i have posted about this trigger before but i still never recieved an answer that worked so posting agien. here is the trigger all i need is to add a if,then,else loop.
variables used in trigger
trigger it self
so what i need in this trigger is this.
instead of this(wich is just an explination of what i need)
i need this.
that is what i have no idea how to do. i know in jass you can do that but im not to good at jass and can't figure out how to loop the trigger correctly.
if you need the trigger itself post and i will attach a map containing this trigger and the required variables.
variables used in trigger
Code:
Sheeps
Events
Map initialization
Conditions
Actions
Unit Group - Pick every unit in (Units in Sheeps <gen>) and do (Actions)
Loop - Actions
Unit Group - Add (Picked unit) to Sheeps
Code:
RandomSheep
Events
Conditions
Actions
Set RandomSheep = (Random unit from Sheeps)
Code:
Randomize spawn Copy
Events
Time - Elapsed game time is 0.01 seconds
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player 1 (Red) slot status) Equal to Is playing) and ((Player 1 (Red) controller) Equal to User)
Then - Actions
If ((Owner of RandomSheep) Equal to Neutral Passive) then do (Unit - Change ownership of (Matching unit) to Player 1 (Red) and Change color) else do (-------- Loop untill red recieves a unit from random sheep --------)
Else - Actions
Unit - Remove (Random unit from Sheeps) from the game
instead of this(wich is just an explination of what i need)
Code:
else do (-------- Loop untill red recieves a unit from random sheep --------)
Code:
else Loop. End loop when player1 red owns 1 unit from sheeps.
that is what i have no idea how to do. i know in jass you can do that but im not to good at jass and can't figure out how to loop the trigger correctly.
if you need the trigger itself post and i will attach a map containing this trigger and the required variables.