• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Spell] How can i Revive my hero with 25% hit points

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
Ok...

If the Repick mode is created later you just disable and destroy the trigger when the repick time is disabled. During the available time for repick, the trigger can be there. As long as you make it impossible to have 2 units of this same unit type, there's no problem.

I repeat it over and over because, if a second unit of this type enters the map, it will overwrite the first one, and the triggers will just work for the second one. But, if you enable repick later, the first one will disappear before a second one becames able to appear, in that case, there's no problem. I'll rework the trigger to make it work for a single unit.

  • Reincarnation Set
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Tauren Chieftain
    • Actions
      • Set ReincarnationUnit = (Triggering unit)
      • Set Cooldown = 0
      • Trigger - Turn on Reincarnation Loop <gen>
  • Reincarnation Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Custom script: set udg_HeroHP = GetUnitState(udg_ReincarnationUnit, UNIT_STATE_LIFE)
      • Custom script: if udg_HeroHP == 0.00 and udg_Cooldown == 0 then
      • Set Cooldown = 60
      • Custom script: endif
      • Custom script: if udg_Cooldown > 0 then
      • Set Cooldown = (Cooldown - 1)
      • Game - Display to (All players) the text: (Cooldown: + (String(Cooldown)))
      • Custom script: else
      • Skip remaining actions
      • Custom script: endif
      • Custom script: if udg_Cooldown == 58 then
      • Unit - Set life of ReincarnationUnit to 25.00%
      • Game - Display to (All players) the text: Life set to 25%
      • Custom script: endif
It's not hard to see this is simple if you compare it with the last one :p

As said before, adjust the "Custom script: if udg_Cooldown == 58 then" to match with your Reincarnation settings. You can also set your Cooldown to whatever you want, even based on the ability level (applying the logic between numbers)
 
ooohh for me?? thanks a lot thanks for the try but this way will bring a leak that i really don't want which is double gold bounty which is something that i have discust in the other pages :D btw +rep to you for trying to help me!!


For the try...? It works exactly as reincarnation would.
The leak I will look for a method to fix it, but it is only one point leak per cast/event triggered which isn't much unless you plan on having a five hour long map or 100 units dieing per second. What about double gold bounty? Oh, I think I get what you mean... You use the basic wc3 bounty system? If you would like I can replace that for you with a custom bounty system using the point value of units which would work better and easier I assume then basic bounty system Wc3 offers.
 
Level 7
Joined
Nov 13, 2011
Messages
127
For the try...? It works exactly as reincarnation would.
The leak I will look for a method to fix it, but it is only one point leak per cast/event triggered which isn't much unless you plan on having a five hour long map or 100 units dieing per second. What about double gold bounty? Oh, I think I get what you mean... You use the basic wc3 bounty system? If you would like I can replace that for you with a custom bounty system using the point value of units which would work better and easier I assume then basic bounty system Wc3 offers.

i think that you think that i am using the "stats - Gold Bounty Awarded - basic" from the object editor
well no i am not using that i am using this"
  • Hero Bounty
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Player - Add 350 to (Owner of (Killing unit)) Current gold
 
Level 7
Joined
Nov 13, 2011
Messages
127
Oh, then it is even easier! what is the problem then? I was already working on that bounty system for you... lol

well the problem with your trigger is that
  • Hero - Instantly revive (Triggering unit) at (Position of (Triggering unit)), Show revival graphics
if he dies he gives normaly the bounty + when he will revive and dies again at that point he will give again the bounty :/
 
i think that you think that i am using the "stats - Gold Bounty Awarded - basic" from the object editor
well no i am not using that i am using this"
  • Hero Bounty
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Triggering unit) is in group) Not equal to True
    • Actions
      • Player - Add 350 to (Owner of (Killing unit)) Current gold

There you go, just change dying unit to that and add that other line and it will be perfect :thumbs_up:
 
Status
Not open for further replies.
Top