• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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