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

#1 2010-09-08 09:05:53

kwickgamer
Scratcher
Registered: 2010-07-13
Posts: 42

player choosing problem

well, i'm trying to make a multiplayer battle game, and i have player 1 and player 2, and 2 charectors. I want to make a third and fourth charector, but I don't know how to make a "choice" script.


Kwickgamer Classic Collection! What is it? find out here!

Offline

 

#2 2010-09-08 23:31:37

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: player choosing problem

Upload your incomplete project, then post a link to it here, please.


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#3 2010-09-09 10:29:09

kwickgamer
Scratcher
Registered: 2010-07-13
Posts: 42

Re: player choosing problem


Kwickgamer Classic Collection! What is it? find out here!

Offline

 

#4 2010-09-09 12:05:19

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: player choosing problem

Currently, the game (very cool btw) goes straight into battle.
You need to make a startup screen where the player sees what robot is currently picked and then presses keys to cycle through options (costumes.)
I would suggest disabling player controls until the fight actually begins.

For example, I often use a variable called State or something similar. It starts at Initialize, then goes through Startup, Playing, and finally Over. Then I can do things like only allow controls to work if State = Playing, change my background according to whatever State equals, display scores and highscore if State = Over, etc.


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#5 2010-09-10 11:50:11

kwickgamer
Scratcher
Registered: 2010-07-13
Posts: 42

Re: player choosing problem

big_smile  Thanks, that perfect.


Kwickgamer Classic Collection! What is it? find out here!

Offline

 

#6 2010-09-10 18:58:57

kwickgamer
Scratcher
Registered: 2010-07-13
Posts: 42

Re: player choosing problem

how do I make the basic choosinbg script?


Kwickgamer Classic Collection! What is it? find out here!

Offline

 

#7 2010-09-10 20:07:54

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: player choosing problem

You could just have the player push a number key, and then set the character to that number. For example,

Code:

When I receive [character select]
set character to 0
repeat until not(character = 0)
    if key 1 pressed
        set character to 1
    EndIf
    if key 2 pressed
        set character to 2
    EndIf
    if key 3 pressed
        set character to 3
    EndIf
    if key 4 pressed
        set character to 4
    EndIf
EndLoop
broadcast [start game]

http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer