Why is this working? This object is reading my mind.

0 favourites
  • 5 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • So when a character is "hold" his LOS range gets bigger and I want the "playerLOS" to reflect that. It's like a range indicator.

    This is working perfectly fine. But I don't understand why.

    I'm never referencing the playerLOS's parent in the condition, why only the correct instance grows? Its like it's reading my mind haha.

    Here is a video of the behaviour

    Subscribe to Construct videos now

    The events:

    The reference of the object. I only have 2 events for this object.

    A few days ago I put this object in a container with one of the characters sprites until i realize it didn't work with families and i then i removed the container. Could that be it? I really don't think it's in the container anymore.

    Now here is the thing, it would be absolutly FANTASTIC if i can make this work for other stuff.

    I'm still new to construct and im having a lot of trouble learning all the nuance to how picking works.

    Tagged:

  • A container would've certainly explained this behavior..

    Are events 9-11 nested under some parent event or function?

    Can you reproduce this issue in a small project and share it?

    Of course, the correct way to achieve the same result would be adding "For each Player, Player pick child PlayerLOS" to event #11

  • Hello dop2000 No, no nesting, just in a group.

    Here is the reproduction in a small proyect:

    https://drive.google.com/file/d/13V5nZVUWB0HitlMUWRB270VhRhEMsIdU/view?usp=sharing

    It's picking the instances in order of creation or something, that's all i can think of. Like it assigns a "player" to a "playerLos" in order. Even if you create another "player" at runtime.

  • I'm trying other things, everything just "works". And the fun thing, there is no parent/child now.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Looks like when you don't pick LOS or Player instances, the engine will try to process them in pairs. I vaguely remember seeing or reading about this before. I'd say this is a bug, you can try reporting it. Here is a simpler repro:

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