The McLeodGaming forums were permanently closed on April 30th, 2020. You are currently viewing a read-only archive.
View unanswered posts | View active topics It is currently Fri May 15, 2020 5:39 am

Forum rules


IMPORTANT

This Forum is for Flash related questions ONLY! Do not ask questions about spriting, Game Maker, Photoshop, or anything else not related to Flash.



 [ 4 posts ] 
[Question] Enemy AI 
Author Message

Joined: Sat Jul 18, 2009 7:45 pm
Posts: 4
Gender: Anime Girl
hey i just want to know if there is a better way to script enemy AI in a fighting type of game

what ive been doing the whole time is have the enemy follow the character and based on a random number it would attack, and when ever the _root.enemy._y>_root.hero._y it would initiate the jumping script

anyways I basically asking if there is a better way of doing this

thanks!!


Sun Jul 19, 2009 12:32 am

Joined: Sat Jul 18, 2009 7:45 pm
Posts: 4
Gender: Anime Girl
im not asking for anyone to give script, but if anyone could help me out
thanks


Mon Jul 20, 2009 12:51 pm
User avatar

Joined: Wed Apr 29, 2009 11:28 pm
Posts: 323
Location: Nowhere, Antarctica
Gender: Anime Girl
Skype: Evilagram
Most fighting games work on a system of far range, close range, and mid range. Depending on which range the player is in, the AI will commence with a certain type of attack for that range. Don't forget that the AI sometimes jumps just like the player does, and that they need to work with aerial attacks too.

_________________
Image

Style [Stayl] (n) - One's unique and personal method of defacing a perfectly good piece of paper.

READ THIS: http://ipgd.freehostia.com/copypasta.html


Mon Jul 20, 2009 10:48 pm

Joined: Sat Jul 18, 2009 7:45 pm
Posts: 4
Gender: Anime Girl
Quote:
Most fighting games work on a system of far range, close range, and mid range. Depending on which range the player is in, the AI will commence with a certain type of attack for that range. Don't forget that the AI sometimes jumps just like the player does, and that they need to work with aerial attacks too.


So this is what I'm thinking,
I would have a variable track the distance between the two players then based on the distance of close, mid, and far, preform the attacks
and if one player is above the other then jump, and if on player is above the other && the distance is close then preform the ariel attack...

is that a good way to approach this?

thanks!


Tue Jul 21, 2009 10:24 am
Display posts from previous:  Sort by  
 [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF.