Functions to retrieve information about sprites. More...
Public Member Functions | |
| integer | GetAnimationCount (integer sprite) |
| Gets the amount of animations in the sprite. | |
| string | GetAnimationName (integer sprite, integer animationIndex) |
| Gets the name of the specified animation index in the sprite. | |
| integer | GetAnimationIndexByName (integer sprite, string name) |
| Gets the first animation in the sprite which matches the specified name. | |
| boolean | GetFrameExists (integer sprite, integer animation, integer frame) |
| Checks if an animation and frame is valid within a sprite. | |
| integer | GetFrameLoopIndex (integer sprite, integer animation) |
| Gets the index of the frame that the specified animation will loop back to when it finishes. | |
| integer | GetFrameCount (integer sprite, integer animation) |
| Gets the amount of frames in the specified animation. | |
| integer | GetFrameDuration (integer sprite, integer animation, integer frame) |
| Gets the frame duration of the specified sprite frame. | |
| integer | GetFrameSpeed (integer sprite, integer animation) |
| Gets the animation speed of the specified animation. | |
| integer | GetFrameWidth (integer sprite, integer animation, integer frame) |
| Gets the frame width of the specified sprite frame. | |
| integer | GetFrameHeight (integer sprite, integer animation, integer frame) |
| Gets the frame height of the specified sprite frame. | |
| integer | GetFrameID (integer sprite, integer animation, integer frame) |
| Gets the frame ID of the specified sprite frame. | |
| integer | GetFrameOffsetX (integer sprite, integer animation, integer frame) |
| Gets the X offset of the specified sprite frame. | |
| integer | GetFrameOffsetY (integer sprite, integer animation, integer frame) |
| Gets the Y offset of the specified sprite frame. | |
| string | GetHitboxName (integer sprite, integer animationID, integer frame, integer hitboxID) |
| Gets the name of a hitbox through its index. | |
| integer | GetHitboxIndex (integer sprite, integer animationID, integer frame, string name) |
| Gets the index of a hitbox by its name. | |
| integer | GetHitboxCount (integer sprite, integer animationID, integer frame) |
| Gets the hitbox count in the given frame of an animation of a sprite. | |
| hitbox | GetHitbox (Entity entity, string hitbox) |
| Gets the hitbox of a sprite frame. | |
| hitbox | GetHitbox (Entity entity, integer hitbox=0) |
| Gets the hitbox of a sprite frame. | |
| hitbox | GetHitbox (integer sprite, integer animationID, integer frameID, string hitbox) |
| Gets the hitbox of a sprite frame. | |
| hitbox | GetHitbox (integer sprite, integer animationID, integer frameID, integer hitbox=0) |
| Gets the hitbox of a sprite frame. | |
| array | GetTextArray (integer sprite, integer animation, string text) |
| Converts a string to an array of sprite indexes by comparing codepoints to a frame's ID. | |
| void | GetTextWidth (integer sprite, integer animation, array text, integer startIndex, integer spacing) |
| Gets the width (in pixels) of a converted sprite string. | |
| void | MakePalettized (integer sprite, integer paletteIndex) |
| Converts a sprite's colors to the ones in the specified palette index. | |
| void | MakeNonPalettized (integer sprite) |
| Removes a sprite's palette. | |
Functions to retrieve information about sprites.
| integer Sprite.GetAnimationCount | ( | integer | sprite | ) |
Gets the amount of animations in the sprite.
| sprite | The sprite index to check. |
| integer Sprite.GetAnimationIndexByName | ( | integer | sprite, |
| string | name ) |
Gets the first animation in the sprite which matches the specified name.
| sprite | The sprite index to check. |
| name | The animation name to search for. |
| string Sprite.GetAnimationName | ( | integer | sprite, |
| integer | animationIndex ) |
Gets the name of the specified animation index in the sprite.
| sprite | The sprite index to check. |
| animationIndex | The animation index. |
| integer Sprite.GetFrameCount | ( | integer | sprite, |
| integer | animation ) |
Gets the amount of frames in the specified animation.
| sprite | The sprite index to check. |
| animation | The animation index of the sprite to check. |
| integer Sprite.GetFrameDuration | ( | integer | sprite, |
| integer | animation, | ||
| integer | frame ) |
Gets the frame duration of the specified sprite frame.
| sprite | The sprite index to check. |
| animation | The animation index of the sprite to check. |
| frame | The frame index of the animation to check. |
| boolean Sprite.GetFrameExists | ( | integer | sprite, |
| integer | animation, | ||
| integer | frame ) |
Checks if an animation and frame is valid within a sprite.
| sprite | The sprite index to check. |
| animation | The animation index to check. |
| frame | The sprite index to check. |
| integer Sprite.GetFrameHeight | ( | integer | sprite, |
| integer | animation, | ||
| integer | frame ) |
Gets the frame height of the specified sprite frame.
| sprite | The sprite index to check. |
| animation | The animation index of the sprite to check. |
| frame | The frame index of the animation to check. |
| integer Sprite.GetFrameID | ( | integer | sprite, |
| integer | animation, | ||
| integer | frame ) |
Gets the frame ID of the specified sprite frame.
| sprite | The sprite index to check. |
| animation | The animation index of the sprite to check. |
| frame | The frame index of the animation to check. |
| integer Sprite.GetFrameLoopIndex | ( | integer | sprite, |
| integer | animation ) |
Gets the index of the frame that the specified animation will loop back to when it finishes.
| sprite | The sprite index to check. |
| animation | The animation index of the sprite to check. |
| integer Sprite.GetFrameOffsetX | ( | integer | sprite, |
| integer | animation, | ||
| integer | frame ) |
Gets the X offset of the specified sprite frame.
| sprite | The sprite index to check. |
| animation | The animation index of the sprite to check. |
| frame | The frame index of the animation to check. |
| integer Sprite.GetFrameOffsetY | ( | integer | sprite, |
| integer | animation, | ||
| integer | frame ) |
Gets the Y offset of the specified sprite frame.
| sprite | The sprite index to check. |
| animation | The animation index of the sprite to check. |
| frame | The frame index of the animation to check. |
| integer Sprite.GetFrameSpeed | ( | integer | sprite, |
| integer | animation ) |
Gets the animation speed of the specified animation.
| sprite | The sprite index to check. |
| animation | The animation index of the sprite to check. |
| integer Sprite.GetFrameWidth | ( | integer | sprite, |
| integer | animation, | ||
| integer | frame ) |
Gets the frame width of the specified sprite frame.
| sprite | The sprite index to check. |
| animation | The animation index of the sprite to check. |
| frame | The frame index of the animation to check. |
| hitbox Sprite.GetHitbox | ( | Entity | entity, |
| integer | hitbox = 0 ) |
Gets the hitbox of a sprite frame.
| entity | An entity with Sprite, CurrentAnimation, and CurrentFrame values. |
| hitbox | The hitbox index. |
| hitbox Sprite.GetHitbox | ( | Entity | entity, |
| string | hitbox ) |
Gets the hitbox of a sprite frame.
| entity | An entity with Sprite, CurrentAnimation, and CurrentFrame values. |
| hitbox | The hitbox name. |
| hitbox Sprite.GetHitbox | ( | integer | sprite, |
| integer | animationID, | ||
| integer | frameID, | ||
| integer | hitbox = 0 ) |
Gets the hitbox of a sprite frame.
| sprite | The sprite index to check. |
| animationID | The animation index of the sprite to check. |
| frameID | The frame index of the animation to check. |
| hitbox | The hitbox index. |
| hitbox Sprite.GetHitbox | ( | integer | sprite, |
| integer | animationID, | ||
| integer | frameID, | ||
| string | hitbox ) |
Gets the hitbox of a sprite frame.
| sprite | The sprite index to check. |
| animationID | The animation index of the sprite to check. |
| frameID | The frame index of the animation to check. |
| hitbox | The hitbox name. |
| integer Sprite.GetHitboxCount | ( | integer | sprite, |
| integer | animationID, | ||
| integer | frame ) |
Gets the hitbox count in the given frame of an animation of a sprite.
| sprite | The sprite index to check. |
| animationID | The animation index of the sprite to check. |
| frame | The frame index of the animation to check. |
| integer Sprite.GetHitboxIndex | ( | integer | sprite, |
| integer | animationID, | ||
| integer | frame, | ||
| string | name ) |
Gets the index of a hitbox by its name.
| sprite | The sprite index to check. |
| animationID | The animation index of the sprite to check. |
| frame | The frame index of the animation to check. |
| name | The name of the hitbox to check. |
| string Sprite.GetHitboxName | ( | integer | sprite, |
| integer | animationID, | ||
| integer | frame, | ||
| integer | hitboxID ) |
Gets the name of a hitbox through its index.
| sprite | The sprite index to check. |
| animationID | The animation index of the sprite to check. |
| frame | The frame index of the animation to check. |
| hitboxID | The hitbox index to check. |
| array Sprite.GetTextArray | ( | integer | sprite, |
| integer | animation, | ||
| string | text ) |
Converts a string to an array of sprite indexes by comparing codepoints to a frame's ID.
| sprite | The sprite index. |
| animation | The animation index containing frames with codepoint ID values. |
| text | The text to convert. |
| void Sprite.GetTextWidth | ( | integer | sprite, |
| integer | animation, | ||
| array | text, | ||
| integer | startIndex, | ||
| integer | spacing ) |
Gets the width (in pixels) of a converted sprite string.
| sprite | The sprite index. |
| animation | The animation index. |
| text | The array containing frame indexes. |
| startIndex | Where to start checking the width. |
| spacing | The spacing (in pixels) between frames. |
| void Sprite.MakeNonPalettized | ( | integer | sprite | ) |
Removes a sprite's palette.
| sprite | The sprite index. |
| void Sprite.MakePalettized | ( | integer | sprite, |
| integer | paletteIndex ) |
Converts a sprite's colors to the ones in the specified palette index.
| sprite | The sprite index. |
| paletteIndex | The palette index. |