Lua functions

PlayAnimation

Registered in this checkout as EQ2Emu_lua_PlayAnimation; implementation found at WorldServer/Lua/LuaFunctions.cpp:7809.

Historical signature: PlayAnimation(spawn, anim, target, hide_type)

Parameter and behavior details in the historical explanation are under review against the current implementation.

Function: PlayAnimation(spawn, anim, target, hide_type)

Description: The spawn will play the animation anim type specified. See the Appearance IDs by client in the ReferenceList here https://eq2emu.com/developers/references Note that the target and hide_type are optional fields. Setting the hide_type to 1 will mean only the target receives the update. Setting to 2 will exclude the target and send to all others.

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.
  • anim (int32) - Integer value anim.
  • target (Spawn) - Spawn objet representing target.
  • hide_type (int32) - Integer value hide_type.

Returns: None.

Checked example

Active call in a local runtime Lua script. A missing target sends the animation to the zone. This is a contextual call pattern, not a tested standalone script.

PlayAnimation(NPC,891)

Evidence: server/SpawnScripts/Castleview/GurpkayeMarrcap.lua:92; binding EQ2Emu_lua_PlayAnimation.

Current registration: WorldServer/Lua/LuaInterface.cpp. Historical explanation: EQ2Emu Lua documentation.