spriteSheetObjectExtension[for GDevelop]
A downloadable GDevelop Prefab
Actions:______________________________________________________________
1.playAnimation//plays an animation by their structure name (example: you'd call "animationTemplate" to play the default "animationTemplate" animation).
2.playFrame//plays a frame by its spot on the spriteSheet's "grid".
--------------------------------------------------------------------------
Conditions/Expressions:______________________________________________
1.currentFrame//get or compare the current frame of the ongoing animation.
2.currentFrameInSheetX//get or compare the selected frame's column at the spriteSheet (left to right).
3.currentFrameInSheetX//get or compare the selected frame's row at the spriteSheet (top to bottom).
-----------------------------------------------------------------------------------------------------------------
How do I?__________________________________________________________________________________________________
a).Import a spriteSheet into the prefab:
1.Open the Visual Editor for the Object, and add your spriteSheet to the sheet object inside the visual editor.
2.Set the Default Width an Height according to your spriteSheet's grid dimensions(this prefab doesnt support empty spaces between frames).
3.Add animations to your spriteSheet, by copy pasting the "animationTemplate" inside the sheet's "animation" objectVariable, and edditing it. You c.an add as many animations as you want to this structure.
b).Read and edit the "animationTemplate"
1.subStructure's Name: the name you choose for each animation subStructure will be the name used to play that animation with the "playAnimation" action.
2.firstFrame: this animation's first frame in row or column.
3.frameID: the row or column in which the animation will play.
4.framesPerSecond: timelapse between each frame.
5.horizontal: true if animation will play on rows(left to right), or false if it will play on columns(top to bottom).
6.lastFrame: this animation's last frame in row or column.
7.loop: true if animation will play on a loop, or false if it will play just once and stop at the last frame.
______________________
Published | 10 days ago |
Status | Released |
Category | Other |
Author | Digi-Device File |
Download
Click download now to get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.