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

How to detect reincarnated unit? (extreme question about reincarnation)

Status
Not open for further replies.
Level 17
Joined
Jun 2, 2009
Messages
1,183
Hello everyone. I have an item in my map like this "Teleports the hero to short distance. This ability not works for 3 seconds if hero getting damaged from enemy heroes"

I have copied item, renamed it as "disabled kelen's dagger of escape" and remove it's ability.
I have simply giving the hero to non-useable version of the dagger. This trigger works well without any issues but it cannot detect reincarnated unit. Is there a way to give real version of the dagger to the reincarnated unit without changing duration of the reincarnation?

  • Dagger Event
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Owner of GDD_DamageSource) Not equal to ClanDevilPlayer
          • (Owner of GDD_DamageSource) Not equal to ClanReaperPlayer
          • (Owner of GDD_DamageSource) Not equal to Neutral Hostile
          • (Owner of GDD_DamageSource) Not equal to Neutral Passive
          • (GDD_DamagedUnit is A Hero) Equal to True
          • (GDD_DamagedUnit is an illusion) Equal to False
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GDD_DamagedUnit has an item of type Kelen's Dagger of Escape) Equal to True
        • Then - Actions
          • Item - Remove (Item carried by GDD_DamagedUnit of type Kelen's Dagger of Escape)
          • Hero - Create Disabled Kelen's Dagger of Escape and give it to GDD_DamagedUnit
          • Countdown Timer - Pause Dagger[(Player number of (Owner of GDD_DamagedUnit))]
          • Countdown Timer - Start Dagger[(Player number of (Owner of GDD_DamagedUnit))] as a One-shot timer that will expire in 3.00 seconds
          • Set DaggerUnit[(Player number of (Owner of GDD_DamagedUnit))] = (Triggering unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (GDD_DamagedUnit has an item of type Disabled Kelen's Dagger of Escape) Equal to True
            • Then - Actions
              • Countdown Timer - Start Dagger[(Player number of (Owner of (Triggering unit)))] as a One-shot timer that will expire in 3.00 seconds
            • Else - Actions


  • Dagger Player2
    • Events
      • Time - Dagger[2] expires
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DaggerUnit[2] is in Oluler_ug) Equal to False
        • Then - Actions
          • Item - Remove (Item carried by DaggerUnit[2] of type Disabled Kelen's Dagger of Escape)
          • Hero - Create Kelen's Dagger of Escape and give it to DaggerUnit[2]
        • Else - Actions
          • Countdown Timer - Start Dagger[2] as a One-shot timer that will expire in 3.00 seconds
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,688
You don't need this:
  • And - All (Conditions) are true
All Conditions need to be true by default.

Edit: Removed a mistake.

And more importantly, here's a system for detecting reincarnation: GUI Unit Event v2.5.3.0

I believe the trick is to use the Defend ability + the "undefend" order. How it works is that Dying units will issue the "undefend" order if killed while having the Defend ability. This includes when being killed with Reincarnation ready. After detecting the order you would check to see if the unit is alive. If it is, then it's probably because it's in the Reincarnation process. I could be wrong though.

Also, make sure you don't copy multiple Unit Indexers into your map!
 
Last edited:
Level 17
Joined
Jun 2, 2009
Messages
1,183
You don't need this:
  • And - All (Conditions) are true
All Conditions need to be true by default.

Edit: Removed a mistake.

And more importantly, here's a system for detecting reincarnation: GUI Unit Event v2.5.3.0

I believe the trick is to use the Defend ability + the "undefend" order. How it works is that Dying units will issue the "undefend" order if killed while having the Defend ability. This includes when being killed with Reincarnation ready. After detecting the order you would check to see if the unit is alive. If it is, then it's probably because it's in the Reincarnation process. I could be wrong though.

Also, make sure you don't copy multiple Unit Indexers into your map!
Thank you so much. Now i am going to check it thank you
 
Status
Not open for further replies.
Top