The FieldId is a number between 0-63999 (at least on 800x800 grid servers)

Each FieldId is directly related to a coordinate pair, the game server uses FieldIds to reference all the squares on the map... 0,0 has fieldId of 0.... 1,0 has fieldId of 1... 799,0 has fieldId of 799... 1,1 is fieldId 800... there is a direct mathematical relationship between the coords and the fieldId. Many of the advanced scripting functions require you to convert your coordinates into fieldIds to use them.

You can convert x and y into FieldId using this forumla:

FieldId = x+(y*800)

Alternately, you can use the NEAT GetFieldId(coords) function to convert a set of coords into a FieldId

You can convert fieldId back into x and y using this forumla:

x = fieldId MOD 800

y = floor(fieldId / 800)

Or you can use

FieldIdToCoords(fieldId)



CategoryConstants

FieldId (last edited 2015-05-23 20:05:55 by Inanna)