I converted a small trigger (only an action) from GUI to JASS, to help me understand it better. There was one part that made absolutely no sense to me, I was hoping somebody could enlight me on it.
In GUI:
JASS:
What is the point of this... it does nothing at all. Why does it exist, let alone getting called, if it does nothing!?
In GUI:
Trigger:
- Untitled Trigger 001
- Events
- Conditions
- Actions
- Unit Group - Pick every unit in (Units within 700.00 of (Position of DummyFC)) and do (Actions)
- Loop - Actions
- Unit Group - Pick every unit in (Random 1 units from (Units within 700.00 of (Position of DummyFC) matching ((Angle from (Position of DummyFC) to (Position of (Matching unit))) Greater than or equal to 10.00))) and do (Actions)
- Loop - Actions
- Unit Group - Pick every unit in (Random 1 units from (Units within 700.00 of (Position of DummyFC) matching ((Angle from (Position of DummyFC) to (Position of (Matching unit))) Greater than or equal to 10.00))) and do (Actions)
- Loop - Actions
- Unit Group - Pick every unit in (Units within 700.00 of (Position of DummyFC)) and do (Actions)
JASS:
JASS:
function Trig_Untitled_Trigger_001_Func001Func001001002003 takes nothing returns boolean
return ( AngleBetweenPoints(GetUnitLoc(udg_DummyFC), GetUnitLoc(GetFilterUnit())) >= 10 )
endfunction
function Trig_Untitled_Trigger_001_Func001Func001A takes nothing returns nothing
endfunction
function Trig_Untitled_Trigger_001_Func001A takes nothing returns nothing
call ForGroupBJ( GetRandomSubGroup(1, GetUnitsInRangeOfLocMatching(700.00, GetUnitLoc(udg_DummyFC), Condition(function Trig_Untitled_Trigger_001_Func001Func001001002003))), function Trig_Untitled_Trigger_001_Func001Func001A )
endfunction
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocAll(700.00, GetUnitLoc(udg_DummyFC)), function Trig_Untitled_Trigger_001_Func001A )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
function Trig_Untitled_Trigger_001_Func001Func001A takes nothing returns nothing
endfunction
What is the point of this... it does nothing at all. Why does it exist, let alone getting called, if it does nothing!?