The Coin Return Foundational Fundraiser is here! Please donate!

How do i create this battle AI in Multimedia Fusion 2?

HedeyasuHedeyasu Registered User new member
edited October 2012 in Help / Advice Forum
It's a 2d game, not sidescrolling, but its one of those games where you can move only left and right, what im asking is, how do i create an AI like that in Super Smash Flash 2? Is it even possible in Multimedia Fusion 2? The best i can come up with is to set the setting to chase the player, and when the enemy overlaps the player, the enemy uses an attack animation, but if i do that, then how do i randomize what the npc will use?

Hedeyasu on

Posts

  • amateurhouramateurhour One day I'll be professionalhour The woods somewhere in TennesseeRegistered User regular
    You'll get a better answer for this in the MF2 forums. It's been a while since I've messed with it, but there used to be a guy there that had like over 100 templates for every kind of game you could imagine.

    fake edit: thankfully I'm notorious for hoarding bookmarks.
    http://www.castles-of-britain.com/mmf2examples.htm

    That guy has TONS of templates for a lot of stuff, and he's on the MF2 forums a fair bit still (I think, again, it's been a while)

    To sort of answer your question, you'll need a few different pieces for the AI. first thing you'll need is a pathfinder system in place to control the NPC enemies (think like the Ghosts in Pac Man)

    From there, you'll need your collision detection, and it sounds like you want the NPC to use a different attack depending on how the collision is detected.

    I don't remember all the terminology to MF scripting, but essentially you'd want a token of some kind for each attack animation, so basically you'd have the enemy reach the point of collision detection, and once they've met it (at whatever distance it needs to be for a ranged or close attack, of which you've created several animations) you'd have a function to generate a random number, and whichever number is generated, it's assigned to that token, which will then execute.

    Good luck!

    are YOU on the beer list?
Sign In or Register to comment.