[Solved] Sequential animations

Hi guys,
I have a machine gun and would like two animations to run in sequence.
how can I do?

Do you want to play the animations continually, or just once?

i need it to play continuously

Can you make one animation with the two, and loop it? Or does that not fit with what you are after?

yes, in loop first shot1 then shot2 and so on

how can I do? do you have any solution?

@ilary27, apologies, I lost track of this thread.

Can you get the frames of animation shot2 and append them to the frames of animation shot?

Otherwise, I’d use the following technique:

  1. Duplicate the last frame of each animation (otherwise the events below will omit the last frame).
  2. Use the following:
    image

I tried duplicating the last frame of both animations and adding your same code but it doesn’t seem to work… the weapon stops at the first animation without executing the subsequent ones

in all the other weapons of my game I use to perform a random animation between shot and shot2, while for this “minigun” weapon I would like the bullets to be created in two different positions by simulating the rotation of the weapon. the two ways to do this are either through the animations or change the exit point of the bullets always sequentially

Do you reset the timer “bulletshot” anywhere, preventing the events from being repeated?

yes the timer is reset every time a projectile is fired

And what about the joystick.speed condition; will that always be 100 while the animation is runnig? Sorry for asking, I’m trying to get a handle on what exactly you’re doing.

sorry for the delay in replying, yes the value of the joystick is 100 the animation is performed

Ok, I’m a tad stumped then. Do you want to share the game.json with me over PM? It may be quicker to sort it out that way, rather than going back and forth for the next week or longer.

1 Like

ok i will send you a game example, thank you for your constant availability

Just an FYI for anyone referencing this thread, the solution posted earlier ended up working. There were other events that prevented it.

2 Likes