- Joined
- Oct 24, 2012
- Messages
- 6,545
hello im making a minigame for my map it basically creates a horizontal and vertical line of lightning blue is safe red kills u now i have it works good just want to see if it can be more efficient also after a period of time if the players do not lose it makes more up to a total of 3 each going at different times umm here r the triggers now tht i listed the basics and thx to anyone tht helps
these next 3 r the kills triggers
JASS:
globals
integer Random_Plus_Sign_Counter = 0
endglobals
function Trig_Plus_Sign_Random_1_Actions takes nothing returns nothing
local rect randomloc1 = (gg_rct_Random_1_for_cross_random)
local rect randomloc2 = (gg_rct_Random_2_for_cross_random)
local real cross_center_y = GetRandomReal(GetRectMinY(randomloc1), GetRectMaxY(randomloc1)) // use for center
local real cross_center_x = GetRandomReal(GetRectMinX(randomloc2), GetRectMaxX(randomloc2)) // use for center
local real array cross1_rx
local real array cross1_ry
local lightning array LightningEffect
set cross1_rx[0] = GetRandomReal(GetRectMinX(randomloc1), GetRectMaxX(randomloc1)) //used for gg_rct_Random_1a_for_cross_random
set cross1_ry[0] = GetRandomReal(GetRectMinY(randomloc2), GetRectMaxY(randomloc2)) //used for gg_rct_Random_1a_for_cross_random
call MoveRectTo( gg_rct_Random_1a_for_cross_random, cross1_rx[0], cross_center_y )
call MoveRectTo( gg_rct_Random_1a_for_cross_random, cross_center_x, cross1_ry[0] )
//
// offset units facing 0 degrees
//
set cross1_rx[1] = cross1_rx[0] + 987.50 // east x value
set cross1_rx[2] = cross1_rx[0] + 493.75 // east x value
//
// offset units facing 180 degrees
//
set cross1_rx[3] = cross1_rx[0] - 987.50 // west x value
set cross1_rx[4] = cross1_rx[0] - 493.75 // west x value
//
// offset units facing 90 degrees
//
set cross1_ry[1] = cross1_ry[0] + 987.50 // north y value
set cross1_ry[2] = cross1_ry[0] + 493.75 // north y value
//
// offset units facing 270 degrees
//
set cross1_ry[3] = cross1_ry[0] - 987.50 // south y value
set cross1_ry[4] = cross1_ry[0] - 493.75 // south y value
//
// units at center
//
// Making Units move to the random point selected w offseting specified above
//
// unit offset moving units = 180 degrees
//
call SetUnitPosition( LightningUnit[1], cross1_rx[3], cross_center_y )
call IssuePointOrder( LightningUnit[1], "patrol", cross1_rx[4], cross_center_y )
//
call SetUnitPosition( LightningUnit[2], cross1_rx[4], cross_center_y )
call IssuePointOrder( LightningUnit[2], "patrol", cross1_rx[0], cross_center_y )
//
// unit offset moving units = 0 degrees
//
call SetUnitPosition( LightningUnit[3], cross1_rx[1], cross_center_y )
call IssuePointOrder( LightningUnit[3], "patrol", cross1_rx[2], cross_center_y )
//
call SetUnitPosition( LightningUnit[4], cross1_rx[2], cross_center_y )
call IssuePointOrder( LightningUnit[4], "patrol", cross1_rx[0], cross_center_y )
//
// unit offset moving units = 270 degrees
//
call SetUnitPosition( LightningUnit[5], cross_center_x, cross1_ry[3] )
call IssuePointOrder( LightningUnit[5], "patrol", cross_center_x, cross1_ry[4] )
//
call SetUnitPosition( LightningUnit[6], cross_center_x, cross1_ry[4] )
call IssuePointOrder( LightningUnit[6], "patrol", cross_center_x, cross1_ry[0] )
//
// unit offset moving units = 90 degrees
//
call SetUnitPosition( LightningUnit[7], cross_center_x, cross1_ry[1] )
call IssuePointOrder( LightningUnit[7], "patrol", cross_center_x, cross1_ry[2] )
//
call SetUnitPosition( LightningUnit[8], cross_center_x, cross1_ry[2] )
call IssuePointOrder( LightningUnit[8], "patrol", cross_center_x, cross1_ry[0] )
//
// starting lightning effects
//
set LightningEffect[0] = AddLightning( "CLPB", true, cross1_rx[1], cross_center_y, cross1_rx[3], cross_center_y )
set LightningEffect[1] = AddLightning( "CLPB", true, cross_center_x, cross1_ry[1], cross_center_x, cross1_ry[3] )
call PolledWait( 3.00 )
set udg_Lightning_Kill_Units_Boolean[1] = true
call DestroyLightning( LightningEffect[0] )
call DestroyLightning( LightningEffect[1] )
set LightningEffect[0] = AddLightning("AFOD", true, cross1_rx[1], cross_center_y, cross1_rx[3], cross_center_y )
set LightningEffect[1] = AddLightning("AFOD", true, cross_center_x, cross1_ry[1], cross_center_x, cross1_ry[3] )
call PolledWait( 2.50 )
set udg_Lightning_Kill_Units_Boolean[1] = false
call DestroyLightning( LightningEffect[0] )
call DestroyLightning( LightningEffect[1] )
set Random_Plus_Sign_Counter = Random_Plus_Sign_Counter + 1
if ( Random_Plus_Sign_Counter == 5 ) then
call EnableTrigger( gg_trg_Plus_Sign_Random_2 )
elseif ( Random_Plus_Sign_Counter == 10 ) then
call EnableTrigger( gg_trg_Plus_Sign_Random_3 )
endif
endfunction
//===========================================================================
function InitTrig_Plus_Sign_Random_1 takes nothing returns nothing
set gg_trg_Plus_Sign_Random_1 = CreateTrigger( )
call DisableTrigger( gg_trg_Plus_Sign_Random_1 )
call TriggerRegisterTimerEvent( gg_trg_Plus_Sign_Random_1, 6.00, true )
call TriggerAddAction( gg_trg_Plus_Sign_Random_1, function Trig_Plus_Sign_Random_1_Actions )
endfunction
JASS:
function Trig_Plus_Sign_Random_2_Actions takes nothing returns nothing
local rect randomloc1 = (gg_rct_Random_1_for_cross_random)
local rect randomloc2 = (gg_rct_Random_2_for_cross_random)
local real cross_center_y = GetRandomReal(GetRectMinY(randomloc1), GetRectMaxY(randomloc1)) // use for center
local real cross_center_x = GetRandomReal(GetRectMinX(randomloc2), GetRectMaxX(randomloc2)) // use for center
local real array cross1_rx
local real array cross1_ry
local lightning array LightningEffect
set cross1_rx[0] = GetRandomReal(GetRectMinX(randomloc1), GetRectMaxX(randomloc1)) //used for gg_rct_Random_1a_for_cross_random
set cross1_ry[0] = GetRandomReal(GetRectMinY(randomloc2), GetRectMaxY(randomloc2)) //used for gg_rct_Random_1a_for_cross_random
call MoveRectTo( gg_rct_Random_1a_for_cross_random, cross1_rx[0], cross_center_y )
call MoveRectTo( gg_rct_Random_1a_for_cross_random, cross_center_x, cross1_ry[0] )
//
// offset units facing 0 degrees
//
set cross1_rx[1] = cross1_rx[0] + 987.50 // east x value
set cross1_rx[2] = cross1_rx[0] + 493.75 // east x value
//
// offset units facing 180 degrees
//
set cross1_rx[3] = cross1_rx[0] - 987.50 // west x value
set cross1_rx[4] = cross1_rx[0] - 493.75 // west x value
//
// offset units facing 90 degrees
//
set cross1_ry[1] = cross1_ry[0] + 987.50 // north y value
set cross1_ry[2] = cross1_ry[0] + 493.75 // north y value
//
// offset units facing 270 degrees
//
set cross1_ry[3] = cross1_ry[0] - 987.50 // south y value
set cross1_ry[4] = cross1_ry[0] - 493.75 // south y value
//
// units at center
//
// Making Units move to the random point selected w offseting specified above
// unit offset moving units = 180 degrees
//
call SetUnitPosition( LightningUnit[9], cross1_rx[3], cross_center_y )
call IssuePointOrder( LightningUnit[9], "patrol", cross1_rx[4], cross_center_y )
//
call SetUnitPosition( LightningUnit[10], cross1_rx[4], cross_center_y )
call IssuePointOrder( LightningUnit[10], "patrol", cross1_rx[0], cross_center_y )
//
// unit offset moving units = 0 degrees
//
call SetUnitPosition( LightningUnit[11], cross1_rx[1], cross_center_y )
call IssuePointOrder( LightningUnit[11], "patrol", cross1_rx[2], cross_center_y )
//
call SetUnitPosition( LightningUnit[12], cross1_rx[2], cross_center_y )
call IssuePointOrder( LightningUnit[12], "patrol", cross1_rx[0], cross_center_y )
//
// unit offset moving units = 270 degrees
//
call SetUnitPosition( LightningUnit[13], cross_center_x, cross1_ry[3] )
call IssuePointOrder( LightningUnit[13], "patrol", cross_center_x, cross1_ry[4] )
//
call SetUnitPosition( LightningUnit[14], cross_center_x, cross1_ry[4] )
call IssuePointOrder( LightningUnit[14], "patrol", cross_center_x, cross1_ry[0] )
//
// unit offset moving units = 90 degrees
//
call SetUnitPosition( LightningUnit[15], cross_center_x, cross1_ry[1] )
call IssuePointOrder( LightningUnit[15], "patrol", cross_center_x, cross1_ry[2] )
//
call SetUnitPosition( LightningUnit[16], cross_center_x, cross1_ry[2] )
call IssuePointOrder( LightningUnit[16], "patrol", cross_center_x, cross1_ry[0] )
//
// starting lightning effects
//
set LightningEffect[0] = AddLightning( "CLPB", true, cross1_rx[1], cross_center_y, cross1_rx[3], cross_center_y )
set LightningEffect[1] = AddLightning( "CLPB", true, cross_center_x, cross1_ry[1], cross_center_x, cross1_ry[3] )
call PolledWait( 2.75 )
set udg_Lightning_Kill_Units_Boolean[1] = true
call DestroyLightning( LightningEffect[0] )
call DestroyLightning( LightningEffect[1] )
set LightningEffect[0] = AddLightning("AFOD", true, cross1_rx[1], cross_center_y, cross1_rx[3], cross_center_y )
set LightningEffect[1] = AddLightning("AFOD", true, cross_center_x, cross1_ry[1], cross_center_x, cross1_ry[3] )
call PolledWait( 2.25 )
set udg_Lightning_Kill_Units_Boolean[1] = false
call DestroyLightning( LightningEffect[0] )
call DestroyLightning( LightningEffect[1] )
endfunction
//===========================================================================
function InitTrig_Plus_Sign_Random_2 takes nothing returns nothing
set gg_trg_Plus_Sign_Random_2 = CreateTrigger( )
call DisableTrigger( gg_trg_Plus_Sign_Random_2 )
call TriggerRegisterTimerEvent( gg_trg_Plus_Sign_Random_2, 5.50, true )
call TriggerAddAction( gg_trg_Plus_Sign_Random_2, function Trig_Plus_Sign_Random_2_Actions )
endfunction
JASS:
function Trig_Plus_Sign_Random_3_Actions takes nothing returns nothing
local rect randomloc1 = (gg_rct_Random_1_for_cross_random)
local rect randomloc2 = (gg_rct_Random_2_for_cross_random)
local real cross_center_y = GetRandomReal(GetRectMinY(randomloc1), GetRectMaxY(randomloc1)) // use for center
local real cross_center_x = GetRandomReal(GetRectMinX(randomloc2), GetRectMaxX(randomloc2)) // use for center
local real array cross1_rx
local real array cross1_ry
local lightning array LightningEffect
set cross1_rx[0] = GetRandomReal(GetRectMinX(randomloc1), GetRectMaxX(randomloc1)) //used for gg_rct_Random_1a_for_cross_random
set cross1_ry[0] = GetRandomReal(GetRectMinY(randomloc2), GetRectMaxY(randomloc2)) //used for gg_rct_Random_1a_for_cross_random
call MoveRectTo( gg_rct_Random_1a_for_cross_random, cross1_rx[0], cross_center_y )
call MoveRectTo( gg_rct_Random_1a_for_cross_random, cross_center_x, cross1_ry[0] )
//
// offset units facing 0 degrees
//
set cross1_rx[1] = cross1_rx[0] + 987.50 // east x value
set cross1_rx[2] = cross1_rx[0] + 493.75 // east x value
//
// offset units facing 180 degrees
//
set cross1_rx[3] = cross1_rx[0] - 987.50 // west x value
set cross1_rx[4] = cross1_rx[0] - 493.75 // west x value
//
// offset units facing 90 degrees
//
set cross1_ry[1] = cross1_ry[0] + 987.50 // north y value
set cross1_ry[2] = cross1_ry[0] + 493.75 // north y value
//
// offset units facing 270 degrees
//
set cross1_ry[3] = cross1_ry[0] - 987.50 // south y value
set cross1_ry[4] = cross1_ry[0] - 493.75 // south y value
//
// units at center
//
// Making Units move to the random point selected w offseting specified above
// unit offset moving units = 180 degrees
//
call SetUnitPosition( LightningUnit[17], cross1_rx[3], cross_center_y )
call IssuePointOrder( LightningUnit[17], "patrol", cross1_rx[4], cross_center_y )
//
call SetUnitPosition( LightningUnit[18], cross1_rx[4], cross_center_y )
call IssuePointOrder( LightningUnit[18], "patrol", cross1_rx[0], cross_center_y )
//
// unit offset moving units = 0 degrees
//
call SetUnitPosition( LightningUnit[19], cross1_rx[1], cross_center_y )
call IssuePointOrder( LightningUnit[19], "patrol", cross1_rx[2], cross_center_y )
//
call SetUnitPosition( LightningUnit[20], cross1_rx[2], cross_center_y )
call IssuePointOrder( LightningUnit[20], "patrol", cross1_rx[0], cross_center_y )
//
// unit offset moving units = 270 degrees
//
call SetUnitPosition( LightningUnit[21], cross_center_x, cross1_ry[3] )
call IssuePointOrder( LightningUnit[21], "patrol", cross_center_x, cross1_ry[4] )
//
call SetUnitPosition( LightningUnit[22], cross_center_x, cross1_ry[4] )
call IssuePointOrder( LightningUnit[22], "patrol", cross_center_x, cross1_ry[0] )
//
// unit offset moving units = 90 degrees
//
call SetUnitPosition( LightningUnit[23], cross_center_x, cross1_ry[1] )
call IssuePointOrder( LightningUnit[23], "patrol", cross_center_x, cross1_ry[2] )
//
call SetUnitPosition( LightningUnit[24], cross_center_x, cross1_ry[2] )
call IssuePointOrder( LightningUnit[24], "patrol", cross_center_x, cross1_ry[0] )
//
// starting lightning effects
//
set LightningEffect[0] = AddLightning( "CLPB", true, cross1_rx[1], cross_center_y, cross1_rx[3], cross_center_y )
set LightningEffect[1] = AddLightning( "CLPB", true, cross_center_x, cross1_ry[1], cross_center_x, cross1_ry[3] )
call PolledWait( 3.25 )
set udg_Lightning_Kill_Units_Boolean[1] = true
call DestroyLightning( LightningEffect[0] )
call DestroyLightning( LightningEffect[1] )
set LightningEffect[0] = AddLightning("AFOD", true, cross1_rx[1], cross_center_y, cross1_rx[3], cross_center_y )
set LightningEffect[1] = AddLightning("AFOD", true, cross_center_x, cross1_ry[1], cross_center_x, cross1_ry[3] )
call PolledWait( 2.75 )
set udg_Lightning_Kill_Units_Boolean[1] = false
call DestroyLightning( LightningEffect[0] )
call DestroyLightning( LightningEffect[1] )
endfunction
//===========================================================================
function InitTrig_Plus_Sign_Random_3 takes nothing returns nothing
set gg_trg_Plus_Sign_Random_3 = CreateTrigger( )
call DisableTrigger( gg_trg_Plus_Sign_Random_3 )
call TriggerRegisterTimerEvent( gg_trg_Plus_Sign_Random_3, 6.50, true )
call TriggerAddAction( gg_trg_Plus_Sign_Random_3, function Trig_Plus_Sign_Random_3_Actions )
endfunction
JASS:
function Trig_Plus_Sign_Random_Kill_Trigger_1_Actions takes nothing returns nothing
local real x
local real y
local integer Loop1 = 1
local integer triggerplayer
if ( (GetTriggerPlayer() == Player(0)) or (GetTriggerPlayer() == Player(1)) ) and (udg_Lightning_Kill_Units_Boolean[1] == true) then
set triggerplayer = GetPlayerId( GetTriggerPlayer())
if ( triggerplayer == 0 ) then
call DisplayTextToForce( GetPlayersAll(), "Player 2 Has Won The Minigame" )
elseif ( triggerplayer == 1 ) then
call DisplayTextToForce( GetPlayersAll(), "Player 1 Has Won The Minigame" )
endif
call DisableTrigger( gg_trg_Plus_Sign_Random_Kill_Trigger_1 )
call DisableTrigger( gg_trg_Plus_Sign_Random_Kill_Trigger_2 )
call DisableTrigger( gg_trg_Plus_Sign_Random_Kill_Trigger_3 )
call DisableTrigger( gg_trg_Plus_Sign_Random_1 )
call DisableTrigger( gg_trg_Plus_Sign_Random_2 )
call DisableTrigger( gg_trg_Plus_Sign_Random_3 )
set x = GetRectCenterX(gg_rct_Hero_Spawn_P1)
set y = GetRectCenterY(gg_rct_Hero_Spawn_P1)
call SetUnitPosition( udg_Selected_Hero_Red, x, y )
set x = GetRectCenterX(gg_rct_Hero_Spawn_P2)
set y = GetRectCenterY(gg_rct_Hero_Spawn_P2)
call SetUnitPosition( udg_Selected_Hero_Blue, x, y )
call PolledWait( 7.00 )
loop
exitwhen Loop1 > 24
call SetUnitPosition( LightningUnit[Loop1], LightningUnit_X[Loop1], LightningUnit_Y[Loop1] )
set Loop1 = Loop1 + 1
endloop
set udg_Lightning_Kill_Units_Boolean[1] = false
set udg_Lightning_Kill_Units_Boolean[2] = false
set udg_Lightning_Kill_Units_Boolean[3] = false
call ResumeTimer( udg_Random_Events_Timer )
call TimerDialogDisplay( udg_Random_Events_Timer_Window, true )
endif
endfunction
//===========================================================================
function InitTrig_Plus_Sign_Random_Kill_Trigger_1 takes nothing returns nothing
set gg_trg_Plus_Sign_Random_Kill_Trigger_1 = CreateTrigger( )
call DisableTrigger( gg_trg_Plus_Sign_Random_Kill_Trigger_1 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_1, 125.00, gg_unit_h05F_0036 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_1, 125.00, gg_unit_h05F_0037 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_1, 125.00, gg_unit_h05F_0038 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_1, 125.00, gg_unit_h05F_0039 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_1, 125.00, gg_unit_h05F_0040 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_1, 125.00, gg_unit_h05F_0041 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_1, 125.00, gg_unit_h05F_0043 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_1, 125.00, gg_unit_h05F_0044 )
call TriggerAddAction( gg_trg_Plus_Sign_Random_Kill_Trigger_1, function Trig_Plus_Sign_Random_Kill_Trigger_Actions )
endfunction
JASS:
function Trig_Plus_Sign_Random_Kill_Trigger_2_Actions takes nothing returns nothing
local real x
local real y
local integer Loop1 = 1
local integer triggerplayer
if ( (GetTriggerPlayer() == Player(0)) or (GetTriggerPlayer() == Player(1)) ) and (udg_Lightning_Kill_Units_Boolean[2] == true) then
set triggerplayer = GetPlayerId( GetTriggerPlayer())
if ( triggerplayer == 0 ) then
call DisplayTextToForce( GetPlayersAll(), "Player 2 Has Won The Minigame" )
elseif ( triggerplayer == 1 ) then
call DisplayTextToForce( GetPlayersAll(), "Player 1 Has Won The Minigame" )
endif
call DisableTrigger( gg_trg_Plus_Sign_Random_Kill_Trigger_1 )
call DisableTrigger( gg_trg_Plus_Sign_Random_Kill_Trigger_2 )
call DisableTrigger( gg_trg_Plus_Sign_Random_Kill_Trigger_3 )
call DisableTrigger( gg_trg_Plus_Sign_Random_1 )
call DisableTrigger( gg_trg_Plus_Sign_Random_2 )
call DisableTrigger( gg_trg_Plus_Sign_Random_3 )
set x = GetRectCenterX(gg_rct_Hero_Spawn_P1)
set y = GetRectCenterY(gg_rct_Hero_Spawn_P1)
call SetUnitPosition( udg_Selected_Hero_Red, x, y )
set x = GetRectCenterX(gg_rct_Hero_Spawn_P2)
set y = GetRectCenterY(gg_rct_Hero_Spawn_P2)
call SetUnitPosition( udg_Selected_Hero_Blue, x, y )
call PolledWait( 7.00 )
loop
exitwhen Loop1 > 24
call SetUnitPosition( LightningUnit[Loop1], LightningUnit_X[Loop1], LightningUnit_Y[Loop1] )
set Loop1 = Loop1 + 1
endloop
set udg_Lightning_Kill_Units_Boolean[1] = false
set udg_Lightning_Kill_Units_Boolean[2] = false
set udg_Lightning_Kill_Units_Boolean[3] = false
call ResumeTimer( udg_Random_Events_Timer )
call TimerDialogDisplay( udg_Random_Events_Timer_Window, true )
endif
endfunction
//===========================================================================
function InitTrig_Plus_Sign_Random_Kill_Trigger_2 takes nothing returns nothing
set gg_trg_Plus_Sign_Random_Kill_Trigger_2 = CreateTrigger( )
call DisableTrigger( gg_trg_Plus_Sign_Random_Kill_Trigger_2 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_2, 125.00, gg_unit_h05F_0045 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_2, 125.00, gg_unit_h05F_0046 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_2, 125.00, gg_unit_h05F_0047 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_2, 125.00, gg_unit_h05F_0048 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_2, 125.00, gg_unit_h05F_0049 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_2, 125.00, gg_unit_h05F_0050 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_2, 125.00, gg_unit_h05F_0051 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_2, 125.00, gg_unit_h05F_0052 )
call TriggerAddAction( gg_trg_Plus_Sign_Random_Kill_Trigger_2, function Trig_Plus_Sign_Random_Kill_Trigger_Actions )
endfunction
JASS:
function Trig_Plus_Sign_Random_Kill_Trigger_3_Actions takes nothing returns nothing
local real x
local real y
local integer Loop1 = 1
local integer triggerplayer
if ( (GetTriggerPlayer() == Player(0)) or (GetTriggerPlayer() == Player(1)) ) and (udg_Lightning_Kill_Units_Boolean[3] == true) then
set triggerplayer = GetPlayerId( GetTriggerPlayer())
if ( triggerplayer == 0 ) then
call DisplayTextToForce( GetPlayersAll(), "Player 2 Has Won The Minigame" )
elseif ( triggerplayer == 1 ) then
call DisplayTextToForce( GetPlayersAll(), "Player 1 Has Won The Minigame" )
endif
call DisableTrigger( gg_trg_Plus_Sign_Random_Kill_Trigger_1 )
call DisableTrigger( gg_trg_Plus_Sign_Random_Kill_Trigger_2 )
call DisableTrigger( gg_trg_Plus_Sign_Random_Kill_Trigger_3 )
call DisableTrigger( gg_trg_Plus_Sign_Random_1 )
call DisableTrigger( gg_trg_Plus_Sign_Random_2 )
call DisableTrigger( gg_trg_Plus_Sign_Random_3 )
set x = GetRectCenterX(gg_rct_Hero_Spawn_P1)
set y = GetRectCenterY(gg_rct_Hero_Spawn_P1)
call SetUnitPosition( udg_Selected_Hero_Red, x, y )
set x = GetRectCenterX(gg_rct_Hero_Spawn_P2)
set y = GetRectCenterY(gg_rct_Hero_Spawn_P2)
call SetUnitPosition( udg_Selected_Hero_Blue, x, y )
call PolledWait( 7.00 )
loop
exitwhen Loop1 > 24
call SetUnitPosition( LightningUnit[Loop1], LightningUnit_X[Loop1], LightningUnit_Y[Loop1] )
set Loop1 = Loop1 + 1
endloop
set udg_Lightning_Kill_Units_Boolean[1] = false
set udg_Lightning_Kill_Units_Boolean[2] = false
set udg_Lightning_Kill_Units_Boolean[3] = false
call ResumeTimer( udg_Random_Events_Timer )
call TimerDialogDisplay( udg_Random_Events_Timer_Window, true )
endif
endfunction
//===========================================================================
function InitTrig_Plus_Sign_Random_Kill_Trigger_3 takes nothing returns nothing
set gg_trg_Plus_Sign_Random_Kill_Trigger_3 = CreateTrigger( )
call DisableTrigger( gg_trg_Plus_Sign_Random_Kill_Trigger_3 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_3, 125.00, gg_unit_h05F_0053 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_3, 125.00, gg_unit_h05F_0054 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_3, 125.00, gg_unit_h05F_0055 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_3, 125.00, gg_unit_h05F_0056 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_3, 125.00, gg_unit_h05F_0058 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_3, 125.00, gg_unit_h05F_0059 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_3, 125.00, gg_unit_h05F_0060 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Plus_Sign_Random_Kill_Trigger_3, 125.00, gg_unit_h05F_0061 )
call TriggerAddAction( gg_trg_Plus_Sign_Random_Kill_Trigger_3, function Trig_Plus_Sign_Random_Kill_Trigger_Actions )
endfunction
Last edited: