Beat Em' Up - Setting Up AI

0 favourites
  • 9 posts
From the Asset Store
10 Loopable Tracks, 4 Musical Stems, 5 Event Stingers, and 43 Sound Effects.
  • youtube.com/watch

    www(dot)youtube.com/watch?v=fvNsSqfsJsM

    I followed this tutorial which hasn't been concluded <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad" />, so I'm going to try and complete the basic gameplay system using my limited knowledge and help from the forums.

    I figure I can setup an AI enemy with the same behaviors (default control OFF) along with their attack animations. After that, what would be the best choice of setting up the AI enemy to start moving towards my player? I haven't used the Line Of Sight behavior yet so I'm not sure of its workings. Any ideas for this would be appreciated.

  • use the system event compare 2 values

    then distance(enemy.x,en.y,player.x,play.y) < 300

    how you choose to move the AI is up to you, i like bullet behavior caus you can set the angle towards the player and give it a speed.

    maybe use los so the enemy knows when to play the attack animation.

  • Funny enough, I just d/l the beatemup.capx from the tutorial (luckily still available) and the developer implemented a way for the AI enemy to find the player using compare values x,y. So clearly this is the way to go as the game build preview ran very well. I do like the idea of using the bullet behavior for other sorts of enemies.

    I also want to know how I would handle a jumping animation/event. Considering that the player's shadown/box isn't supposed to go higher than a certain point on the Y axis, how would I implement jumping? You can always jump in a beat 'em up even if you can't go any higher on the stage. Hopefully I'll get to try this out sometime.

  • Well, I have my Player and my Enemy moving towards each other. And that's about it.

    The tutorial developer's .capx file includes having an instance variable on the Enemy for the STATE of "walking" but I wasn't able to even change it in the events tab. Not sure what the issue with it it.

    I'm not sure how to go about figuring out when the Enemy should even detect the player (collision with object OR comparing X,Y variables). I tried the X,Y and it's just awful mixed results (not getting the Enemy to return to walking, not sure of distance). Anyone has any clues as to what to use, I could use some help.

    Well, I have my Player and my Enemy moving towards each other. And that's about it.

    The tutorial developer's .capx file includes having an instance variable on the Enemy for the STATE of "walking" but I wasn't able to even change it in the events tab. Not sure what the issue with it it.

    I'm not sure how to go about figuring out when the Enemy should even detect the player (collision with object OR comparing X,Y variables). I tried the X,Y and it's just awful mixed results (not getting the Enemy to return to walking, not sure of distance). Anyone has any clues as to what to use, I could use some help.

    https://www.dropbox.com/s/x2peztm94xwfl ... .capx?dl=0

  • You could use the path-finding. Set the target a few pixels away from the player sprite so it goes in front or behind the player.

    This will make so they will navigate around obstacle too.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'll have to look over a path-finding tutorial since I haven't used it yet. Hopefully this can produce the results that I want. I also really just want some sort of great example of a beat em up made in Construct 2 already.

  • something lke this? https://youtu.be/1JEYeLGsYlg?list=PLOFk0YyEmMmdifV9NiUDvYhUEjWS-bJpy

    Dude, I've watched your videos! I literally just finished your Tetris tutorial!

    But now, I can't figure out how to add the other Tetris block shapes (square, 4 pixel line). How do you create those shapes and have them work properly? I couldn't ever have figured out how to accomplish making Tetris in C2 without your videos; way too much work trying to figure out the array setup.

    As for the beat em' up, I'll look into it a long ways from now; probably will just purchase a template that works and try to make adjustments. Hope you create more videos!

  • just add new shapes for the blocks, the code should automatically make them work.

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