Mega Man Boss AI

Hey all,

So I have been trying to program a MEGAMAN style boss. I am having so many issues. My boss has three different moves, and I would like him to randomly select which "move" he is going to do. (E.G. Shoot his gun, Cause object to fall from sky, let loose a horde of robots.) In between the moves he will go back to an idle Position where the hero can shoot him. Any suggestions? I have looked for tutorials and so far haven't found anything.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    If you're just asking how to randomly select a move, that's not too difficult. If you're asking how to program all of those moves, well, that's a lot to cover in one post.

    Let's start with random selection:

    Create an integer game attribute called game.bossStatus. Set it to 0. In the boss actor, have rule that says When attribute game.bossStatus=0 and inside of that rule have a Timer set to every few seconds. Inside of the timer do Change Attribute game.bossStatus to random(1,3). Then have separate rules for each possible value of game.bossStatus. A value of 1 could be shooting his gun, 2 could be objects falling, 3 could be spawning robots, etc. At the end of each of those separate rules, change game.bossStatus back to 0. You may need to use some timers to get it to all sync correctly.

    You'll then want a rule in the player or bullet actor that says When game.bossStatus=0 and actor collides with actor [boss], ... do something such as reducing the enemy's health, changing to the win scene, etc.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Shim-ShamShim-Sham Member Posts: 2

    Thank you. thats basically what I had, but I was grouping them all together. Thank you so much!

  • UtopianGamesUtopianGames Member Posts: 5,692
    edited December 2014

    If you get stuck with the animations our latest free template Snowmen Attack has 3 different random moves for the enemies which are walk, idle and fire...might help you.

    Theres also a hit effect that sends them backwards with animation.

    http://www.deepblueapps.com/gs-snowmen-attack/

    Darren.

Sign In or Register to comment.