How do I do that the player don't go through the wall?

Get help using Construct 2

Post » Wed Aug 20, 2014 3:07 pm

Hello

In my game the player move in "snap to grid" style (top view game). I mean it move one frame/grid to another one.
Of course in the game there are walls. The walls must be solid as the player can't through walls. So the hero stop when he collisions the walls.

But he doesn't do it. I think because I don't use movement behaviors. Just I use a simple "if a key is pressed set position to ....". It perfectly works, just it doesn't stop in front of the wall. I tried add a movement behaviors and set the "default controll" is "no". The result is: Stop front of the wall, just when I move left (for exemple) and the player collision the wall, he began to "climp" along the wall.

I upload my game, maybe it will help you. Thanks!

I think write here and I ask you, because I have no more idea...
You do not have the required permissions to view the files attached to this post.
B
5
S
1
Posts: 37
Reputation: 441

Post » Wed Aug 20, 2014 4:16 pm

Someone made this capx with one possible solution, can't remember who..
You do not have the required permissions to view the files attached to this post.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Aug 20, 2014 5:04 pm

Thanks but I don't open it. My program version is 173. This file will save with 175.

If the "script" of this file not too complex may be enough a picture about the script for me.
B
5
S
1
Posts: 37
Reputation: 441

Post » Wed Aug 20, 2014 5:27 pm

There is a new stable version 178, I suggest you update to that..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: Artcadev and 39 guests