- Joined
- Dec 2, 2016
- Messages
- 733
JASS:
scope spawnHellHounds
//initializer OnInit
//globals
//endglobals
function checker takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A046' ) ) then
return false
endif
return true
endfunction
function spawnHell takes nothing returns nothing
if ( checker() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n008', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetSpellTargetLoc() )
call AddSpecialEffectTargetUnitBJ( "head", GetLastCreatedUnit(), "Environment\\LargeBuildingFire\\LargeBuildingFire2.mdl" )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetSpellTargetLoc() )
set udg_TempPoint = GetSpellTargetLoc()
call UnitApplyTimedLifeBJ( 5.00, 'BTLF', GetLastCreatedUnit() )
call SelectUnitAddForPlayer( GetLastCreatedUnit(), GetOwningPlayer(GetTriggerUnit()) )
call RemoveLocation(udg_TempPoint)
else
endif
endfunction
function activate takes nothing returns nothing
set spawner = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(spawner, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
call TriggerAddAction(spawner, function spawnHell)
endfunction
endscope
When I compile this it says 'spawner' was not declared properly. What am I doing something wrong here?