How do I stop custom movement going through solids

Get help using Construct 2

Post » Mon Nov 09, 2015 9:16 am

Hey. Using a custom movement for a dash move in my game, but the player goes through walls if I dash in their direction. Is there any way to have the custom movement stop when it hits a solid?
B
7
S
2
Posts: 60
Reputation: 604

Post » Mon Nov 09, 2015 10:25 am

From the manual, people forget to read:

Push out solid
Only valid when the behavior is currently overlapping an object with the solid behavior. Automatically move the object until it is no longer overlapping the solid. This has no effect if the object is not currently overlapping a solid. The following techniques can be used:
Opposite angle reverses (or 'backtracks') the object from its current angle of motion until it is no longer overlapping.
Nearest moves the object in an eight-direction spiral out one pixel at a time until it is no longer overlapping. The aim is for the object to end up in the nearest free space, but since only eight directions are used it will be an approximation.
Up, down, left and right moves the object along a specific axis until it is no longer overlapping.
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 » Mon Nov 09, 2015 10:59 am

Push out solid, eh? Sounds vulgar! Haha!
Thanks for the help. I'll give it a go.
B
7
S
2
Posts: 60
Reputation: 604


Return to How do I....?

Who is online

Users browsing this forum: David181, jorgmaquoi, MPPlantOfficial, unicornspitfire and 28 guests