Discuss Scratch

dogcom
Scratcher
12 posts

how to make a cpu

i need help makeing a cpu in my fighting game
TheHockeyist
Scratcher
1000+ posts

how to make a cpu

Are you referring to AI (artificial intelligence)? That's pretty difficult.
LMartin75
Scratcher
40 posts

how to make a cpu

With AI, you would need many randomized variables to predict the direction, speed, and other things to operate the AI. AI's ARE pretty difficult!
Birdlegs
Scratcher
1000+ posts

how to make a cpu

AI isn't ALWAYS too difficult to make! In my Pong game, the AI is a good match just by moving closer to the ball along the y-axis, effectively trying to follow it. It can be hard, though, if you're getting into other stuff.
Austinato
Scratcher
1000+ posts

how to make a cpu

dogcom wrote:

i need help makeing a cpu in my fighting game
If you're talking about AI, then there could be numerous different ways, as of I know.

Fighting Costumes
Please do not get mad at me if this doesn't work XD
If you want it so that when it kicks, it automatically harms your character or something, then you might want to make the sprite change to ‘<costume>’ name (which will look like a person/character kicking). When it does that, you could branch off by changing the variable when it does so (make the variable), like change the variable to 1 or Kick, but 1 if you're planning on making it Cloud-Related (Cloud isn't recommended). When it does so, for the enemy going to be affected by the kick, make it so that this happens:

(When Flag Clicked)
(Forever)
| (If touching {<sprite of kicking character> and <variable name> = <number of kicking>} then
| (Change <variable (heart power) by <any amount of heart power lost>)
—–

If you want, you could make it so it doesn't drop quickly, instead at every 1 or 2 seconds it drops 5. Or etc.

This is one way, if you find this helpful and you want another style, let me know.
Blank1234
Scratcher
500+ posts

how to make a cpu

LMartin75 wrote:

With AI, you would need many randomized variables to predict the direction, speed, and other things to operate the AI. AI's ARE pretty difficult!
not randomized variables. that would be super easy. ai means predicting the players best move then responding to that move
dogcom
Scratcher
12 posts

how to make a cpu

TheHockeyist wrote:

Are you referring to AI (artificial intelligence)? That's pretty difficult.
yes i neen A.I i dont care if it takes forever do you know how to make one
barcode312
Scratcher
100+ posts

how to make a cpu

Look at this project to help you out:
https://scratch.mit.edu/projects/933971/#editor
Click the p2 sprite.

Last edited by barcode312 (June 1, 2015 14:33:03)

dogcom
Scratcher
12 posts

how to make a cpu

barcode312 wrote:

Look at this project to help you out:
https://scratch.mit.edu/projects/933971/#editor
Click the p2 sprite.
thank you so much
whenclickedforeverifyou=girl thenmove10stepspointtowardsyouswitchcostumetokiss
barcode312
Scratcher
100+ posts

how to make a cpu

dogcom wrote:

barcode312 wrote:

Look at this project to help you out:
https://scratch.mit.edu/projects/933971/#editor
Click the p2 sprite.
thank you so much
whenclickedforeverifyou=girl thenmove10stepspointtowardsyouswitchcostumetokiss

Np! Also no, I'm not a girl xD

Powered by DjangoBB