Well i made this simple jass trigger.
When a unit get the spell it do the defend animation tag, realy simple.
But i tried to do it in JASS but i got one error in the syntax cheker on JASScraft.
The error is: Undeclared variable: gg_trg_Events Line 14
Whats wrong with that? Its the same if i convert a trigger from GUI to JASS but in the 2 cases it gave me this error. Why? T.T
Quick Questions:
1. call TriggerAddCondition and call TriggerAddAction what they do? I know it add condition and actions but... Its like the Events function will run the condition then if its true it will run the action? or something like that?
2. set gg_trg_Events = CreateTrigger(). What this line do? I know it create a trigger but... It can be in a variable? Maybe the cause of the error its because i dont have a global/local variable?
Thanks for now on =P
When a unit get the spell it do the defend animation tag, realy simple.
But i tried to do it in JASS but i got one error in the syntax cheker on JASScraft.
JASS:
function Conditions takes nothing returns boolean
if ( GetLearnedSkill() == 'A000' ) then
return true
endif
return false
endfunction
function Actions takes nothing returns nothing
call AddUnitAnimationProperties( GetTriggerUnit(), "defend", true )
endfunction
function Events takes nothing returns nothing
set gg_trg_Events = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Events, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Events, Condition( function Conditions ) )
call TriggerAddAction( gg_trg_Events, function Actions )
endfunction
The error is: Undeclared variable: gg_trg_Events Line 14
Whats wrong with that? Its the same if i convert a trigger from GUI to JASS but in the 2 cases it gave me this error. Why? T.T
Quick Questions:
1. call TriggerAddCondition and call TriggerAddAction what they do? I know it add condition and actions but... Its like the Events function will run the condition then if its true it will run the action? or something like that?
2. set gg_trg_Events = CreateTrigger(). What this line do? I know it create a trigger but... It can be in a variable? Maybe the cause of the error its because i dont have a global/local variable?
Thanks for now on =P