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

#1 2008-10-12 11:10:15

RukiaKuchiki
Scratcher
Registered: 2008-09-14
Posts: 78

making a fighting game!

plz help me! i hav this page where u can choose ur character by clicking on them. I hav 4 sprites and 1 background so far.....I cant figure out how u can script it to where u can choose ur character by clicking on the sprite, and the going to the next background!! help plz!

Thanks,
-Rukia Kuchiki  smile


http://i292.photobucket.com/albums/mm27/MoonPrincessMewMew/Sailor%20Moon/thmoon_spiral_heart_attack1.gifhttp://i110.photobucket.com/albums/n88/beewee3/inuyasha/thKikyo-1.gif http://i280.photobucket.com/albums/kk181/Tohru_Honda_Yuki_Sohma/0989f47ecabe30_full.jpghttp://i701.photobucket.com/albums/ww19/Monkeex3/fruits_basket_354.jpg

Offline

 

#2 2008-10-12 11:20:20

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

Re: making a fighting game!

Lets say that you have 4 buttons for character selection.

But first...
Your character sprite should be set up so that it can become any character depending on a variable.

//kinda like this
if (charSelect=1)
only do character 1 stuff
if (charSelect=2)
only do character 2 stuff
And so on

On now for the code on the buttons.
if button1 clicked
charSelect=1
broadcast startgame

Just do this for each button.


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

 

#3 2008-10-12 11:40:54

RukiaKuchiki
Scratcher
Registered: 2008-09-14
Posts: 78

Re: making a fighting game!

archmage wrote:

Lets say that you have 4 buttons for character selection.

But first...
Your character sprite should be set up so that it can become any character depending on a variable.

//kinda like this
if (charSelect=1)
only do character 1 stuff
if (charSelect=2)
only do character 2 stuff
And so on

On now for the code on the buttons.
if button1 clicked
charSelect=1
broadcast startgame

Just do this for each button.

plz show this in script form....that way I understand it better....


http://i292.photobucket.com/albums/mm27/MoonPrincessMewMew/Sailor%20Moon/thmoon_spiral_heart_attack1.gifhttp://i110.photobucket.com/albums/n88/beewee3/inuyasha/thKikyo-1.gif http://i280.photobucket.com/albums/kk181/Tohru_Honda_Yuki_Sohma/0989f47ecabe30_full.jpghttp://i701.photobucket.com/albums/ww19/Monkeex3/fruits_basket_354.jpg

Offline

 

#4 2008-10-12 12:47:21

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

Re: making a fighting game!

<when[ button1 ]clicked>
<set{ charselect }to(1
<broadcast[ startgame ]and wait c>

Thats it.

When startgame is broadcasted just make it so that it changes backgrounds.


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

 

#5 2008-10-13 16:34:36

RukiaKuchiki
Scratcher
Registered: 2008-09-14
Posts: 78

Re: making a fighting game!

thx for helping me!! ^o^


http://i292.photobucket.com/albums/mm27/MoonPrincessMewMew/Sailor%20Moon/thmoon_spiral_heart_attack1.gifhttp://i110.photobucket.com/albums/n88/beewee3/inuyasha/thKikyo-1.gif http://i280.photobucket.com/albums/kk181/Tohru_Honda_Yuki_Sohma/0989f47ecabe30_full.jpghttp://i701.photobucket.com/albums/ww19/Monkeex3/fruits_basket_354.jpg

Offline

 

Board footer