need help on trigger(randomly select unit)

garion992

TH.net Regular
Reaction score
17
i created this, not tested

Code:
Randomize spawn red
    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 (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of RandomSheep) Equal to Neutral Passive
                    Then - Actions
                        Unit - Change ownership of (Matching unit) to Player 1 (Red) and Change color
                        Trigger - Run (This trigger) (checking conditions)
                    Else - Actions
                        Do nothing
            Else - Actions
                Unit - Remove (Random unit from Sheeps) from the game

srry triple post
 

squorpion

New Member
Reaction score
12
i created this, not tested

Code:
Randomize spawn red
    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 (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of RandomSheep) Equal to Neutral Passive
                    Then - Actions
                        Unit - Change ownership of (Matching unit) to Player 1 (Red) and Change color
                        Trigger - Run (This trigger) (checking conditions)
                    Else - Actions
                        Do nothing
            Else - Actions
                Unit - Remove (Random unit from Sheeps) from the game

srry triple post
i dont see anything change besides change the if the else to if then else multiple funtcions
 

garion992

TH.net Regular
Reaction score
17
yes, thats the prob i think.
but if you dont mind, gonna sleep now 02:15 here ^^
maybe ill see you tomorrow
 

squorpion

New Member
Reaction score
12
yes, thats the prob i think.
but if you dont mind, gonna sleep now 02:15 here ^^
maybe ill see you tomorrow

alright thx for all your help

+rep

edit: i found the glitch with the trigger i thought i fixed it but apperntly i didnt hes the trigger im using now the glitch i think is that the trigger never turns off. when i didnt have the wait time in there the game closes still but when i put it in it doesnt close but it doesnt change ownership
 

squorpion

New Member
Reaction score
12
forgott to put the trigger in XD. here it is.
Code:
Randomize spawn red
    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 (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of RandomSheep) Equal to Neutral Passive
                    Then - Actions
                        Unit - Change ownership of (Matching unit) to Player 1 (Red) and Change color
                        Trigger - Turn off (This trigger)
                    Else - Actions
                        Wait 0.01 seconds
                        Trigger - Run (This trigger) (checking conditions)
            Else - Actions
                Unit - Remove (Random unit from Sheeps) from the game
i have that trigger 8 times ones per sheep
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top