SceneEventTypeTable containing constants indicating the type of event notification constant None - Invalid event constant Debug - A debug event, triggered with the cheat SendSceneEvent, stringData of the event contains the parameters the cheat was called with constant SpellCancel - Indicates a client spell cast was canceled, spellID is stored in the integerData of the event constant SpellStart - Indicates a client spell cast started, spellID is stored in the integerData of the event, spell reticle radius in the floatData of the event, and scene space dest target in the vectorData constant SpellComplete - Indicates a client spell cast completed successfully, spellID is stored in the integerData of the event, spell reticle radius in the floatData of the event SceneEventA notification to the scene from an external source (e.g. spell cast, debug cheat) SceneEventType type - type of event, member of the SceneEventType table integer timeStamp - time in milliseconds since the start scene when the event notification occurred integer integerData - integer data associated with the event float floatData - floating point (fractional number) data associated with the event string stringData - string data associated with the event Vector vectorData - vector data associated with the event SceneThe Scene class table contains all the overall control mechanisms for ascene, including timing and spawning actors. The current Scene class table that is active in the scene is specially pushed to script as the variable 'scene'. GetPositionFunction: Vector GetPosition(Scene self) Return: Vector the location that the scene was created at WaitFunction: YIELD Wait(Scene self, Sync sync) Yield the currently executing script back to game code, until the sync object is signaled. The sync object is typically a timer, and execution will continue after the timer has expired Parameters: - Sync sync: synchronization object for this wait - when it is signaled, execution will resume
TimerFunction: Sync Timer(Scene self, float seconds) Create a synchronization object that waits a specific time Return: Sync newly created sycnhronization timer, that can be waited on Parameters: - float seconds: time in seconds to wait
EndSceneFunction: EndScene(Scene self) Forcibly complete the current scene CancelSceneFunction: CancelScene(Scene self) Forcibly cancel the current scene SpawnActorFunction: Actor SpawnActor(Scene self, ActorCreateData actorcreateData) Spawn an actor under the control of the scene Return: Actor newly created Actor instance Parameters: - ActorCreateData actorcreateData: data table describing the spawn information for the new actor
AddCoroutineFunction: AddCoroutine(Scene self, function mainFunction) Run the function specified as a coroutine in the current scene. The coroutine is added as pending, added to the end of the current queue. Parameters: - function mainFunction: function to run as a coroutine
SetFadeRegionFunction: SetFadeRegion(Scene self, float radius, boolean includePlayer) Set a client fading region centered on the scene origin. All units entering this region will be seen to fade out. Parameters: - float radius: fade redion radius, in yards. 0 will turn off the fade region.
- boolean includePlayer: if true, the active player model will also be faded when inside the fade region
SetOverrideSpawnAOISettingsFunction: SetOverrideSpawnAOISettings(Scene self, boolean enabled, ActorAOISettings settings) For any new actor spawns, override their AOI settings with those specified Parameters: - boolean enabled: Enable or disable AOI overrides.
- ActorAOISettings settings: Override AOI settings for all subsequent spawns.
SetFadeRegionExcludesAllPlayersFunction: SetFadeRegionExcludesAllPlayers(Scene self, boolean excludeAllPlayers) Set the currently active fade region to exclude or include all players for fading. Parameters: - boolean excludeAllPlayers: if true, all players in the fade region will be visible
AddFadeRegionExcludedCreatureFunction: AddFadeRegionExcludedCreature(Scene self, integer creatureID) Add a creature by creatureID that will be excluded from all fading within the region Parameters: - integer creatureID: ID of the creature to exclude
AddFadeRegionExcludedGameObjectFunction: AddFadeRegionExcludedGameObject(Scene self, integer gameObjectID) Add a game object by gameObjectID that will be excluded from all fading within the region Parameters: - integer gameObjectID: ID of the game object to exclude
RemoveFadeRegionExcludedCreatureFunction: RemoveFadeRegionExcludedCreature(Scene self, integer creatureID) Remove a creature by creatureID from fade region exclusion, causing it to fade in the region Parameters: - integer creatureID: ID of the creature to stop excluding from fading
RemoveFadeRegionExcludedGameObjectFunction: RemoveFadeRegionExcludedGameObject(Scene self, integer gameObjectID) Remove a game object by gameObjectID from fade region exclusion, causing it to fade in the region Parameters: - integer gameObjectID: ID of the game obejct to stop excluding from fading
PeekEventFunction: SceneEvent PeekEvent(Scene self) Check for a pending server script event Return: SceneEvent if the server has sent this scene a script event, it will be returned, otherwise the return value is nil PopEventFunction: PopEvent(Scene self) Discard the server script event at the top of the stack, allowing PeekEvent to return subsequent events TriggerServerEventFunction: TriggerServerEvent(Scene self, string event) Send a named server trigger event Parameters: - string event: named server event trigger, will fire the matching server event for this scene
SetRelativeCoordsFunction: SetRelativeCoords(Scene self, boolean relative) Switch the scene between absolute world coordinates, and coordinates being relative to the scene origin Parameters: - boolean relative: true indicates that the scene should be in a relative coordinate space
SetAxisAlignedCoordsFunction: SetAxisAlignedCoords(Scene self, boolean aligned) If a scene is in a relative coordinate space, only use the translation (i.e. the x axis will point in the world space x direction) Parameters: - boolean aligned: true indicates that the scenes x, y and z axis should be aligned with the world x, y and z axis
SetGameCameraTargetFunction: SetGameCameraTarget(Scene self, Actor targetActor, float maxZoom, float) Set the camera focus/orbit to an actor in the scene Parameters: - Actor targetActor: actor to be the new camera orbit point. Nil indicates that the game camera should return to the active mover/player.
- float maxZoom: maximum zoom (in yards) for the orbit camera around the new actor
ResetGameCameraZoomFunction: ResetGameCameraZoom(Scene self) Return zoom and zoom extents back to their default values SetCameraFunction: SetCamera(Scene self, integer cameraID, float transitionTime, Actor targetA, Actor targetB) Set a custom scene camera. This will take camera control away from the player. Parameters: - integer cameraID: ID of a Camera record to use. 0 indicates the default gameplay camera.
- float transitionTime: Time (in seconds) to transition from the current camera to the new camera.
- Actor targetA: For Camera records that are relative to some primary unit/actor, this is specified here
- Actor targetB: For Camera records that are relative to some secondary unit/actor, this is specified here
AddCameraShakeFunction: integer AddCameraShake(Scene self, integer cameraShakeRecID, Vector pos) Add a one-shot or looping camera shake to the scene Return: integer Handle to the created camera shake instance, which can be used to manually stop the shake later Parameters: - integer cameraShakeRecID: ID of a CameraShake record describing the shake parameters
- Vector pos: For 3D shakes, this is the source of the shake
ClearCameraShakeFunction: ClearCameraShake(Scene self, integer shakeInstanceID) Clear a previously initiated shake Parameters: - integer shakeInstanceID: Handle to the previously created shake, returned from AddCameraShake
GetOverrideSpellDataIDFunction: integer GetOverrideSpellDataID(Scene self) Get the override spell data for this scene. Note that this spell data may not actually be in use if another scene changed it first Return: integer ID of the OverrideSpellData entry SetOverrideSpellDataIDFunction: SetOverrideSpellDataID(Scene self, integer overrideSpellDataID) Set the override spell data for this scene. Note that this spell data may not actually be in use if another scene changed it first Parameters: - integer overrideSpellDataID: ID of the OverrideSpellData entry
SetCameraInterruptedByFreelookFunction: SetCameraInterruptedByFreelook(Scene self, boolean canBeInterrupted) If set, attempting to mouse look will clear the scene camera and prevent future scene cameras from starting Parameters: - boolean canBeInterrupted: indicate whether to disable or enable freelook cancel
GetWorldStateFunction: integer GetWorldState(Scene self, integer worldStateID) Get the value of a world state variable Return: integer rvalue of the variable Parameters: - integer worldStateID: ID of the world state
EvalWorldStateExpressionFunction: boolean EvalWorldStateExpression(Scene self, integer worldStateExpressionID) Evaluate a world state expression Return: boolean result of the expression (true/false) Parameters: - integer worldStateExpressionID: ID of the expression
EvalPlayerConditionFunction: boolean EvalPlayerCondition(Scene self, integer playerConditionID) Evaluate a player condition for the local client. Return: boolean result of the condition (true/false) Parameters: - integer playerConditionID: ID of the player condition. Player condition must be flagged as availabled on the client.
LoadPathFunction: PathData LoadPath(Scene self, integer pathID) Load all the information of a WOWEdit created Path record into script Return: PathData the loaded path data Parameters: - integer pathID: ID of the WOWEdit Path
ApplyScreenEffectFunction: ApplyScreenEffect(Scene self, integer screenEffectID) Apply a ScreenEffect record by ID Parameters: - integer screenEffectID: ID of a ScreenEffect record
ClearScreenEffectFunction: ClearScreenEffect(Scene self, integer screenEffectID) Clear a ScreenEffect record by ID Parameters: - integer screenEffectID: ID of a ScreenEffect record. All screen effects currently active on the scene matching this ID will be cleared
GetTransformFunction: Transform GetTransform(Scene self) Return: Transform return the world space transformation of the scene origin GetActivePlayerDisplayFunction: UnitDisplay GetActivePlayerDisplay(Scene self) Return: UnitDisplay handle to the active players UnitDisplay, so that visuals and position queries can be performed on the active player. GetCreatorDisplayFunction: UnitDisplay GetCreatorDisplay(Scene self) Return: UnitDisplay handle to the creating units UnitDisplay, so that visuals and position queries can be performed. GetSelectedActorFunction: Actor GetSelectedActor(Scene self) Return: Actor return a handle to the selected actor, from this scene. Note if a unit or actor from another scene is selected, nil will be returned PetBattleStateTable of constants indicating the current overall state that the battle is in constant Invalid constant Created constant WaitingPreBattle constant RoundInProgress constant WaitingForFrontPets constant CreateFailed constant FinalRound constant Finished PetBattleEffectTable of constants indicating the type of a round effect constant Invalid constant SetHealth constant AuraApply constant AuraCancel constant AuraChange constant PetSwap constant StatusChange constant SetState constant SetMaxHealth constant SetSpeed constant SetPower constant TriggerAbility constant AbilityChange constant NPCEmote constant AuraProcesssingBegin constant AuraProcesssingEnd PetBattlePetIDTable of constants indicating a particular slot of pet for a battle participant constant Invalid constant Pad constant Weather - Only relevant for 'players' of type Weather constant Slot1 constant Slot2 constant Slot3 PetBattlePlayerIDTable of constants indicating a particulat battle participant constant Invalid constant Weather constant Player1 constant Player2 PetBattleEventTable of constants indicating particular events needing to be performed in the playback of battle results constant Invalid constant RoundResult constant RoundStart constant RoundComplete constant BattleResultsBegin constant BattleResults constant BattleOver constant ObserverChange constant MoveAbilitySelected - This is a 'precast' event on the client that is triggered as soon as an action is selected constant MovePetSwapSelected - This is a 'precast' event on the client that is triggereed as soon as a pet swap action is selected constant MoveTrapSelected - This is a 'precast' event on the client that is triggereed as soon as a trap action is selected PetBattleRangeTable of constant range types for a PetBattleVisual, mapping to those selectable in WOWEdit constant Invalid constant Melee constant Ranged constant InPlace constant PointBlank constant BehindMelee constant BehindRanged PetBattleVisualTable of data generated from a BattlePetVisual static data record in WOWEdit. Only records relevant to the current battle will be loaded into the pet battle script integer ID - ID of the static data in WOWEdit PetBattleRange range - One of the range constants integer spellVisualID - spellVisualID associated with this visual float castTime - time to channel a precast animation and visual float impactTime - time after cast before impact (e.g. of a missile) string scriptFunctionString - special script code for this visual PetBattlePetAbilityTable of data generated from a BattlePetAbility static data record in WOWEdit. Only records relevant to the current battle will be loaded into the pet battle script integer ID - ID of the static data in WOWEdit integer visualID - ID of the PetBattleVisual table associated with this ability {integer, ...} turnIDs - List of IDs of the PetBattlePetAbilityTurn tables associated with this ability PetBattlePetAbilityTurnTable of data generated from a BattlePetAbilityTurn static data record in WOWEdit. Only records relevant to the current battle will be loaded into the pet battle script integer ID - ID of the static data in WOWEdit integer abilityID - ID of the parent PetBattlePetAbility table that this turn belongs to integer visualID - ID of the PetBattleVisual table associated with this turn {integer, ...} effectIDs - List of IDs of the PetBattlePetAbilityEffect tables associated with this turn PetBattlePetAbilityEffectTable of data generated from a BattlePetAbilityEffect static data record in WOWEdit. Only records relevant to the current battle will be loaded into the pet battle script integer ID - ID of the static data in WOWEdit integer turnID - ID of the parent PetBattlePetAbilityTurn table that this effect belongs to integer visualID - ID of the PetBattleVisual table associated with this effect integer effectType - ID of the PetBattlePetAbilityEffectType of this effect PetBattlePetAbilityEffectTypeTable of data generated from a BattlePetEffectProperties static data record in WOWEdit. Only records relevant to the current battle will be loaded into the pet battle script integer ID - ID of the static data in WOWEdit integer visualID - ID of the PetBattleVisual table associated with this effect type PetBattlePetAuraTable of aura information associated with a pet or pad integer instanceID - unique instance ID used to identify this aura application integer abilityID - ability ID of the aura ability integer turnsRemaining - number of turns remaining until the aura expires. -1 indicates the aura lasts forever PetBattlePlayerID casterPlayerID - identifier of the player that owns the pet that applied this aura PetBattlePetID casterPetID - identifier of the pet of the casterPlayerID player that applied this aura PetBattlePetStateTable of a particular state variable associated with a pet or pad integer ID - ID of the state variable integer value - current value of the state variable PetBattlePetActiveAbilityTable of information associated with the active abilities of a pet (i.e. the abilities that can actually be cast, and are on the UI bar) integer abilityID - references a PetBattlePetAbility table by ID integer cooldownRemaining - number of cooldown rounds remaining integer lockdownRemaining - number of lockdown rounds remaining PetBattlePetStatusTable of status flags associated with a pet boolean isTrapped - pet is currently in a trap boolean isStunned - pet is stunned boolean isSwapLocked - pet is locked from swapping out boolean isSwapInLocked - pet is locked from swapping in PetBattlePetTable of data describing the entire current state of a pet PetBattlePetID slot - indicates which slot of the owning player this pet is in integer creatureID - Creature record ID of the pet integer displayID - CreatureDisplay record ID of the pet integer baseHealth - maximum health of the pet integer level - current level of the pet integer xp - current XP of the pet integer health - current health of the pet {PetBattlePetActiveAbility, ...} abilities - list of active abilities that the pet posseses, as well as their cooldowns etc {PetBattlePetAura, ...} auras - list of auras currently active on the pet {PetBattlePetState, ...} states - list of current state variables and their values on the pet PetBattlePetStatus status - status flags of the pet (e.g. stunned, trapped) PetBattlePlayerTable of data describing the entire current state of a player boolean isNPC - is this player AI controlled PetBattlePlayerID playerID - indicates which of the two players (or weather) this data is for PetBattlePetID activePet - slot of the currently active front pet {PetBattlePet, ...} petDescs - list of pet state data for this player integer trapAbilityID - ability ID that this player should use for a trap integer npcCreatureID - in an NPC battle, this indicates the Creature ID to spawn as an opponent player integer npcDisplayID - in an NPC battle, this indicates the CreatureDisplay ID of the opponent PetBattleTable of data describing the entire current state of the battle, it's players and their pets PetBattleState battleState - current stage of the battle integer round - round number of the round awaiting playback {PetBattlePlayer, ...} players - list of the state of players in the battle {PetBattlePetAbility, ...} abilityDescs - static database of all the relevant abilities to the battle {PetBattlePetAbilityTurn, ...} abilityTurnDescs - static database of all the relevant ability turns to the battle {PetBattlePetAbilityEffect, ...} abilityEffectDescs - static database of all the relevant ability effects to the battle {PetBattlePetAbilityEffectType, ...} abilityEffectTypeDescs - static database of all the relevant effect types to the battle {PetBattleVisual, ...} abilityVisualDescs - static database of all the relevant ability visuals to the battle PetBattleFinalPetTable of data describing a victory ceremony reward for a pet integer playerID - player whose pet will be rewarded integer petSlot - slot of the pet to be rewarded boolean wasCaptured - was this pet captured (trapped) during the battle boolean awardedXP - total experience awarded integer newLevel - final level of the pet integer newXP - final XP of the pet integer newHealth - new health value of the pet, after round recovery is applied boolean caged - did the pet end up in a cage PetBattleEventFlagsTable of flags for a round effect boolean invalidTarget - indicates the round effect failed on the server for some unknown reason boolean miss boolean crit boolean blocked boolean dodge boolean heal boolean unkillable boolean reflect boolean absorb boolean immune boolean strong boolean weak PetBattleEventTableTable of data representing a scene playback element integer instanceID - unique instance ID to identify this particular playback element. These are used in SignalRoundEffectApplied. PetBattleEvent eventType - type of playback event (e.g. begin round, round result, round result) integer roundNumber - round number that this playback element is associated with integer turnInstanceID - for round results, this is a number uniquely identifying this result as belonging to a particular source ability turn integer stackDepth - for round results, indicates the proc depth of the result PetBattleEffect effectType - for round results, this indicates the type of result (e.g. SetHealth) PetBattleEventFlags flags - for round results, this indicates the success or failure integer sourceAuraInstanceID - indicates the source of this result is an aura. The caster will be who originally applied this aura PetBattlePlayerID casterPlayerID - player ID of the caster that caused this round result PetBattlePetID casterPetSlot - pet slot of the caster that caused this round result PetBattlePlayerID targetPlayerID - player ID of the target of this round result PetBattlePetID targetPetSlot - pet slot of the target of this round result integer effectID - an ID of a PetBattlePetAbilityEffect table associated with this round result integer value - if the effect type sets a value (e.g. health), then the new value will be in this field integer auraInstanceID - for aura related round results, this is the instance ID of the aura to manipulate integer auraAbilityID - for aura added round results, this is the ability ID of the aura added, and references a PetBattlePetAbility table integer auraTurnsRemaining - for aura related round results, this is the number of turns remaining on the aura integer stateID - indicates the state variable ID for effect type SetState PetBattlePetStatus status - for StatusChange round results, this indicates the new values of the flags PetBattleState stateChange - for RoundComplete event types, this indicates the change to the overall battle state at the end of the round PetBattlePlayerID winnerID - for BattleResults and BattleOver event types, this is the player slot of the winner of the battle. An invalid player ID indicates a draw or there was no winner boolean abandoned - for BattleResults and BattleOver event types, this indicates if the battle was actually abandoned {PetBattleFinalPet, ...} rewards - for BattleResults and BattleOver event types, this is a list of all the individual rewards that should be applied MissReasonsTable containing constants mapping to the various miss reasons available to floating world text constant None constant Physical constant Resist constant Dodged constant Parried constant Blocked constant Evaded constant Immune constant Immune constant Deflected constant Absorbed constant Reflected constant Misfired WorldTextTable containing constants mapping to the different kinds of floating world text that can be displayed constant Damage constant Absorb constant Critical constant Miss constant XPGain constant HonorGain constant Healing constant HealingCritical constant BuildingDamage constant BuildingHeal constant Threat constant WhiteDamage constant None BroadcastTypeTable containing constants mapping to the different kinds of broadcast constant Say constant Yell constant Whisper - NOT YET IMPLEMENTED constant Emote - NOT YET IMPLEMENTED constant Invalid MoveRotControlTable containing constants indicating how an angle should be adjusted with progress along a move path constant None - Do not influence rotation constant Angle - Rotate the shortest arc to reach angle (degrees) constant AngleAbs - Rotate to this angle exactly, ignoring wrap around constant Tangent - Angle is adjusted to match the tangent of the path constant LookAt - Angle is adjusted to face the current look at path point MovePosControlTable containing constants indicating how position should change over time as a move path is followed constant TotalTime - Use the MoveData time field as the total time to travel the path constant ConstantSpeed - Use the MoveData time field as a constant speed to travel the path constant ConstantSpeedXY - Use the MoveData time field as a constant speed to travel the path, ignoring vertical changes constant PointTime - Use each MovePoint's time field as the time taken to reach that point constant PointSpeed - Use each MovePoint's speed field as the speed to be at when crossing that point constant PointSpeedXY - Use each MovePoint's speed field as the speed to be at when crossing that point, ignoring vertical changes constant PointSpeedMul - Use each MovePoint's speed field as a multiplier on the base MoveData speed when crossing that point constant PointSpeedMulXY - Use each MovePoint's speed field as a multiplier on the base MoveData speed when crossing that point, ignoring vertical changes AnimTierTable containing constants mapping to an animation tier for an Actor constant Ground constant Swim constant Hover constant Fly constant Submerged constant Invalid ActorAOIPriorityTable containing constants indicating the priority of an actor. Low priority actors are eligible to be faded out if the current actor count is high. constant Always - If the actor is in range, it will always beshown, regardless of actor count constant Low ActorAOIRangeTable containing constants indicating at what distance an actor should fade constant None - 0 yards constant Infinite - extends to the farclip plane constant Gigantic - 400 yards constant Large - 200 yards constant Normal - 100 yards constant Small - 50 yards constant Tiny - 25 yards CursorRangeTable containing constants indicating how to disable interaction cursor with range constant AlwaysOutOfRange - Interaction always out of range constant AlwaysInRange - Interaction always in range constant RangeFromPlayer - Interaction range is distance to local player constant RangeFromCamera - Interaction range is distance to local camera constant RangeFromActor - Interaction range is distance to a specified actor ReactionTypeTable containing constants indicating an override reaction type for the actor (dictates selection, nameplate color if interactible) constant Default - Default to the reaction dictated by the creature data constant Hostile - Appear as hostile (RED) constant Unfriendly - Appear as unfriendly (ORANGE) constant Neutral - Appear as neutral (YELLOW) constant Friendly - Appear as friendly (GREEN) constant Dead - Appear as dead (GRAY) WeaponSlotTable containing constants indicating weapon slots constant MainHand - Main hand weapon slot constant OffHand - Off hand weapon slot constant Ranged - Ranged weapon slot constant None - Invalid slot SheatheStateTable containing constants indicating weapon sheathing constant Sheathed - Sheathe all weapons constant ShowWeapon - Show melee weapons constant ShowRanged - Show ranged weapons AnimKitSpeedTypeTable containing constants indicating how to interpret the additional speed value used to play an anim kit constant None - Speed unchanged from that defined in the anim kit constant Set - Force speed to the override value constant Scale - Scale anim kit speed by the override value constant ScaleMoveSpeed - Interpret override value as a move speed, and scale anim playback speed by the animated move speed (used to reduce foot sliding) AnimKitBlendTypeTable containing constants indicating how to interpret the additional blend value used to play an anim kit constant None - Blend time unchanged from that defined by default in the anim kit and the models animation data constant Set - Force blend time to the override value constant Min - Take the minimum blend time of the default and the override value constant Max - Take the maximum blend time of the default and the override value ActorAOISettingsTable of data that describes how an actor should be faded automatically with range ActorAOIPriority priority - indicate the actor priority. Low priority actors are candidates for auto fading if the actor count is high. ActorAOIRange range - indicate the automatic fading range of the actor. ActorAOIRange minRange - indicate a minimum distance that an actor must be from you to be visible (inverse AOI). ActorCreateDataTable of data that is defines how, where and what sort of actor should be created, passed to various Scene create functions integer creatureID - creature record to use to spawn the actor, the record MUST be flagged as client local integer creatureDisplayID - creature display ID override to spawn the actor integer itemID - item record used to spawn the actor, the model and texture will be taken from the item record string model - model filename override to spawn the actor with float scale - initial span scale of the actor float facingOffset - reorient the base facing of the actor by this angle (degrees) string name - name to show for the actor if it is interactible Transform transform - spawn location of the actor float hoverHeight - height to hover above the ground if ground snapping is enabled boolean groundSnap - actor should snap to ground boolean interactible - actor is interactible (can be moused over) boolean selectable - actor is selectable boolean floatingTooltip - if interactible, a floating tooltip should be shown boolean smoothPhase - actor will smooth phase if a matching unit/actor is available ActorAOISettings aoiSettings - controls the automatic fading off the actor ReactionType overrideReaction - controls the reaction type for the actor MovePointTable of point data, contained in a list of points in a parent MoveData table structure. Defines information for each point on a path. Vector pos - location of the path point Vector lookAt - a look at point for this path point, used by any angle control set to the LookAt option float time - time value associated with this point, used if the MoveData posControl is PointTime float speed - speed value asscoiated with this point, used if the MoveData posControl is any of the PointSpeed options float yaw - yaw angle at this point in degrees, used if the MoveData yawControl is any of the Angle options float pitch - pitch angle at this point in degrees, used if the MoveData pitchControl is any of the Angle options float roll - roll angle at this point in degrees, used if the MoveData rollControl is any of the Angle options MoveDataTable of move data, contains a list of points or a pathID of point data, as well as information about how the path should be followed boolean isRelative - points/angles of the path are relative to the actors current location and orientation boolean isGroundSnapping - points of the path will be ground snapped, with the Z value of the point being used as an offset from ground level (unless forceGroundSnapPositionZ is also flagged boolean teleportToFirstPoint - rather than moving from the current location to the first point, the actor will snap to the first point instantly boolean forceGroundSnapPositionZ - if ground snapping, the position z is used only for the ground test and not as a relative ground offset boolean noDefaultAnimation - do not play a default movement animation integer animKitID - custom anim kit to use while performing this movement MovePosControl posControl - indicate what timing method should be used to follow the path MoveRotControl yawControl - indicate how yaw should change along the path MoveRotControl pitchControl - indicate how pitch should change along the path MoveRotControl rollControl - indicate how roll should change along the path float time - total time to travel the path, used if posControl is set to TotalTime float speed - constant speed (or base speed) to use to travel the path, if posControl is set to ConstantSpeed, PointSpeedMul, PointSpeedMulXY {MovePoint, ...} points - list of point data for the path integer pathID - if specified, attempt to use path data from the DB AnimKitDataTable of anim data, used to play an animation kit and override animations, start time blending and speed integer animKitID - ID of the anim kit to play. All speed, blend and start time settings come from the anim kit data unless otherwised specified here boolean isMaintained - if true, anim kit will play as a maintained/looping kit, and will need to be manually stopped. If false, anim kit plays as a fire and forget one-shot integer animOverride - Entry from the Animations table to override as the initial anim of the anim kit integer boneSetIDOverride - Entry from the AnimKitBoneSet table for an override bone to play on (-1 means use default specified in the anim kit) integer variationOverride - Override the variation index for the initial anim integer startTimeOverrideMS - If specified, anim kit will begin from this many milliseconds into the initial animation float startTimeOverrideProgress - If specified, the initial animation will start at this percentage completion (0 to 1). Takes precedence over the milliseconds value above AnimKitBlendType blendOverrideType - Indicate what type of blend override to use integer blendOverrideMS - Indicate the value for the blend override AnimKitSpeedType speedOverrideType - Indicate what type of speed override to use float speedOverrideValue - Indicate the value for the speed override AttachmentDataTable of attachment data, used to define a link between one actor and another Actor parentActor - parent actor to attach to integer parentAttachment - attachment index in the AttachmentPoints table to attach to boolean useChildAttachOrientation - if true, the orientation of the child attachment will be applied integer childAttachment - if specified, this attachment point of the child will be attached to the parent boolean useTargetOffset - if true, use the specified target offset from the attachment point. Otherwise, maintain the actors current offset from the attachment point Transform targetOffset - target offset from the attachment point float transitionTime - time to transition to the new attachment point AnimKitA class table that is a handle to an anim kit that was played on an Actor by script. The handle need not be stored, but can be if you later want to control or stop playback manually. StopFunction: Stop(AnimKit self) Stop the anim kit from playing IsStoppedFunction: boolean IsStopped(AnimKit self) Query if the anim kit has stopped Return: boolean true if anim kit playback has stopped SoundKitA class table that is a handle to a sound kit that was played on an Actor by script. The handle need not be stored, but can be if you later want to control or stop playback manually. StopFunction: Stop(SoundKit self) Stop the sound kit from playing IsStoppedFunction: boolean IsStopped(SoundKit self) Query if the sound kit has stopped Return: boolean true if sound kit playback has stopped UnitDisplayA class table that provides base functionality for manipulating animation, sound and spell effects on an Actor (or a real unit, in certain cases). The Actor class table also includes all of these functions. GetSceneFunction: Scene GetScene(UnitDisplay self) Return: Scene the Scene object that owns this actor GetPositionFunction: Vector GetPosition(UnitDisplay self) Return: Vector current position of the actor GetTransformFunction: Transform GetTransform(UnitDisplay self) Return: Transform current transform of the actor GetRaceIDFunction: integer GetRaceID(UnitDisplay self, boolean useNativeVisual) find the race of an actor or unit Return: integer return the race ID of the actor or unit. Returns 0 if no race could be found Parameters: - boolean useNativeVisual: if true, return the race of what you were prior to your current transform
StopAnimKitFunction: StopAnimKit(UnitDisplay self, integer animKitID) stop anim kit(s) from playing on this actor Parameters: - integer animKitID: stop all currently active anim kits on the actor matching this ID
IsPlayingCombatActionFunction: boolean IsPlayingCombatAction(UnitDisplay self) Return: boolean true if the actor is playing a combat action anim kit (e.g. triggered from a spell visual) GetAnimTierFunction: AnimTier GetAnimTier(UnitDisplay self) Return: AnimTier current anim kit tier for the actor SetAnimTierFunction: SetAnimTier(UnitDisplay self, AnimTier animTier) switch the animation tier of the actor Parameters: - AnimTier animTier: new animation tier
ClearSpellPreCastVisualFunction: ClearSpellPreCastVisual(UnitDisplay self, integer spellVisualID, integer instanceID) Clear a currently playing precast spell visual from the actor Parameters: - integer spellVisualID: cleared spell visuals must match this ID
- integer instanceID: cleared spell visuals must match this particular application instance
ClearSpellStateVisualFunction: ClearSpellStateVisual(UnitDisplay self, integer spellVisualID, integer instanceID) Clear a currently playing state spell visual from the actor Parameters: - integer spellVisualID: cleared spell visuals must match this ID
- integer instanceID: cleared spell visuals must match this particular application instance
ClearSpellChannelVisualFunction: ClearSpellChannelVisual(UnitDisplay self, integer spellVisualID, integer instanceID) Clear a currently playing channel spell visual from the actor Parameters: - integer spellVisualID: cleared spell visuals must match this ID
- integer instanceID: cleared spell visuals must match this particular application instance
PlaySpellPreCastVisualFunction: integer PlaySpellPreCastVisual(UnitDisplay self, integer spellVisualID) Play (and maintain) the pre cast visual kit from a SpellVisual Return: integer instance ID for the active spell visual Parameters: - integer spellVisualID: ID of the SpellVisual record to use
PlaySpellCastVisualFunction: integer PlaySpellCastVisual(UnitDisplay self, integer spellVisualID) Play (and maintain) the cast visual kit from a SpellVisual Return: integer instance ID for the active spell visual Parameters: - integer spellVisualID: ID of the SpellVisual record to use
PlaySpellCastVisualAtTargetsFunction: integer PlaySpellCastVisualAtTargets(UnitDisplay self, integer spellVisualID, float missileSpeed, boolean speedAsTime, {Actor, ...} targets) Play (and maintain) the cast visual kit from a SpellVisual at specific target actors Return: integer instance ID for the active spell visual (on the caster) Parameters: - integer spellVisualID: ID of the SpellVisual record to use
- float missileSpeed: speed in yards per second of any produced missiles
- boolean speedAsTime: treat speed value as the time to reach target for missiles
- {Actor, ...} targets: list of actors to cast the spell visual at
PlaySpellCastVisualAtPointsFunction: integer PlaySpellCastVisualAtPoints(UnitDisplay self, integer spellVisualID, float missileSpeed, boolean speedAsTime, {Vector, ...} targets) Play (and maintain) the cast visual kit from a SpellVisual at specific target points Return: integer instance ID for the active spell visual (on the caster) Parameters: - integer spellVisualID: ID of the SpellVisual record to use
- float missileSpeed: speed in yards per second of any produced missiles
- boolean speedAsTime: treat speed value as the time to reach target for missiles
- {Vector, ...} targets: list of points to cast the spell visual at
PlaySpellImpactVisualFunction: PlaySpellImpactVisual(UnitDisplay self, integer spellVisualID) Play a one shot impact visual kit from a SpellVisual Parameters: - integer spellVisualID: ID of the SpellVisual record to use
PlaySpellTargetImpactVisualFunction: PlaySpellTargetImpactVisual(UnitDisplay self, integer spellVisualID) Play a one shot target impact visual kit from a SpellVisual Parameters: - integer spellVisualID: ID of the SpellVisual record to use
PlaySpellStateVisualFunction: integer PlaySpellStateVisual(UnitDisplay self, integer spellVisualID) Play (and maintain) the state visual kit from a SpellVisual Return: integer instance ID for the active spell visual Parameters: - integer spellVisualID: ID of the SpellVisual record to use
PlaySpellStateVisualAtTargetsFunction: integer PlaySpellStateVisualAtTargets(UnitDisplay self, integer spellVisualID, {Actor, ...} targets) Play (and maintain) the state visual kit from a SpellVisual at targets, useful for creating beams Return: integer instance ID for the active spell visual Parameters: - integer spellVisualID: ID of the SpellVisual record to use
- {Actor, ...} targets: list of target actors
PlaySpellChannelVisualAtTargetsFunction: integer PlaySpellChannelVisualAtTargets(UnitDisplay self, integer spellVisualID, {Actor, ...} targets) Play (and maintain) the channel visual kit from a SpellVisual at targets, useful for creating beams Return: integer instance ID for the active spell visual Parameters: - integer spellVisualID: ID of the SpellVisual record to use
- {Actor, ...} targets: list of target actors
ApplyLevelUpEffectFunction: ApplyLevelUpEffect(UnitDisplay self) Play the ding effect on this actor IsPlayingSpellCastAnimFunction: boolean IsPlayingSpellCastAnim(UnitDisplay self) Return: boolean true if a cast spell visual is causing the actor to animate IsPlayingSpellPreCastAnimFunction: boolean IsPlayingSpellPreCastAnim(UnitDisplay self) Return: boolean true if a precast spell visual is causing the actor to animate HasSpellEffectFunction: boolean HasSpellEffect(UnitDisplay self, integer spellID) Return if any specific effects are attached to the actor from a specific spell source Return: boolean has attached effects Parameters: - integer spellID: search for effects created from this spell record
HasCastSpellEffectFunction: boolean HasCastSpellEffect(UnitDisplay self, integer spellID) Return if any specific cast effects are attached to the actor from a specific spell source Return: boolean has attached effects Parameters: - integer spellID: search for cast effects created from this spell record
HasPreCastSpellEffectFunction: boolean HasPreCastSpellEffect(UnitDisplay self, integer spellID) Return if any specific pre-cast effects are attached to the actor from a specific spell source Return: boolean has attached effects Parameters: - integer spellID: search for pre-cast effects created from this spell record
HasPendingMissilesFunction: boolean HasPendingMissiles(UnitDisplay self, integer instanceID) return if there are any pending (i.e. waiting on an anim event to launch) missiles on this actor Return: boolean has missiles Parameters: - integer instanceID: spell visual handle returned from the Cast functions
HasPendingOrInFlightMissilesFunction: boolean HasPendingOrInFlightMissiles(UnitDisplay self, integer instanceID) return if there are any pending or in flight missiles from this actor Return: boolean has missiles Parameters: - integer instanceID: spell visual handle returned from the Cast functions
AddWorldXPGainTextFunction: AddWorldXPGainText(UnitDisplay self, integer xpGain) Add floating XP text Parameters: - integer xpGain: Numerical value
PlaySoundKitFunction: SoundKit PlaySoundKit(UnitDisplay self, integer soundKitID, boolean oneShot) Play a 3D sound kit at the actor's location Return: SoundKit Handle to the active sound Parameters: - integer soundKitID: Sound Entry ID of the sound kit to play
- boolean oneShot: Should the sound fire and forget or loop continuously
PlaySoundKitStereoFunction: SoundKit PlaySoundKitStereo(UnitDisplay self, integer soundKitID, boolean oneShot) Play a 2D sound kit Return: SoundKit Handle to the active sound Parameters: - integer soundKitID: Sound Entry ID of the sound kit to play
- boolean oneShot: Should the sound fire and forget or loop continuously
PlayMusicFunction: SoundKit PlayMusic(UnitDisplay self, integer soundKitID) Play a 2D sound on the music channel Return: SoundKit Handle to the active sound Parameters: - integer soundKitID: Sound Entry ID of the sound kit to play
StopSoundKitFunction: StopSoundKit(UnitDisplay self, integer soundKitID) Stop all anim kits on the actor by sound kit ID Parameters: - integer soundKitID: stop all active sounds matching this ID
BroadcastTextFunction: BroadcastText(UnitDisplay self, BroadcastType type, integer broadcastTextID) Play chat bubbles and dialog on the actor, with the dialog playing in 3D Parameters: - BroadcastType type: Type of broadcast - e.g. yell, say
- integer broadcastTextID: ID of a BroadcastText record
BroadcastTextStereoFunction: BroadcastTextStereo(UnitDisplay self, BroadcastType type, integer broadcastTextID) Play chat bubbles and dialog on the actor, with the dialog playing in 2D Parameters: - BroadcastType type: Type of broadcast - e.g. yell, say
- integer broadcastTextID: ID of a BroadcastText record
IsPlayingDialogSoundFunction: boolean IsPlayingDialogSound(UnitDisplay self) Return true if the dialog audio for a broadcast text is playing Return: boolean Dialog sound is playing SyncA synchronization object used to control when script should yield back to the game. For example, a timer synch object allows the script to sleep for a certain number of seconds IsSignaledFunction: integer IsSignaled(Sync self) Return: integer if the condition (e.g. time) on the synch object has expired, this will return true ResetFunction: Reset(Sync self) Reset the timer on the synch object so it will need to wait the full time again VectorTable storing 3D position information float x float y float z TransformTable storing a point and rotation in 3D space Vector position float yaw - degrees float pitch - degrees float roll - degrees ColorTable for storing a 32 bit ARGB color value byte a - alpha value, 0-255 byte r - red value, 0-255 byte g - green value, 0-255 byte b - blue value, 0-255 PathDataNodeTable representing a single node of information of a PathData parent table Vector pos - position of the node Vector rot - vector containing (roll, pitch, yaw) of the node (in degrees) float scale - scale of the node float value - additional data stored at the node PathDataTable containing a list of path points, that can be populated directly from the data base boolean isRelative - path points are relative to a local origin {PathDataNode, ...} nodes - list of path nodes PetBattleSceneThis is the primary interface for all pet battle related functions, and is pushed to script automatically as the global variable 'battleScene'. Internally the scene manages the state of the battle, and this can be queried. It will also accumulate round results, and they can be processed from script and then signaled as completed, which will update the internal state and notify the UI UseTestPlayerDataFunction: boolean UseTestPlayerData(PetBattleScene self) Return: boolean true if the user has enabled the CVAR to use test data for the pet battle IsTestBattleFunction: boolean IsTestBattle(PetBattleScene self) Return: boolean true if the user has enabled the CVAR to run a test pet battle WarningsEnabledFunction: boolean WarningsEnabled(PetBattleScene self) Return: boolean true if the user has enabled the CVAR to turn on pet battle warnings SpawnPetFunction: Actor SpawnPet(PetBattleScene self, PetBattlePlayerID playerID, PetBattlePetID petID, ActorCreateData actorCreateData) Spawn a pet specifically associated with a particular player and pet slot according to the supplied ActorCreateData. The pet actor will be uniquely bound to the game code, so that it can be identified for sound and other hooks Return: Actor the newly spawned actor Parameters: - PetBattlePlayerID playerID: player owning the pet
- PetBattlePetID petID: slot of the pet
- ActorCreateData actorCreateData: spawn information for the pet
SpawnNPCFunction: Actor SpawnNPC(PetBattleScene self, PetBattlePlayerID playerID, ActorCreateData actorCreateData) Spawn an NPC pet specifically associated with a particular player according to the supplied ActorCreateData. The pet actor will be uniquely bound to the game code, so that it can be identified for sound and other hooks Return: Actor the newly spawned actor Parameters: - PetBattlePlayerID playerID: player owning the pet
- ActorCreateData actorCreateData: spawn information for the pet
GetBattleStateFunction: PetBattle GetBattleState(PetBattleScene self) Return the full up to date battle state associated with the pet battle. WARNING: this function is relatively expensive and should typically only be called on battle startup Return: PetBattle full update of the current battle state SignalOpeningCompleteFunction: SignalOpeningComplete(PetBattleScene self) Indicate that the opening phase of the pet battle intro is complete and that the UI should be displayed HasPendingEffectsFunction: boolean HasPendingEffects(PetBattleScene self) Return: boolean true if there are pending events that need to be played back by the scene script GetPendingEffectFunction: PetBattleEventTable GetPendingEffect(PetBattleScene self) Return: PetBattleEventTable the first pending playback event SignalEffectAppliedFunction: SignalEffectApplied(PetBattleScene self, integer eventInstanceID) When a playback event has been completed by the script, this notifies the internal state to update, which will in turn trigger the UI and other feedback Parameters: - integer eventInstanceID: instanceID of the playback event to signal. Since playback must occur in order, if the instance ID is not the first pending, all playback events will be flushed until this is reached
SignalBattleCompleteFunction: SignalBattleComplete(PetBattleScene self) Indicates that the battle playback has completed and the battle can shutdown IsUIObservingFunction: boolean IsUIObserving(PetBattleScene self) Return: boolean true if the battle is being observed from the pet battle UI GetUIObservingPlayerFunction: integer GetUIObservingPlayer(PetBattleScene self) Return: integer the slot of the player that the UI is observing the battle from GetUICameraTransitionFunction: integer GetUICameraTransition(PetBattleScene self) Return: integer a value indicating if there is enough space available to successfuly perform the default camera transitoin SetPetBattleGameCameraTargetFunction: SetPetBattleGameCameraTarget(PetBattleScene self, Actor cameraTarget, float zoomMin, float zoomMax) Set the pet battle orbit camera to focus on an actor, restoring the pet battle camera zoom that has been saved Parameters: - Actor cameraTarget: target actor for the freelook camera
- float zoomMin: minimum zoom for the camera
- float zoomMax: maximum zoom for the camera
ResetPetBattleGameCameraZoomFunction: ResetPetBattleGameCameraZoom(PetBattleScene self) Reset the game camera zoom to the normal values, and store the current pet battle zoom GetActivePlayerDisplayFunction: UnitDisplay GetActivePlayerDisplay(PetBattleScene self, PetBattlePlayerID playerID) Get a display handle for the active players in a pet battle, so that they can have animations and effects played on them Return: UnitDisplay the display handle fof the requested player Parameters: - PetBattlePlayerID playerID: player slot of the player handle to obtain
PlayPetBattleMusicFunction: PlayPetBattleMusic(PetBattleScene self, integer soundKitID) Play a sound by ID on the special PetBattleMusic sound track Parameters: - integer soundKitID: ID of the SoundEntry for the music
ActorA class table that maps to an instance of a client created unit. As well as the functions listed below, an Actor contains all the functions of a UnitDisplay table. SetTransformFunction: SetTransform(Actor self, Transform transform) Set the current position and rotation of the actor Parameters: - Transform transform: new transform for the actor
SetModelFunction: SetModel(Actor self, ActorCreateData modelData) Change the model used for the actor, without interrupting animation or movement Parameters: - ActorCreateData modelData: structure containing dispolay information for the new model. Transformation and name information are ignored, but a model file name, creature ID or creature display ID can be specified, as well as a scale and facing offset.
GetScaleFunction: float GetScale(Actor self) Return: float the current script scale of the actor SetScaleFunction: SetScale(Actor self, float scale) Set the current script scale of the actor Parameters: - float scale: new scale for the actor
EquipWeaponFunction: EquipWeapon(Actor self, WeaponSlot slot, integer itemID) Set the item equipped in a particular weapon slot (0 clears the slot) Parameters: - WeaponSlot slot: weapon slot
- integer itemID: ID of an item record in WOWEdit
GetSheatheStateFunction: SheatheState GetSheatheState(Actor self) Return: SheatheState the current target sheathe state of the actor (spell effects that manipulate sheathing will take priority, as with normal units) SetSheatheStateFunction: SetSheatheState(Actor self, SheatheState sheatheState, boolean instant) Set the target sheathe state for the actor (spell effects that manipulate sheathing will take priority, as with normal units) Parameters: - SheatheState sheatheState: new target sheathe state
- boolean instant: do not animate any sheathe transition
GetHealthFunction: integer GetHealth(Actor self) Return: integer the current health value of the actor, purely for visuals on the portrait GetMaxHealthFunction: integer GetMaxHealth(Actor self) Return: integer the current max health value of the actor, purely for visuals on the portrait SetHealthFunction: SetHealth(Actor self, integer health) Set the health that will displayed on UI elements (e.g. protrait frames) for this actor Parameters: - integer health: new health value of this actor
SetMaxHealthFunction: SetMaxHealth(Actor self, integer maxHealth) Set the maximum health that will displayed on UI elements (e.g. protrait frames) for this actor Parameters: - integer maxHealth: new maximum health value of this actor
SetRelativeToFunction: SetRelativeTo(Actor self, Actor parentActor) Maintaining the actor's current position, mark it as relative to another actor. When the parent actor moves, the current offset from the parent will be maintained. When the child actor moves, movement will modify the offset to the parent Parameters: - Actor parentActor: actor that will become the new parent, or 'transport' of this actor
SetAttachedToFunction: SetAttachedTo(Actor self, AttachmentData attachData) Maintaining the actor's current position, mark it as relative to another actor's attachment point. When the parent actor moves, the current offset from the parent will be maintained. When the child actor moves, movement will modify the offset to the parent Parameters: - AttachmentData attachData: information for the attachment - parent actor, attachment point, offsets etc
GetAttachmentTransformFunction: Transform GetAttachmentTransform(Actor self, integer attachmentIndex, Transform offset, float predictAheadSeconds) Return the world space transform of an attachment point of an actor. If the actor does not have that attachment point, the root of the actor will be returned. Return: Transform Full transform of the attachment point (note, scale will be removed) Parameters: - integer attachmentIndex: attachment point to look up, see the AttachmentPoint table for available points
- Transform offset: additional transformation to apply to the attachment point
- float predictAheadSeconds: if the actor is moving, predict the attachment point this many seconds into the future. NOTE: this will be approximate
StopMovementFunction: StopMovement(Actor self) Stop any current movement MoveFunction: Move(Actor self, MoveData moveData) Instruct the actor to perform a movement Parameters: - MoveData moveData: data structure containing a description of the movement to be performed
IsMovingFunction: boolean IsMoving(Actor self) Return: boolean true if the actor is moving GetRemainingMoveTimeFunction: float GetRemainingMoveTime(Actor self) Return: float return time remaining until current movement complete SetSnapToGroundFunction: SetSnapToGround(Actor self, boolean snapToGround) Turn on/off ground snapping for an actor. When snap is enabled, the actor will immediately snap from it's current location to the ground. Parameters: - boolean snapToGround: enable ground snap
IsGroundSnapPendingFunction: boolean IsGroundSnapPending(Actor self) Return: boolean true if this actor is set to snap to the ground, but ground couldn't not be found (either too high, or the ground may be too far out of range to be loaded) SetHoverHeightFunction: SetHoverHeight(Actor self, float hoverHeight) Modify the hover height for the actor. If the actor is ground snapping, this is the height above the ground that that the actor will maintain Parameters: - float hoverHeight: new hover height for the actor
GetHoverHeightFunction: float GetHoverHeight(Actor self) Return: float current hover height of the actor SetHoverHeightSpeedFunction: SetHoverHeightSpeed(Actor self, float hoverHeightSpeed) Modify the hover height change speed of the actor. Rate at which hover height will be changed (a value of zero will lead to instant changes) Parameters: - float hoverHeightSpeed: new hover height for the actor
GetHoverHeightSpeedFunction: float GetHoverHeightSpeed(Actor self) Return: float current hover height speed of the actor SetFacingFunction: SetFacing(Actor self, float facingAngle) Turn the actor to a given facing. If the actor is moving, or starts a new move, the facing will be reset to the direction of movement. Parameters: - float facingAngle: new facing angle for the actor (degrees)
SetFacingToAbsFunction: SetFacingToAbs(Actor self, Vector absPos) Lock actor facing to a particular world position. The actor will continue to face this position during movement, until ClearFacing is called. Parameters: - Vector absPos: position in the world to face
SetFacingToTargetFunction: SetFacingToTarget(Actor self, Actor target, Vector offset) Lock actor facing to another actor, plus a world space offset. Movement will not break the facing lock. Parameters: - Actor target: actor to focus facing direction on
- Vector offset: offset from the target actor to look at. (0,0,0) will look directly at the actor
ClearFacingFunction: ClearFacing(Actor self) Remove any current facing lock on the actor. The actor will maintain it's current facing until a movement or other facing change. SetHeadFacingFunction: SetHeadFacing(Actor self, float facingAngle) Turn the actor's head to a given facing. If the actor is moving, or starts a new move, the head facing will be reset to the direction of movement. Parameters: - float facingAngle: new head facing angle for the actor (degrees)
SetHeadFacingToAbsFunction: SetHeadFacingToAbs(Actor self, Vector absPos) Lock actor head facing to a particular world position. The actor will continue to face his head at this position during movement, until ClearHeadFacing is called. Parameters: - Vector absPos: position in the world to turn head to
SetHeadFacingToTargetFunction: SetHeadFacingToTarget(Actor self, Actor target, Vector offset) Lock actor head facing to another actor, plus a world space offset. Movement will not break the head facing lock. Parameters: - Actor target: actor to focus head facing direction on
- Vector offset: offset from the target actor to look at. (0,0,0) will turn head directly at the actor
ClearHeadFacingFunction: ClearHeadFacing(Actor self) Remove any current head facing lock on the actor. The actor's head facing will return to its current base facing. SetFacingTurnRateFunction: SetFacingTurnRate(Actor self, float rate) Adjust the rate at which facing adjustments are made by the actor. Default is '5', a higher number will turn faster Parameters: - float rate: new facing for the actor
GetFacingTurnRateFunction: float GetFacingTurnRate(Actor self) Return: float current facing rate for the actor IsReadyToDisplayFunction: boolean IsReadyToDisplay(Actor self) Return: boolean true if the actor's model and textures are fully loaded, so that it can be rendered SetHiddenFunction: SetHidden(Actor self, boolean hidden) Turn on and off rendering for an actor Parameters: - boolean hidden: new rendering state for the actor
DespawnFunction: Despawn(Actor self) Fade out and despawn the actor IsDespawnedFunction: boolean IsDespawned(Actor self) Test if the actor has been despawned Return: boolean returns true if Despawn has previously been called on this actor FadeFunction: Fade(Actor self, float alpha, float time) Fade the actor to a particular alpha value over time Parameters: - float alpha: target alpha value for the fade (a number 0 to 1)
- float time: time to fade over, in seconds
SetFloatingTooltipFunction: SetFloatingTooltip(Actor self, boolean floating) Enable or disable tooltips in the 'floating' style (e.g. signs on sign posts). Tooltips are only visible for interactable actors. Parameters: - boolean floating: set to true to enable tooltips in the 'floating' style
SetInteractibleFunction: SetInteractible(Actor self, boolean interactable) Control the interactability of the actor. Interactable actors have mouse-over highlight and tooltips available Parameters: - boolean interactable: set to true to make the actor interactable
SetSelectableFunction: SetSelectable(Actor self, boolean selectable) Control the selectability of the actor. Selectable actors will have portrait frames and selection circles like a normal unit Parameters: - boolean selectable: set to true to make the actor selectable
SetInteractCursorFunction: SetInteractCursor(Actor self, string cursorName, CursorRange rangeType, float range, Actor relativeTo) Change the cursor and interaction range for the actor Parameters: - string cursorName: name of the cursor file, e.g. 'crosshairs'
- CursorRange rangeType: method for calculating the range of the interaction {e.g. from player, from camera)
- float range: range of the interaction
- Actor relativeTo: if range type is relative to some other actor, specify that actor here (otherwise use nil)
GetOverrideReactionFunction: ReactionType GetOverrideReaction(Actor self) Return: ReactionType return the current reaction type for this actor SetOverrideReactionFunction: SetOverrideReaction(Actor self, ReactionType reaction) Set an override for the reaction type for this actor, dictates selection color Parameters: - ReactionType reaction: new reaction type for the actor. Set to type default to revert to the creature data reaction
GetRightClickCountFunction: integer GetRightClickCount(Actor self) Return: integer return the number of times this actor has been right clicked CastSpellFunction: CastSpell(Actor self, integer spellID, Actor target) Simulate a full spell cast, playing all appropriate spell visuals and respecting cast time to play precast visuals Parameters: - integer spellID: Spell table ID of the spell to cast. Must be available on the client
- Actor target: Target actor for impacts, missile destinations etc
IsCastingFunction: boolean IsCasting(Actor self) Return: boolean true if the actor is simulating a spell cast |