Having weird results with 8 direction (capx)

Get help using Construct 2

Post » Fri Oct 16, 2015 2:09 pm

(Please note the capx also uses rexrainbow's move to behavior)

I am getting some weird results while using 8 direction. I am using it to simulate an object pushing another object. If you open the capx and touch and hold the blue box on the right, and push the yellow box, it goes perfectly to the left. But if I do it with the right blue box, the yellow box moves at 315 angle. The 8 direction is set to 4 directions only, so I really don't understand why it moves that way. And the events for both are similar so I am really at a lost of why this is happening. Would appreciate any hep on this, thanks!

https://www.dropbox.com/s/jvrx0o0vaqmv1fl/BlockExample.capx?dl=0
B
46
S
23
G
31
Posts: 693
Reputation: 20,637

Post » Wed Oct 21, 2015 3:13 pm

Bumpity bump.....
B
46
S
23
G
31
Posts: 693
Reputation: 20,637

Post » Thu Oct 22, 2015 9:49 am

I don't think that the behaviors are designed for what your are trying to do. If you use the 8-direction behavior and rexrainbow's 'push out solid' behavior you get the same odd result by pushing things. I would suggest you use the physic-behavior or try it without behaviors, but that could get messy if you want more than only push one of your boxes. I made a little example, but I give up to stop movement of the blue and the red boxes if they collide. So you can only push the yellow and the other still overlap.
https://drive.google.com/file/d/0B5FlDY ... sp=sharing
B
24
S
3
G
1
Posts: 454
Reputation: 2,171

Post » Sat Oct 24, 2015 4:34 pm

Thanks @Asmodean, I'm travelling right now so once I'm back I'll test it out and post it here. Again, thanks.
B
46
S
23
G
31
Posts: 693
Reputation: 20,637

Post » Tue Oct 27, 2015 4:43 am

@Asmodean, thank you for your capx. After studying it and reading what you said, I found a solution to achieve what I wanted in my game. Again, thank you so much!
B
46
S
23
G
31
Posts: 693
Reputation: 20,637


Return to How do I....?

Who is online

Users browsing this forum: Christmas and 46 guests