I tried that once but it said there was error in the script and it also considered the function a boolen even though it was an integer comparison. I dunno but i'll try setting it to 0 (perhaps that will work)
[edit] nope that doesn't work but i've found the problem. I'm 99% sure this was the map editor creator's fault because this is suppose to be a boolean but it's treated in GUI as an integer. All i had to do was change it to custom text and set it to true/false to make it work properly
Here's what i ended up with and it works perfectly
function Trig_Test_trig_terrain_check_Func001Func002A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Test_trig_terrain_check_Func001Func003C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfTypeIdAll('h00Q')) > 1 ) ) then
return false
endif
return true
endfunction
function Trig_Test_trig_terrain_check_Func001C takes nothing returns boolean
if ( not ( IsTerrainPathableBJ(GetUnitLoc(gg_unit_E003_0009), PATHING_TYPE_FLOATABILITY) == false ) ) then
return false
endif
return true
endfunction
function Trig_Test_trig_terrain_check_Actions takes nothing returns nothing
if ( Trig_Test_trig_terrain_check_Func001C() ) then
if ( Trig_Test_trig_terrain_check_Func001Func003C() ) then
call DoNothing( )
else
call CreateNUnitsAtLoc( 1, 'h00Q', GetOwningPlayer(gg_unit_E003_0009), GetRectCenter(GetPlayableMapRect()), bj_UNIT_FACING )
endif
else
call UnitRemoveBuffBJ( 'B00U', gg_unit_E003_0009 )
call ForGroupBJ( GetUnitsOfTypeIdAll('h00Q'), function Trig_Test_trig_terrain_check_Func001Func002A )
endif
endfunction
//===========================================================================
function InitTrig_Test_trig_terrain_check takes nothing returns nothing
set gg_trg_Test_trig_terrain_check = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Test_trig_terrain_check, 0.01 )
call TriggerAddAction( gg_trg_Test_trig_terrain_check, function Trig_Test_trig_terrain_check_Actions )
endfunction