Name | Type | is_array | initial_value |
Checkpoint | location | Yes | |
CheckpointREGION | location | Yes | |
Deathtime | integer | No | |
Dialog | dialog | Yes | |
Dialogbutton | button | Yes | |
FlameTowerAttack1 | location | Yes | |
Lives | real | Yes | |
NewName | string | Yes | |
Origname | string | Yes | |
PriorityPlayer | player | No | |
RemoveLeavers | boolean | No | true |
TempPoint | location | No | |
TempPoint2 | location | No | |
TempPoint3 | location | No | |
Time | integer | No |
function Trig_Slide1_Actions takes nothing returns nothing
local group g1
local group g2
local location p
local location p2
local unit u
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set g1 = GetUnitsOfPlayerAndTypeId(ConvertedPlayer(GetForLoopIndexA()), 'Hpal')
set u = GroupPickRandomUnit(g1)
set p = GetUnitLoc(u)
if ( IsUnitAliveBJ(u) == true ) then
if ( GetTerrainTypeBJ(p) == 'Nice' ) then
set p2 = PolarProjectionBJ(p,7, GetUnitFacing(u))
call SetUnitPositionLoc( u, p2 )
call RemoveLocation( p2 )
endif
endif
call RemoveLocation( p )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
function InitTrig_Slide1 takes nothing returns nothing
set gg_trg_Slide1 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Slide1, 0.02 )
call TriggerAddAction( gg_trg_Slide1, function Trig_Slide1_Actions )
endfunction
function Trig_Slide2_Conditions takes nothing returns boolean
if ( GetBooleanOr( GetIssuedOrderIdBJ() == String2OrderIdBJ("smart") , GetIssuedOrderIdBJ() == String2OrderIdBJ("move") ) ) then
return true
endif
return false
endfunction
function Trig_Slide2_Actions takes nothing returns nothing
local location p
local location p2
set p = GetUnitLoc(GetOrderedUnit())
if ( GetTerrainTypeBJ(p) == 'Nice' ) then
set p2 = GetOrderPointLoc()
call SetUnitPositionLocFacingBJ( GetTriggerUnit(), PolarProjectionBJ(p, 1.00, DistanceBetweenPoints(p, p2)), AngleBetweenPoints(p, p2) )
call RemoveLocation( p2 )
endif
call RemoveLocation( p )
endfunction
function InitTrig_Slide2 takes nothing returns nothing
set gg_trg_Slide2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Slide2, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_Slide2, Condition( function Trig_Slide2_Conditions ) )
call TriggerAddAction( gg_trg_Slide2, function Trig_Slide2_Actions )
endfunction