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

Easy one {reviving a hero with full mana}

Status
Not open for further replies.
Level 10
Joined
Aug 15, 2008
Messages
720
Event
Unit - A unit dies (Generic)
Conditions
((Triggering unit) is A Hero Equal to (==) True (Boolean)
Action
Hero - Instantly revive (Triggering unit) at (Center of (<your region>)), Show revival graphics (Or hide, whatever you want =P)
 
Level 14
Joined
Nov 4, 2006
Messages
1,241
yes, that is the problem, maybe you should store him in a variabel when he dies, then add the mana to the variable hero, and set the variable to nothing after that

  • reviving
  • Events
    • Unit - A unit dies (Generic)
  • Conditions
    • ((Triggering unit) is A Hero
  • Actions
    • set deadhero = triggering unit
    • Hero - Instantly revive (Triggering unit) at (Center of (region)), Show revival graphics
    • Unit - set mana of deadhero to 100%
    • set deadhero = No Unit
 
Level 25
Joined
Mar 23, 2008
Messages
1,813
Do i need a variable for each player then or can i use the same in every "trigger"? I think its best if i show my trigger..
Its eight players, can i use the same variable on each one or do i need to make one for each player?
  • HeroRess
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) is A Hero) Equal to True
          • (Owner of (Dying unit)) Equal to Player 2 (Blue)
        • Then - Actions
          • Game - Display to (All players) the text: ((Name of (Owner of (Dying unit))) + has been killed and will be revived in 25 seconds.)
          • Set Player1Ress = 25
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to (String(Player1Ress))
          • Trigger - Turn on RessTime1 <gen>
          • Wait 25.00 seconds
          • Hero - Instantly revive (Dying unit) at (Center of Spawnkillspawn <gen>), Show revival graphics
          • Camera - Pan camera for (Owner of (Dying unit)) to (Center of Spawnkillspawn <gen>) over 0.00 seconds
          • Unit - Set mana of (Reviving Hero) to 100000000.00
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) is A Hero) Equal to True
          • (Owner of (Dying unit)) Equal to Player 3 (Teal)
        • Then - Actions
          • Game - Display to (All players) the text: ((Name of (Owner of (Dying unit))) + has been killed and will be revived in 25 seconds.)
          • Set Player2Ress = 25
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row 2 to (String(Player2Ress))
          • Trigger - Turn on RessTime2 <gen>
          • Wait 25.00 seconds
          • Hero - Instantly revive (Dying unit) at (Center of Spawnkillspawn <gen>), Show revival graphics
          • Camera - Pan camera for (Owner of (Dying unit)) to (Center of Spawnkillspawn <gen>) over 0.00 seconds
          • Unit - Set mana of (Reviving Hero) to 100000000.00
        • Else - Actions
          • Do nothing
And so on.
 
Level 11
Joined
Feb 14, 2009
Messages
884
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Triggering unit) Equal to A Hero
  • Actions
    • Set RevHero = (Triggering unit)
  • Actions
    • Hero - Instantly revive RevHero at <your location>, Show revival graphics
    • Unit - Set mana of RevHero to 100.00%
Not a fully functional trigger, but I hope it helps...
 
Level 14
Joined
Nov 4, 2006
Messages
1,241
i think you can use the same variable for every trigger, as long as you put the " set deadhero = triggering unit" action after your wait action

  • c
    • Then - Actions
    • Game - Display to (All players) the text: ((Name of (Owner of (Dying unit))) + has been killed and will be revived in 25 seconds.)
    • Set Player2Ress = 25
    • Multiboard - Set the text for (Last created multiboard) item in column 3, row 2 to (String(Player2Ress))
    • Trigger - Turn on RessTime2 <gen>
    • Wait 25.00 seconds
    • set deadhero = triggering Unit
    • Hero - Instantly revive (Dying unit) at (Center of Spawnkillspawn <gen>), Show revival graphics
    • Camera - Pan camera for (Owner of (Dying unit)) to (Center of Spawnkillspawn <gen>) over 0.00 seconds
    • Unit - Set mana of (deadhero) to 100%
    • set deadhero = No Unit
 
Level 11
Joined
Feb 14, 2009
Messages
884
Yeah, but I was writing the trigger when this

fagge said:
Eh, Azeroc no offense but that didnt answer a thing :/

Wand mirror that doesnt work, tried it and tried set the mana value to 999999 also.
Maybe i should post my whole trigger as it look like? I think the problem is that i use "set mana of reviving hero".

was your last post...
 
Status
Not open for further replies.
Top