Few Question

simonake

New Member
Reaction score
72
1. Is there a way to turn on/off triggers in Jass

2. If several event happens at the same time and i use the same local name and type will it bug/leak?

It's this tirgger
JASS:
function Trig_East1_Conditions takes nothing returns boolean
    if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(11) ) ) then
        return false
    endif
    return true
endfunction

function Trig_East1_Actions takes nothing returns nothing

    local location ctn = GetRectCenter(gg_rct_Castle_Emplacement)
    
    call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", ctn)
 
    call RemoveLocation( ctn)
    set ctn = null
    
endfunction

//===========================================================================
function InitTrig_East1 takes nothing returns nothing
    set gg_trg_East1 = CreateTrigger(  )
    call TriggerRegisterEnterRectSimple( gg_trg_East1, gg_rct_EastSpawn1 )
    call TriggerAddCondition( gg_trg_East1, Condition( function Trig_East1_Conditions ) )
    call TriggerAddAction( gg_trg_East1, function Trig_East1_Actions )
endfunction
 

Azlier

Old World Ghost
Reaction score
461
1. call EnableTrigger, call DisableTrigger...

2. Events can never run at the exact same time. They run one at a time. Even if they did, local variables cannot be modified in any way from outside a function. Else, they wouldn't be local variables.
 

Azlier

Old World Ghost
Reaction score
461
Well, yes. Your condition reeks of GUI and the gg_trg is annoying, but it is leakless.
 

simonake

New Member
Reaction score
72
I started monday so yes, my conditions "sucks"i do event and conditions, then i transform.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top