GUI -> JASS tool?

Pahl

New Member
Reaction score
7
Im learning JASS, and its going pretty well but im still using alot of GUI to JASS conversions(and converting some old triggers to make them better).

Anyways, im getting really annoyed over the way the "If" triggers and some others end up after conversion.. example:

Code:
function Trig_Untitled_Trigger_001_Func001Func002001 takes nothing returns boolean
    return ( GetTriggerUnit() == GetLastCreatedUnit() )
endfunction

function Trig_Untitled_Trigger_001_Func001C takes nothing returns boolean
    if ( not ( CountUnitsInGroup(GetUnitsInRectAll(GetPlayableMapRect())) == 0 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    if ( Trig_Untitled_Trigger_001_Func001C() ) then
        if ( Trig_Untitled_Trigger_001_Func001Func002001() ) then
            call KillUnit( GetTriggerUnit() )
        else
            call DoNothing(  )
        endif
    else
        call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_720" )
    endif
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

Have anyone ever made a tool that lets you clean up messes like that quickly?
 

Rinpun

Ex TH Member
Reaction score
105
Nope.

But if you convert before you edit too many of the actions, you get a good base of a trigger that you can then add lines of clean code to manually. No need to convert except at the beginning once you have your events and conditions down.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top