So, the title said it.
I've a projectile that deals damage but I also want it to make any hero that touches the flying projectile to lose experience. It also would be pretty nice to tweak the value depending on the level of this ability (I got 10 levels in my map). This is my current ability
Thank you in advance.
I've a projectile that deals damage but I also want it to make any hero that touches the flying projectile to lose experience. It also would be pretty nice to tweak the value depending on the level of this ability (I got 10 levels in my map). This is my current ability
-
function Trig_DaggersOfOblivion_Copy_Conditions takes nothing returns boolean
-
if ( not ( GetSpellAbilityId() == 'A01W' ) ) then
- return false
- endif
- return true
-
if ( not ( GetSpellAbilityId() == 'A01W' ) ) then
- endfunction
-
function Trig_DaggersOfOblivion_Copy_Actions takes nothing returns nothing
- set bj_forLoopAIndex = 1
- set bj_forLoopAIndexEnd = 2
-
loop
- exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
- set udg_MS_dmg_source = GetSpellAbilityUnit()
- set udg_MS_owner = GetOwningPlayer(GetSpellAbilityUnit())
- set udg_MS_create_point = GetUnitLoc(GetSpellAbilityUnit())
- set udg_MS_target_point = GetSpellTargetLoc()
- set udg_MS_damage = 20.00
- set udg_MS_seconds_to_reach = 1.00
- set udg_MS_angle = AngleBetweenPoints(udg_MS_create_point, udg_MS_target_point)
- set udg_MS_distance = DistanceBetweenPoints(udg_MS_create_point, udg_MS_target_point)
- set udg_MS_missile_gfx = "DaggersOfOblivion.mdx"
- set udg_MS_impact_gfx = "Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl"
- set udg_MS_unit_hit_eff = "Objects\\Spawnmodels\\Human\\HumanBlood\\HumanBloodFootman.mdl"
- set udg_MS_arcs = true
- // If MS_arc = true aply the following settings
- set udg_MS_arc_dist = 200.00
- set udg_MS_arc_type = GetForLoopIndexA()
- // ---
- set udg_MS_parabola = true
- // If MS_parabola = true aply the following settings
- set udg_MS_parabola_height = 450.00
- // ---
- call TriggerExecute( gg_trg_MS_init )
- call RemoveLocation(udg_MS_create_point)
- call RemoveLocation(udg_MS_target_point)
- set bj_forLoopAIndex = bj_forLoopAIndex + 1
- endloop
- endfunction
- //===========================================================================
-
function InitTrig_DaggersOfOblivion_Copy takes nothing returns nothing
- set gg_trg_DaggersOfOblivion_Copy = CreateTrigger( )
- call TriggerRegisterAnyUnitEventBJ( gg_trg_DaggersOfOblivion_Copy, EVENT_PLAYER_UNIT_SPELL_EFFECT )
- call TriggerAddCondition( gg_trg_DaggersOfOblivion_Copy, Condition( function Trig_DaggersOfOblivion_Copy_Conditions ) )
- call TriggerAddAction( gg_trg_DaggersOfOblivion_Copy, function Trig_DaggersOfOblivion_Copy_Actions )
- endfunction
Thank you in advance.
Last edited: