Platform AI

This forum is currently in read-only mode.
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • I've been trying for ever but I can never seem to get it right.

    All I wanted is for an AI to patrol out a path and then seek out the player when in range or something to that matter. Also being able to jump to other platforms would be a great help.

    Another thing is mirroring. I want to figure out how to flip the character so he is facing the character when he is chasing him or something.

    Thanks in advance for you help.

  • I've actually been using something EXACTLY like this for my game. I'll see if I can't get an example up later.

  • And... here it is:

    Platfrom AI example

    It's not perfect, for example, sometimes the enemies will get stuck on the higher sections while trying to get back to you, but this can be fixed if the levels aren't so crowded. Hope this helps.

  • Hey, that's pretty close to how I'm doing it too. I tweaked it a little:

    http://www.amirai.net/misc/platformai2.cap

    Now it works properly if the player doesn't move from the top platform.

    Edit: Er, realized that I probably should have commented my edits to the .cap... sorry.

    Edits: jump boxes now tell the direction of the jump by their angle

    Event 3&4: added when on ground condition

    Events 5&6: enemy doesn't turn directions in midair, but does continue forward if stopped by the edge of a platform

    Event 10: Added if angle of 'badguy' is equal to angle of jump to prevent incorrect jumps

    Set 'badguy' air acceleration/deceleration to 0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I didn't even think of doing that for the jumps. Nice idea.

  • Thank you both for the support! I got it working just fine! Though the path finding and stuff isn't the best, it'll do

    Thanks again for the help!

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