Sprite Won't Move

0 favourites
  • 11 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
  • I made an event where if the F key is pressed, every tick the sprite moves forward a pixel, but the sprite doesn't move at all. Any help?

  • Superpigy

    I made an event where if the F key is pressed, every tick the sprite moves forward a pixel, but the sprite doesn't move at all. Any help?

    If you just used On Key Pressed, then this is a trigger and will only happen once. The every tick is meaningless in this situation.

    What you probably want is the condition 'On key down'. The every tick would still not be needed.

  • Superpigy

    > I made an event where if the F key is pressed, every tick the sprite moves forward a pixel, but the sprite doesn't move at all. Any help?

    >

    If you just used On Key Pressed, then this is a trigger and will only happen once. The every tick is meaningless in this situation.

    What you probably want is the condition 'On key down'. The every tick would still not be needed.

    Still won't work?

  • Superpigy

    You would make this a lot easier by posting your .capx.

    Try the example attached: https://dl.dropboxusercontent.com/u/34306693/Egs4Users/moveblock.capx

    Requires the latest stable release - r212.2.

    Just run the preview and press the 'F' key to move the block right.

    May I suggest you take a good look at the manual, and especially at some of the excellent beginner tutorials - you will learn much quicker.

  • Superpigy

    You would make this a lot easier by posting your .capx.

    Try the example attached: Requires the latest stable release - r212.2.

    Just run the preview and press the 'F' key to move the block right.

    May I suggest you take a good look at the manual, and especially at some of the excellent beginner tutorials - you will learn much quicker.

    II have looked at the manual and used the exact code from the game you linked, but as I stated before, the sprite just won't move at all.

  • My version (attached above) works. Does it work for you?

    If not, then explain in detail what happens.

    Are there any errors shown in the browser console?

    What browsers are you trying?

    If you attach a .capx of your work, then this will be resolved much easier and quicker.

  • My version (attached above) works. Does it work for you?

    If not, then explain in detail what happens.

    Are there any errors shown in the browser console?

    What browsers are you trying?

    If you attach a .capx of your work, then this will be resolved much easier and quicker.

    I'm using Google Chrome, and yeah the thing that you linked does work which is why I'm confused, how do you submit a .capx?

  • Can't figure out how to upload a .capx but this is the answer

    Global Number "Movement = 0" 1= Move 0 = Don't move

    System>>Movement=1 >>Simulate 8Direction pressing left

    >>Everytick

    Keyboard F is down >> System Set movement 1

    Keyboard F released >>> Set movement 0

    Full details:

    Basically what your doing is when you are holding down F your setting a global value to 1 then when you release the button your setting it back to 0.

    Since 1 means to move left and 0 means to not move the system works.

    Just make sure the first system has a Everytick.

  • Taser

    That seems like quite a pointlessly over-complicated way of doing something that is so simple, and doesn't seem to relate to the OP question at all.

  • Taser

    That seems like quite a pointlessly over-complicated way of doing something that is so simple, and doesn't seem to relate to the OP question at all.

    How doe's it not relate to the question, he wanted to know how to move a sprite every tick so I gave him a way. It might be complicated but it's a Answer to the question. Also I'm not posting for you, I'm posting for him so that he will have an idea of a way in which it could be done. Obviously the best way would be

    keyboard F down >> 8 direction move left. :\</p>

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My version (attached above) works. Does it work for you?

    If not, then explain in detail what happens.

    Are there any errors shown in the browser console?

    What browsers are you trying?

    If you attach a .capx of your work, then this will be resolved much easier and quicker.

    I figured it out. I made my sprite scroll to, for later in the game, but since i was testing the movement I shouldn't have because it was just a never changing white screen, the sprite was moving the entire time. My apologies if I waste your time but thanks for trying to help!

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