Solved Adding multiple animations for anim followX

Question that is answered or resolved.

PS_VITA

Active member
Hi,
Is there a way skip to a certain frame in player one anim follow?

Example: I'm trying to skip to "animation victory3 " by using a script controlled by a stage object.


(Player1)
Anim follow7
Offset 0 0
Delay 100
.../victorypose1.png
.../victorypose2.png
.../victorypose3.png

I know how to use changeproperty (P1, "animation ", anim_follow7);

But how can I include a code to skip to the third frame to force victorypose3? (And not play the first two frames)

I have to many anim follows and I'm trying to optimize this a bit.

Thanks for reading my question.
 
You can use updateframe(P1, frame);

Replace frame with number of desired frame.
So it works great, but I guess I didn't expect it to not continue to play the next animations, it just got stuck on the frame number I assigned.


There wouldn't happen to be a way to continue to play the animation regularly would it?


edit: regardless, this is extremely useful and I super grateful for the suggestion.
 
Well, we need to understand what exactly you are making here. Are you making a script to choose victory pose compiled in one animation? or something else?
Correct, I'm making a script to choose a victory pose compiled in one animation. But each victory pose has several frames of animations.

For example:

Anim follow11
Offset 0 0
Delay 10
..../victorypose1a.png
..../victorypose1b.png
..../victorypose1c.png
..../victorypose1d.png
..../victorypose1e.png
..../victorypose2a.png
..../victorypose2b.png
..../victorypose2c.png
..../victorypose2d.png

Updateframe allowed me to skip to victory pose2 but I thought it would animate frames b,c and d. ( Instead it just loops frame victorypose2a.)

The only way to animate the rest of those frames is to keep using updateframe, perhaps in a script that uses an if statement followed by "if frame== 1" or whatever frame number.

Thanks for your help @Bloodbane
 
Last edited:
Updateframe allowed me to skip to victory pose2 but I thought it would animate frames b,c and d. ( Instead it just loops frame victorypose2a.)

It's hard to imagine what's happening here without seeing the script :rolleyes:.
I can only guess that you aren't using frame check yet.

OTOH from your example, after playing last frame of victory animation, character would loop at that last frame right?
 
It's hard to imagine what's happening here without seeing the script :rolleyes:.
I can only guess that you aren't using frame check yet.

OTOH from your example, after playing last frame of victory animation, character would loop at that last frame right?
Not the last frame,
Updateframe allowed me to skip to victory pose2 but I thought it would animate frames b,c and d. ( Instead it just loops frame victorypose2a).

I managed to get the results that I wanted but if I ever use updateframe I wonder if the code is meant to simply use whatever frame you choose once or create a loop for it. I didn't get a chance to test it but eventually if I ever need it again I will test that.
 
I asked cause I was going to suggest this:
C:
anim    follow11
@script
  if(frame==5){
    void self = getlocalvar("self");

    updateframe(self, 0); //1st loop
  }
  if(frame==10){
    void self = getlocalvar("self");

    updateframe(self, 6); //2nd loop
  }
@end_script
    Offset    0 0
    Delay    10
    ..../victorypose1a.png
    ..../victorypose1b.png
    ..../victorypose1c.png
    ..../victorypose1d.png
    ..../victorypose1e.png
    Delay    1
    ..../victorypose1e.png
    Delay    10
    ..../victorypose2a.png
    ..../victorypose2b.png
    ..../victorypose2c.png
    ..../victorypose2d.png
    Delay    1
    ..../victorypose2d.png

In this example, victory pose frames are grouped and looped by script.
 
I asked cause I was going to suggest this:
C:
anim    follow11
@script
  if(frame==5){
    void self = getlocalvar("self");

    updateframe(self, 0); //1st loop
  }
  if(frame==10){
    void self = getlocalvar("self");

    updateframe(self, 6); //2nd loop
  }
@end_script
    Offset    0 0
    Delay    10
    ..../victorypose1a.png
    ..../victorypose1b.png
    ..../victorypose1c.png
    ..../victorypose1d.png
    ..../victorypose1e.png
    Delay    1
    ..../victorypose1e.png
    Delay    10
    ..../victorypose2a.png
    ..../victorypose2b.png
    ..../victorypose2c.png
    ..../victorypose2d.png
    Delay    1
    ..../victorypose2d.png

In this example, victory pose frames are grouped and looped by script.
Neat. And thank you.
 
Back
Top Bottom