Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » HOW TO MAKE A 2 players selcetion screen?
- stmbbg
-
19 posts
HOW TO MAKE A 2 players selcetion screen?
Am making a 2 player fighting game how would I make a selecting screen were both players can chose there characters before they fight?
- Birdlegs
-
1000+ posts
HOW TO MAKE A 2 players selcetion screen?
I would either have players take turns choosing, or use different keys on the keyboard to select the fighter for each player. Good luck!
- WolfCat67
-
1000+ posts
HOW TO MAKE A 2 players selcetion screen?
This may seem like self-advertisement, but I have a sequence for my game Smiley Fighters that has both of the buttons on the same screen, one for each player.
- stmbbg
-
19 posts
HOW TO MAKE A 2 players selcetion screen?
But how would I do that? I would either have players take turns choosing, or use different keys on the keyboard to select the fighter for each player. Good luck!
- adas2005
-
34 posts
HOW TO MAKE A 2 players selcetion screen?
This is sort of the first script you would use, I can't make the rest because it'll be confusing for me.
so I'll explain:
After (select) is broadcasted, it then needs to check if (selecter) is the same as 1.
if so, it will wait untill the choice is clicked which it will save in a variable( maybe as a number)
if not, it will wait for for player 2's choice instead of ones choice.
If you want me to make a project with this script then ask me.
- stmbbg
-
19 posts
HOW TO MAKE A 2 players selcetion screen?
Yes please because am making this fighting game and I would like both players to be able to choose their own characters then after chose the map.
This is sort of the first script you would use, I can't make the rest because it'll be confusing for me.
so I'll explain:
After (select) is broadcasted, it then needs to check if (selecter) is the same as 1.
if so, it will wait untill the choice is clicked which it will save in a variable( maybe as a number)
if not, it will wait for for player 2's choice instead of ones choice.
If you want me to make a project with this script then ask me.

- tr3poz
-
1 post
HOW TO MAKE A 2 players selcetion screen?
so now what? where can i see the script?? D:Yes please because am making this fighting game and I would like both players to be able to choose their own characters then after chose the map.
This is sort of the first script you would use, I can't make the rest because it'll be confusing for me.
so I'll explain:
After (select) is broadcasted, it then needs to check if (selecter) is the same as 1.
if so, it will wait untill the choice is clicked which it will save in a variable( maybe as a number)
if not, it will wait for for player 2's choice instead of ones choice.
If you want me to make a project with this script then ask me.
- TimeLordPlanet
-
500+ posts
HOW TO MAKE A 2 players selcetion screen?
Okay, so here's the script. This script assumes that it is in the “Single Player Button” sprite, though a similar script must also be used in the “2 Player Button” sprite.
Hope this helps!
TLP
This script uses what's known as a boolean variable, one that has only two options: True and False. Scratch doesn't officially support boolean variables, but you can use them by setting the string ones to “True” and “False” as I've done here. If you need a numeric variable instead, you can use 1 or 0. The “2 Player button” sprite, uses the exact same code but with the “True” value for the 2 Player? variable, like so:
Then, assuming that in this game P1 uses the arrow keys and P2 uses WASD (such as in the web game Fire Boy and Ice Girl), the following script can be used in the P1 sprite, replacing the left and right arrow keys with WASD in the P2 sprite.
Then, you can use the
block so that in Single Player, the player has the option to use either the arrow keys OR the WASD keys for movement:
Obviously, this is only for horizonatal movement. For vertical movement you would have to institute gravity and probably momentum mechanics, which I will not document in this post.
Hope this helps!

TLP
Last edited by TimeLordPlanet (Aug. 29, 2018 08:32:38)
- RealmKing01
-
1 post
HOW TO MAKE A 2 players selcetion screen?
That was helpful but how do i make a 2 player game anybody know a video
- -_Soul_-
-
100+ posts
HOW TO MAKE A 2 players selcetion screen?
Try griffpatch's video. That was helpful but how do i make a 2 player game anybody know a video
Oh yeah, and please don't necropost. Create a new topic instead.
Last edited by -_Soul_- (May 4, 2020 02:30:14)
- sidbis123
-
22 posts
HOW TO MAKE A 2 players selcetion screen?
Isn't that called necroposting? bump
- Superman234567890
-
4 posts
HOW TO MAKE A 2 players selcetion screen?
I want to make a two player game Am making a 2 player fighting game how would I make a selecting screen were both players can chose there characters before they fight?
- Discussion Forums
- » Help with Scripts
-
» HOW TO MAKE A 2 players selcetion screen?