Countdown Timer

  • Thread starter Thread starter Ninja_J
  • Start date Start date
N

Ninja_J

Guest
I created a timer at the beginning of the game that lasts for 60 sec. 15 seconds into the game, i created another one that lasts for 30 sec. I set the trigger to destroy the last created timer (the one that lasts 30 sec).

How do i make it so both timers are destroyed? Last created timer is the 30 sec one so it wont destroy the 60 sec one.
 
Instead of creating a 2nd timer change the time for the first timer or am i confused?
 
lol u r confused, but thats my fault. The two timers represent diff things. The first timer is how long ti'll the gameplay begins. The second timer (which starts like 15 sec later) is used to tell how long ti'll certain units are destroyed.

Edit: Wait, I get what ur saying. Is there any way to do it with two timers or must i use your way?
 
Im not good with variables but i believe you could set the first timer as a variable destroy it and then use last created for the 2nd timer.
 
Set a timer variable, and destroy that variable. It is easy to use local variables in JASS, but if you are doing GUI triggers, just make a global variable.
 
hmm... i dunno how to do this. Since you have to destroy the timer window, i created a timer window variable. The thing is, I dont know how to set the display stuff (countdown, title).
 
To set the title, do 'Countdown Timer - Change Timer Window Title', and give it the Timer Window variable. To set the time, do 'Countdown Timer - Start Timer' and give it the Timer variable.
 
okay... how do i create the actual variable timer window?



srry, but i suck crap with triggers/variables
 
make a variable for the timer (type is timer), and for the timer windo (type is timer windo) then with triggeres:

Code:
Events:
[I]whatever[/I]
Conditions:
Actions:
Start [I]your timer[/I] as a oneshot timer that will expire in [I]your time[/I] seconds
Create a timer window for [I]your timer[/I] with the title [I]your title[/I] (you get the picture)
Set [I]your timer windo[/I] equal to last created timer window
just replace all italics with the nessisary text
Pyromancer
 
Go to the trigger editor, then click the 'X' icon for the variable editor. A window should pop up, the click the button to make a new variable name it First_Timer_Window or something, and set the type to Timer Window. Then in your first timer trigger say,

Set First_Timer_Window = (Last Created Timer Window)

Then after the timer is done use,

Destroy Timer Window (First_Timer_Window)

Also, you may want to take a look at my Variable and Array Tutorial that I just posted.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Probably inflates their numbers so they look better to advertisers.
  • The Helper The Helper:
    Yeah google does not filter those bots. I remember when Apex was doing Google ads I saw the same IPs in there as I was seeing here - google is totally tracking all those bots as traffic and most google traffic, at least ours, was all bots
  • The Helper The Helper:
    oh wow, i bet i can post x links now and do the webp pics now giggity
  • The Helper The Helper:
    ahh anubis blocks anyone that has javascript turned off
  • The Helper The Helper:
    Robot: HTTP client library - i love the new robot :)
  • The Helper The Helper:
    New Science News Forum and it starts out with 420 threads :)
  • The Helper The Helper:
    Technical Support forum name changed To Technology News, there is now a Tech, sci/tech and science forums now :)
  • The Helper The Helper:
    Happy Saturday! Hope everyone has a fantastic weekend!
  • Ghan Ghan:
    We are now on Ubuntu 24.04. Had some issues with the style after the OS/PHP upgrade but now resolved.
    +1
  • Ghan Ghan:
    PHP 8.3 now live
    +1
  • The Helper The Helper:
    Weekend went by too fast. Next weekend I am going to try to do a nature thing - buddy of mine lives by the Colorado river and has some kayaks and invited me to do some kayaking from a place he knows to get on the river.
  • Ghan Ghan:
    That sounds like an adventure.
  • The Helper The Helper:
    400 users all online all looking at latest content
  • The Helper The Helper:
    I wonder how all these bots that sit on the lastest content page get passed anubis or maybe they did not but they are just registering on whos online
  • The Helper The Helper:
    showing up on whos online not registration
  • Ghan Ghan:
    The first gate is stopping all the bots that don't execute javascript.
  • Ghan Ghan:
    That's the main thing with Anubis - no Javascript, no site. Typically you can still get the site to load without Javascript.
  • The Helper The Helper:
    I remember the whole javascript thing, question - how many real people disable that?
  • The Helper The Helper:
    Hell I guess I could go back on the stats to know that - we probably capture that and we know the before and after
  • Ghan Ghan:
    Real users can't really disable Javascript anymore these days.
  • Ghan Ghan:
    The internet is broken without it.
  • Ghan Ghan:
    Bot readable, not human usable.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    Check out the new Featured Content feature we apparently got with the forum software upgrade! https://www.thehelper.net/featured/

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top