Other great resources: Official JS API docs, Scripting Forum
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 9 Next »
bind(functionName, gameObject);
undefined
function certainDeath(gameObject) { // do stuff } bind("certainDeath", someObject); // where someObject is any Game Object
This function is incredibly useful because you can use it on objects owned by other players, and even destroyable features like trees.
Your function will be triggered immediately before the game object is removed from the map.
To detect when your own objects are destroyed, it's easier to use eventDestroyed() because it avoids having to bind to individual objects.
Requires:
Jump to:
Related articles: