SYNQ Objects are intelligent tables containing attributes and functions used to easily get information about and interact with units, players, and other objects in game.
All SYNQ objects with an existing underlying unit will have all of the expected attributes and functions available for you to access.
target, focus, etc.)
enemies, friends, objects) generated and returned each frame they are referencedWe access attributes by referencing them, and functions by calling them.
target.hp
target.isUnit(focus)
Every SYNQ object with an existing underlying unit has access to a full set of attributes and functions. Attributes are accessed by reference (target.hp), while functions require parentheses (target.isUnit(focus)).
For complete references, see:
Empty objects are a shell, containing only isUnit. They are only generated by functions which generate an object when there is no relevant underlying object:
object.castTarget - Returns the destination target of a spell cast as a SYNQ objectobject.target - Returns the object's target as a SYNQ objectTip: This is so you can always rule out things like object.castTarget.isUnit(healer) without the need to redundantly check for existence of the castTarget.
Always check if an object exists before querying its data. Most boolean attributes like object.enemy or object.friend also prove existence when they return true.
Good existence checks:
object.exists - Explicit existence checkobject.enemy - Checks existence AND confirms enemy statusobject.combat - Checks existence AND confirms in combatAvoid these patterns:
not object.combat don't prove existenceobject.hp < 30 may fail gracefully but won't work as intended without existence check firstNext: Learn how to create and use Spell Objects for your rotations.