Plays immediately an animation on the calling Spine object
int trackIndex: Spines animation track.
string newAnimation: Animation name that will be played.
bool loop: Should the animation be looped at the end.
function callback: called on the end of the animation, also on looped animations.
Adds an animation on the calling Spine object that will be played after the current animation ends
int trackIndex: Spines animation track.
string newAnimation: Animation name that will be played.
bool loop: Should the animation be looped at the end.
function callback: called on the end of the animation, also on looped animations.
See PlayAnimation
SpineObject object: Objects ID that should be effected
int trackIndex: Spines animation track.
string newAnimation: Animation name that will be played.
bool loop: Should the animation be looped at the end.
function callback: called on the end of the animation, also on looped animations.
void AddAnimationOn(LuaSpineObject object, Number trackIndex, LuaSpineAnimation newAnimation, bool loop, Number delay, std::optional<sol::function> callback)
¶
See AddAnimation
SpineObject object: Objects ID that should be effected
int trackIndex: Spines animation track.
string newAnimation: Animation name that will be played.
bool loop: Should the animation be looped at the end.
function callback: called on the end of the animation, also on looped animations.
See AddToInventory
SpineObject object: Objects ID that should be effected
Note: The object has to be in the scene, this function does not create new objects. The object can be placed outside of the scenes view.
See AddToInventory
SpineObject object: Objects ID that should be effected
string skin: A skin that will be set insted of inventar_default_skin
Note: See AddToInventoryOn's note.
See SetDeleted
SpineObject object: Objects ID that should be effected
Note: SetDeleted can not be called on the last frame of an animation via a Spine event.
returns: a list of positions GetPointNamesOn(LuaSpineObject object)
¶
See GetPointNames
Lua Example:
local points = GetPointNamesOn("inventory_object")
for i = 1, #points do
print(i, points[i])
end
SpineObject object: Objects ID that should be effected
Send the player to a point's position of this Spine object.
string point_name: Name of the point the player should go to
function callback: Function that will becalled when the layer reaches the position
See GoToPoint
SpineObject object: Objects ID that should be effected
string point_name: Name of the point the player should go to
function callback: Function that will becalled when the layer reaches the position
Set all objects with a lower layer this value not interactable. Usefull for a menu, inventory or an intro playing ontop of a scene.
int layer: Layer [default: 0]