Events by variable value within family

This forum is currently in read-only mode.
  • I'm not sure why this doesn't work.

    In the attached cap, the grey skeletons have MoveType=1, while the red skeletons have MoveType=2. MoveType=1 means they'll walk till they reach the end of the platform, then turn around. MoveType=2 means that it'll only turn around once it hits a wall (I've given the red skeleton gravity=0 for floating purposes).

    Use "Destroy on startup" to delete all the grey skeletons, and the red ones work perfectly. Do the same for the red skeletons, and the grey ones work perfectly. Have both in the same sheet, and they start glitching out.

    Help?

  • +Pick FamilyName by FamilyName.Value('MoveType')=1

    Do unspeakable horrors to family members with MoveType set to 1

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you for pointing out the "Pick" condition, I hadn't realized its existence.

    Unfortunately, it does not fix the problem. Exactly the same behavior occurs.

  • I think there might be a bug with remembering picked objects in sub-events. Maybe. I changed the events to this and it works fine:

    <img src="http://i39.tinypic.com/2gws7m8.png">

    Those events do exactly the same thing as yours do, just without sub-events. I can't quite tell if it's a bug or not though, it's early and I haven't had my coffee yet

  • If you have to do all that, it's got to be a bug somehow... sheesh!

  • This is odd. Making the above changes, to the walkers only, does fix the problem in the example cap I uploaded. Exporting those changes to my main project does NOT fix the problem. Exact same code. I also converted the sub-events of the floater group (not needed in the cap above) and it still doesn't work.

  • Bah. Swapping the order so that the floater group is above the walker group fixes it in my main project, yet in the test cap the order makes no difference. I don't get this. At least it's working... for now.

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