• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Spell] How to Stop Ankh of Reincarnation

Level 15
Joined
Sep 11, 2013
Messages
562
Greetings!

In my map, if the Main Peasant dies, everything that belong to that player dies (including the hero and other units that can carry the Ankh of reincarnation) and the game will end.

So, I have 2 scenarios.
1. If the Main Peasant dies and my Hero together with other units has Ankh, I want that Ankh to be removed from everyone because my main Peasant will be dead.
I don't know if this trigger is good, but seems to work.
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Dying unit)) Equal to Peasant
  • Actions
    • Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)).) and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Or - Any (Conditions) are true
              • Conditions
                • (Unit-type of (Picked unit)) Equal to Malfurion(Hero with Ankh)
                • (Unit-type of (Picked unit)) Equal to Styk Clone(Units with Ankh)
          • Then - Actions
            • Item - Remove (Item carried by (Picked unit) of type Ankh of Reincarnation)
          • Else - Actions
        • Unit - Cause (Killing unit) to damage (Picked unit), dealing 1000000000.00 damage of attack type Chaos and damage type Normal

I don't know how to solve the second scenario..
2.If my Hero/units dies with Ankh and will be reincarnated in 7 seconds, but after 3 seconds my Main Peasant will die, how can I stop the Hero/units with the Ankh from reincarnating right after my Main Peasant dies?

The help will be appreciated! :peasant-bowing:

Edit:
Thanks for answers!
It seems way too complicated and I will give up to this Ankh item..
 
Last edited:
Couldn't you just detect if a hero has been reincarnated and then kill it? Something like this (didn't test):
  • Kill Revived Hero
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Item Reincarnation
          • ((Units owned by (Owner of (Casting unit)) matching (((Unit-type of (Matching unit)) Equal to Peasant) and (((Matching unit) is alive) Equal to True)).) is empty) Equal to True
    • Actions
      • Unit - Kill (Casting unit)
 
Back
Top