Top-down movements and text that follows

0 favourites
  • 8 posts
From the Asset Store
Set of tiles to create a map for top-down games with island theme
  • Hey again!

    I want to make my "FPS" text stay still in the corner while my character moves around with the scroll to behaviour. I tried using the anchor behaviour but it still moves a little bit when I press down a key, gyazo.com/45aa133bcbdae59e62b7398b2fa81fa2.

    One other problem is that I'm using the 8-directions behaviour on my character but I set it to 4-directions since I only have animations for up,left,down,right. But if I press both up AND left, for example, at the same time it freezez at the left-animation and moves up. How can I fix this?!

  • Hi there. For the first problem you need to crate a new layer, and in it's properties set the paralax to 0,0. then move all GUI element to that layer.

    for the second problem, i think you should set additional conditions to the player. so, "when up = animation up", "when up and left = animation up", "when left = animation left".

    you'll need to place two conditions on the event and it will work as an AND.

  • Thank you!

    I was thinking of doing that as backup (the character controls). But I wanted to check here if there was another easier way :P

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • UPDATE: I tried: W is down + A is down -> Character - Set animation "up" + Character - simulate 8direction pressing Up.

    But still same thing happens and it really starts getting on my nerves! :S Still freezes on the left animation first frame.. :(

  • bump..

  • You probably have conflicting events setting your animations.

    something like :

    • if a is down set animation to left
    • if a+W is down set animation to up

    so every tick the animation is set to left and then to up

    which makes it seem like the animation isn't running

    There are many ways of solving this, you should make sure it's impossible for both events to be true.

    You could add a condition w is not down to the if a is down, that way it only triggers if a is down and w is not so that if a is down and w is down only the other event triggers.

  • no idea what you meant.

    I checked for a every tick setting the animation, there was none.

    Here's the CAPJ so you can download and have a look and maybe fix and? (a) C:

    dl.dropboxusercontent.com/u/15696142/Test.capx

  • You are using third party plugins in your capx, so I can't open it.

    What I meant is that you probably have your events set up like this:

    1.- If A is down - do this

    2.- If W is down - do this

    3.- If A is down and W is down - do this

    If event 3 is true, event 1 and 2 are also true.

    To prevent this you could do something like this:

    1.- If A is down and W is not down - do this

    2.- If W is down and A is not down - do this

    3.- If A is down and W is down - do this

    this way it's impossible for all three events to be true at the same time.

    This could be simplified by using subevents and else statements, but the above explains the basics.

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