Yizzy
New Member
- Reaction score
- 20
Would anyone like to make me a trigger that preload my abilities..
I'm not that experianced with JAZZ..
My thought was to add a unit at init, add and remove all abilities and then remove the unit.. the problem is that the abilities are listed as a hex number and I only know how to make a loop with an integer..
Thx
I'm not that experianced with JAZZ..
My thought was to add a unit at init, add and remove all abilities and then remove the unit.. the problem is that the abilities are listed as a hex number and I only know how to make a loop with an integer..
Code:
function Trig_Preloading_Test_Actions takes nothing returns nothing
set udg_TempPoint = GetRectCenter(GetPlayableMapRect())
call CreateNUnitsAtLoc( 1, 'H01K', Player(PLAYER_NEUTRAL_PASSIVE), udg_TempPoint, bj_UNIT_FACING )
set udg_TempUnit = GetLastCreatedUnit()
set bj_forLoopAIndex = 0
set bj_forLoopAIndexEnd = 149
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitAddAbilityBJ( 'A000+bj_forLoopAIndex', udg_TempUnit )
call UnitRemoveAbilityBJ( 'A000+bj_forLoopAIndex', udg_TempUnit )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveUnit( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Preloading_Test takes nothing returns nothing
set gg_trg_Preloading_Test = CreateTrigger( )
call TriggerAddAction( gg_trg_Preloading_Test, function Trig_Preloading_Test_Actions )
endfunction
Thx