• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Bug when using Jump System [Paladon]

Status
Not open for further replies.
Level 14
Joined
Jun 15, 2016
Messages
749
I try to apply this system: Jump System [Paladon] - for an auto-cast spell (Curse).

Normally, it will work if we manually cast the spell but will not work if we let a unit auto-casting it. The unit just simply fly off to the center of the map. I guess the auto-cast spells cannot detect "Target point of ability being cast" thus switch it backs to default location?
 
Level 14
Joined
Jun 15, 2016
Messages
749
Are you sure the ability is being cast at all? because I do not think it is possible to make a spell like blink or flamestrike auto cast, at least not through the object editor.
You'd need an AI for t hat.
Yes, I'm sure it is auto-casted because it is based on Curse ability, with sample setting from Paladon system. I try to use my units to attack an enemy (these units has the spell) while the custom spell is activated and they just fly away, unless when we cast the spell manually.
 
Level 14
Joined
Jun 15, 2016
Messages
749
I am amazed that actually works.
Still, can you post the trigger of the spell?

JavaScript:
function Trig_Leap_Assault_Copy_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A13S' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Leap_Assault_Copy_Actions takes nothing returns nothing
    set udg_JDA_JumpHigh_Distance = ( 0.33 * I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetTriggerUnit())) )
    set udg_JDA_DestroyTrees_Dash = false
    set udg_JDA_Collusion = false
    set udg_JDA_TargetPoint = GetSpellTargetLoc()
    set udg_JDA_Unit = GetTriggerUnit()
    set udg_JDA_Speed = 30.00
    set udg_JDA_SpecialEffect = "Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl"
    set udg_JDA_Animation = "walk"
    set udg_JDA_AnimationSpeed = 0.60
    call ConditionalTriggerExecute( gg_trg_Jump_System_1 )
endfunction

//===========================================================================
function InitTrig_Leap_Assault_Copy takes nothing returns nothing
    set gg_trg_Leap_Assault_Copy = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Leap_Assault_Copy, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Leap_Assault_Copy, Condition( function Trig_Leap_Assault_Copy_Conditions ) )
    call TriggerAddAction( gg_trg_Leap_Assault_Copy, function Trig_Leap_Assault_Copy_Actions )
endfunction
AS you see, I change only spell ID based on Paladon system.
 
Level 14
Joined
Jun 15, 2016
Messages
749
Okay so my intuition was right. Manually casting the spell gives you the right coordinates, but autocasting returns a null value, so it sends the unit to the center of the map (0, 0).

So is there a solution to this? If not, maybe I just skip this away and use another thing instead

Edit: I change the setting to "Position of Target Unit of Ability Being Cast" and it works flawlessly. Thanks, guy anyway. +rep.
 
Last edited:
Status
Not open for further replies.
Top