HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hero Death!

09-09-2003, 02:04 AM#1
Crimsongg137
how do i create when a hero dies the hero will have to wait a certain amount of time until it comes back. if that player keeps dien the amount becomes longer.. and it loses so xp
09-09-2003, 03:01 AM#2
Crimsongg137
ahh crap
09-09-2003, 12:39 PM#3
kl33r
Trigger 1- to detect the dead hero and start the timer

Events
Unit - A unit owned by Player 1 (Red) Dies

Conditions
((Triggering unit) is A Hero) Equal to True

Actions
Countdown Timer - Start timerREVIVE[0] as a One-shot timer that will expire in 90.00 seconds
Countdown Timer - Create a timer window for (Last started timer) with title ((Name of (Triggering player)) + revival time...)
Set TimerWindowREV[0] = (Last created timer window)
Game - Display to (Triggering player), at offset (0.00, 0.00) for 30.00 seconds the text: You have been kille...

Trigger 2- to revive the dead hero

Events
Time - timerREVIVE[0] expires

Conditions

Actions
Countdown Timer - Destroy TimerWindowREV[0]
Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Hero - Instantly revive (Picked unit) at (Center of CreateHeroHere <gen>), Show revival graphics)
Camera - Pan camera for Player 1 (Red) to (Center of CreateHeroHere <gen>) over 0.50 seconds

You can add the trigger, Hero - Add experience points and set its value to a negative one (-) so it removes instead of adds

Dunno bout making the timer longer with every death tho..
09-09-2003, 08:12 PM#4
Crimsongg137
is there any variables i need
09-09-2003, 08:54 PM#5
bludragn
You can do it without custom variables, like this:

Code:
-Actions-
..Unit - a unit dies

-Conditions-
..Dying unit is a hero Equal to true

-Actions-
..If-dying unit custom value Equal to 0
..Then-wait 60 seconds; revive dying unit instantly; add -150 xp for dying unit
..Else-do nothing
---------------------
..If-dying unit custom value Equal to 1
..Then-wait 120 seconds; revive dying unit instantly; add -300 xp for dying unit
..Else-do nothing
---------------------
..If-dying unit custom value Equal to 2
..Then-wait 180 seconds; revive dying unit instantly; add -450 xp for dying unit
..Else-do nothing
---------------------
Set Unit - Set Custom Value of dying unit to dying unit's custom value + 1
It shouldn't be too hard to find those functions in the trigger editor. I know they are there, but I didn't write this looking at it.
09-09-2003, 10:17 PM#6
Crimsongg137
wow im not sure if ur wrote that write cuz i cant find some ****
09-09-2003, 10:19 PM#7
Crimsongg137
**** u just told me how to do it u didnt give me it ok i c. this is gonan take me awhile but ill get it
09-09-2003, 10:22 PM#8
Crimsongg137
um if u no how to do that plz tell me cuz i give up
09-09-2003, 11:17 PM#9
bludragn
I created a Hero Death trigger that works with all players and an infinite number of deaths. I used a Real value as the death variable for more customization. The trigger comment how it works.

The download is a WTG file; goto the trigger editor to import it into a map. Use a new map because importing overwrites all triggers, then you can CnP the trigger into a map.
09-10-2003, 12:18 AM#10
Crimsongg137
where did u get that
09-10-2003, 12:22 AM#11
Crimsongg137
lol opps is their a **** where i can dl stuff like that
09-10-2003, 12:54 AM#12
bludragn
I made that trigger. The trigger repository is a sub-forum to this forum and you might find some things like this in there. Also edit your posts instead of posting again.