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

0 favourites
  • 5 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • 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.

  • 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)

  • 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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Brilliant, a helper sprite. After a bit of tweaking, chaining with recursion works perfectly. Thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)