- Joined
- Jun 30, 2006
- Messages
- 230
Edit: Doesn't freaking fire!
JASS:
globals
rect gg_rct_HeartOfTheAlliance = Rect( -4064.0, -448.0, -3616.0, 0.0 )
rect gg_rct_HeartOfTheHorde = Rect( 3616.0, -512.0, 4064.0, -64.0 )
region array udg_Region
endglobals
function Regions takes nothing returns nothing
local integer i = 0
local rect array udg_Rect
set udg_Rect[0] = Rect( -7328.0, 2080.0, -7136.0, 2272.0 )
set udg_Rect[1] = Rect( -7328.0, 800.0, -7136.0, 992.0 )
set udg_Rect[2] = Rect( -7328.0, -480.0, -7136.0, -288.0 )
set udg_Rect[3] = Rect( -7328.0, -1760.0, -7136.0, -1568.0 )
set udg_Rect[4] = Rect( -7328.0, -3040.0, -7136.0, -2848.0 )
set udg_Rect[5] = Rect( 7136.0, 2208.0, 7328.0, 2400.0 )
set udg_Rect[6] = Rect( 7136.0, 928.0, 7328.0, 1120.0 )
set udg_Rect[7] = Rect( 7136.0, -352.0, 7328.0, -160.0 )
set udg_Rect[8] = Rect( 7136.0, -1632.0, 7328.0, -1440.0 )
set udg_Rect[9] = Rect( 7136.0, -2912.0, 7328.0, -2720.0 )
loop
exitwhen i>9
call RegionAddRect( udg_Region[i], udg_Rect[i] )
set i = i + 1
endloop
endfunction
function MassAttack takes nothing returns nothing
local unit u = GetEnumUnit()
local player p = GetOwningPlayer(u)
local integer i = GetPlayerId(p)
local rect r
local location l
if i < 10 then
if i < 5 then
set r = gg_rct_HeartOfTheHorde
else
set r = gg_rct_HeartOfTheAlliance
endif
set l = GetRectCenter(r)
call IssuePointOrderLoc( u, "attack", l )
endif
call RemoveLocation(l)
set l = null
call RemoveRect(r)
set r = null
set p = null
set u = null
endfunction
function MassSendActions takes nothing returns nothing
local integer i = 0
local unit u = GetTriggerUnit()
local player p = GetOwningPlayer(u)
local region Region = GetTriggeringRegion()
local rect r = GetWorldBounds()
local group g
loop
exitwhen i>9
if ( Region == udg_Region[i] ) then
if ( p == Player(i) ) then
set g = GetUnitsInRectOfPlayer( r, Player(i) )
call ForGroup( g, function MassAttack )
endif
endif
set i = i + 1
endloop
call DestroyGroup(g)
set g = null
set Region = null
call RemoveRect(r)
set r = null
set p = null
set u = null
endfunction
//===========================================================================
function InitTrig_MassSend takes nothing returns nothing
local integer i = 0
set gg_trg_MassSend = CreateTrigger()
loop
exitwhen i>9
call TriggerRegisterEnterRegion( gg_trg_MassSend, udg_Region[i], null )
set i = i + 1
endloop
call TriggerAddAction( gg_trg_MassSend, function MassSendActions )
endfunction
Last edited: