GUI to JASS conversion

Emu.Man00

New Member
Reaction score
41
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:
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

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!?
 

Naga'sShadow

Ultra Cool Member
Reaction score
49
Its because you switched a group actions function.

Trig_Untitled_Trigger_001_Actions calls uses the ForGroupBJ function which calls Trig_Untitled_Trigger_001_Func001A that's the actions part of your group actions.

But in actions you've asked it for another subgroup so it puts
Trig_Untitled_Trigger_001_Func001Func001001002003 together.

Trig_Untitled_Trigger_001_Func001Func001A is the actions function for that second group function, you didn't put anything in it so its empty.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top