I'm trying to make a passive spell, it should use an dead unit corpse to heal the hero of # hp. Also should auto-cast shadow strike on a nearby enemy unit if there's one. The part where it heal the unit works, the auto-cast shadow strike doesn't work, the unit is created, then he cast shadow strike, but then it doesn't get removed...
My trigger:
Also, can someone tell me how to use hidden in forums?
My trigger:
-
Salvation
-
Events
- Unit - A unit Learns a skill
-
Conditions
- (Learned Hero Skill) Equal to Salvation
-
Actions
- Set Salvation_dCasterUnit = (Learning Hero)
- Trigger - Turn on Salvation Effect <gen>
- Trigger - Turn off (This trigger)
-
Events
-
Salvation Effect
-
Events
- Time - Every 8.00 seconds of game time
- Conditions
-
Actions
- Set Salvation_dLoc1 = (Position of Salvation_dCasterUnit)
- Set Salvation_dTargetUnit = (Random unit from (Units within 512.00 of Salvation_dLoc1 matching (((Matching unit) is dead) Equal to True)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Salvation_dTargetUnit Not equal to No unit
- (Salvation_dCasterUnit is alive) Equal to True
-
Then - Actions
- Set Salvation_dLoc2 = (Position of Salvation_dTargetUnit)
- Set Demon_jump_target = (Random unit from (Units within 800.00 of Salvation_dLoc2 matching ((((Matching unit) belongs to an enemy of (Owner of Salvation_dCasterUnit)) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False
- Unit - Create 1 Salvation Aura Effect [Step 2] for (Owner of Salvation_dCasterUnit) at Salvation_dLoc2 facing (Random angle) degrees
- Unit - Set level of Salvation Aura Heal for (Last created unit) to (Level of Salvation for Salvation_dCasterUnit)
- Unit - Order (Last created unit) to Human Paladin - Holy Light Salvation_dCasterUnit
- Unit - Make (Last created unit) Explode on death
- Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
- Unit - Remove Salvation_dTargetUnit from the game
- Unit - Create 1 Shadow Demon Dummy for (Owner of Salvation_dCasterUnit) at Salvation_dLoc2 facing Default building facing degrees
- Unit - Set level of Shadow Demon for (Last created unit) to (Level of Salvation for Salvation_dCasterUnit)
- Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike Demon_jump_target
- Unit - Add a 2.50 second Generic expiration timer to (Last created unit)
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_Salvation_dLoc1)
- Custom script: call RemoveLocation(udg_Salvation_dLoc2)
-
Events
Also, can someone tell me how to use hidden in forums?
Last edited: