(S)How do I trigger "on collision" with a tiled object?

Get help using Construct 2

Post » Mon May 01, 2017 8:46 pm

Hey, I've got this chain that I'm making wider every tick the player is pressing the left mouse button. Thing is, I want it to stop when it's collided with another object.

I made this code and it works, but only if there's only one instance of that object in the layout. If there are more it doesn't...
Image

Here's a capx: https://www.dropbox.com/s/h8j1m37tdt4pc ... .capx?dl=0

Do you guys have any idea how to do this?
Thanks!
Last edited by TRMG on Tue May 23, 2017 9:02 am, edited 1 time in total.
ImageImageImageImage
B
30
S
9
G
7
Posts: 245
Reputation: 5,602

Post » Mon May 01, 2017 9:26 pm

B
39
S
22
G
77
Posts: 285
Reputation: 42,686

Post » Tue May 02, 2017 1:08 am


Great, thanks!
ImageImageImageImage
B
30
S
9
G
7
Posts: 245
Reputation: 5,602

Post » Tue May 02, 2017 1:49 am


Oh also, do you know of a way to get the X and Y position of that collision?
ImageImageImageImage
B
30
S
9
G
7
Posts: 245
Reputation: 5,602

Post » Tue May 02, 2017 10:00 am

TRMG wrote:

Oh also, do you know of a way to get the X and Y position of that collision?


Hi TRMG, I haven't tried it myself but on this links, they talk about it and they have some nice Capx Examples I hope it helps.


1: https://www.scirra.com/forum/collision-point_t148607

2: https://www.scirra.com/forum/how-do-i-get-coordinates-of-collision_t162238

3: https://www.scirra.com/forum/viewtopic.php?f=147&t=153479&p=967445&hilit=collision#p967445
B
39
S
22
G
77
Posts: 285
Reputation: 42,686

Post » Tue May 02, 2017 4:10 pm

tarek2 wrote:
TRMG wrote:

Oh also, do you know of a way to get the X and Y position of that collision?


Hi TRMG, I haven't tried it myself but on this links, they talk about it and they have some nice Capx Examples I hope it helps.


1: https://www.scirra.com/forum/collision-point_t148607

2: https://www.scirra.com/forum/how-do-i-get-coordinates-of-collision_t162238

3: https://www.scirra.com/forum/viewtopic.php?f=147&t=153479&p=967445&hilit=collision#p967445

Awesome! Thank you very much!
ImageImageImageImage
B
30
S
9
G
7
Posts: 245
Reputation: 5,602

Post » Tue May 02, 2017 4:19 pm

@TRMG Cool m8 any time :)
B
39
S
22
G
77
Posts: 285
Reputation: 42,686


Return to How do I....?

Who is online

Users browsing this forum: beohs, brunopalermo and 13 guests