overlapping and detecting

This forum is currently in read-only mode.
  • My problem is that it seems that there's only a reaction to the first overlapping. Not to anything that comes after it (when overlapping of first still takes place).

    I have 1 box (school), 1 sprite (child).

    When child overlaps school: add 1 to variable.

    If child stands in front of school building, it overlaps. Everything ok so far.

    When a 2nd child comes as well in front of building, both children overlap. But it seems like it is ignoring the 2nd one.

    Because overlapping is already "true"?

    I wonder how I can get the next overlappings being detected by the "school".

    Thanks in advance.

  • If "child" is just a different instance of the same object, then no it wont detect it.

    Try placing "child" into a family, or giving each new instance its own pv, and check with two conditions, child is overlapping, and child's pv is equal to new pv.

  • try the system condition 'for each object' thusly:

    For each child

    if child is overlapping school

    -->set child pv to 1

  • try the system condition 'for each object' thusly:

    For each child

    if child is overlapping school

    -->set child pv to 1

    Definitely the best way.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You don't need a for each if that instance is referenced in the same condition.

    That instance is already in the S.O.L. It is picked by the condition, and since its pv can be changed to something different than all the other instance's pvs, it can be treated as a single object.

  • Sorry for the late reply. I already tried something, but I need more time.

    Which I have today. To try to get it working.

    What is S.O.L.?

    pv = private variable?

  • What is S.O.L.?

    S.O.L. stands for Selected Objects List I do believe, it basically a list of objects that fit your event conditions.

  • Thanks for all suggestions.

    I am now using the following construction:

    for each child

    child: private variable is set to '1'

    --> do something

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