...
Parameter | Type | Mandatory | Description |
---|---|---|---|
structure | Structure object | The structure that will perform the special action. | |
target | Game object {x:xPos, y:yPos} | The target location – this can be a game object, or any other object that has x,y properties. |
Return value
...
Value | Type | Description |
---|---|---|
true | Boolean | The structure was activated |
<error> | Error | Something went wrong |
Example
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
var lastAttacker; function eventAttacked(victim,attacker) { lastAttacker = attacker; } function eventStructureReady(structure) { if (structure.stattype == LASSAT) activateStructure(structure,lastAttacker); } |
...