NaN:NaN
NaN:NaN
--:-- / --:--
Newgrounds Background Image Theme

InterloperFur just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

AI system for game

555 Views | 2 Replies
New Topic Respond to this Topic

AI system for game Nov 1, 2007


I'm making a game and i'm trying to make a combat system. If you've played any pokemon games for gameboy you'll know the sort of battle system i mean.

I need the enemy to do a random attack. He'll need to go to a differant frame per attack. These are on the main timeline, not in a movie clip. Example:
Attack 1 on frame 5-55
Attack 2 on frame 56-120
Atack 3 on frame 121-150
And so on


Since April 2007.

Response to AI system for game Nov 1, 2007


you should have added the attacks in a mc, and place them like this:

_root > enemy > attacks > attack1 > animation
attack2 > animation
attack3 > animation

and on the enemies as panel write something like:

var attacktouse = random(3);

if(attacktouse == 3)
{
_root.enemy.attacks.gotoAndStop(attack1) //frame of attack 1;
}

and do that for all your attacks...


BBS Signature

Response to AI system for game Nov 1, 2007


Thanks


Since April 2007.