GetRunesList()
GetRunesList():
Rune[]
CAUTION
Do not modify the returned array. It is a reference to the internal array.
TIP
This array contains all runes that have been seen at least 1 time.
Description
The GetRunesList
function retrieves a list of all rune entities
Returned
- Rune[] - array of all rune entities.
Example
ts
let exampleScript: ScriptDescription = {};
exampleScript.OnScriptLoad = () => {
// Check if we are in the game, because otherwise the list of rune will be empty
if(!GameRules.IsActiveGame()) {
return;
}
let runes = EntitySystem.GetRunesList();
for(let rune of runes) {
// Display the type of each rune on the map
console.log(`Rune type - `, rune.GetRuneType());
}
}
RegisterScript(exampleScript, "Example script");