[Solved]How to stop correctly my sprite against solids

Get help using Construct 2

Post » Sat May 02, 2015 5:09 pm

Hi Scirra world :)

I'm searching the best way to stop a sprite with a 8-direction behavior against solids.
Actually, when my player hit solids with a not horizontal or vertical angle, it rotates randomly and stop after.
I would like to stop my sprite without any rotation, but i don't know how to do.
Can you explain me ?

You can test my game here :

Finally, i'v found how to get my player to bounce correctly.

Code: Select all
If Player is overlapping SOLIDS at offset ((2* cos(Player.Angle)) , (2* sin(Player.Angle)))
Player.Reverse 8-direction;
Player 8-direction setspeed to Player.8direction.MaxSpeed;
FreezeCommands = 1;
Wait 0.4;
FreezeCommands = 0;

FreezeCommands is a global variable. If set to 1, the joystick and keyboard moving events are disabled.
Construct 2, an easy way to do great things.
Posts: 43
Reputation: 1,478

Return to How do I....?

Who is online

Users browsing this forum: sofiabatte and 3 guests