• 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.

Trigger help !

Status
Not open for further replies.
Level 8
Joined
Oct 3, 2004
Messages
101
ok so i want to do something - when a hero dies, i want it to revive after 5 SECONDS X THE HERO WHO DIES's LEVEL

if the hero who dies is level 6
so it will be 5 x 6 until his revival

which triggers do i need to put?
thanks
btw i already tried to do a "WAIT" trigger BEFORE the instantly revive hero trigger command and i managed to do 5 X <number>, but i couldnt turn the <number> into "Hero Level of Triggering Unit" or something similar. which trigger exactly do i need to put?
 
Level 8
Joined
Oct 3, 2004
Messages
101
ok i did it
do you think this will work?
didnt test it yet
i set a variable of HeroLevel to Integer (Integer) 0 (Default)

Revive Hero Sentinel
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
((Triggering unit) belongs to an ally of Player 1 (Red)) Equal to True
Actions
Set HeroLevel = (Hero level of (Dying unit))
Wait (5.00 x (Real(HeroLevel))) seconds
Hero - Instantly revive (Dying unit) at (Random point in Sentinel Hero Revival <gen>), Show revival graphics
Camera - Pan camera for (Owner of (Dying unit)) to (Center of Sentinel Hero Move <gen>) over 1.00 seconds

do you think that will work?
 
Level 4
Joined
Oct 1, 2004
Messages
98
I've never tried to use a trigger in that sequence (in fact i've never really needed too....) but from just a glance it looks like a hero being revived will be canceled out by another one that has just died. I might suggest using individual triggers for each player. That should work. But as i said earlier i have never needed to use this trigger. try it out.
______________________________________________________
" The shwartz is within u Lonestar it's within u!" Yogurt
 
Level 9
Joined
Sep 8, 2004
Messages
633
it'll work for more heroes, all you'd have to change is the variable herolevel, it needs an array the size of the number of heroes in the map, and for each hero that dies, it must use the right integer.
If every player has only one hero, then the simplest way is:

Set HeroLevel (player number of owner of triggerin player) = (Hero level of (Dying unit))
 
Level 7
Joined
Mar 26, 2004
Messages
350
why do u use this "hero level" integer var. at all?

just use: wait (5 * ((Real)hero level of (dying unit)))

edit: @ angelusz: but this only works if each player hasn't more than 1 hero :p
 
Level 9
Joined
Sep 8, 2004
Messages
633
RaZoR said:
why do u use this "hero level" integer var. at all?

just use: wait (5 * ((Real)hero level of (dying unit)))

edit: @ angelusz: but this only works if each player hasn't more than 1 hero :p

If you would've read what i wrote there, you would have known that i wrote:
"if every player has only one hero"
just read it.
So, buzz off.
 
Status
Not open for further replies.
Top