This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-05-13 17:51:42

isabela_taffy
New Scratcher
Registered: 2011-03-25
Posts: 4

I need help with programming the computer in a fighting game

I need help! with CPU in a fighting game

Offline

 

#2 2011-05-13 18:05:33

gbear605
Scratcher
Registered: 2008-03-06
Posts: 1000+

Re: I need help with programming the computer in a fighting game

isabela_taffy wrote:

I need help! with CPU in a fighting game

I suggest posting stuff like this in the 'all about scratch' forum next time, not the 'advanced topics' forum, as it isn't really advanced in this sense, as it has nothing to do with modding scratch.


Yeah, I'm mostly inactive.  I check in once in a while though.  If you want to contact me, I have a contact form at my website, http://escratch.org

Offline

 

#3 2011-05-14 16:48:04

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: I need help with programming the computer in a fighting game

gbear605 wrote:

isabela_taffy wrote:

I need help! with CPU in a fighting game

I suggest posting stuff like this in the 'all about scratch' forum next time, not the 'advanced topics' forum, as it isn't really advanced in this sense, as it has nothing to do with modding scratch.

While Advanced Topics is often used for Scratch Mods...it can also be used for advanced topics in Scratch as well.  But I agree that the topic is more likely to get help in All About Scratch, so I'll move it there.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#4 2011-05-14 20:40:25

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: I need help with programming the computer in a fighting game

Try and use your common sense in the AI  tongue

For a turn-based game: If the AI is low on health, it should activate a healing move. If you have buffs up, the AI should try to dispel them or buff itself. If it's not low on health and buffs are well managed, it should attack.

For a simple fighting game (where both enemies fight at the same time), just try and make it perform some random attacks whenever the player gets too close. If the player runs away, either make the AI wait or chase him or her.

Those are just some guidelines though  tongue

Last edited by Jonathanpb (2011-05-14 20:42:35)


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#5 2011-05-16 13:10:25

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: I need help with programming the computer in a fighting game

A basic AI script is to have it point towards the Player and start shooting in the direction the player is going, or for a zombie it moves towards the player. But if you want it to be strategic, you will have to code a few more things ( like dodges bullets, etc ). But that can get really complicated, which I suggest with the basics then continue to code each movement, attack, etc.  smile

Offline

 

Board footer