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

Reviving

Status
Not open for further replies.
Level 3
Joined
Oct 6, 2005
Messages
34
ok in triggers i order this, my hero gets revived but not under my control it appears like an enemy, plz help.
Events:
Unit - A unit owned by Player 1 (Red) Dies
Conditions:
((Dying unit) is A Hero) Equal to True
Actions:
Set ReviveSeconds = ((Real((Level of (Dying unit)))) + 120.00)
-
Countdown Timer - Create a timer window for ReviveTimer with title ((Name of Player 1 (Red)) + Revive time:)
-
Set ReviveTimerWindow = (Last created timer window)
-
Countdown Timer - Start ReviveTimer as a One-shot timer that will expire in ReviveSeconds seconds
-
Countdown Timer - Show ReviveTimerWindow
-
Wait ReviveSeconds seconds
-
Countdown Timer - Destroy ReviveTimerWindow
-
Hero - Instantly revive (Dying unit) at (Random point in Revive <gen>), Show revival graphics
-
Camera - Pan camera for Player 1 (Red) to (Center of Revive <gen>) over 0.00 seconds
 
Level 7
Joined
Mar 12, 2006
Messages
407
Set ReviveSeconds = ((Real((Level of (Dying unit)))) + 120.00)


Responding to dying unit after 120 seconds is no good idea...
set the hero to a unit variable array when player selects his hero

set hero[player index] = Hero of player with index


and then use your trigger to revive hero[index]
If you have a trigger which changes ownership of units you should fix it not to change on heroes or you run a trigger which changes ownership of hero[index] to his original owner using "convert player index to player" function


If you didnt understand all feel free to pm me ;)
 
Level 3
Joined
Oct 6, 2005
Messages
34
ok first of all i didnt ignore u i was offline for long time (working in WE)
and second i searched all site for those models and i didnt find them so i placed models from SC here.
----
and about this reviving i fixed problem, its working fine.
 
Status
Not open for further replies.
Top