• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Ruin of Rebirth

Status
Not open for further replies.
Level 5
Joined
Aug 8, 2019
Messages
113
I randomly stumbled upon this item while experimenting with the editor, it allows the unit that drops it to be "reborn" under the control of whoever picks up the ruin after the unit has been slain. However in order for this to work the unit must have it set to the item dropped upon death. I tried playing around with a trigger to drop this ruin so the victor can gain control of the slain unit, however it doesn't appear to work, can anyone help me out with this? Is there a trigger that could make a unit drop a ruin of rebirth upon being slain that will actually work? I'm trying to make a spell that if cast would basically allow the enemy which it is cast upon to drop this ruin so whoever has slain it will now control it, kind of like charm with the exception that you have to slay the unit first.
 
Level 5
Joined
Aug 8, 2019
Messages
113
I could set up a trigger where it checks if a unit that previously had a buff has been slain, but creating a rune of rebirth in its place does not ressurect the unit, I need to check out the other alternatives
 
Level 28
Joined
Feb 18, 2014
Messages
3,580
Do you want the rune to be acquired only by the player who killed the unit or by anyone?
Anyway, you can store the unit that you want to gain control upon death inside a variable and then resurrect it once the player pick up the rune.
  • Trigger 01
    • Events
      • Unit - A unit Start the effect of an ability
    • Conditions
      • (Ability being cast) Equal MyCustomAbility
    • Actions
      • Set MyTarget = (Target unit of ability being cast)
  • Trigger 02
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to MyTarget
    • Actions
      • Set MyTargetLoc = (Position of MyTarget)
      • Item - Create Rune of Rebirth at MyTargetLoc
  • Trigger 03
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Rune of Rebirth
    • Actions
      • Unit - Create 1 (Unit-type of MyTarget) for (Owner of (Hero manipulating item)) at MyTargetLoc facing 0 degrees
      • Custom script: call RemoveLocation (udg_MyTargetLoc)
 
Level 28
Joined
Feb 18, 2014
Messages
3,580
Bingo! I found the perfect solution for this problem, basically what you need to do is store the units that you want to resurrect inside an array and then create a Rune of Rebirth at their position when they die.
  • Rune Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set RuneCount = 3
      • Set RuneType[1] = Gnoll
      • Set RuneType[2] = Murloc
      • Set RuneType[3] = Forest Troll
  • Rune Create
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
    • Actions
      • Set Position = (Position of (Triggering unit))
      • For each (Integer A) from 1 to RuneCount, do (Actions)
        • Boucle - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Triggering unit)) Equal to RuneType[(Integer A)]
            • Then - Actions
              • Item - Create Rune de renaissance at Position
              • Item - Set the custom value of (Last created item) to (Integer A)
            • Else - Actions
  • Rune Use
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Rune of Rebirth
    • Actions
      • Set Position = (Position of (Item being manipulated))
      • Unit - Create 1 RuneType[(Custom value of (Item being manipulated))] for (Owner of (Hero manipulating item)) at Position facing 270 degrees
Now, all you have to do now is detect if the unit that dies has a specific buff.
 

Attachments

  • Rune of Rebirth.w3x
    17.6 KB · Views: 23
Status
Not open for further replies.
Top