Skip to content

Allow direct access to or add Blocks to get Animation number, and get/set animation frame number #181

@NickR-Git

Description

@NickR-Git

Is your feature request related to a problem? Please describe.
In need of a way to sequence multiple animations, including a way to set them to a different animation based on a specific animation frame number.

Describe the solution you'd like
While vcsgm provides an abstraction layer to allow naming of animations, in my case I'm using the animation number to set the animation. To sequence animations together, I'd like a way to get the current frame number of the currently playing animation on a specific player sprite.

A usage example would be playing this animation once:

Image

Then, after the last frame duration of the animation, switch to a different looping animation:

Image

Describe alternatives you've considered
There doesn't appear to be a reliable working alternative at this time.

Additional context
Perhaps the related variables I see in the generated bB could be made more directly accessible to vcsgm users? player0frame, player0animation, etc. for both player sprites.

Given animation length can be different between animations, we would likely still need a way to know when the last animation frame has finished playing and a way to trigger an event based on it.

Even more additional context
Somewhat related, it wasn't until I noticed unexpected program behaviors that I thought might be a bug that I took a deeper look at the generated bB code and realized some of the a-z variables slots were being taken up by the generated code to manage player animation, audio generation, color, etc:

Image

This has ended up conflicting with variables I created to manage some of the same behaviors that get assigned to overlapping variable slots, many of which are being created by vcsgm already (player sprite color, animation, size etc.):

Image

If there were a way to access these generated variable values directly and get/set their values, this would reduce the need to create additional variables that vcsgm users can get/set directly. It would be great if this could be done for as many of the generated variables as possible, including getting color by number, not just the color block that abstracts which color is being picked with the (admittedly more user friendly) color box dropdown.

I also see a "loopcounter" var being defined but not used anywhere in the program, but possible that's for future vcsgm usage?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions