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

Resurection with Bribe GUI Unit Event

Status
Not open for further replies.

KPC

KPC

Level 7
Joined
Jun 15, 2018
Messages
178
Hi,
I want to change the way resurrection works:

- The player gains control over resurrected units

This means to change owner of unit to resurection caster.

I'm using Bribe GUI Unit Event to detect Resurection. GUI Unit Event v2.5.2.0

Detect when a unit is brought back to life via Reincarnation, Resurrect or Reanimate
Event: Game - DeathEvent Becomes Equal to 2.00

You can differentiate between the three of these as well. If it is summoned, that means it was reanimated. If IsUnitReincarnating[UDex] is true, that means it finished reincarnating. Otherwise, it was simply resurrected.

  • SetTempPala
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Resurrection
    • Actions
      • Set VariableSet TempPala = (Triggering unit)
  • On Revival
    • Events
      • Game - DeathEvent becomes Equal to 2.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IsUnitReincarnating[UDex] Equal to True
        • Then - Actions
        • Else - Actions
          • Unit - Change ownership of UDexUnits[UDex] to (Owner of TempPala) and Change color
If TempPala was set before this also changes owner when I'm using Animate Dead or resurection item version.

How can I differ those things so it works only for paladin resurection?
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
You should just trigger Resurrection yourself.

Pick Every Unit will find the dead units, then you use the Create Unit function to "resurrect" them, and finally the Remove Unit function to remove their corpses from the game.
 

KPC

KPC

Level 7
Joined
Jun 15, 2018
Messages
178
Ok when it comes to resurrecting, it won't let you cast ability when there's no corps around. So when I want to build ability like this based on another, what should it be?

EDIT:
Ok it should be resurection with number of corpses raised set to 0 (set with shift + enter). I guess.
 
Last edited:

KPC

KPC

Level 7
Joined
Jun 15, 2018
Messages
178
Ok, I think I solved it (at least it works for my map)
This one is for item resurrection:
  • ChangeOwner False
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Item Resurrection (cooldown)
    • Actions
      • Set VariableSet ChangeOwner = False
This one is for Paladin:
  • ChangeOwner True
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Resurrection
    • Actions
      • Set VariableSet TempPala = (Triggering unit)
      • Set VariableSet ChangeOwner = True
By Summoned = False I disabled any reanimation like Aniamte Death or or Raise Death
By Hero = Fale I diabled heroes which comes back to life by trigger or altar/tavern
By ChangeOwner I can disable units resurrected by item or allow for ressurection
Those are only things that can run thiss trigger i guess (at least in my map) so it works :p
  • On Revival
    • Events
      • Game - DeathEvent becomes Equal to 2.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IsUnitReincarnating[UDex] Equal to True
        • Then - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (UDexUnits[UDex] is A Hero) Equal to False
              • (UDexUnits[UDex] is Summoned) Equal to False
              • ChangeOwner Equal to True
            • Then - Actions
              • Unit - Change ownership of UDexUnits[UDex] to (Owner of TempPala) and Change color
            • Else - Actions
 

KPC

KPC

Level 7
Joined
Jun 15, 2018
Messages
178
Ok, Hello there is one problem, sometimes when i use Resurrection for creeps:
  • when they rebirth they instantly changes owner to last TempPala owner
It is possible If Create unit can run Death Event 2 and ommit conditions

Or there might be a problem with the trigger I use:
  • Hell6
    • Events
      • Unit - A unit Dies
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Unit-type of (Triggering unit)) Equal to MonsterType[11]
              • ((Owner of (Triggering unit)) controller) Equal to Hostile
              • ((Triggering unit) is dead) Equal to True
          • And - All (Conditions) are true
            • Conditions
              • (Ability being cast) Equal to Charm
              • (Unit-type of (Target unit of ability being cast)) Equal to MonsterType[11]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is dead) Equal to True
        • Then - Actions
          • Set VariableSet MonsterDeadPoint[11] = (Position of (Triggering unit))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Charm
        • Then - Actions
          • Set VariableSet MonsterDeadPoint[11] = (Position of (Target unit of ability being cast))
        • Else - Actions
      • Wait 10.00 seconds
      • Unit - Create 1 MonsterType[11] for Neutral Hostile at (Center of Hell6 <gen>) facing 90.00 degrees
 
Last edited:
Status
Not open for further replies.
Top