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

Status
Not open for further replies.
Level 4
Joined
Jan 14, 2006
Messages
67
i need help with creating a revival trigger for two teams, and seperated revival locations like in the most Multiplayer team1 vs team2 games.

I want a revival system that includes:

-Timer
-Name of reviving unit (hero)
-2 seperated reviving locations

Thank you soo mutch :!:
 
Level 4
Joined
Jul 3, 2006
Messages
61
Code:
Player 1
    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)))) + 10.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 (Center of RevivePlace <gen>), Show revival graphics
        Camera - Pan camera for Player 1 (Red) to (Center of RevivePlace <gen>) over 0.00 seconds

ReviveSeconds = Real Variable (init = 0)
ReviveTimer = Timer (init = new timer def)
ReviveTimerWindow = Timer Window

Reviveplace = region = choose the place of reviving.

Change Wait ReviveSeconds to whatever u prefer.

Copy this for every player and create new variables or use arrays[0].

There are still easyer ways I guess but I'll just post this one. :roll:
 
Status
Not open for further replies.
Top