• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Problem with "Timer Expires"

Status
Not open for further replies.
Level 10
Joined
Jul 31, 2008
Messages
477
Hello!

I have 2 triggers one that looks something like this.

  • Events
    • Time - Wait 1.00 second of game tiem
  • Actions
    • Countdown Timer - Create a timer window for (Last started timer) with the title |cff32cd32Next level in:|r
    • Countdown Timer - Start (Last started timer) as a repeting timer that will expire in 45.00 seconds.
    • Set *TimerWindow* = (Last Created Timer Window)
    • Set *Timer* = (Last started timer)
And the second;

  • Events
    • Time - *Timer* expires
  • Actions
    • ---My actions--- They are very long is i won't post them :)
 
Last edited:
Level 10
Joined
Jul 31, 2008
Messages
477
the first trigger wont work beacuse you gotta set the set variable action before countdown timer

Uhhm, why is that?

If i do that. There won't be anything to set the variable to...

The variable would kinda... empty if i do that.

What i need is to store the timer into a variable then when the stored timer expires you are supose to get gold.
 
Level 2
Joined
Dec 19, 2007
Messages
20
Start (Last started timer). Thats not working. Doesnt matter if you have set Timer before the trigger was started. Countdown Timer - Start (Timer) as a repeting timer that will expire in 45.00 seconds. It should be like this.
 
Level 10
Joined
Jul 31, 2008
Messages
477
Start (Last started timer). Thats not working. Doesnt matter if you have set Timer before the trigger was started. Countdown Timer - Start (Timer) as a repeting timer that will expire in 45.00 seconds. It should be like this.

Uhhm, yes it does. The timer runs the way it should.

If you read the title you should understand what my problem is. The problem is with TIMER EXPIRES.

When i use the TIMER EXPIRES event and use my variable *Timer* in it. It leaks.

Now the question is;

WHY DOES IT LEAK?
 
Level 3
Joined
Apr 24, 2005
Messages
61
I don't know what your problem is, but I'm guessing the timer doesn't show, so here's the standard timer triggers I've been using:

  • Events
    • Time - 0.1 seconds in game time
  • Actions
    • Countdown Timer - Start YourTimer as a X timer that will expire in X seconds
    • Countdown Timer - Create a Timer window for YourTimer titled X
    • Countdown Timer - Show YourTimer to (Player X)
Meaning that your problem probably is that you don't tell the game to show the timer. Also, your Timer is a variable, a Timer that doesn't have to be set before running the trigger.
 
Level 4
Joined
Jun 19, 2007
Messages
107
Hmm

If you use the "last started timer", it doesn't start the timer you use in your other trigger, but a new one.
Just do the "Start Timer as a repeating timer that will expire in x seconds".
 
Last edited:
Level 10
Joined
Jul 31, 2008
Messages
477
I don't know what your problem is, but I'm guessing the timer doesn't show, so here's the standard timer triggers I've been using:

  • Events
    • Time - 0.1 seconds in game time
  • Actions
    • Countdown Timer - Start YourTimer as a X timer that will expire in X seconds
    • Countdown Timer - Create a Timer window for YourTimer titled X
    • Countdown Timer - Show YourTimer to (Player X)
Meaning that your problem probably is that you don't tell the game to show the timer. Also, your Timer is a variable, a Timer that doesn't have to be set before running the trigger.

Ah for the last time!
The TIMER SHOWS the problem is with THE EVENT TIMER - TIMER EXPIRES
!!!
READ

Doesn't anyone have the answer for that question.

My game is bugging because my trigger;

  • Time - *Timer* Expires
The trigger never runs...

--------------------------------------------------------------------------------------------------------------------------------------------------

I will try to explain my triggers in words:

First i have the Trigger where i create a repeting timer (the timer works). With this, i create a wich i store the timer in. The second trigger has the event,
  • Time - Timer Exspires
, in that event i use the variable wich is stored the timer in. But the second trigger never runs (the second trigger is the one wich has the "Timer Exspires" event.)

Is that explanation good enough?
 
Level 3
Joined
Apr 24, 2005
Messages
61
Aight then. Instead of using the "Timer expires" event you could:

  • Events
    • Time - Every [Timer duration] seconds
  • Actions
    • Do your stuff
If you need it for something complicated you can have it disabled by default and turn it on via the countdown timer trigger.
 
Level 10
Joined
Jul 31, 2008
Messages
477
Aight then. Instead of using the "Timer expires" event you could:

  • Events
    • Time - Every [Timer duration] seconds
  • Actions
    • Do your stuff
If you need it for something complicated you can have it disabled by default and turn it on via the countdown timer trigger.

I've thought of that :/ But it doesnt work, becuase i have a cinematic in the start.

Doesnt any1 know how to do "Timer Expires"!?!?! Is it impossible?
 
Level 20
Joined
Jan 6, 2008
Messages
2,627
Actions
Set *TimerWindow* = (Last Created Timer Window)
Set *Timer* = (Last started timer)
Countdown Timer - Create a timer window for (Last started timer) with the title |cff32cd32Next level in:|r
Countdown Timer - Start (Last started timer) as a repeting timer that will expire in 45.00 seconds.
Isnt it just to do the Set "Variables" first? Tell me if it works =)
 
Level 3
Joined
Jul 6, 2008
Messages
42
Your trigger never run because of the sequence nt correct...
Start timer action should before timer window action , then it will work.

  • Events
    • Time - Wait 1.00 second of game tiem
  • Actions
    • Countdown Timer - Start *Timer_Variable* as a repeting timer that will expire in 45.00 seconds.
    • Countdown Timer - Create a timer window for *Timer_Variable* with the title |cff32cd32Next level in:|r
    • Set *TimerWindow* = (Last Created Timer Window)
and
  • Set *Timer_Varible* = (Last Started Timer)
is unnecessary.
 
Level 10
Joined
Jul 31, 2008
Messages
477
Your trigger never run because of the sequence nt correct...
Start timer action should before timer window action , then it will work.

  • Events
    • Time - Wait 1.00 second of game tiem
  • Actions
    • Countdown Timer - Start *Timer_Variable* as a repeting timer that will expire in 45.00 seconds.
    • Countdown Timer - Create a timer window for *Timer_Variable* with the title |cff32cd32Next level in:|r
    • Set *TimerWindow* = (Last Created Timer Window)
and
  • Set *Timer_Varible* = (Last Started Timer)
is unnecessary.

No i need the *Timer* because the "Timer Window" is invalid variable type. The only valid variable type is the "Timer variable" not the "Timer Window variable". I can't use the Timer Window variable can't be used in the "Timer exspires" event. So no, the Time variable is really necessary.
 
Level 10
Joined
Jul 31, 2008
Messages
477
How would that interfere with it? The trigger should run anyway..

Yes, but it will make it bad. When the timer exspires, its supose to give you gold.

  • Countdown Timer - Start *Timer_Variable* as a repeting timer that will expire in 45.00 seconds.
Already will set the timer into Timer Variable.

ah ok, will test it.

EDIT: Ty fatty it works! + rep
 
Status
Not open for further replies.
Top