Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

Centre the camera view on a specific x,y tile co-ordinate...

 

Syntax

Code Block
themeRDark
languagejavascript
linenumberstrue
centreView(x,y);

Parameters

ParameterTypeMandatoryDescriptionGame version
xNumber(tick)The x co-ordinate to show3.1 Beta 1
yNumber(tick)The y co-ordinate to show3.1 Beta 1

Return value

ValueTypeDescriptionGame version
undefinedUndefinedThe camera view has been updated3.1 Beta 1
<error>Error(question) I assume an error will be thrown if the x,y is out of bounds on the map?3.1 Beta 1

Example

Code Block
themeRDark
languagejavascript
titleCentre view on a new droid
linenumberstrue
eventDroidBuilt(droid) {
  centreView(droid.x, droid.y);
}
Div
classbox
Availability
Status
colourGreen
title
Stable
3.1 b1+

Requires:

  • Warzone 3.1 Beta 1 and above
Div
classbox
Contents

Jump to:

Table of Contents
maxLevel5

Div
classbox

See also

Related articles: