GDevelop-extensions icon indicating copy to clipboard operation
GDevelop-extensions copied to clipboard

NEW EXTENSION - Extended Animations

Open TheGemDev opened this issue 11 months ago โ€ข 5 comments

This extension provides: Expression to return the total number of animations and frames, Action to loop animations, Action to set the time between frames, Action to set origin and center points.

Screenshot 2024-03-08 at 14 30 03 Screenshot 2024-03-08 at 14 30 52 Screenshot 2024-03-08 at 14 30 38

Project File - Archive.zip

Extension - ExtendedAnimations.json

TheGemDev avatar Mar 08 '24 13:03 TheGemDev

Thank you for submitting an extension.

Expression to return the total number of animations and frames

  • I guess it's rare to check the number of animations and a variable can be used if necessary.
  • There is already an expression for the number of frames: Sprite.AnimationFrameCount()

Action to loop animations, Action to set the time between frames, Action to set origin and center points.

Can you explain what is the purpose of these actions? Do you use them in one of your project?

Members that starts with an underscore are private and extensions should avoid to use them because they may not exist anymore in future releases.

D8H avatar Mar 08 '24 14:03 D8H

Sometimes i'm in a situation where i need to get the total number of animations, and i believe having an expression return that would be so much faster.

i forgot about the frames count. An action to stop a loop is essential.

TheGemDev avatar Mar 10 '24 18:03 TheGemDev

Hello, it seems that the command "object._animations[index].directions[0].frames[i].origin.x = x;" generate an error. Thanks, J

jumpingjh avatar May 12 '24 19:05 jumpingjh

Hello, it seems that the command "object._animations[index].directions[0].frames[i].origin.x = x;" generate an error. Thanks, J

hello it only works on version 195, as D8H said "Members that starts with an underscore are private and extensions should avoid to use them because they may not exist anymore in future releases"

I have an update though. which should work with the current version.

TheGemDev avatar May 13 '24 09:05 TheGemDev

Thanks @TheGemDev for your replay.

Reading theGDevelop projecyt I I tried with this command MyObject.animations[0].directions[0].sprites[0].originPoint.x = 10; but it downs't work.

I will wait for your new version extension.

If you need a tester, I can help you.

Thanks, J

jumpingjh avatar May 13 '24 10:05 jumpingjh