Mutilate Spell -=fail=-

MagnaGuard

Active Member
Reaction score
49
JASS:
scope mutilate
private function Trig_mutilate_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A003'
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
from Romek mini-system
 

MagnaGuard

Active Member
Reaction score
49
JASS:
You never gave your scope the initializer.

>> I'm just learning scopes :) so what does giving it the initializer do?

Edit: By the way the spell works as it's supposed to now
 

Viikuna

No Marlo no game.
Reaction score
265
DestroyEffect(AddSpecialEffect(-Args-)) only works for some models.

It works for most sfx models.

It plays models death animation, so it works if death animation is what you need.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top