Other great resources: Official JS API docs, Scripting Forum
function eventSelectionChanged(selected) { // do stuff }
Array ofGame objects
An array of selected game objects.
Array will be empty if no objects are selected.
Warzone does not process the event handler's return value.
The event is triggered after each selection change, but with a slight delay to avoid being triggered too many times.
Remember that a player might select objects one at a time, or in groups, or hold down shift to add or remove objects to or from the selection.
function eventSelectionChanged(selectedObjects) { selectedObjects.forEach(function get(gameObject) { // do stuff with selected game object } }
Requires:
Jump to:
Related articles: