- Joined
- Apr 6, 2008
- Messages
- 760
Vjass Problem
i fixed the problem with the unit...
its a more advanced way of creating a SFX at the caster(just to try things out) but i dont see any SFX :<
any comments for first vjass "spell" or something^^ (if any moderate could change the name of my post to "Vjass" coz i dont wanna do more posts )
EDIT!mg i forget too add a event ^^ yep it's working
i fixed the problem with the unit...
its a more advanced way of creating a SFX at the caster(just to try things out) but i dont see any SFX :<
any comments for first vjass "spell" or something^^ (if any moderate could change the name of my post to "Vjass" coz i dont wanna do more posts )
JASS:
scope Spell
private struct Data
unit caster
real x
real y
endstruct
globals
private constant integer abil_id = 'A000'
private constant string SFX = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl"
endglobals
private function PreLoad takes nothing returns nothing
call Preload(SFX)
endfunction
private function conds takes nothing returns boolean
return GetSpellAbilityId() == abil_id
endfunction
private function Spell_Cast takes nothing returns nothing
local Data data = Data.create()
set data.caster = GetTriggerUnit()
set data.x = GetUnitX(data.caster)
set data.y = GetUnitY(data.caster)
call DestroyEffect(AddSpecialEffect(SFX,data.x,data.y))
call data.destroy()
endfunction
//===========================================================================
public function InitTrig takes nothing returns nothing
local trigger trig = CreateTrigger()
local integer index = 0
loop
call TriggerRegisterPlayerUnitEvent(trig, Player(index), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
set index = index + 1
exitwhen index == 16
endloop
call TriggerAddAction( trig, function Spell_Cast)
call TriggerAddCondition( trig, Filter(function conds) )
call PreLoad()
endfunction
endscope
EDIT!mg i forget too add a event ^^ yep it's working
Last edited: