How do I get to make a single object in a group do an action?

0 favourites
  • 2 posts
From the Asset Store
Alot of High Quality Items sound effects for your game!
  • I'm trying to replicate a classic game called "Deadly Duck" and I'm working on a mechanic where the ships attacking the player go to the side of the screen, "grabbing" a bullet to get back and shoot down close by the player.

    But I'm having a couple of problems, although I'll address one I'm having more difficulty with, based on what I mentioned above.

    The ship has a default movement back and forth as it waits to shoot a bullet since only one ship should be able to shoot at a time, so as to not make the game impossible to play. There are 6 ships/enemies initially that need to detect when only one (preferably the one closest to the side of the screen) can go to the side "grab" a bullet and shoot it nearby the player, then go back to the default movement. But I'm having a problem making only one ship go through the behavior, and every time I try all the ships end up going to the side of the screen. I've tried Trigger once, and adding variables but I didn't manage to make it work as I want.

    Any help is appreciated, I'll figure out how to send the project if it's needed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There's a system condition Pick random instance, I would first get it working with this and every X seconds. You pick a random instance every X seconds and run the new movement logic. Maybe change a variable on the instance if you need to stop the default movement, so all instances with a certain variable set will only run default movement. Something like if var=0 continue with default movement, and for the one that was picked to go off screen you set the var to 1, then back to 0 when it's finished.

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