timer?

X-maul

AKA: Demtrod
Reaction score
201
how do i create a timer if a hero die that will ekspire in 30 seconds??...
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Events
Unit - A unit dies

Conditions
Dying unit is a Hero Equal to True

Actions
Start ReviveTimer as a one-shot timer that will expire in 30 seconds.

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

ReviveTimer is a Timer variable.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
Code:
timer1
    Events
        Unit - A unit Dies
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Countdown Timer - Start timer as a One-shot timer that will expire in 30.00 seconds
        Countdown Timer - Create a timer window for (Last started timer) with title Revive in
        Countdown Timer - Show (Last created timer window)
        Set hero = (Triggering unit)
Code:
timer2
    Events
        Time - timer expires
    Conditions
    Actions
        Hero - Instantly revive hero at (Center of (Playable map area)), Show revival graphics

It uses 2 variables, hero is an unit variable and timer is a timer variable.
 

X-maul

AKA: Demtrod
Reaction score
201
thx - but theres a proplem with it - when the timer ekspires there's just an timerwindow with 0 seconds:confused: how i get it removed?
 

X-maul

AKA: Demtrod
Reaction score
201
the timer variable is an "timer (timer)" or an "timer window (timerdialog)"?
 

X-maul

AKA: Demtrod
Reaction score
201
it doesnt works they still doesnt get destroyed - here is the trigger so you can see if there's something wrong -

Code:
    Events
        Unit - A unit owned by Player 3 (Teal) Dies
        Unit - A unit owned by Player 4 (Purple) Dies
        Unit - A unit owned by Player 5 (Yellow) Dies
        Unit - A unit owned by Player 6 (Orange) Dies
        Unit - A unit owned by Player 7 (Green) Dies
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Countdown Timer - Start (Create a periodic One-shot timer lasting 30.00) as a One-shot timer that will expire in 30.00 seconds
        Countdown Timer - Create a timer window for (Last started timer) with title (Name of (Triggering player))
        Countdown Timer - Show (Last created timer window)
        Set hero = (Triggering unit)
        Game - Display to (All players) the text: -------------------...
        Wait 30.00 seconds
        Countdown Timer - Destroy timer
        Camera - Pan camera for (Owner of (Dying unit)) to (Center of Rect 010 <gen>) over 0.00 seconds
        Special Effect - Create a special effect at (Center of Rect 010 <gen>) using Abilities\Spells\Other\Awaken\Awaken.mdl
        Hero - Instantly revive (Dying unit) at (Center of Rect 010 <gen>), Show revival graphics
        Special Effect - Create a special effect at (Center of Rect 010 <gen>) using Abilities\Spells\Demon\ReviveDemon\ReviveDemon.mdl
 

X-maul

AKA: Demtrod
Reaction score
201
the marked one
Code:
    Events
        Unit - A unit owned by Player 3 (Teal) Dies
        Unit - A unit owned by Player 4 (Purple) Dies
        Unit - A unit owned by Player 5 (Yellow) Dies
        Unit - A unit owned by Player 6 (Orange) Dies
        Unit - A unit owned by Player 7 (Green) Dies
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Countdown Timer - Start (Create a periodic One-shot timer lasting 30.00) as a One-shot timer that will expire in 30.00 seconds
        Countdown Timer - Create a timer window for (Last started timer) with title (Name of (Triggering player))
        Countdown Timer - Show (Last created timer window)
        Set hero = (Triggering unit)
        Game - Display to (All players) the text: -------------------...
        Wait 30.00 seconds
        Countdown Timer - Destroy [B][FONT="Arial Black"]timer[/FONT][/B]
        Camera - Pan camera for (Owner of (Dying unit)) to (Center of Rect 010 <gen>) over 0.00 seconds
        Special Effect - Create a special effect at (Center of Rect 010 <gen>) using Abilities\Spells\Other\Awaken\Awaken.mdl
        Hero - Instantly revive (Dying unit) at (Center of Rect 010 <gen>), Show revival graphics
        Special Effect - Create a special effect at (Center of Rect 010 <gen>) using Abilities\Spells\Demon\ReviveDemon\ReviveDemon.mdl
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
the marked one
Code:
    Events
        Unit - A unit owned by Player 3 (Teal) Dies
        Unit - A unit owned by Player 4 (Purple) Dies
        Unit - A unit owned by Player 5 (Yellow) Dies
        Unit - A unit owned by Player 6 (Orange) Dies
        Unit - A unit owned by Player 7 (Green) Dies
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Countdown Timer - Start timer as a One-shot timer that will expire in 30.00 seconds
        Countdown Timer - Create a timer window for (Last started timer) with title (Name of (Triggering player))
        [U]Set Timer window = (last created timer window)[/U]
        Countdown Timer - Show (Last created timer window)
        Set hero = (Triggering unit)
        Game - Display to (All players) the text: -------------------...
        Wait 30.00 seconds
        Countdown Timer - Destroy [B][FONT="Arial Black"]timer[/FONT][/B]
        Camera - Pan camera for (Owner of (Dying unit)) to (Center of Rect 010 <gen>) over 0.00 seconds
        Special Effect - Create a special effect at (Center of Rect 010 <gen>) using Abilities\Spells\Other\Awaken\Awaken.mdl
        Hero - Instantly revive [B][FONT="Arial Black"]hero[/FONT][/B] at (Center of Rect 010 <gen>), Show revival graphics
        Special Effect - Create a special effect at (Center of Rect 010 <gen>) using Abilities\Spells\Demon\ReviveDemon\ReviveDemon.mdl


I've changed it now, it should work. Bold parts is where I've changed something, so change it so it looks like the bold part instead.
Underlined is where I've added something, so just add it too.
 

Sinan2

New Member
Reaction score
9
You didn't declare the timer; you got to split the trigger into two(waits are never accurate). First, create a timer that goes as far as before the wait. Set the Dying Unit into a Unit Array variable, and then create another trigger. Also make the timer and the window arrays to make it MPI, and add the events Timer[1],Timer[2]... expires. Add the actions 1 to number of players Integer A,
If Time Remaining In Timer[Integer A] equal to 0, then do the actions you want.
 

X-maul

AKA: Demtrod
Reaction score
201
Code:
Set Timer window = (last created timer window)

the Timer Window is the variable?

hehe i really dont get it :p hehe
 

X-maul

AKA: Demtrod
Reaction score
201
but when 2 heroes dies 1 in 10 seconds and 1 in 20 seconds when number 1's timer has expired number 2's timer will be destroyed and number 1's timer will stand still at 0 seconds

:eek::confused:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top