How do I move an sprite without overlapping

Get help using Construct 2

Post » Sat Nov 19, 2016 1:40 pm

Hi, I have two solid objects(player and rock). The player have custom movement, when I press "W" it accelerates vertically -20000 and sets player variable "moving " to 1(initialized with 0). have WASD for the controlls(the same as the "W" but different dorections).
When player collides with a rock and moving is 1 accelertion from customMovement is setted to 0 and variable moving to 0 too.

The problem is when the player colllides with a rock, first if the player just rub the rock without a "collision" it stops and if the player collides with the rock it overlaps inside.

Anyone have any idea what can I do?

Thanks in advantage :d
Posts: 9
Reputation: 193

Post » Sat Nov 19, 2016 4:21 pm

Give the Rock the "SOLID" behaviour and give the player the "PUSH OUT SOLID" behaviour.
Now, add an event "on start of layout", and an action "Player: Add obstacle: Rock" under that.
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
Posts: 528
Reputation: 7,091

Return to How do I....?

Who is online

Users browsing this forum: Kira8, stuatk and 5 guests