Animation is not acting as Expected?

0 favourites
  • 10 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Man....this is really hurting my head. I have come back to this problem off and on for months and everytime it just not make any sense why it is not working.

    I have an array that determines the player display along with an animation when you select your player at the beginning of the game. That works fine on the displaying of the main sprite...but the character is constantly walking. I have done about 30 different things and i cannot explain so I ewant to show you what I have and see if anything sticks out to this smart group of people. The set animation to array command is what I am using to allow your player you choose to be displayed on screen. That sprite as 5 different animations but each animation is one character doing a walk animation. This works great from the stand point of showing the player...but again always walking. I am trying to get it to not be walking at the start and then when something is triggered do the walk animation for X seconds as the sprite makes it's way along the path

    Tagged:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • the art looks great.

    do you have idle animations? you could just stop running the animation when it gets to its target, but it would look better to have an idle animation.

    I am not really clear on what you have in the array? just the animation name? you could add extra columns for different animations:

    Array_Player_Full.At(Player_Select,0) for idle

    Array_Player_Full.At(Player_Select,1) for walk

    Array_Player_Full.At(Player_Select,2) for run

    Array_Player_Full.At(Player_Select,3) for Attack, etc...

    or skip the array, and set Player_Select to the character type (Warrior, Ninja, Wizard, or Knight) and then set animations as you need like this:

    Set Animation to Player_Select & "_Idle"

    or Set Animation to Player_Select & "_Walk"

    in events 11 to 15 I see you checking Stage and starting to move the character to a destination, but I don't see you updating Stage. That means those events will happen every tick. Once a sequence has been started, you should update Stage, or add a trigger once. then when the sequence finishes, set animation to Player_Select & "_Idle"

  • Are you missing a trigger once? Also disabling the loop? The animations are set to run every tick so they will play constantly, also the animations are set to loop so even if you did use a trigger once it would appear to be constantly walking.

  • The every tick on Stage 2 was a test I tried but looks like I forgot to remove that and it does not do anything from what I can tell in that example.

    But I will give the "Run Once A try."

    The Array just determines the the character to display on screen as the player gets to choose their character on the layout previous. So this is what I came up with to display the character. There is only the one object, with the 5 character options that only have one animation..which is walking.

    I like the idea of an idle but I'd like to to get the walking to work first :)

  • I paid for the artwork for the character sprites. The world map I used a D&D map creator site to create it. I think that turned out well :)

  • the "every tick" on stage 2 does not have any effect - as long as stage is 2, the actions on that event will happen every tick until stage is no longer 2.

    the same goes for stages 1 3 4 and 5 - they will also run every tick when stage has one of those values, unless you add a "trigger once" or change the value of stage.

    in your original post you said you want the character to not be walking at the start - but how can the character not be walking if you only have a walking animation?

  • Ok thanks for explaining the Stage = # commands. That makes sense.

    For now it was just going to be static until i can get the thing to work as hoped...so I thought if I did a "Stop Animation" on the object at startup of layout then once it called the "Stage = #" I would do start animation it would do the walk animation...but alas it doesnt :)

    I have not tried any recommendations yet as I am at work.

  • Are you missing a trigger once? Also disabling the loop? The animations are set to run every tick so they will play constantly, also the animations are set to loop so even if you did use a trigger once it would appear to be constantly walking.

    Animation Loop - I tried it both ways and it did not change anything. But I will set them all not to loop

  • The Run Once on the Stage = # does get the animation to do what I want. Which is great but the only way it works correctly has to have Line 3 located where it is in my original post, but then the player display does not change like it should.

    I have to have line 3 at line 9 to get my player to display correctly. But when I do this the animation just keeps running regardless of the Stop animation I have at startup

  • I was able to get this to work but I disabled the array all together and used a different approach. It required me doing the task 5 times in CS2 but in the end it works and that is all I care about. :) While doing this I did add an IDLE animation for each of the characters too...so thanks for the suggestion on that!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)