Difference between revisions of "ASSS Region"
From ASSS Wiki
(changed some formatting. added reference to python code sample.) |
m |
||
Line 26: | Line 26: | ||
<!-- no point having duplicate code everywhere --> | <!-- no point having duplicate code everywhere --> | ||
+ | |||
+ | [[Category: ASSS]] | ||
[[Category: Documents]] | [[Category: Documents]] |
Revision as of 23:13, 12 January 2005
An ASSS Region is a region defined inside a map file. These can be arbitrary sets of tiles. Regions can have warpto coordinates, that will warp a player to a certain coordinate and/or arena when they enter the region. Regions can also have flags set for them that are understood internally by the server. These flags include: isBase (whether the region represents a base in a flag game), no antiwarp, no weapons, and no flag drops. They are understood internally using the mapdata interface. Regions are encoded in Extended LVL Files, and can be made using a python script from the ASSS site, Continuum Level / Ini Tool, or DustEd.
One can check if a tile is in a region using this code:
Code examples
C
Region *myRgn = mapdata->FindRegionByName(arena,"myRegion"); int x = 512; int y = 512; if (myRgn && md->Contains(myRgn,x,y)) { // your point is in the region } else { // your point is not in the region }