Other great resources: Official JS API docs, Scripting Forum
addBeacon()
- Aubergine
Owned by Aubergine
Send a beacon to a specific player or allies...
Â
Syntax
addBeacon(x, y, to[, message]);
Parameters
Parameter | Type | Mandatory | Notes | Game Version |
---|---|---|---|---|
x | Number | The x co-ordinate of the beacon. | 3.2 | |
y | Number | The y co-ordinate of the beacon. | 3.2 | |
to | Number Constant | The player id who the beacon is for. Alternatively you can send the beacon to all ALLIES. | 3.2 | |
message | String | An optional message to send with the beacon. | 3.2 |
Return values
Value | Type | Notes | Game Version |
---|---|---|---|
true | Boolean | Indicates the beacon was successfully added. | 3.2 |
false | Boolean | Indicates the beacon did not get added. (why??) | 3.2 |
<error> | Error | Invalid parameters. | 3.2 |
Example
function eventObjectSeen(sensor, gameObject) { addBeacon(gameObject.x, gameObject.y, ALLIES, "I just spotted a "+gameObject.name); }
Availability 3.2+
Requires:
- Warzone 3.2 or above
Contents
Jump to:
See also
Related articles:
- eventBeacon() – triggered when you receive a beacon from another player.
- removeBeacon() – removes beacons
- chat() – send chat message
Â