What-side-is-it-on detection

Get help using Construct 2

Post » Mon Aug 26, 2013 2:10 am

I can't figure out how to make a crate that my character can shove around. I got the part down where it falls and lands on the floor, but it doesn't work right. How do I make something that a player can kick around without it going through walls? Apparently at the moment it's a phantom ball.

What I did was give it a Physics behavior and a Platformer (controls-none) behavior, but there's probably a better way to do it. My next step would have been to make it kickable. I figured out how to make it jump when someone touches it, but I can't figure out how to make it know which way to go. What I'm missing is some kind of where-did-that-kick-come-from detection. Anyone know how to do this?
B
5
S
1
Posts: 22
Reputation: 569

Post » Mon Aug 26, 2013 2:51 am

for the "Phantom Ball" problem, you want to give it AND the wall's a solid behavior and make sure they are enabled in the item properties.

for the "Which side is it on" you could do a compare X to player.x

If Box.X > player.X   you know the box is to the right of the player. Vice versa for Box.X < Player.X
B
35
S
5
Posts: 411
Reputation: 3,406

Post » Mon Aug 26, 2013 5:48 pm

That works, thanks!
B
5
S
1
Posts: 22
Reputation: 569


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests