Character won't dislay

0 favourites
  • 8 posts
From the Asset Store
Check preview, download and add value to your games.
  • I have a background picture set up, and on the 1 layer I have one sprite with an animation yet he won't appear on the layout. He is set to visible, opacity is 100, initial visibility is visible...

    Why won't he appear on the layout when I run it.. why not?

  • Ok, it was actually a problem with the run function. It kept displaying just the background when I first ran it. I closed my browser and tried again and it worked, but now it's stuck again.

    Is there a way to fix this? The run function in the window won't show any new settings I make, even if I save them first.

  • Is the sprite appearing BEHIND the background? Make sure the background is on bottom of the layer. Better yet, place it on background layer that is on bottom of all.

  • I checked that and it was set properly. I'm not sure what I did, however it seemed to be a problem with my browser, only displaying the first run screen each time, which was just of the background.

    It's good now though, thanks.

    However I do have another issue, with getting my character to move. I want him to move down while the down arrow is pressed and to play an animation, and then I want it all to stop when the down arrow is released. How do I do this? And I don't want him to slide or rotate either.

  • One thing you have to get used to with C2 is that when you preview a game it's stored in the browser's cache. Most of the time it works properly, but every now and then you'll either have to clear the cache, close the preview window and run again, or hard reset the page so that the browser runs the updated version of your project, instead of the cached one.

    If you're using the 8 Way behaviour (you haven't specified how you're doing things so I'm guessing) then you can disable rotating by changing the "Set Angle" setting in the sprite's properties.

    For what you want to do with movement you could either leave the 8 Way behaviour setting "Default Controls" on yes or disable it and do the movement via events.

    + Down Arrow is down

    - Set animation "yourAnimation"

    - Simulate Control: Down (if you set "Default Controls" to no)

    + Else

    - Set animation "someOtherAnimation"

    To make the character stop without as much slide, simply increase "decceleration" until the character stops the way you want it to.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the info, it did help and work!

    Now I have another problem- when I press any key, up/down/left/right, the proper animation occurs, etc. When I release the key, the animation stops and reverts to frame 0, which is good. However, if I press the same key again, the sprite will just slide along in frame 0.

    For example, if I press right, he will turn right and do the running right animation. When I stop, he goes back to frame 0, slides for a little bit (which is what I want) and then stops. If I then pressed right again, he would just move in frame 0. If I then pressed left, up or down, he would do those animations as normal.

    How do I set the animations so that they can repeat their function immediately after the key is released?

  • Properties bar, set looping to yes.

    scirra.com/manual/48/image-and-animations-editor

  • I have those set up already though. It won't do the animation the second time if a key is pressed twice in a row. If I press left/right and then quickly release it and press up/down (changing from a horizontal/vertical key to a vertical/horizontal key) sometimes the animation won't play at all, like I pressed the key too fast and the system didn't have time to react.

    Also when I run the game, the running down animation plays automatically until I press another arrow key. Is there a common fix to this?

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