- Joined
- Jun 7, 2008
- Messages
- 37
JASS:
function Trig_Result3_Actions takes nothing returns nothing
local location l
local location p
local unit c
local integer f = 0
loop
set l = GetRandomLocInRect(gg_rct_Respawn)
set p = GetRandomLocInRect(gg_rct_Respawn)
set c = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'h001', l, 0.)
call UnitAddAbility(c, 'A004')
call IssuePointOrderLoc(c, "impale", p)
call UnitApplyTimedLife(c, 'BOsf', 3)
set f = f+1
exitwhen f == 5
endloop
call RemoveLocation(l)
call RemoveLocation(p)
set c = null
set l = null
set p = null
endfunction
//===========================================================================
function InitTrig_Result3 takes nothing returns nothing
set gg_trg_Result3 = CreateTrigger( )
call TriggerAddAction( gg_trg_Result3, function Trig_Result2_Actions )
endfunction
JASS:
function I_Hate_Boolxpr takes nothing returns boolean
return (IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true)
endfunction
function Trig_Result4_Actions takes nothing returns nothing
local location l
local unit t
local unit c
local integer f = 0
local group g
call GroupEnumUnitsInRect(g, gg_rct_Respawn, Condition(function I_Hate_Boolxpr))
loop
set l = GetRandomLocInRect(gg_rct_Respawn)
set c = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'h001', l, 0.)
set t = FirstOfGroup(g)
call UnitAddAbility(c, 'A005')
call SetUnitAbilityLevel(c, 'A005', 1)
call IssueTargetOrder(c, "thunderbolt", t)
call UnitApplyTimedLife(c, 'BOsf', 3)
call GroupRemoveUnit(g, t)
exitwhen IsUnitGroupEmptyBJ(g) == true
endloop
call RemoveLocation(l)
call DestroyGroup(g)
set g = null
set c = null
set l = null
endfunction
//===========================================================================
function InitTrig_Result4 takes nothing returns nothing
set gg_trg_Result4 = CreateTrigger( )
call TriggerAddAction( gg_trg_Result4, function Trig_Result2_Actions )
endfunction
JASS:
function Trig_Result5_Actions takes nothing returns nothing
local location l = GetRandomLocInRect(gg_rct_Respawn)
local location p = GetRandomLocInRect(gg_rct_Respawn)
local unit c = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'h001', l, 0.)
call UnitAddAbility(c, 'S001')
call IssuePointOrderLoc(c, "deathanddecay", p)
call UnitApplyTimedLife(c, 'BOsf', 3)
call RemoveLocation(l)
call RemoveLocation(p)
set c = null
set l = null
set p = null
endfunction
//===========================================================================
function InitTrig_Result5 takes nothing returns nothing
set gg_trg_Result5 = CreateTrigger( )
call TriggerAddAction( gg_trg_Result5, function Trig_Result2_Actions )
endfunction
The one thing that they have in common is that they don't work. Could you please lend me a hand here?