- Joined
- Jun 7, 2008
- Messages
- 440
Okay, So i read all of the jass tutorials and all of them start nice and slow, and then jumps. I read trying to find out how to, say creating a unit at a local point. I then Tried converting the trigger from GUI to JASS and going about it that way. While it works, i wanted to remove the "BJ"'s and such. This is what i have so far. Im novice, so please bear with me
Please help
EDIT: I notice now i could have used local unit arrays there, oops.

JASS:
function Trig_Light_Invisible_Sins_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'e005' ) ) then
return false
endif
return true
endfunction
function Trig_Light_Invisible_Sins_Actions takes nothing returns nothing
local unit u
local unit a
local location p = GetRandomLocInRect(gg_rct_Light_Summon)
local location t = GetRandomLocInRect(gg_rct_Light_Reinforcement_Spawn)
local integer g = 10
call KillUnit(GetTriggerUnit())
loop
exitwhen g == 0
set u = CreateUnit( player(9), 'e00F', p, 0, 0)
set a = CreateUnit( player(9), 'e00F', t, 0, 0)
set g = g - 1
set udg_Light_Unit = udg_Light_Unit + 2
call TriggerSleepAction(1)
endloop
call RemoveLocation(t)
call RemoveLocation(p)
set u = null
set a = null
endfunction
//===========================================================================
function InitTrig_Light_Invisible_Sins takes nothing returns nothing
set gg_trg_Light_Invisible_Sins = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Light_Invisible_Sins, gg_rct_Light_No_Entry_Zone )
call TriggerAddCondition( gg_trg_Light_Invisible_Sins, Condition( function Trig_Light_Invisible_Sins_Conditions ) )
call TriggerAddAction( gg_trg_Light_Invisible_Sins, function Trig_Light_Invisible_Sins_Actions )
endfunction
Please help
EDIT: I notice now i could have used local unit arrays there, oops.