I got a stupid problem with my spawning system. First of all I would like to describe how my system works (3 triggers):
Spawn Activate:
Elapsed game-time is 30s > Turn On "Spawn" trigger
Spawn (off at beginning):
Every 10s > Spawn "Spawn #" times 1 Zergling
Spawn Raise:
Every 1 min > Set Variable (Spawn #) +2
My problem now is, that the Spawn # doesn't raise at all, its always spawning 1 Zergling.
When I raise "Spawn #" at start to another number, it will create Zerglings with this number but never raises them.
Its like the "Spawn Raise" trigger doesn't do anything.
I assume that the "Spawn" trigger never checks if the Variable "Spawn #" changed, but that doesn't make any sense.
yeah. had exactly the same. and have no idea why it happens :S
It might be a matter of global and local variables. Sometimes when you use a local variable in a trigger, it just won't work. If you make the variable global, it does.
If you don't know the difference between global and local variables: local is a variable you add in the trigger itself (amongst the Events, Conditions, Actions tree), global variables are those you add as an element in the Triggers window. A global variable is available for all your triggers in your map, local variables can only be used by the trigger were you created them.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi,
I got a stupid problem with my spawning system. First of all I would like to describe how my system works (3 triggers):
Spawn Activate:
Elapsed game-time is 30s > Turn On "Spawn" trigger
Spawn (off at beginning):
Every 10s > Spawn "Spawn #" times 1 Zergling
Spawn Raise:
Every 1 min > Set Variable (Spawn #) +2
My problem now is, that the Spawn # doesn't raise at all, its always spawning 1 Zergling.
When I raise "Spawn #" at start to another number, it will create Zerglings with this number but never raises them.
Its like the "Spawn Raise" trigger doesn't do anything.
I assume that the "Spawn" trigger never checks if the Variable "Spawn #" changed, but that doesn't make any sense.
-h34dl4g
add a chat message to the Spawn Raise trigger to see if it fires.
had something similar like this with a periodic event that didn't fire at all
Ok checked the trigger with "Text Messages" (thx Jackolas).
It doesn't start at all.
I just deleted the whole trigger and rewrote it.
And omfg....it works. -.-
-h34dl4g
yeah. had exactly the same. and have no idea why it happens :S
mine also started to work after I rewrote the whole trigger.
but text messages are your best friend to debug things like this
It might be a matter of global and local variables. Sometimes when you use a local variable in a trigger, it just won't work. If you make the variable global, it does.
If you don't know the difference between global and local variables: local is a variable you add in the trigger itself (amongst the Events, Conditions, Actions tree), global variables are those you add as an element in the Triggers window. A global variable is available for all your triggers in your map, local variables can only be used by the trigger were you created them.