global region (not rect)

meOme

New Member
Reaction score
31
Hi guyz

All I'm trying to do is to define a global region, add some rects to this region, and use it in a couple of triggers.
I just can't get it to work. :(

I added this to my mapheader:
JASS:
globals
    region walls = CreateRegion()
endglobals

(Only works with JassHelper, though. Any way to create global variables without Jasshelper?)

But when I try to use this variable, the game just crashes:
JASS:
call RegionAddRect( walls, gg_rct_Gebiet_001 ) // = Crash :/


What am I doing wrong?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Meaning that you need to initialize it in an "Init" function, like:
JASS:
scope InitRegions initializer Init

    globals
        region walls
    endglobals

    private function Init takes nothing returns nothing
        set walls = CreateRegion()
    endfunction

endscope


;)
 
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