- Joined
- Jul 9, 2008
- Messages
- 253
So i have a spell called Raging Howl which decreases health regen (easy part, just spell effect) and i want it to do 2 times Strength (of caster ofcourse) in damage. I made it in GUI and it worked fine, but i stepped to JASS and tried to make it in JASS.
This is what i got:
But when i test the spell nothing happens..
Can someone please help me?
Thanks in advance,
Quetzalcotl
This is what i got:
JASS:
function Trig_Raging_Howl_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00M' ) ) then
return false
endif
return true
endfunction
function Trig_Raging_Howl_Actions takes nothing returns nothing
local unit caster = GetTriggerUnit()
local group g = CreateGroup()
local unit u
call GetUnitsInRangeOfLocAll (500, GetUnitLoc (caster) )
loop
set u = FirstOfGroup ( g )
exitwhen u == null
if IsUnitEnemy(u, GetOwningPlayer(caster)) then
return false
endif
return true
call UnitDamageTargetBJ(caster, u, ( I2R(GetHeroStatBJ(bj_HEROSTAT_STR, caster, true)) * 2.00 ), ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
call GroupRemoveUnit (g , u )
endloop
endfunction
//===========================================================================
function InitTrig_Raging_Howl takes nothing returns nothing
set gg_trg_Raging_Howl = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( gg_trg_Raging_Howl, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Raging_Howl, Condition( function Trig_Raging_Howl_Conditions ) )
call TriggerAddAction( gg_trg_Raging_Howl, function Trig_Raging_Howl_Actions )
endfunction
But when i test the spell nothing happens..
Can someone please help me?
Thanks in advance,
Quetzalcotl
Last edited by a moderator: