Name | Type | is_array | initial_value |
Build3SupplyDepots | questitem | No | |
BuildBase | quest | No | |
BuildRefinery | questitem | No | |
Bunker_Dummys | group | No | |
Dummy | integer | No | |
FloatyGeneralText | texttag | Yes | |
FloatyVespinMenge | texttag | Yes | |
FoodTemp | real | Yes | |
gamecache | gamecache | No | |
Gather100VaspeneGas | questitem | No | |
Mineinvoq | boolean | No | |
Order | integer | No | |
Point | location | Yes | |
SCV | questitem | No | |
SupplyDepot | questitem | No | |
Temp_Group | group | No | |
tempInt | integer | No | |
tempLoc | location | No | |
var_armor_on_player | boolean | Yes | |
VaspeneCounter | multiboard | No | |
Vespin | unit | Yes | |
VespinIntegar | integer | Yes | |
VespinInteger | integer | Yes |
//TESH.scrollpos=0
//TESH.alwaysfold=0
//===========================================================================
// Trigger: Vespin1 Updating
//===========================================================================
function Trig_Vespin1_Updating_Conditions takes nothing returns boolean
return GetWidgetLife(udg_Vespin[1]) > 0.405
endfunction
function Trig_Vespin1_Updating_Actions takes nothing returns nothing
set udg_VespinInteger[1] = S2I(I2S(GetResourceAmount(udg_Vespin[1])))
endfunction
//===========================================================================
function InitTrig_Vespin1_Updating takes nothing returns nothing
set gg_trg_Vespin1_Updating = CreateTrigger()
call DisableTrigger( gg_trg_Vespin1_Updating )
call TriggerRegisterTimerEvent(gg_trg_Vespin1_Updating, 1.00, true)
call TriggerAddCondition( gg_trg_Vespin1_Updating, Condition( function Trig_Vespin1_Updating_Conditions ) )
call TriggerAddAction( gg_trg_Vespin1_Updating, function Trig_Vespin1_Updating_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function GetHandleUnit takes handle subject,string name returns unit
return GetHandleHandle(subject,name)
endfunction
function GetHandleTrigger takes handle subject,string name returns trigger
return GetHandleHandle(subject,name)
endfunction
function FlushStoredHandle takes handle subject,string name returns nothing
call FlushStoredInteger(LocalVars(),I2S(HandleVars_GetInt(subject)),name)
endfunction
function Trig_Terran_Liftoff_Conditions takes nothing returns boolean
return GetIssuedOrderId()==OrderId("unroot")
endfunction
function IncreaseHeight takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit u=GetHandleUnit(t,"Structure")
call SetUnitFlyHeight(u,GetUnitFlyHeight(u)+5,0)
if GetUnitFlyHeight(u)>200 then
call FlushStoredHandle(t,"Structure")
call DestroyTimer(t)
endif
set t=null
set u=null
endfunction
function Trig_Terran_Liftoff_Actions takes nothing returns nothing
local timer t=CreateTimer()
call PlaySoundOnUnitBJ( gg_snd_liftoff, 100, GetAttacker() )
call SetHandleHandle(t,"Structure",GetTriggerUnit())
call SetUnitFlyHeight(GetTriggerUnit(),0,0)
call TimerStart(t,0.05,true,function IncreaseHeight)
endfunction
//===========================================================================
function InitTrig_Terran_Liftoff takes nothing returns nothing
set gg_trg_Terran_Liftoff=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Terran_Liftoff,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(gg_trg_Terran_Liftoff,Condition(function Trig_Terran_Liftoff_Conditions))
call TriggerAddAction(gg_trg_Terran_Liftoff,function Trig_Terran_Liftoff_Actions)
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Terran_Liftdown_Conditions takes nothing returns boolean
return GetIssuedOrderId()==OrderId("root") and GetHandleInt(GetTriggerUnit(),"isrooting")==0
endfunction
function DecreaseHeight takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit u=GetHandleUnit(t,"structure")
local location l=GetHandleLoc(t,"rootloc")
call SetUnitFlyHeight(u,GetUnitFlyHeight(u)-5,0)
call SetUnitPositionLoc(u,l)
call SetUnitFacing(u,270)
call IssueImmediateOrder(u,"stop")
if GetUnitState(u,UNIT_STATE_LIFE)<=0 then
call FlushHandleLocals(t)
call DestroyTimer(t)
call RemoveLocation(l)
elseif GetUnitFlyHeight(u)<10 then
call PauseTimer(t)
call IssuePointOrderLoc(u,"root",l)
endif
set t=null
set u=null
set l=null
endfunction
function Trig_Terran_Liftdown_Actions takes nothing returns nothing
local unit u=GetTriggerUnit()
local timer t
local location l1=GetHandleLoc(u,"rootloc")
local location l2=GetOrderPointLoc()
local real d
call SetHandleHandle(u,"rootloc",l2)
if l1!=null then
set u=null
call RemoveLocation(l1)
set l1=null
set l2=null
return
endif
loop
set l1=GetUnitLoc(u)
set l2=GetHandleLoc(u,"rootloc")
set d=DistanceBetweenPoints(l1,l2)
call RemoveLocation(l1)
set l1=null
exitwhen d<30
if GetUnitCurrentOrder(u)!=OrderId("root") and d>30 then
call FlushHandleLocals(u)
call RemoveLocation(l2)
set u=null
set l2=null
return
endif
call TriggerSleepAction(0.25)
endloop
call PauseUnit(u,true)
call IssueImmediateOrder(u,"stop")
call PauseUnit(u,false)
call PlaySoundOnUnitBJ( gg_snd_land, 100, GetTriggerUnit() )
call SetHandleInt(u,"isrooting",1)
call SetHandleHandle(u,"rootloc",null)
set t=CreateTimer()
call SetHandleHandle(t,"structure",u)
call SetHandleHandle(t,"rootloc",l2)
call TimerStart(t,0.05,true,function DecreaseHeight)
set u=null
set t=null
set l2=null
endfunction
function InitTrig_Terran_Liftdown takes nothing returns nothing
set gg_trg_Terran_Liftdown=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Terran_Liftdown,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call TriggerAddCondition(gg_trg_Terran_Liftdown,Condition(function Trig_Terran_Liftdown_Conditions))
call TriggerAddAction(gg_trg_Terran_Liftdown,function Trig_Terran_Liftdown_Actions)
endfunction