• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Hero reviving trigger

Status
Not open for further replies.
Level 2
Joined
Feb 7, 2005
Messages
17
hi,

I have a little problem... I want to make it so that:

when hero dies (of player 1, 2, 3 or 4)
he respawns in (hero level x1.2) secs
at (region)

and there's a timer that shows when the hero respawns (visible to everyone)

I have tried to make it, but it only comes up with a timer :S

please, someone help me!

~Araknid
 
Level 8
Joined
Jul 3, 2004
Messages
404
you need 2 triggers!
one trigger that starts when the hero dies (The timer)
And when the "timer" expires. It runs the "revive hero" trigger

And i think you need to add the dying hero to a variable...DARN!
Why do i always help ppls when i'm not home with my WE!
 
Level 2
Joined
Feb 7, 2005
Messages
17
OK, I didnt get one single bit of help from that :p

can anyone here explain me a little better??

~Araknid
 
Level 2
Joined
Jan 30, 2005
Messages
12
Right click on the top of your trigger (where the name is, but not on the left list) and click "Copy as Text" then paste it in a post and then we can see what you're doing and how to help you.
 
Level 2
Joined
Feb 7, 2005
Messages
17
(TRIGGER TO TURN ON THE REVIVING TRIGGER)


Events
Unit - A unit owned by Player 1 (Red) Becomes revivable
Unit - A unit owned by Player 2 (Blue) Becomes revivable
Unit - A unit owned by Player 3 (Teal) Becomes revivable
Unit - A unit owned by Player 4 (Purple) Becomes revivable

Conditions

Actions
Countdown Timer - Create a timer window for Herotimer with title Hero revives in:
Countdown Timer - Start Herotimer as a One-shot timer that will expire in 20.00 seconds
Wait 20.00 seconds
Trigger - Turn on reviveem <gen>




(REVIVEEM TRIGGER(THE ONE THAT REVIVES EM))
Events
Conditions
Actions
Hero - Instantly revive (Revivable Hero) at (Center of herospawn <gen>), Show revival graphics
 
Level 10
Joined
Aug 2, 2004
Messages
703
lorothrigs said:
This should work

Timer window
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 (Name of (Owner of (Dying unit)))
Wait (Real((Hero level of (Dying unit)))) seconds
Countdown Timer - Destroy Death_window[(Player number of (Owner of (Dying unit)))]

Make sure that both variables have arrays of 12

Have fun icon_wink.gif icon_cool.gif
 
Level 2
Joined
Feb 7, 2005
Messages
17
so.. this is the trigger needed to let the timer window appear?

I cant find the part with the

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


(the (Real((Hero level of (Dying unit))) seconds part)


and the hero still doesn't revive :(



thanks anyway :)

~Araknid
 
Level 8
Joined
Jul 3, 2004
Messages
404
Araknid said:
(TRIGGER TO TURN ON THE REVIVING TRIGGER)


Events
Unit - A unit owned by Player 1 (Red) Becomes revivable
Unit - A unit owned by Player 2 (Blue) Becomes revivable
Unit - A unit owned by Player 3 (Teal) Becomes revivable
Unit - A unit owned by Player 4 (Purple) Becomes revivable

Conditions

Actions
Countdown Timer - Create a timer window for Herotimer with title Hero revives in:
Countdown Timer - Start Herotimer as a One-shot timer that will expire in 20.00 seconds
Wait 20.00 seconds
Trigger - Turn on reviveem <gen>




(REVIVEEM TRIGGER(THE ONE THAT REVIVES EM))
Events
Conditions
Actions
Hero - Instantly revive (Revivable Hero) at (Center of herospawn <gen>), Show revival graphics

Dont use "turn on trigger" when theres no Event!
Use "RUN" trigger!!
 
Level 2
Joined
Feb 7, 2005
Messages
17
(unit dies trigger)

Events
Unit - A unit Dies
Conditions
((Dying unit) is A Hero) Equal to True
Actions
Countdown Timer - Start Herotimer[(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 Herotimer[(Player number of (Owner of (Dying unit)))] with title (Name of (Owner of (Dying unit)))
Wait Real[(Hero level of (Dying unit))] seconds
Countdown Timer - Destroy deathtimer[(Player number of (Owner of (Dying unit)))]
Trigger - Run reviveem <gen> (ignoring conditions)



VARIABLES:
Real (real seconds variable)
Herotimer (timer)
Deathtimer (window)


(TRIGGER TO REVIVE)
Events
Conditions
Actions
Hero - Instantly revive (Revivable Hero) at (Center of herospawn <gen>), Show revival graphics


can anyone tell me if it is correct now? cause they're still not reviving :(
 
Level 8
Joined
Jul 3, 2004
Messages
404
..Why did i not see!
You can have the Hero - Instantly revive (Revivable Hero) at (Center of herospawn <gen>), Show revival graphics
trigger in the 1st trigger (unit dies trigger)


I don't see why you should have 2 triggers revive a hero that has died!

And here's one more thing!
When 2 heroes dies (The 2nd one 10sec afte the 1st one)
Then the timer will disappear when the 2nd hero has 10sec left on the timer.
The best way to do that is with a multiboard or one timer for each player!
 
Level 2
Joined
Feb 7, 2005
Messages
17
multiboard? more timers?? how??


I am not one of the best triggerers, only some of the basic stuff.. :p

~Araknid
 
Level 13
Joined
May 5, 2004
Messages
1,330
though Lonely Wolf is already writing the trigger, I'll only explain why that 2-trigger-thingie not worked.

(Revivable Hero). I guess this is a variable for the hero. Problem is you didn't link the dead hero to that variable in the first trigger. So if you add the action "Set (Revivable Hero) = (Dying Hero)", it should work. But though Lonely Wolf is doing the trigger anyway, lets wait for his result.
 
Level 2
Joined
Feb 7, 2005
Messages
17
ok, I got the triggers now :D

only one thing:

how do I make it so that:

time to wait for revive = hero level

(so if hero is level 999, you'd have to wait 999 seconds for him to revive)

I now have this:

Events
Unit - A unit Dies
Conditions
((Dying unit) is A Hero) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Dying unit)) Equal to Player 1 (Red)
Then - Actions
Countdown Timer - Start Revive_hero_timer[1] as a One-shot timer that will expire in Real[(Hero level of (Dying unit))] seconds
Countdown Timer - Create a timer window for Revive_hero_timer[1] with title ((Name of (Owner of (Dying unit))) + Hero revives in:)
Set Revive_hero_timer_Copy[1] = (Last created timer window)
Countdown Timer - Show Revive_hero_timer_Copy[1]
Wait Real[(Hero level of (Dying unit))] seconds
Hero - Instantly revive (Dying unit) at (Center of KINGGROUND <gen>), Show revival graphics
Countdown Timer - Destroy Revive_hero_timer_Copy[1]
Else - Actions



(Real = a "Real" type of variable. with size 12 array.)

can anyone complete this for me?? thanks!!!

~Araknid
 
Level 10
Joined
Aug 2, 2004
Messages
703
For normal hero level:

Code:
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:

Code:
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 :)
 
Level 2
Joined
Feb 7, 2005
Messages
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
 
Level 10
Joined
Aug 2, 2004
Messages
703
Araknid said:
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
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
 
Level 2
Joined
Feb 7, 2005
Messages
17
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
 
Level 10
Joined
Aug 2, 2004
Messages
703
Real is NOT a variable u do this

Code:
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) "
 
Level 2
Joined
Jan 2, 2006
Messages
10
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
 
Status
Not open for further replies.
Top