Happysmiley
New Member
- Reaction score
- 22
Hey,
Let me explain the ability:
I made a dummy spell based on firebolt (since I want it to be targetable) called "Igni" with no damage. After that I created a dummy unit with the real spell called "Igni (Igni Rune)" (also based on firebolt neutral) where Id entered the damage and so on. After that I made a script (converted to custom text):
function Trig_Igni_Copy_2_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01D' ) ) then
return false
endif
return true
endfunction
function Trig_Igni_Copy_2_Actions takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'A00O', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A01D', GetFilterUnit()) )
set udg_Point = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc( 1, 'n00Y', Player(0), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 2.50, 'BTLF', GetLastCreatedUnit() )
call SetUnitFlyHeightBJ( GetTriggerUnit(), 400.00, 100.00 )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "firebolt", GetSpellTargetUnit() )
call RemoveLocation (udg_Point)
endfunction
//===========================================================================
function InitTrig_Igni_Copy_2 takes nothing returns nothing
set gg_trg_Igni_Copy_2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Igni_Copy_2, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Igni_Copy_2, Condition( function Trig_Igni_Copy_2_Conditions ) )
call TriggerAddAction( gg_trg_Igni_Copy_2, function Trig_Igni_Copy_2_Actions )
endfunction
What I want to happen: You select a target with the spell. A dummy unit is created with 400 movement height (Yes, Ive set the movement type to fly) which will then cast the real spell.
What really happened: I target a unit, the dummy unit is created but is not at 400 movement height. It doesn't cast the spell. GG
What have I done wrong?
Help appreciated!
Let me explain the ability:
I made a dummy spell based on firebolt (since I want it to be targetable) called "Igni" with no damage. After that I created a dummy unit with the real spell called "Igni (Igni Rune)" (also based on firebolt neutral) where Id entered the damage and so on. After that I made a script (converted to custom text):
function Trig_Igni_Copy_2_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01D' ) ) then
return false
endif
return true
endfunction
function Trig_Igni_Copy_2_Actions takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'A00O', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A01D', GetFilterUnit()) )
set udg_Point = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc( 1, 'n00Y', Player(0), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 2.50, 'BTLF', GetLastCreatedUnit() )
call SetUnitFlyHeightBJ( GetTriggerUnit(), 400.00, 100.00 )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "firebolt", GetSpellTargetUnit() )
call RemoveLocation (udg_Point)
endfunction
//===========================================================================
function InitTrig_Igni_Copy_2 takes nothing returns nothing
set gg_trg_Igni_Copy_2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Igni_Copy_2, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Igni_Copy_2, Condition( function Trig_Igni_Copy_2_Conditions ) )
call TriggerAddAction( gg_trg_Igni_Copy_2, function Trig_Igni_Copy_2_Actions )
endfunction
What I want to happen: You select a target with the spell. A dummy unit is created with 400 movement height (Yes, Ive set the movement type to fly) which will then cast the real spell.
What really happened: I target a unit, the dummy unit is created but is not at 400 movement height. It doesn't cast the spell. GG
What have I done wrong?
Help appreciated!