Other great resources: Official JS API docs, Scripting Forum
hackMarkTiles()
- Aubergine
Owned by Aubergine
Highlight map tiles with a pulsing red glow...
Syntax
There are several syntax options for this function...
// syntax #1: POSITION or AREA label hackMarkTiles(labelName); // syntax #2: x,y tile reference hackMarkTiles(x, y); // syntax #3: area co-ordinates hackMarkTiles(x, y, x2, y2); // syntax #4: clear all markings hackMarkTiles();
Parameters
Syntax | Parameter | Type | Mandatory | Notes | Warzone Version |
---|---|---|---|---|---|
#1 | labelName | String | A Label associated with a Position object or Area object – corresponding tiles will be marked. | 3.2 | |
#2 | x, y | Numbers | Mark a single tile specified by its x,y co-ordinates. | 3.2 | |
#3 | x,y, x2,y2 | Numbers | The top-left corner (x,y) and bottom-right corner (x2,y2) of an area to mark. | 3.2 |
Return value
Value | Type | Notes | Warzone Version |
---|---|---|---|
undefined | Undefined | The function does not return anything if sucessful. | 3.2 |
<error> | Error | An error occurred, most likely invalid parameters. | 3.2 |
Notes
The markings are cumulative – when you mark tiles, those already marked will remain marked. For example, you could mark a specific tile then an area, and both the tile and the area will now be marked.
When the function is called without parameters, all markings are cleared. It's not currently possible to unmark specific tiles or areas.
Tip: You can use the Javascript Debugger to highlight tiles associated with Labels:
Example
// syntax #1: POSITION or AREA referenced by label hackMarkTiles("OUTPOST"); // mark tiles of object labelled "OUTPOST" // syntax #2: single tile hackMarkTiles(5,7); // highlight tile at 5,7 // syntax #3: area co-ordinates hackMarkTiles(5,7, 10,15); // area highlighted // syntax #4: clear all markings hackMarkTiles(); // all markings removed
This function is likely to undergo several changes.
Availability 3.2+
Requires:
- Warzone 3.2 or above
Contents
Jump to:
See also
Related articles:
- Map – other map related JS API features
- addLabel() – add a label to an object
- eventArea<LABEL>() – triggered when droids enter a labelled Area object