Move System Error

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
JASS:
function Trig_Actions_01 takes nothing returns nothing
    set udg_Loop[2] = 1
    set udg_LoopEnd = 5
    loop
        exitwhen udg_Loop[2] > udg_LoopEnd
        call TriggerRegisterEnterRectSimple( gg_trg_Move_System, udg_MoveRegions[udg_Loop[2]] )
        set udg_Integer[udg_Loop[2]] = udg_Loop[2]
        set udg_Loop[2] = udg_Loop[2] + 1
    endloop
endfunction
//===========================================================================
function InitTrig_Setup_Move_System takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    call TriggerAddAction( t, function Trig_Actions_01 )
endfunction



When using this trigger the events seem to not be added correctly, but just incase here's second half.

Edit: The result is nothing. Nothing seems to trigger.

Code:
Move System
    Events
    Conditions
    Actions
        Unit - Move (Triggering unit) instantly to (Center of MovedRegions[Integer[Loop[2]]])
 

Nina

New Member
Reaction score
8
First of all in the first trigger you forgot the f of function, I think the problem is because you add the event in the action. An action can only be ran after it has been triggered atleast once by an event and since the action is never called the event will never be added.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
The event is On Map Initialization...

It' setting up another trigger..
 

Flare

Stops copies me!
Reaction score
662
Have you assigned a rect/region (whichever :p) to that variable array? If the variable doesn't point to a rect/region, how can you move a unit to Center of <variable> :)

Also, you could simply do everything within the InitTrig, just to have things a little neater

@Nina: If that doesn't work with JASS triggers, then what is the point of is even existing? That check-box isn't available to GUI triggers (and it's the Map Init event that checks it)
 

Nina

New Member
Reaction score
8
with On map intialization do you mean you ticked the box run on map intialization? That won't work in JASS triggers, you will have to add the event in the trigger.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Hmm... I think I know one way it can mess up. I set the regions on Map Init too. Lemme turn the setup trigger on a sec later.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
It's still not working... The second trigger doesn't even seem to start up.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Yea, in the original the f is there. Don't know how that messed up when pasting here. XD
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
The trigger still isn't working. Does anyone have an idea to why this is... I need this to make a hero selection sytem, so it's kinda important for my map..
 
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