Multiple enemies moving independently

0 favourites
  • 3 posts
From the Asset Store
This is a code so you can see the same skin on all screens (peers). Each peer gets a skin, in addition to 4 directions t
  • Despite there already being some threads about this, I still can't seem to get this to work for me:

    I'm making a platformer and have just built my first enemy. The AI and everything else works as it should.

    Next I copied and pasted the enemy somewhere else in the layout so I could have two enemies of the same kind that would attack the player simultaneously.

    Not being an absolute beginner, I also added "for each" conditions wherever I thought they might be necessary.

    But as it turns out, this is not at all as easy as I though it would be. I've spent the last three days trying to get the AI to work for two enemies at once, with no luck.

    So as a last resort I've decided to post an example.capx here and hope for someone to help me out.

    Example.capx

    So please, please, would someone be so kind?

    This game is going to be part of my final project for art school so I can't just leave it unfinished.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Two things. 1) you do need a 'For each' to check each enemy individually for the correct state. 2) you need to make sure you can pick the associated object that is pinned. You need to store the UID of the box for the dude, and the UID of the dude for the box so that they can be picked together.

    example_BHT.capx

  • What? ... Already? Wow. I wasn't sure if I'd get any replies at all.

    It's perfect. I can't thank you enough.

    How did you do this so fast? To me it looked unsolvable. A dead end.

    You've added so few lines. Makes it look so easy. Yet I still don't fully understand why it works this way... I'll spend tomorrow working that out on my own.

    Thanks.

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