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

#26 2008-01-12 13:16:45

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: Fighting Game AI Tutorial

How do you make some of the text bold and some not?(on posts)


http://i.imgur.com/WBkM2QQ.png

Offline

 

#27 2008-01-12 15:16:29

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Fighting Game AI Tutorial

Click on the BBcode link below the "Write your message" box for information about formatting posts.

Offline

 

#28 2008-08-14 19:08:15

Bobby500
Scratcher
Registered: 2008-04-19
Posts: 1000+

Re: Fighting Game AI Tutorial

NOw, Archmage or someone else,Do you know how to make the Ai go through a bunch of running sprites while moving torwards the player?

Offline

 

#29 2008-08-14 20:02:39

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Fighting Game AI Tutorial

Bobby500 wrote:

NOw, Archmage or someone else,Do you know how to make the Ai go through a bunch of running sprites while moving torwards the player?

Do you mean you want it to play a running animation?

In that case, just make the sprite shift thorough a series of costumes to make up the running animation.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#30 2008-08-14 21:23:13

Bobby500
Scratcher
Registered: 2008-04-19
Posts: 1000+

Re: Fighting Game AI Tutorial

archmage wrote:

Bobby500 wrote:

NOw, Archmage or someone else,Do you know how to make the Ai go through a bunch of running sprites while moving torwards the player?

Do you mean you want it to play a running animation?

In that case, just make the sprite shift thorough a series of costumes to make up the running animation.

Thanks, I just wasn't sure if it was possible. Now I know.

Offline

 

#31 2008-10-30 13:42:45

djm111
Scratcher
Registered: 2008-10-29
Posts: 1000+

Re: Fighting Game AI Tutorial

nice thanks for the tutorial archmage i might be able to put ai in my smash bros game now


http://i627.photobucket.com/albums/tt358/Dazzamcgazza/sig.png

Offline

 

#32 2009-08-23 19:59:20

Jinck
Scratcher
Registered: 2009-07-18
Posts: 100+

Re: Fighting Game AI Tutorial

