- Joined
- Dec 10, 2008
- Messages
- 850
Ok, so I've recently been tying to make VJASS spells, and I've got alot of the basics down, like how to int them and everything, but heres my problem. I have a message that displays right after all the locals are declared so I know if it works or not. Its showed up everytime I have it right there, but nothing elsew after it apears to work, and warcraft doesn't close or do anything diffrent..... So whats wrong with this?
I'm not looking for leaks and other bad things YET, but I will be as soon as this problem goes away.
JASS:
scope Test initializer IntTrig_Test
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'AOOO'
endfunction
private function Actions takes nothing returns nothing
local unit x = GetSpellAbilityUnit()
local location l = GetSpellTargetLoc()
local string e = "Abilities/Weapons/PhoenixMissile/Phoenix_Missile_mini.mdl"
local string f = "Objects/Spawnmodels/Other/NeutralBuildingExplosion/NeutralBuildingExplosion.mdl"
local effect c
local effect g
local string w = "weapon"
local string h = "chest"
local integer i =10
call BJDebugMsg ("It worked")
call AddSpecialEffectTarget(e,x,w)
set c = GetLastCreatedEffectBJ()
loop
exitwhen i==0
call AddSpecialEffectLoc(f,l)
set g = GetLastCreatedEffectBJ()
call TriggerSleepAction(0.30)
call DestroyEffect(g)
endloop
call TriggerSleepAction(0.20)
call DestroyEffect(c)
set x=null
call RemoveLocation(l)
set e=null
set f=null
set w=null
endfunction
private function IntTrig_Test takes nothing returns nothing
local trigger I = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(I, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition(I, Condition (function Conditions))
call TriggerAddAction(I, function Actions)
endfunction
endscope
I'm not looking for leaks and other bad things YET, but I will be as soon as this problem goes away.
Last edited: