- Joined
- Nov 2, 2007
- Messages
- 160
i'm new to jass and i've read Daenlins Tutorial
(http://www.thehelper.net/forums/showthread.php?t=28292http://www.thehelper.net/forums/showthread.php?t=28292)
there is a trigger in point 12 wich makes my WE crash when saving
i made some changes to make the trigger suitable for some beginners Jass tests
this is the trigger:
(http://www.thehelper.net/forums/showthread.php?t=28292http://www.thehelper.net/forums/showthread.php?t=28292)
there is a trigger in point 12 wich makes my WE crash when saving
i made some changes to make the trigger suitable for some beginners Jass tests
this is the trigger:
JASS:
function firecond takes nothing returns boolean
return GetSpellAbilityId()==’A001’
endfunction
function Fire takes nothing returns nothing
local group g
local unit u
local unit cast
local unit dumb
local location p
set cast = GetTriggerUnit()
set p = GetSpellTargetLoc()
set g = GetUnitsInRangeOfLocAll(500.00, p)
loop
set u = FirstOfGroup(g)
exitwhen u==null
if IsUnitEnemy(u, GetOwningPlayer(cast))==true
then
call GroupRemoveUnit(g,u)
set dumb = CreateUnitAtLoc(GetOwningPlayer(cast), ‘h000’, GetUnitLoc(u), 0.00)
call IssueTargetOrderBJ(dumb, A002, u)
call UnitApplyTimedLifeBJ (1.50, ‘BFig’, dumb)
set dumb = null
endif
endloop
set g = null
set u = null
set cast = null
set p = null
endfunction
function InitTrig_Feuer takes nothing returns nothing
local trigger t
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t, Condition(function firecond))
call TriggerAddAction(t, function Fire)