MagnaGuard
Active Member
- Reaction score
- 49
JASS:
scope mutilate
private function Trig_mutilate_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;A003039;
endfunction
private function Trig_mutilate_Actions takes nothing returns nothing
local unit u=GetTriggerUnit()
local location locA=GetUnitLoc(GetTriggerUnit())
local location locB= GetSpellTargetLoc()
local real angle = Atan2(GetLocationY(locB) - GetLocationY(locA), GetLocationX(locB) - GetLocationX(locA))
local real x= 0.00
local real y= 0.00
local real z=70
local integer i=1
set x = GetUnitX(u) + 50 * Cos(angle)
set y = GetUnitY(u) + 50 * Sin(angle)
call SetUnitAnimation (u, "attack slam")
loop
exitwhen i >= 7
call DestroyEffect(AddSpecialEffectLocZ("Objects\\Spawnmodels\\Orc\\OrcLargeDeathExplode\\OrcLargeDeathExplode.mdl", x, y, z) )
set z=z-10
set i=i+1
endloop
//===========================================================================
private function InitTrig_mutilate takes nothing returns nothing //gives me syntax error?
set gg_trg_mutilate = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_mutilate, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_mutilate, Condition( function Trig_mutilate_Conditions ) )
call TriggerAddAction( gg_trg_mutilate, function Trig_mutilate_Actions )
endfunction
endscope
Well I attempted to make a spell so it would create big line that was red (done it in object editor, making the spell) and have blood fly out of the "deep cut" for like 7 times. However it failed and the blood effects don't appear.
JASS:
AddSpecialEffectLocZ