pin function

Discussion and feedback on Construct 2

Post » Thu Apr 12, 2018 10:42 pm

is there any way to do something like this: if object1 that is pinned to object2 is overlapping object3, does some action that I want?? thanks.
B
7
S
3
Posts: 33
Reputation: 707

Post » Fri Apr 13, 2018 7:00 am

You can use .PinnedUID expression:

System Pick object1 by comparison object1.Pin.PinnedUID=object2.UID
...object1 is overlapping object3
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
19
S
9
G
158
Posts: 2,386
Reputation: 84,399

Post » Sun Apr 15, 2018 5:23 pm

@dop2000

sorry dop, I made a mistake, I forgot to warn that there are several objects 1, 2 and 3. because whenever object 1 is overlapping object 3 nothing happens because there are more than 1 object 1.
B
7
S
3
Posts: 33
Reputation: 707

Post » Mon Apr 16, 2018 4:17 am

It should still work, you just need to pick correct objects.
It will be easier to understand your problem if you share your capx.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
19
S
9
G
158
Posts: 2,386
Reputation: 84,399

Post » Mon Apr 16, 2018 3:52 pm

You can also have a obj_uid instance variable that is setup whenever you create/spawn the objects, making it easier to pick correct instances, like dop suggested.
B
19
S
7
G
4
Posts: 184
Reputation: 4,198


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests