• 🏆 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!

How do I trigger my version of reincarnation?

Status
Not open for further replies.
Level 1
Joined
Aug 4, 2009
Messages
5
I would like to have a spell that works like reincarnation, but after being brought back, they are at 35% of maximum HP instead of 100% of maximum HP.

Apparently the spell "Reincarnation" is not a casted ability. I have tried to make event: "Ability is cast." The condition: "Ability cast is Self-Resuscitation (my spell)" and the event: set triggering (or casting) unit to 35% HP. It didn't work. :cry:

Any ideas to make this trigger work? Thanks so much!
 
Level 10
Joined
Sep 21, 2007
Messages
517
i cant open my WE currently, but u prob can change some value from 100% to 35%, other than that i suggest for u to make the spell be triggered by adding to the units hp when it reaches 0 (never tried it, but i hope that the actions in the trigger will be executed before the death events of exp etc take place) well, gl in the spell; il trz to come up with another solution. cus ithink there is a way to block the exp taken and stuff like that, or by identifying the damage going to be dealt and if enough hp is able to endure it, cus it isnt then a triggered revive would take place. Think jass needs to be used to get the damage tho, native GetUnitDamage i think
 
Level 1
Joined
Aug 4, 2009
Messages
5
I have a trigger I made to sort of make my own reincarnation. It didn't work. (I haven't done all the levels of it yet, so beside that) Any reasons why it doesn't work? (Of course better would be the JASS code or whatever to trigger reincarnation)


  • Untitled Trigger 021
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to Homey God
    • Actions
      • Set Anubis_003 = (Trained unit)
  • Untitled Trigger 016
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Self-Resuscitation
    • Actions
      • Set SelfResuscitation = ((Execution count of (This trigger)) + 1)
  • Untitled Trigger 020
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Life of Anubis_003) Less than or equal to 100.00
          • (Life of Anubis_003) Greater than or equal to 100.00
          • SelfResuscitation Equal to 2
    • Actions
      • Unit - Set life of Anubis_003 to 35.00%
      • Set Trigger_020 = (This trigger)
      • Countdown Timer - Start (Create a periodic One-shot timer lasting 400.00) as a One-shot timer that will expire in 400.00 seconds
      • Set Timer001 = (Last started timer)
      • Trigger - Turn on Trigger_023
      • Trigger - Turn off (This trigger)
  • Untitled Trigger 023
    • Events
      • Time - Timer001 expires
    • Conditions
    • Actions
      • Set Trigger_023 = (This trigger)
      • Trigger - Turn on Trigger_020
      • Trigger - Turn off (This trigger)
 
Level 7
Joined
Mar 8, 2009
Messages
360
  • (Life of Anubis_003) Less than or equal to 100.00
  • (Life of Anubis_003) Greater than or equal to 100.00
  • SelfResuscitation Equal to 2

this is only true when you have exact 100 life

EDIT:
when you start timer you must do: Start Timer001 as a ....
 
Level 11
Joined
May 11, 2008
Messages
830
Not sure but I'm taking a good guess.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to (Hero Name)
    • Actions
      • Wait 7.00 seconds (If you wish for that)
      • Hero - Instantly revive (Hero Name) at (Center of (Dying Unit)), Hide revival graphics
      • Unit - Set life of (Dying unit) to 30.00%
 
Level 10
Joined
Sep 21, 2007
Messages
517
i suggest you find out the damage that the enemy unit will deal (considering the armor of the enemy unit) by using JASS, i think there is a function for getting the damage called GetUnitDamage or something (ask some good jasser), then if your hp is lower than that damage "reincarnate" the hero. there are also damage detection systems in jass too, all in all, i suggest you dont do this xD
--- i really think there is way to find damage taken in gui tho, but may not work, so i gotta try it out xD
 
Status
Not open for further replies.
Top