Name | Type | is_array | initial_value |
banditenguppe | group | No | |
Gebiet | rect | No | |
Leben | integer | No | 8 |
lvl | real | No | |
Schussweite | real | No | |
Timekill | real | No | |
UNIT | unit | No | |
unitgroup | group | No |
function Trig_ArbeiterJump_Conditions takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_ArbeiterGeschossRegion, gg_unit_hpea_0001) == true ) ) then
return false
endif
return true
endfunction
function Trig_ArbeiterJump_Actions takes nothing returns nothing
set udg_GeschossRichtung = 180.00
set udg_ChatString = GetEventPlayerChatString()
set udg_ChatString = SubStringBJ(udg_ChatString,7,20)
set udg_ArbeiterGeschossDistanz = S2I( udg_ChatString )
//
set udg_GeschossDistanz = I2R( udg_ArbeiterGeschossDistanz )
//
call ShowUnitHide( gg_unit_hpea_0001 )
call IssuePointOrderLocBJ( gg_unit_hmtm_0000, "attackground", PolarProjectionBJ(GetUnitLoc(gg_unit_hmtm_0000), udg_GeschossDistanz, udg_GeschossRichtung) )
call TriggerSleepAction( 2.50 )
call SetUnitPositionLoc( gg_unit_hpea_0001, PolarProjectionBJ(GetUnitLoc(gg_unit_hmtm_0000), udg_GeschossDistanz, udg_GeschossRichtung) )
call ShowUnitShow( gg_unit_hpea_0001 )
call TriggerSleepAction( 1.00 )
call IssueImmediateOrderBJ( gg_unit_hmtm_0000, "stop" )
endfunction
//===========================================================================
function InitTrig_ArbeiterJumpDistanz takes nothing returns nothing
set gg_trg_ArbeiterJumpDistanz = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_ArbeiterJumpDistanz, Player(0), "-shoot ", false )
call TriggerAddCondition( gg_trg_ArbeiterJumpDistanz, Condition( function Trig_ArbeiterJump_Conditions ) )
call TriggerAddAction( gg_trg_ArbeiterJumpDistanz, function Trig_ArbeiterJump_Actions )
endfunction