ShinyPickle
New Member
- Reaction score
- 9
I think there is an infinite loop in my trigger, but I don't know where. It's actually a series of triggers that were working fine last night, and I don't think I changed them. Here are the triggers.
Trigger1
That sets the integer to whatever number the player types. That was working.
Trigger2
If the number you typed in trigger1 is higher then the level of the unit currently in the region, it runs this trigger.
It was working fine last night... I wanted it to be so that when a specific event happens (Like the player typing the number, which was just to test it) it would change the value of the integer accordingly, thus placing the correct unit in the region. I had the same action in trigger3 5 times. One for each level. But when I test it, it creates infinite units one after another until I quit the game.
Trigger1
Event: Player - Player 1 (Red) types a chat message containing <Empty String> as An exact match
Action: Set Integer = (Integer((Entered chat string)))
Action: Set Integer = (Integer((Entered chat string)))
Trigger2
Event: Time - Every 0.50 seconds of game time
Condition: Integer Greater than (Level of (Random unit from (Units in Region <gen>)))
Action: Trigger - Run Trigger3 <gen> (checking conditions)
Condition: Integer Greater than (Level of (Random unit from (Units in Region <gen>)))
Action: Trigger - Run Trigger3 <gen> (checking conditions)
If the number you typed in trigger1 is higher then the level of the unit currently in the region, it runs this trigger.
Action: If (Integer Equal to 1) then do (Unit - Remove (Random unit from (Units in Region <gen>)) from the game) else do (Do nothing)
Action: If (Integer Equal to 1) then do (Unit - Create 1 Unitl level 1 for Player 1 (Red) at (Center of Region <gen>) facing (Position of Barracks 0000 <gen>)) else do (Do nothing)
Action: If (Integer Equal to 1) then do (Unit - Create 1 Unitl level 1 for Player 1 (Red) at (Center of Region <gen>) facing (Position of Barracks 0000 <gen>)) else do (Do nothing)
It was working fine last night... I wanted it to be so that when a specific event happens (Like the player typing the number, which was just to test it) it would change the value of the integer accordingly, thus placing the correct unit in the region. I had the same action in trigger3 5 times. One for each level. But when I test it, it creates infinite units one after another until I quit the game.