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?!
Develop games in your browser. Powerful, performant & highly capable.
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.
I was thinking of doing that as backup (the character controls). But I wanted to check here if there was another easier way :P
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.. :(
You probably have conflicting events setting your animations.
something like :
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:
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
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.