Picking sprites in container in family collides need "wait"?

0 favourites
  • 8 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • Though I have solve the problem , but the solution is still a mist.


    I have three families , "tower", "add" and "attackcolor".

    The tower family has two sprites which name "small and "large ". The add family has "add1"and "add2".

    The "small" and "add1"are in the same container. Another container is made by"large" and "add2" .

    Here is the preset result when "tower" family collide with "attackcolor"family I want to create.

    Main event sheet:

    Wrong pick result without wait 0 after families created ,set value and pin.

    Another wrong pick when wait 0 is not in correct place.

    Correct wait event sheet :

    It seems like that after creating family with container , a wait 0 action is needed, so the following events of family collide with family could correct pick?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is definitely a bug.

    I suggest you report it:


    But don't post your capx, it's impossible to understand what's going on there!

    Here is a very simple capx demonstrating the problem:

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

    Basically, when two objects are in a container, and one of them is a member of a family, when you use "create family" event, the second object from the container is created, but it's not "pickable" for a few seconds.

    And adding "wait 0" indeed fixes it, which is really weird as there are no actions after wait.

  • I'm not sure this is a bug. I think it's related to this issue.

    When an object is created it doesn't really exist until the next top pevel event.

  • tunepunk

    In this case you have to wait not just 1 tick, but several seconds! Objects are created, they are moving on the screen and everything, but you can't pick them with events for several seconds.

    And somehow this event fixes it:

    On object created -> Wait 0

    Which doesn't make sense, because there is nothing else in the event, so "wait 0" should have absolutely no effect.

  • Thanks to dop2000's brief and direct example!

    Because I am a beginner and I don't know what's the real problem.Or just because I don't know how the program working .

    In your example , it spends 3 seconds to have a correct pick .It really point out a problem.

    But in my example , when I set bullets speed to zero and drag to collide each other , it never pick correctly.

    Or maybe it relate to "On collision with family with container".

  • provintia7

    I don't know why in your example it doesn't get picked even after 3 seconds..

    All I know that it's definitely a bug and you should report it.

  • I try and test again .

    My example shows that it only picks the last one sprite individually .


    "pick all family" dosen't work

    Only " pick all separately " works

  • dop2000

    I will report it ! Thanks !

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