I do not understand this

  • Hello here something strange happens, can anyone explain?

    In the project there are two tilemap objects, only one of them has the variable "var" with value 1.

    If the other tilemap object is deleted, then it works.

    It's no use uncommenting the second "pick" just after "every 0.1 seconds"

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

  • the Mnk there's only one actual tile map object, and two instances of it. Therefore both have the variable.

    (view image to see full size)

  • The variable is 1 in one object, in the other object it is 0. In the object that collides it is 1 so I do not understand why the collision does not occur.

    If you remove the "x > 500" and "x < 0" conditions then it works correctly.

    The problem is the block "OR", there is a failed there.

    If you disable the "x > 500" and "x < 0" conditions, it will not work, you need to delete them.

  • I don't think Pick works that way. If you change your Pick statement to check if the Tilemap's "var" = 1, it works.

    A simpler way at it, if it's useful.

  • I understand, thank you, although there is still something strange about the OR block in my example.

  • I'm not sure if you are aware, but the 'every tick' condition is redundant and have no effect in there.

    Like brushfe, I would use a compare variable on the Tilemap to pick it and that seems to work fine.

    I would expect the system's pick by comparison to work though, but strangely it doesn't. I manage to make it work by replacing the 'every tick' with a 'for each Tilemap' (which I think shouldn't be necessary). Maybe it's worth reporting as a bug.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If someone wants to report the error feel free to use my example capx file and my image.

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