This is still a problem. Right now I have 51 wave triggers, each using a periodic event of .1 game seconds because I don't know how to force the game to check for the variable current wave otherwise. This causes MAJOR LAG in my map. I've tried figuring it out for myself but nothing seems to work.
This is still a problem. Right now I have 51 wave triggers, each using a periodic event of .1 game seconds because I don't know how to force the game to check for the variable current wave otherwise. This causes MAJOR LAG in my map. I've tried figuring it out for myself but nothing seems to work.
Well you could use array of waves on init something like
Wave[1] = zerglings
Wave[2] = archons
etc. And than in 1 "spawner" kind of trigger use something like create unit Wave[current wave] You can also change 0.1 to something 0.5 . For human it wont make difference but for code its about 30% less (i believe minimal tick is 0.125? or is it 0.0125?)
Use a global timer variable so you can reference to the timer when the code runs again.... otherwise your just creating new timers on top of old ones....
nm looks like thats what your doing....
try destroying the old timer window before updating/creating the new one... see what happens
you should only need 1 action definition to handle all your waves
when the current wave has ended
update your Level/ wave integer
then call your "create wave action"
personally I have never used waves..... I just spawn the units as needed and add them to unit groups and handle all that accordingly
the create wave action should check what wave you are currently on and create the wave accordingly
Yeah I only have one Trigger to define all my wave spawning. The problem isn't that, it's the wave timer. No matter what I do the current wave variable will not update in the wave timer window. I have trying re-setting the title, killing the timer window and creating a new one, etc, nothing works. I don't get it. Here is what I have in my triggers:
Now I have tried this every which way, kill timer, hide timer, set timer title, etc. Everything works except for the hiding the window (which I initially had) or killing it. There IS a new timer recreated but I can't see anything of it except the top border of it to see if the wave variable is updated. I have also tried last created timer window instead of the name of the timer window, and that STILL does not work.
Also, I have a Spawn Wave trigger, which I tried putting the hide or kill window there and it doesn't work there either. This is really frustrating me because KILL and SHOW both do not work yet new windows are created. WHAT AM I DOING WRONG lol.
Wave Timer Window = No Timer Window <Timer Window>
So just for kicks I thought I would try placing the Destroy (Last Created Timer) or Destroy (Wave Timer Window) in a different trigger. I have an Update Leaderboard trigger, and I thought "Surely when the leaderboard is updated the timer window will be destroyed." Well it didn't work. So the problem is, no matter how I word the it, the Destroy command WILL NOT WORK. What the hell am I doing wrong? OMG this so frustrating, did I mention that? I mean, Set Title does not work, Hide does not work, destroy does not work, no matter if I call it last created timer or by it's variable name, is this a bug in the editor or am I making a stupid mistake somewhere?
No help? I have to have made a mistake or something, I've looked at OneTwoSC's tutorial and followed the wave timer part of it, and it still doesn't work. It's the same as I got in my above posts.
Done in 20 seconds, I belive you think that your wave will update by doing Set title, it wont
Edit: Ah you didn't saved Timer window either so no way to refer to it.
Gloval variables:
TW = No Timer Window <TimerWindow>
T = (New timer) <Timer>
Wave = 0 <Integer>
Initial trigger
Events
Timer - Elapsed time is 2.0 Game Time seconds
Local Variables
Conditions
Actions
Timer - Start T as a One Shot timer that will expire in 6.0 Game Time seconds
Timer - Create a timer window for T, with the title ("Wave " + (Text(Wave))), using Remaining time (initially Visible)
Variable - Set TW = (Last created timer window)
Thanks. No, I didn't think updating the timer window would update waves. I already have a Current Wave variable and my adding 1 to that variable is in my wave end trigger. Thanks so much though. I don't know wtf I did wrong but it worked!! Thanks thanks thanks! This was so frustrating for days!
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Is this right?
I have this variable:
Current Wave = 0 <Integer>
Wave Timer = (New timer) <Timer>
I have this in Initialization:
Variable - Set Wave Timer = (Last started timer)
Timer - Create a timer window for Wave Timer, with the title ("Wave: " + (Text((Current Wave + 1)))), using Remaining time (initially Visible)
Timer - Show Wave Timer Window for (All players)
And this at the end of my Spawn Waves trigger
Variable - Modify Current Wave: + 1
Shouldn't this work or is this wrong? I want to show current wave all the time, but it always says Wave: 1
You need to start the timer before you can set it as the last started timer.
@TheTAZsc: Go
Yeah my bad, I have that in my triggers too:
Timer - Start Wave Timer as a One Shot timer that will expire in 30.0 Game Time seconds
I have that listed before the set as last started timer.
Ah the timer window has to be 'refreshed' every time the new timer beings so that the title will be updated
@Rubybeard: Go
I also have
Timer - Restart Wave Timer
Timer - Show Wave Timer Window for (All players)
At the end of my wave end trigger.
When u restart the timer use 'Set title for timer window' and this should update the title
@TheTAZsc: Go
Did that, still didn't change the 1 to 2 on wave 2.
This is still a problem. Right now I have 51 wave triggers, each using a periodic event of .1 game seconds because I don't know how to force the game to check for the variable current wave otherwise. This causes MAJOR LAG in my map. I've tried figuring it out for myself but nothing seems to work.
Well you could use array of waves on init something like
Wave[1] = zerglings
Wave[2] = archons
etc. And than in 1 "spawner" kind of trigger use something like
create unit Wave[current wave]
You can also change 0.1 to something 0.5 . For human it wont make difference but for code its about 30% less (i believe minimal tick is 0.125? or is it 0.0125?)
@Rubybeard: Go
Use a global timer variable so you can reference to the timer when the code runs again.... otherwise your just creating new timers on top of old ones....
nm looks like thats what your doing....
try destroying the old timer window before updating/creating the new one... see what happens
you should only need 1 action definition to handle all your waves
when the current wave has ended
update your Level/ wave integer
then call your "create wave action"
personally I have never used waves..... I just spawn the units as needed and add them to unit groups and handle all that accordingly
the create wave action should check what wave you are currently on and create the wave accordingly
@SouLCarveRR: Go
Yeah I only have one Trigger to define all my wave spawning. The problem isn't that, it's the wave timer. No matter what I do the current wave variable will not update in the wave timer window. I have trying re-setting the title, killing the timer window and creating a new one, etc, nothing works. I don't get it. Here is what I have in my triggers:
In Initialization:
In the trigger that controls the end of the wave:
Now I have tried this every which way, kill timer, hide timer, set timer title, etc. Everything works except for the hiding the window (which I initially had) or killing it. There IS a new timer recreated but I can't see anything of it except the top border of it to see if the wave variable is updated. I have also tried last created timer window instead of the name of the timer window, and that STILL does not work.
Also, I have a Spawn Wave trigger, which I tried putting the hide or kill window there and it doesn't work there either. This is really frustrating me because KILL and SHOW both do not work yet new windows are created. WHAT AM I DOING WRONG lol.
@Rubybeard: Go
Forgot to add: My variables are:
Wave Timer = (New timer) <Timer>
Wave Timer Window = No Timer Window <Timer Window>
So just for kicks I thought I would try placing the Destroy (Last Created Timer) or Destroy (Wave Timer Window) in a different trigger. I have an Update Leaderboard trigger, and I thought "Surely when the leaderboard is updated the timer window will be destroyed." Well it didn't work. So the problem is, no matter how I word the it, the Destroy command WILL NOT WORK. What the hell am I doing wrong? OMG this so frustrating, did I mention that? I mean, Set Title does not work, Hide does not work, destroy does not work, no matter if I call it last created timer or by it's variable name, is this a bug in the editor or am I making a stupid mistake somewhere?
No help? I have to have made a mistake or something, I've looked at OneTwoSC's tutorial and followed the wave timer part of it, and it still doesn't work. It's the same as I got in my above posts.
Done in 20 seconds, I belive you think that your wave will update by doing Set title, it wont Edit: Ah you didn't saved Timer window either so no way to refer to it.
Edit: added condition to prevent endless waves
Thanks. No, I didn't think updating the timer window would update waves. I already have a Current Wave variable and my adding 1 to that variable is in my wave end trigger. Thanks so much though. I don't know wtf I did wrong but it worked!! Thanks thanks thanks! This was so frustrating for days!