"Is overlapping at offset" and "Pick nth instance" Issues

Just started using Construct 2? Post your questions here

Post » Mon Dec 26, 2016 6:46 pm

Hello,

I'm trying out Construct 2 by building your average, generic block destruction game, but I'm having some issues combining the afforementioned methods.

I want destroyed blocks to chain to similar, adjacent blocks, but "Is overlapping at offset" alone seems to reference to the instance calling the method. I thought "Pick nth instance" would help overcome this issue, but sadly it does not.

My current event chain for checking, for instance, if a similar adjacent block is located to the left of the block calling the method and destroying it afterwards is as follows:

+ On Left button Clicked on [Obj]
++ Is overlapping [Obj] at offset (-10, 0)
+++ Pick [Obj] instance 1 > [Obj] Destroy

Is this supposed to not work, with "Is overlapping at offset"? If it is, what am I missing?

Thank you.
B
3
Posts: 3
Reputation: 181

Post » Mon Dec 26, 2016 7:39 pm

is [Obj] the same object ?

If so, then 'On Left button Clicked on [Obj]' selects 1 instance of [Obj]. It ads that object to an internal list: The Picklist.
All following sub events start picking from the objects in the picklist, and (on there end) adjust that list.
Since that list contains only 1 instance (the instance clicked by the mouse), .... 'Is overlapping [Obj] at offset' has no other instances to evaluate.
Hence, the 'Pick nth instance' has to pick from an empty picklist, that condition will therefor always be false.

Do you have access to family's ? (paid version)
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Dec 26, 2016 7:52 pm

99Instances2Go wrote:is [Obj] the same object ?

If so, then 'On Left button Clicked on [Obj]' selects 1 instance of [Obj]. It ads that object to an internal list: The Picklist.
All following sub events start picking from the objects in the picklist, and (on there end) adjust that list.
Since that list contains only 1 instance (the instance clicked by the mouse), .... 'Is overlapping [Obj] at offset' has no other instances to evaluate.
Hence, the 'Pick nth instance' has to pick from an empty picklist, that condition will therefor always be false.

Do you have access to family's ? (paid version)

Thank you for clarifying.

Yes, it's the same object.

Would there be any dirty workaround for this? I do not have access to families, as I haven't purchased C2 (yet). I need to get acquainted with it, first.
B
3
Posts: 3
Reputation: 181

Post » Mon Dec 26, 2016 8:36 pm

Dont need a dirty way. : )

You will learn to understand 'picking', which is a major actor in Construct's game.

https://www.dropbox.com/s/aplwnnx4q8zub ... .capx?dl=0

Step by step, you will get there.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Dec 26, 2016 10:29 pm

Brilliant, a helper sprite. After a bit of tweaking, chaining with recursion works perfectly. Thanks!
B
3
Posts: 3
Reputation: 181


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest