function SomeAction takes nothing returns nothing
loop
exitwhen MyCondition
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, someInterval)) //RMaxBJ makes sure the interval isn't lower than 0.1
endloop
endfunction
//===========================================================================
function InitTrig_MyTrigger takes nothing returns nothing
set gg_trg_MahTrig = CreateTrigger()
call TriggerAddAction(gg_trg_MahTrig, function SomeAction)
endfunction
//I changed the code a little bit, so you can actually read it