How do I stop a sprite after setting it to move forward?

0 favourites
  • 5 posts
From the Asset Store
This is a code so you can see the same skin on all screens (peers). Each peer gets a skin, in addition to 4 directions t
  • Hello again!

    I wanted a sprite to move forward on it's own, so put this into the event sheet:::

    But now, I'm not sure how to go about making it stop moving once it's collided with the trigger.

    Is there a way to, or is there a different, better solution to make a sprite automatically move until a certain point?

    Thank you in advance for any advice/help :))

  • Replace every tick with:

    Is "Willbur..." Not playing "idle" animation: Move forward

    This condition runs every tick so you don`t need to have every tick condition

    edit: let me explain what changed

    Instead of move your sprite every tick, now, you first compare the animation to see if it is not playing "idle" if it is not, then move it forward.

    When it colide it will change to "idle" animation and the first condition its no more true so it will not move anymore

  • uhh okay, I get what you're saying, but I don't know if I put it into the Event sheet right lol

    I hit "preview" and it's just moving forward with the idle animation playing.

    Have I done something dumb or wrong? :)

  • Oh no, never mind, I've got it now!!

    Thank you so much! :))

    I was supposed to put "Is animation WALK playing" not the "Idle" animation lol

    I appreciate your help KryptoPixel

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Its 2 different ways, both work. "Is animation WALK playing" but I was saying to use "Is animation IDLE NOT playing" you can active the "NOT" inverting an action. Create: "Is animation IDLE playing", right click on it and "Invert". Both works same but are different comparisions and is also good to know how to have the inverted version.

    I used the "invert" version because I didnt know the name of your walking animation, I just knew the idle one.

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