How do I pick only one object?

0 favourites
  • 3 posts
From the Asset Store
Pick Up Items Sound effects for your game, Take them for a ride right now and you will worry no more.
  • I have multiple bullet objects which have a boolean called "disabled" and once they leave the screen they turn on the boolean "disabled" and they stop moving. What i am trying to figure out is how to pick only one of the multiple bullets with the boolean "disabled" on, so i can turn off the "disabled" boolean.

    I tried to do it in this way, but i didn't work.

    does somebody have a way to achieve what i am trying to do?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The code on your screenshot looks correct - is should pick one bullet instance with disabled=false.

    The problem must be in some other event. Or maybe there are no disabled instanced. Try running the project in Debug Mode and check.

  • The code on your screenshot looks correct - is should pick one bullet instance with disabled=false.

    The problem must be in some other event. Or maybe there are no disabled instanced. Try running the project in Debug Mode and check.

    Oh, i just realized what i did wrong. Last time i did that code i place "is disabled" at the bottom rather that at the top, which caused to select a bullet that wasn't disabled. I recreated the code just for this screenshot and accidentally did it correct.

    Thanks for helping me anyways!

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