Warcraft III resources & community, 2003–2006 · archived

Hero reviving trigger

23 posts
#16
For normal hero level:

heh
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Countdown Timer - Start Death_timer[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in ((Real((Hero level of (Dying unit))))) seconds
        Countdown Timer - Create a timer window for Death_timer[(Player number of (Owner of (Dying unit)))] with title Time till Revival:
        Set Death_timer_window[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
        Wait (Real((Hero level of (Dying unit)))) seconds
        Countdown Timer - Destroy Death_timer_window[(Player number of (Owner of (Dying unit)))]
        Hero - Instantly revive Hero_to_be_revived[(Player number of (Owner of (Dying unit)))] at (Center of (Playable map area)), Show revival graphics


For hero levelx3:

heh
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Countdown Timer - Start Death_timer[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in ((Real((Hero level of (Dying unit)))) x 3.00) seconds
        Countdown Timer - Create a timer window for Death_timer[(Player number of (Owner of (Dying unit)))] with title Time till Revival:
        Set Death_timer_window[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
        Wait ((Real((Hero level of (Dying unit)))) x 3.00) seconds
        Countdown Timer - Destroy Death_timer_window[(Player number of (Owner of (Dying unit)))]
        Hero - Instantly revive Hero_to_be_revived[(Player number of (Owner of (Dying unit)))] at (Center of (Playable map area)), Show revival graphics


Im pretty sure thsi will work just post if not :)
#17
OK, Im trying to make the trigger. but I cant find out where the trigger " Hero - Instantly revive Hero_to_be_revived[(Player number of (Owner of (Dying unit)))] at (Center of (Playable map area)), Show revival graphics "


is made :(

is it a variable? what type??


~Araknid
#18
AraknidOK, Im trying to make the trigger. but I cant find out where the trigger " Hero - Instantly revive Hero_to_be_revived[(Player number of (Owner of (Dying unit)))] at (Center of (Playable map area)), Show revival graphics "


is made :(

is it a variable? what type??


~Araknid

to revive instantly it is under "hero-"
the "hero_to_be_revived" is a "Unit" type of variable
o and i forgot to do "Set Variable- hero_to_be_revived = Dying Unit
#19
ok, I have all that now, but the "Real" variable is, the variable that makes it so that the time to wait between death and revive, is made?



please tell me EXACTY what kind of variable the "Real" variable is.

arrays,name,type, etc

I currently have this:

Events
Unit - A unit Dies
Conditions
((Dying unit) is A Hero) Equal to True
Actions
Set hero_to_be_revived = (Dying unit)
Countdown Timer - Start Revive_hero_timer[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in Real[((Hero level of hero_to_be_revived) x 1)] seconds
Countdown Timer - Create a timer window for Revive_hero_timer[(Player number of (Owner of (Dying unit)))] with title Time left for reviv...
Set Revive_hero_timer_Copy[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
Wait Real[((Hero level of hero_to_be_revived) x 1)] seconds
Countdown Timer - Destroy (Last created timer window)
Hero - Instantly revive hero_to_be_revived at (Center of KINGGROUND <gen>), Show revival graphics



(Real is a "real" type variable, 1 array, initial value 0)

~Araknid
#20
Real is NOT a variable u do this

Its Wait->> Conversion >> Convert Integer to Real >> Hero Level of Dying Unit 


and if u do "Destroy Last Created Timer Window" it will mess up, after u create the timer window do,

"Set Death_timer_window[(Player number of (Owner of (Dying unit)))] = (Last created timer window) "
#21
thanks =D=D=D=D


it works PERFECTLY now :D:D:D:D:D:D:D:D:D:D:D
#22
no problem, glad i cud help
#23
Im working on a map where I want to show a Timerwindow when a player owned hero dies, but only for that player. As it is now the timer window is shown to all players. I could problably use Array Variables in some placed but im not sure where they work and wont work. My trigger looks like this:

event
 Unit - A Unit Owned by Player x (color) dies
condition
 (triggering unit) equal to PlayerXHero
action
 Set PlayerXRezTime = ((Real(Level of PlayerXHero) x 5.00)
 Countdown timer - Start PlayerXTimer as a one-shot timer that will expire in PlayerXRezTime
 Countdown timer - Create a Time Window for PlayerXTimer with title Resurection
 Countdown timer - Show PlayerXTimer for PlayerX (color)
 Set PlayerXTimerwindow = (Last created time window)
 Wait PlayerXReztime seconds
 Countdown Timer - Destory PlayerXTimerwindow