short hero-respawn question

Advena

Just casually observing atm ;)
Reaction score
42
Yo.
Have a look:

Code:
Respawn Timer Start
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is in All_User_Heroes) Equal to True
    Actions
        Countdown Timer - Start Respawn_Timer as a One-shot timer that will expire in (((Real((Level of (Dying unit)))) + 2.00) x 3.00) seconds
        Countdown Timer - Create a timer window for Respawn_Timer with title Respawn in
        Set Respawn_TimeWindow = (Last created timer window)
        Countdown Timer - Show Respawn_TimeWindow for (Owner of (Dying unit))
[COLOR="LightBlue"]_[/COLOR]
Code:
Respawn Timer End
    Events
        Time - Respawn_Timer expires
    Conditions
    Actions
        Wait 2.00 seconds
        Countdown Timer - Destroy Respawn_TimeWindow
        Countdown Timer - Hide Respawn_TimeWindow for (Owner of (Dying unit))
        (and then I respawn the hero. I haven't made the actions for that yet


As you see I haven't bothered to make a separate timer for every player.
The question is:
If another hero die before the first is respawned, the timer for the first one should be kinda messed up, right? :p

~~
 

AoW_Hun7312

I'm a magic man, I've got magic hands.
Reaction score
76
I don't think so, as it's different timers (shown for a different player)
 

Advena

Just casually observing atm ;)
Reaction score
42
So it's a diffrent timer just because I show it to diffrent players?
That'd be what I was hoping for, but to be honest I don't think it works like that :eek:
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
It will get messed up.
It's not a local timer.
You're using a global variable.
Which means that only unique timer will show at a time.
Unless you make more variables.
 

Advena

Just casually observing atm ;)
Reaction score
42
Lazy as I am (atm that is :p) I was hoping to not have to make so many diffrent variables, but I'll do that.
Ty for posting guys :)

+rep to both
rep is earned but first it must be given
:D
 

hell_knight

Playing WoW
Reaction score
126
To fix this problem, Use arrayed vairables. So example Timer[Player number of dying unit] something on the lines of that. Needs to be MPI to not get messed up MUI isn't neccsary unless more than one hero.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top