Name | Type | is_array | initial_value |
asdf | unit | No | |
asdfasdf | effect | No |
function Trig_BuildFarm_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetConstructedStructure()) == 'hhou' ) ) then
return false
endif
return true
endfunction
function Trig_BuildFarm_Func006001 takes nothing returns boolean
return ( GetUnitStateSwap(UNIT_STATE_LIFE, udg_asdf) <= 100 )
endfunction
function Trig_BuildFarm_Actions takes nothing returns nothing
local unit TempUnit
local effect TempEffect1
local effect TempEffect2
local effect TempEffect3
local effect TempEffect4
call AddSpecialEffectLocBJ( GetUnitLoc(GetConstructedStructure()), "Doodads\\Ruins\\Water\\FishSchool\\FishSchool.mdl" )
set TempUnit = GetConstructedStructure()
call AddSpecialEffectLocBJ( GetUnitLoc(GetConstructedStructure()), "Doodads\\Ruins\\Water\\FishSchool\\FishSchool.mdl" )
set TempEffect1 = GetLastCreatedEffectBJ()
call AddSpecialEffectLocBJ( GetUnitLoc(GetConstructedStructure()), "Doodads\\Ruins\\Water\\FishSchool\\FishSchool.mdl" )
set TempEffect2 = GetLastCreatedEffectBJ()
call AddSpecialEffectLocBJ( GetUnitLoc(GetConstructedStructure()), "Doodads\\Ruins\\Water\\FishSchool\\FishSchool.mdl" )
set TempEffect3 = GetLastCreatedEffectBJ()
call AddSpecialEffectLocBJ( GetUnitLoc(GetConstructedStructure()), "Doodads\\Ruins\\Water\\FishSchool\\FishSchool.mdl" )
set TempEffect4 = GetLastCreatedEffectBJ()
loop
set udg_asdf = TempUnit
exitwhen ( Trig_BuildFarm_Func006001() )
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 0.10))
endloop
call DestroyEffectBJ( TempEffect1 )
call DestroyEffectBJ( TempEffect2 )
call DestroyEffectBJ( TempEffect3 )
call DestroyEffectBJ( TempEffect4 )
endfunction
//===========================================================================
function InitTrig_BuildFarm takes nothing returns nothing
set gg_trg_BuildFarm = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BuildFarm, EVENT_PLAYER_UNIT_CONSTRUCT_FINISH )
call TriggerAddCondition( gg_trg_BuildFarm, Condition( function Trig_BuildFarm_Conditions ) )
call TriggerAddAction( gg_trg_BuildFarm, function Trig_BuildFarm_Actions )
endfunction