Running_dap
New Member
- Reaction score
- 3
Why dont u just make a dummy unit, cast War Stomp at the place of where the Unit reincarnates? Do u want the reincarnated unit to display the spell or something? :/
Untitled Trigger 002
Events
Unit - A unit Is attacked
Conditions
(Integer((Life of (Triggering unit)))) Less than or equal to (<=) 1
(Triggering unit) Equal to (==) Tauren Chieftain 0017 <gen>
Actions
Wait 3.00 seconds
Set tempPoint = (Position of (Triggering unit))
Unit - Create 1 DummyCaster for (Owner of (Triggering unit)) at tempPoint facing Default building facing (270.0) degrees
Unit - Add Frost Stomp to (Last created unit)
Unit - Order (Last created unit) to (Order((Name of Frost Stomp )))
Unit - Remove Frost Stomp from (Last created unit)
Custom script: call RemoveLocation(udg_tempPoint)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
scope StompOnRez initializer Init
globals
private integer UNIT_TYPE = 039;H000039; //Rawcode of reincarnating unit-type
private integer DUMMY_ID = 039;h000039; //Rawcode of dummy unit
private integer ABILITY_ID = 039;A000039; //Rawcode of stomp ability
private string STOMP_ORDER_STRING = "stomp" //Order string of base ability
private boolean USE_DUMMY = true //Have dummy cast or hero cast
//Recommended true
endglobals
private function Conditions takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit()) == UNIT_TYPE
endfunction
private function AltActions takes nothing returns nothing
local unit rez = GetReincarnatingUnit()
call TriggerSleepAction(0.0) //Required
call IssueImmediateOrder(rez, STOMP_ORDER_STRING)
set rez = null
endfunction
private function Actions takes nothing returns nothing
local unit rez = GetReincarnatingUnit()
local unit u = CreateUnit(GetOwningPlayer(rez), DUMMY_ID, GetUnitX(rez), GetUnitY(rez), 0)
call UnitAddAbility(u, ABILITY_ID)
call IssueImmediateOrder(u, STOMP_ORDER_STRING)
call UnitApplyTimedLife(u, 039;BTLF039;, 3)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdx", rez, "origin"))
set rez = null
set u = null
endfunction
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterReincarnationEvent(t, true)
call TriggerAddCondition(t, Condition(function Conditions))
if USE_DUMMY then
call TriggerAddAction(t, function Actions)
else
call TriggerAddAction(t, function AltActions)
endif
endfunction
endscope
scope StompOnRez initializer Init
globals
private integer UNIT_TYPE = 039;Otch039; //Rawcode of reincarnating unit-type
private integer DUMMY_ID = 039;n000039; //Rawcode of dummy unit
private integer ABILITY_ID = 039;A001039; //Rawcode of stomp ability
private string STOMP_ORDER_STRING = "stomp" //Order string of base ability
private boolean USE_DUMMY = true //Have dummy cast or hero cast
//Recommended true
endglobals
private function Conditions takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit()) == UNIT_TYPE
endfunction
private function AltActions takes nothing returns nothing
local unit rez = GetReincarnatingUnit()
call TriggerSleepAction(0.0) //Required
call IssueImmediateOrder(rez, STOMP_ORDER_STRING)
set rez = null
endfunction
private function Actions takes nothing returns nothing
local unit rez = GetReincarnatingUnit()
local unit u = CreateUnit(GetOwningPlayer(rez), DUMMY_ID, GetUnitX(rez), GetUnitY(rez), 0)
call UnitAddAbility(u, ABILITY_ID)
call IssueImmediateOrder(u, STOMP_ORDER_STRING)
call UnitApplyTimedLife(u, 039;BTLF039;, 3)
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\FrostStomp.mdx", rez, "origin"))
set rez = null
set u = null
endfunction
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterReincarnationEvent(t, true)
call TriggerAddCondition(t, Condition(function Conditions))
if USE_DUMMY then
call TriggerAddAction(t, function Actions)
else
call TriggerAddAction(t, function AltActions)
endif
endfunction
endscope