Versions Compared

Key

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

Send a beacon to a specific player or allies...

 

Syntax

Code Block
themeRDark
languagejavascript
linenumberstrue
addBeacon(x, y, to[, message]);

Parameters

ParameterTypeMandatoryNotesGame Version
xNumber(tick)The x co-ordinate of the beacon.3.2
yNumber(tick)The y co-ordinate of the beacon.3.2
to

Number

Constant

(tick)

The player id who the beacon is for.

Alternatively you can send the beacon to all ALLIES.

3.2
messageString(error)An optional message to send with the beacon.3.2

Return values

ValueTypeNotesGame Version
trueBooleanIndicates the beacon was successfully added.3.2
falseBooleanIndicates the beacon did not get added. (why??)3.2
<error>ErrorInvalid parameters.3.2

Example

Code Block
themeRDark
languagejavascript
linenumberstrue
function eventObjectSeen(sensor, gameObject) {
	addBeacon(gameObject.x, gameObject.y, ALLIES, "I just spotted a "+gameObject.name);
}
Div
classbox
Availability
Status
colour
Yellow
Red
title
Beta
Dev

Requires:

  • Warzone 3.2 or above
Div
classbox
Contents

Jump to:

Table of Contents
maxLevel5

Div
classbox

See also

Related articles: