- Joined
- Jan 1, 2014
- Messages
- 14
I have a few set of example triggers my teacher gave me. All I tried worked, except this one.
What I tried is, in the AoE I cast my spell (like the Blizard spell), I want to Cripple all the targets (the Single Target spell). The result I'm receiving is similiar to a Howl of Terror: not where I target the AoE, but instead around my unit.
I give, I give, it's years since I last tried codes instead of GUI, that's why I forgot if there was something else to edit, like that " local real area = 400+l*100"
Can you help me?
What I tried is, in the AoE I cast my spell (like the Blizard spell), I want to Cripple all the targets (the Single Target spell). The result I'm receiving is similiar to a Howl of Terror: not where I target the AoE, but instead around my unit.
JASS:
scope Cripple//Casts a Single Target spell in an AoE (MassCripple)
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A00D'
endfunction
private function Actions takes nothing returns nothing
local real x = GetUnitX(GetTriggerUnit())
local real y = GetUnitY(GetTriggerUnit())
local integer l = GetUnitAbilityLevel(GetTriggerUnit(),'A00D')
local real area = 400+l*100
call CastAreaEnemy(GetTriggerUnit(),'A00E',l,"cripple",x,y,area,0.5)
endfunction
//===========================================================================
public function InitTrig takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t, Condition( function Conditions ) )
call TriggerAddAction(t, function Actions )
set t = null
endfunction
endscope
I give, I give, it's years since I last tried codes instead of GUI, that's why I forgot if there was something else to edit, like that " local real area = 400+l*100"
Can you help me?
Last edited by a moderator: