l)emonStorm
New Member
- Reaction score
- 3
I am making a custom ability based off reincarnation. when a unit dies if the ability is cooled down, i want a ghost of the unit (i already made that) to appear at the players start location. The ghost can then move to the body of the dead unit (i created a permanent corpse) and ressurect it (i already made the ability). However, my trigger does not work, and i think it is because of the event. Any ideas? Here are my triggers: (i couldnt think of any way to do this without multiple triggers)
Code:
Self Preservation
Events
Unit - A unit Finishes (i tried Begins as well, same result) casting an ability
Conditions
(Ability being cast) Equal to Self Ressurection
Actions
Set Self_Preservation_Unit = (Casting unit)
Region - Center Self Preservation target <gen> on (Position of (Casting unit))
Unit - Hide (Casting unit)
Unit - Create 1 Ghastly Necromancer for (Owner of (Casting unit)) at (Center of Horde Circle of Power <gen>) facing Default building facing degrees
Unit - Create a permanent Fleshy (Unit-type of (Casting unit)) corpse for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Facing of (Casting unit)) degrees
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item carried by (Casting unit) in slot (Max(1, 6))) Equal to Alliance Flag 0006 <gen>
Then - Actions
Unit - Order (Casting unit) to drop (Item being manipulated) at ((Owner of (Casting unit)) start location)
Else - Actions
Do nothing
Wait 1.00 seconds
Camera - Pan camera for (Owner of (Casting unit)) to (Position of (Last created unit)) over 0.00 seconds
Code:
Self Preservation
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Self Ressurection
Actions
Set Self_Preservation_Unit = (Casting unit)
Region - Center Self Preservation target <gen> on (Position of (Casting unit))
Unit - Hide (Casting unit)
Unit - Create 1 Ghastly Necromancer for (Owner of (Casting unit)) at (Center of Horde Circle of Power <gen>) facing Default building facing degrees
Unit - Create a permanent Fleshy (Unit-type of (Casting unit)) corpse for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Facing of (Casting unit)) degrees
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item carried by (Casting unit) in slot (Max(1, 6))) Equal to Alliance Flag 0006 <gen>
Then - Actions
Unit - Order (Casting unit) to drop (Item being manipulated) at ((Owner of (Casting unit)) start location)
Else - Actions
Do nothing
Wait 1.00 seconds
Camera - Pan camera for (Owner of (Casting unit)) to (Position of (Last created unit)) over 0.00 seconds
Code:
Self Preservation
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Self Ressurection
Actions
Set Self_Preservation_Unit = (Casting unit)
Region - Center Self Preservation target <gen> on (Position of (Casting unit))
Unit - Hide (Casting unit)
Unit - Create 1 Ghastly Necromancer for (Owner of (Casting unit)) at (Center of Horde Circle of Power <gen>) facing Default building facing degrees
Unit - Create a permanent Fleshy (Unit-type of (Casting unit)) corpse for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Facing of (Casting unit)) degrees
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item carried by (Casting unit) in slot (Max(1, 6))) Equal to Alliance Flag 0006 <gen>
Then - Actions
Unit - Order (Casting unit) to drop (Item being manipulated) at ((Owner of (Casting unit)) start location)
Else - Actions
Do nothing
Wait 1.00 seconds
Camera - Pan camera for (Owner of (Casting unit)) to (Position of (Last created unit)) over 0.00 seconds
Code:
Self Preservation 3
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Ressurect Now
Actions
Wait 0.50 seconds
Unit - Unhide Self_Preservation_Unit
Special Effect - Create a special effect attached to the origin of Self_Preservation_Unit using Abilities\Spells\Orc\Reincarnation\ReincarnationTarget.mdl
Unit - Remove (Casting unit) from the game


