Another Dummy unit problem...

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!
 
Reaction score
341
JASS:
 tags please. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue    :p" loading="lazy" data-shortname=":p" />

We also have a Jass Help Section, so i&#039;m sure a mod will move this, though by the looks of it you just converted a GUI trigger without any modifications.
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
Well for one, you're setting the flying height of the triggering unit, not the last created one, which is why the flying height is changing. Not sure why it doesn't cast the spell, though.
 

Happysmiley

New Member
Reaction score
22
Awesome, Ziggy! Although that problem is mostly aestethic I'm glad you pointed that out :) Can't belive I didn't see that... + rep
 
General chit-chat
Help Users

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top