Warcraft III resources & community, 2003–2006 · archived

Hero reviving trigger

23 posts
#1

Hero reviving trigger

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
#2
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!
#3
OK, I didnt get one single bit of help from that :P

can anyone here explain me a little better??

~Araknid
#4
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.
#5
(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
#6
lorothrigsThis 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
#7
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
#8
Araknid(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!!
#9
(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 :(
#10
..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!
#11
multiboard? more timers?? how??


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

~Araknid
#12
I'll write you a trigger when i get back home if no one else helps you! (Damn it's hot in this room. Can't concentrate [/code]
#13
thanks :D

I can finally continue on my map then
#14
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.
#15
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