Field

Introduction

Provided below are all the attribute values pertaining to Map. Currently, the Mapโ€™s width and height fields cannot be seen.

๐Ÿ”’ Fields with this icon are read-only fields that cannot be revised.

Name
Description

๐Ÿ”’ width

Calls the mapโ€™s width value.

๐Ÿ”’ height

Calls the mapโ€™s height value.

๐Ÿ“š API Explanation and Example

width & height

Map.width : Number Map.height : Number

Calls the mapโ€™s width and height values.

Example

Display the mapโ€™s width and height values on the chat screen.

// Activates function when q is pressed  
// **[App.addOnKeyDown Description (Link)](https://www.notion.so/Callbacks-7ac5078bab7c4f3180ae05463713581d)**
App.addOnKeyDown(81, function (player) {
	App.sayToAll(`map's horizontal size: ${Map.width}`);
	App.sayToAll(`map's vertical size: ${Map.height}`);
});

Last updated

Was this helpful?