Hey, would anyone know how to make computer AI (artifical intelligence) for opponents in a stick fighting type game. I have no clue how and really needa figure out some way.
Any ideas, suggestions, scripts (:)) are greatly appreciated…
Ya, I did find the pacman script… but I didn’t think it would work out for fighting… (Also, that’s mostly an excuse because I’ll unintelligent in fixing it up for fighting… )
Okay well, it would be great if it was just random, with certain moves when the main player is close to the enemies… Practically, if the player gets close to the enemy, he startes punching/kicking, then chases him kinda…
I can show you the fla so you know what your working with if you want…
Here… lemem give you a short algorithm… This should be able to help you out with your thinking process…
Algorithm Not Code
if(player-x is short distance away)
{
action = make random number;
switch(action)
{
case 1 :
{
perform kick1;
}break;
case 2 :
{
perform kick2;
}break;
}
} else {
action = make random number;
switch(action)
{
case 1 :
{
perform fireball;
}break;
case 2 :
{
perform run towards;
}break;
}
}
That should help you come up with a good decisive procurrsion to what it may be.
Ugh… .fla’s… It’s probably better just doing it yourself and me helping… As people know about me… I don’t do .fla’s… I can’t stand looking at other people’s code…
Nothing against you but I have a weird style lmao…
Just tell me what you might need… Do you have all the animations done for kicking and stuff?
Oh, sorry bout that, I guess I haven’t been here long enough…
Hmm, okay well, the main mc is the boss, with the instance name of “boss”…
He’s got only a few moves so far…
Frame 1-5 = Walking
Frame 7-14 = Punch Left
Frame 16-24 = Punch Right
But basically, I want it to be that all the enemy’s (bosses i guess, lol) come after the main player (instance name “hero”). Then when there close enough, they’ll punch left (or right).
They don’t have to be directly drawn to him… maybe just if you start punching them, they come after you? I dunno, put in a few ideas of your own…
Btw, thank so much for helping me, I appreciate it greatly,
KoRRupt
Now… I just need a few more facts and then I can make you a decent script… I’m guessing this is a FInal Fight type game and not a fighting game… Beat em Up game…
Double Dragon style… Sounds cool man… Well I can make a small script that would do this…
If distance is medium… Get the “boss” attention… Then if you get closer… They start to attack you…
Sound good?
I just need to know what your movie height and width is and what the fps is.