9.13 Map object
Description
You can get/set the properties of the current map with the Map object. You can read generic informations (width, height, ...) or change the single chips (upper chip, lower chip).
List of methods/properties
Name | Type | Short description |
ID | Property | The id of the map |
Width | Property | The width of the map |
Height | Property | The height of the map |
HeroX | Property | The x coordinate of the hero on the map |
HeroY | Property | The y coordinate of the hero on the map |
Chipset | Property | The id of the map's used chipset |
Lower | Property | The lower chip at a specific position on the map |
Upper | Property | The upper chip at a specific position on the map |
EventCount | Property | The number of events on the map |
Description
This is the id used by the RPG-Maker 2000 to identify the current map.
Syntax
Data type
Dword
Type
Property, read-only
Example
At the end v[1] whould contain the Id of the current map (in this case probably 1).
Description
This is the width (in chips) of the current map.
Syntax
Data type
Dword
Type
Property, read-only
Example
At the end v[1] whould contain the width of the current map (e. g. on a 20 x 15 sized map this whould be 20).
Description
This is the height (in chips) of the current map.
Syntax
Data type
Dword
Type
Property, read-only
Example
At the end v[1] whould contain the height of the current map (e. g. on a 20 x 15 sized map this whould be 15).
Description
This is the current hero's x coordinate on the current map.
Syntax
Data type
Dword
Type
Property, read-only
Example
At the end v[1] whould contain the current x coordinate of the hero.
Description
This is the current hero's y coordinate on the current map.
Syntax
Data type
Dword
Type
Property, read-only
Example
At the end v[1] whould contain the current y coordinate of the hero.
Description
This is the id of the chipset which is used by the current map.
Syntax
Data type
Dword
Type
Property, read-only
Example
At the end v[1] whould contain the chipset id of the current map.
Description
This is the lower chip at a specific position on the map. A two dimensional index is used to specify the position. The first value is the x coordinate an the second value is the y coordinate. Both values start at 0. The boundaries of the map may not be exceeded.
Syntax
Data type
Word
Type
Property
Example
1
2
$
Map.Lower[0, 0] = 4333
At the end the lower chip in the upper left corner of the map (position 0, 0) whould be changed to a poisoned chip (depends on the chipset).
Description
This is the upper chip at a specific position on the map. A two dimensional index is used to specify the position. The first value is the x coordinate an the second value is the y coordinate. Both values start at 0. The boundaries of the map may not be exceeded.
Syntax
Data type
Word
Type
Property
Example
1
2
$
Map.Upper[Map.Width - 1, 0] = 10000
At the end the upper chip in the upper right corner of the map whould be a clear chip (depends on the chipset).
Description
This is the total number of events (excluding the hero and the vehicles) on the map. This property can be quite well combined for loops with the
MapEvent object.
Syntax
Data type
Dword
Type
Property, read-only
Example
1
2
$
v[1] = Map.EventCount
At the end v[1] whould contain the number of events on the current map.