How do I Block an object like a real wall?

Get help using Construct 2

Post » Mon Apr 07, 2014 9:59 pm

Hello!

I have just added collision behavior on my objects. I am using mouse to drag-and-drop them around the screen. I have also created transparent/invisible objects that are supposed to be immovable and block the other objects.

This block object really blocks them... but while dragging the objects the system let me to overlap this "wall" and only moves the object to an available place if I release the mouse button.

I can't allow the player to drag this objects over the walls.

Any ideas?
Thanks!
B
24
S
4
G
1
Posts: 174
Reputation: 1,821

Post » Tue Apr 08, 2014 11:25 am

Yes! IMHO, add condition: When "object" collides with "wall" ==> Add action: "Object" Drop.
Hope it will help!
ImageImageImageImageImage
B
54
S
15
G
5
Posts: 852
Reputation: 11,346

Post » Tue Apr 08, 2014 12:08 pm

Hi Naji! Thanks for the reply!
Well... I tried that... but the object stops in all directions. I would like it to still be able to slide on the walls.
For instance:

The player has a wall above the object, still it is dragging it towards the wall but a little bit to its right.. so the object would I least move to the right. =)

I would love to see it working with only behaviors. In a matter of fact it works... but Dragging let's the object to overlap the walls (even though it bounces it off later).

Thanks!
B
24
S
4
G
1
Posts: 174
Reputation: 1,821

Post » Tue Apr 08, 2014 3:40 pm

I need an object (wall)) that makes it impossible for another (player token) one to overlap it. At the same time, the Token cannot just stop its movements.. it has to slide.

One more thing, when I have more than 1 token, while dragging them around, they are able to overlap each other, even with collision enabled!
B
24
S
4
G
1
Posts: 174
Reputation: 1,821


Return to How do I....?

Who is online

Users browsing this forum: jasontoups and 1 guest