here is how to make a scrolling bouns
[blocks] <when green flag clicked>
<set{xVolosity}to(0
<set{yVolosity}to(0
<set{max speed}to(25   
<forever>
<if><<<touching[G<or><color[green]is over[black>>
<set{yVolosity}to(15
<if><<<key[right arrow]pressed?><and><(<abs(<{xVolosity}><<><{max speed}>  )>>>
<change{xVolosity}by(2
<if> ><<<key[left arrow]pressed?><and><(<abs(<{xVolosity}><<><{max speed}>  )>>>
<change{xVolosity}by(-2
<set{xVolosity}to(((<{xVolosity}><*>0.9))
<change{yVolosity}by(-1
<change{scrollX}by(<{xVolosity}>
<change y by(<{yVolosity}> [/blocks]


Play Sins of A Solar Empire!!!!!!!! http://media.pcgamer.com/files/2012/03/Sins-of-A-Solar-Empire-Rebellion-5.jpg

Offline

 

#33 2009-08-25 12:14:26

agentblueberry
Scratcher
Registered: 2009-08-19
Posts: 100+

Re: Fighting Game AI Tutorial

I need help. I added the script for movement of AI but nothing happends.


The story of agent Blueberry in the works: http://scratch.mit.edu/projects/agentblueberry/1070585 You must download it to play it.
.

Offline

 

#34 2009-10-06 18:02:55

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Fighting Game AI Tutorial

archmage, your projects and tutorials are awesome. too bad your last scratch project is coming soon.
<when green flag clicked>
<play sound[ taps

Last edited by 16Skittles (2009-10-06 18:03:50)


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#35 2009-10-26 16:44:47

cod4person
Scratcher
Registered: 2009-10-26
Posts: 2

Re: Fighting Game AI Tutorial

how do you make youre guy die plz help

Offline

 

#36 2010-03-11 16:19:11

infinite_minus_zero
Scratcher
Registered: 2010-02-18
Posts: 100+

Re: Fighting Game AI Tutorial

cod4person wrote:

how do you make youre guy die plz help

I suggest making a variable called "life" (or whatever you want) and put <when green flag clicked><forever if> <( <{  }>  <=> 0 )> then make it do whatever you want, like <broadcast[ game over or <stop all> , some thing like that. hope it helped!

Offline

 

#37 2010-03-15 19:41:31

taken405
Scratcher
Registered: 2009-08-27
Posts: 1

Re: Fighting Game AI Tutorial

This was very  helpful. Oh, and in the following part [blocks]
if   < <( y position less than (( y position   of player1    +    50  )) )> and touching   ground  > 
change   yVelocity    by   15 [/blocks] , it says "...of player 1 + 50..." Whereas in the orinal script picture, it says "...of player 1 - 50..." You might confuse some people with this.


Taken405: The ultimate Scratcher U stole my cookies! :_(

Offline

 

#38 2010-03-20 10:56:37

infinite_minus_zero
Scratcher
Registered: 2010-02-18
Posts: 100+

Re: Fighting Game AI Tutorial

assuming your talking to me, your welcome. if not, chances are ive done something for you, sometime, somewhere, somehow, so your welcome. if not, your welcome in advance.

Offline

 

#39 2010-05-22 13:41:13

andrewcevery
Scratcher
Registered: 2008-03-23
Posts: 28

Re: Fighting Game AI Tutorial

I once used one of your AI's and was using it for a game.
IT DIDN'T KNOW ABOUT WALLS.
I forgive you, though, because I decided that the game sucked so much anyways that I never finished it. XD

Offline

 

#40 2010-06-11 21:03:40

twik
Scratcher
Registered: 2009-10-20
Posts: 1

Re: Fighting Game AI Tutorial

I;m Having a dillema myself.... i am making a fighting game which is DEFINATELY going to be amazing if I can pull this off, but everytime i strike the enemy-it glitches between his walking and his reaction from getting hit
(note)- i am using color to color sensing
(note)- His movements are- he moves back and when he moves forward he punches 3 times and these movements are set on repeat
HELP WOULD BE MUCH APPRECIATED!!! AS I HOPE YOU ALL WILL APPRECIATE THIS WHEN I MOVE ON WITH IT! THANKYOU  smile

Offline

 

#41 2010-06-21 16:58:24

testrgoogillion
Scratcher
Registered: 2010-05-07
Posts: 8

Re: Fighting Game AI Tutorial

PEOPLE!! USE A FINITE STATE MACHINE!! It should look something like this:
<when green flag clicked>
<forever>
<if>
<broadcast[___]and wait c>
<broadcast[___]and wait c>

And it goes on and on...

Offline

 

#42 2010-10-23 16:05:30

09reidt
Scratcher
Registered: 2010-07-08
Posts: 3

Re: Fighting Game AI Tutorial

There's one flaw to this program. The Ai player will be able to walk throuhg the sides and underneaths of the terrains sprites, which means the game will lack vertical walls.

Offline

 

#43 2010-10-23 18:10:05

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Fighting Game AI Tutorial

You are correct, and for something like this which is meant to be simple I find that it is not a big issue. This focuses on creating the AI player and doesn't mention how to do proper collisions. After a person is experienced I think they would be able to modify this on their own to add whatever sort of collisions they want.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#44 2011-04-02 17:38:38

NNNEEEOOO11
Scratcher
Registered: 2009-05-09
Posts: 5

Re: Fighting Game AI Tutorial

http://scratch.mit.edu/projects/NNNEEEOOO11/1690921
A crazy game w. an advanced ai...
Ultra hard to make, yet easy to understand and control.
ENJOY!

Offline

 

#45 2011-05-17 14:41:08

Kakarot121
Scratcher
Registered: 2011-05-16
Posts: 2

Re: Fighting Game AI Tutorial

how do you make a life bar so that when you hit the other player he loses a certain amount of health?

Offline

 

#46 2011-05-25 17:12:04

munkle
Scratcher
Registered: 2011-02-23
Posts: 34

Re: Fighting Game AI Tutorial

can you make one with helping AIs and games  that you bump into each other. I know how to make it very hard like this <when green flag clicked> <forever> <if> <<  <not><touching[player]>  >> <glide(<pick random( 0.1 )to( 1 )secs to x sad <x position of player>  )y sad <y position of player> ) <change{bounce }by( 0.1)

Offline

 

#47 2011-10-14 18:45:31

ericelias2341
Scratcher
Registered: 2011-07-15
Posts: 71

Re: Fighting Game AI Tutorial

very cofusing

Offline

 

#48 2011-11-25 15:34:45

Gamemaster43211
Scratcher
Registered: 2011-06-06
Posts: 11

Re: Fighting Game AI Tutorial

Do i have to do the Velocity part...because mine is like a room change scroller

Offline

 

#49 2011-11-25 18:00:54

Gamemaster43211
Scratcher
Registered: 2011-06-06
Posts: 11

Re: Fighting Game AI Tutorial

i put this on my game...but it didnt work  sad

Offline

 

#50 2011-12-10 16:27:37

iansezppdd
Scratcher
Registered: 2011-04-22
Posts: 6

Re: Fighting Game AI Tutorial

how do I make a COM attack?

Offline

 

Board footer