Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEW EXTENSION - Extended Animations #1210

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

TheGemDev
Copy link
Contributor

@TheGemDev TheGemDev commented Mar 8, 2024

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 TheGemDev requested a review from a team as a code owner March 8, 2024 13:43
@TheGemDev TheGemDev changed the title extended animations NEW EXTENSION - Extended Animations Mar 8, 2024
@D8H
Copy link
Contributor

D8H commented Mar 8, 2024

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 D8H added ✨ New extension A new extension 👨‍👩‍👧‍👦 Community extension An extension submission to be merged ASAP with a lightweight review. labels Mar 8, 2024
@D8H D8H added this to Needs review in Extensions review via automation Mar 8, 2024
@TheGemDev
Copy link
Contributor Author

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.

@jumpingjh
Copy link

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

@TheGemDev
Copy link
Contributor Author

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.

add fliped x and y expression
@TheGemDev TheGemDev marked this pull request as draft May 13, 2024 09:43
@jumpingjh
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👨‍👩‍👧‍👦 Community extension An extension submission to be merged ASAP with a lightweight review. ✨ New extension A new extension
Projects
Extensions review
  
Needs review
Development

Successfully merging this pull request may close these issues.

None yet

3 participants