Other great resources: Official JS API docs, Scripting Forum
enumSelected()
Get a list of all objects selected by the the game host...
Syntax
var results = enumSelected();Parameters
No parameters.
Return values
Value | Type | Notes | Game Version |
|---|---|---|---|
<results> | Array of | An array of game objects that are currently selected by the human game host (usually player 0). | 3.2 |
| Empty Array | If no objects are selected, an empty array is returned. | 3.2 |
Example
Iterate through all selected game objects...
enumSelected().forEach(function get(gameObject) {
// do stuff with selected gameObject
});