I have a tiered wave system im using in my map, and ive offset the time when the next tier comes in to help synchronize the time the units arrive at their target. I have 3 tiers so far and i thought i had created a system that would work, which is setting each high tier 5 seconds apart from the lower tier so the spawned units can reach the area the lower tier spawns and they will travel to the target in a group. In the triggers this seemed excuted fine, i even have a command trigger where each wave spawns 5 seconds apart and they group together nearly perfectly. However, when i let the next tier come into play in-game, they arent synchronized at all. So heres my question, when a trigger that uses a 30 second periodic event timer is turned on by another trigger, does it start that 30 second timer from when the trigger was turned on, or does it actually have the timer going costantly, so the periodic event would fire every 30 seconds from 00:00. Here is the trigger i use to activate each tier of waves.
Tier 2 Wave Switch
Events -
Timer - Elapsed time is 295.0 Game Time seconds
Local Variables
Conditions
Actions -
Trigger - Turn Tier 2 Wave On
The wave trigger that spawns the actual units runs on a 30 second periodic event timer.
Scrap your activation trigger and just add a condition to your tier 2 wave trigger. Check that the mission time is over 295 seconds. This should work for you I think?
Just realised that changing the condition to ensure the timer is at 295 seconds... That wouldnt work because the timer would still be on a 00:00 loop. I want a 00:05 loop, so the timers origin is on a 00:05 loop and will always remain 5 seconds off from the first wave.
My unit wave triggers are bit extensive, but repetitive so ill give you the key parts:
- Tier 2 Wave
- - Events - Timer - Every 30.0 seconds of Game Time
- - Local Variables
- - Conditions
- - Actions
- - - - Unit Group - Pick each unit in (Sentry Cyber Core units in (Entire map) owned by player 14 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
- - - - - - Actions
- - - - - - - Unit - Create 2 Ancient Sentry for player 14 at (Position of (Picked unit)) using default facing (No Options)
- - - - - - - Unit - Order all units in (Last created units) to ( Attack targeting (Random point in Assault Region)) (After Existing Orders)
Disable "timer staggering". That tries to offset all periodic triggers so they never run at once.
For such trigger it is often best to use a single thread with Wait actions to time correctly. SC2 Wait actions are as accurate as timer events. It can even make the code more logical as you have a single trigger doing it all instead of dozens of "spaghetti linked" triggers.
willuwontu: The issue with a 25 second timer is that the loop would run as 00:25 - 00:50 - 01:15. This would cause the wave to spawn up to 20 or 15 seconds before the other wave, and the delay would change every 25 second loop.
ImperialGood: Im not quite sure you mean in your second section there. Im trying a timer variable method in hopes that will work though i doubt it will.
The timer variable system is working since they count down on their own time, unlike the periodic timer which counts even if the trigger is toggled off(the variable timers count while off too but they can be offset since they're not linked to the game timer).
I have a tiered wave system im using in my map, and ive offset the time when the next tier comes in to help synchronize the time the units arrive at their target. I have 3 tiers so far and i thought i had created a system that would work, which is setting each high tier 5 seconds apart from the lower tier so the spawned units can reach the area the lower tier spawns and they will travel to the target in a group. In the triggers this seemed excuted fine, i even have a command trigger where each wave spawns 5 seconds apart and they group together nearly perfectly. However, when i let the next tier come into play in-game, they arent synchronized at all. So heres my question, when a trigger that uses a 30 second periodic event timer is turned on by another trigger, does it start that 30 second timer from when the trigger was turned on, or does it actually have the timer going costantly, so the periodic event would fire every 30 seconds from 00:00. Here is the trigger i use to activate each tier of waves.
Tier 2 Wave Switch
Events - Timer - Elapsed time is 295.0 Game Time seconds
Local Variables
Conditions
Actions - Trigger - Turn Tier 2 Wave On
The wave trigger that spawns the actual units runs on a 30 second periodic event timer.
Scrap your activation trigger and just add a condition to your tier 2 wave trigger. Check that the mission time is over 295 seconds. This should work for you I think?
Seems like that would work, ill do that tomorrow its pretty late right now.
Show us the other trigger please; it would seem as though that is the trigger causing you problems.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
Just realised that changing the condition to ensure the timer is at 295 seconds... That wouldnt work because the timer would still be on a 00:00 loop. I want a 00:05 loop, so the timers origin is on a 00:05 loop and will always remain 5 seconds off from the first wave.
My unit wave triggers are bit extensive, but repetitive so ill give you the key parts:
- Tier 2 Wave
- - Events - Timer - Every 30.0 seconds of Game Time
- - Local Variables
- - Conditions
- - Actions
- - - - Unit Group - Pick each unit in (Sentry Cyber Core units in (Entire map) owned by player 14 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
- - - - - - Actions
- - - - - - - Unit - Create 2 Ancient Sentry for player 14 at (Position of (Picked unit)) using default facing (No Options)
- - - - - - - Unit - Order all units in (Last created units) to ( Attack targeting (Random point in Assault Region)) (After Existing Orders)
could have a condition to check the elapsed time is 270 secs, and then have a 25 sec wait so that they'd match up.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Disable "timer staggering". That tries to offset all periodic triggers so they never run at once.
For such trigger it is often best to use a single thread with Wait actions to time correctly. SC2 Wait actions are as accurate as timer events. It can even make the code more logical as you have a single trigger doing it all instead of dozens of "spaghetti linked" triggers.
willuwontu: The issue with a 25 second timer is that the loop would run as 00:25 - 00:50 - 01:15. This would cause the wave to spawn up to 20 or 15 seconds before the other wave, and the delay would change every 25 second loop.
ImperialGood: Im not quite sure you mean in your second section there. Im trying a timer variable method in hopes that will work though i doubt it will.
The timer variable system is working since they count down on their own time, unlike the periodic timer which counts even if the trigger is toggled off(the variable timers count while off too but they can be offset since they're not linked to the game timer).
@Project_06: Go
no what i was saying is you have a 30 sec periodic trigger, but the first action in it is a 25 sec wait. The triggering cycle would always match up.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Oh okay, my apologies for misunderstanding. Yes that would actually work thanks for the help.