How do I make a select screen using buttons?

Get help using Construct 2

Post » Fri Jun 17, 2016 12:18 am

Oh I see okay...

All you need to do is have a global variable that is set depending which character you choose...

Character1.sprite is clicked
--- Set GlobalVariable.CharacterPicked = 1

Character2.sprite is clicked
--- Set GlobalVariable.CharacterPicked = 2

Character3.sprite is clicked
--- Set GlobalVariable.CharacterPicked = 3

Then when the game starts you spawn the character you want, based on the value of the global variable.

GlobalVariable.CharacterPicked = 1
--- Create object Player1.Sprite

GlobalVariable.CharacterPicked = 2
--- Create object Player2.Sprite

GlobalVariable.CharacterPicked = 3
--- Create object Player3.Sprite

Hope that helps

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474

Post » Fri Jun 17, 2016 11:47 am

SoldjahBoy wrote:Oh I see okay...

All you need to do is have a global variable that is set depending which character you choose...

Character1.sprite is clicked
--- Set GlobalVariable.CharacterPicked = 1

Character2.sprite is clicked
--- Set GlobalVariable.CharacterPicked = 2

Character3.sprite is clicked
--- Set GlobalVariable.CharacterPicked = 3

Then when the game starts you spawn the character you want, based on the value of the global variable.

GlobalVariable.CharacterPicked = 1
--- Create object Player1.Sprite

GlobalVariable.CharacterPicked = 2
--- Create object Player2.Sprite

GlobalVariable.CharacterPicked = 3
--- Create object Player3.Sprite

Hope that helps

~Sol

can you try a video tutorial XD
B
6
Posts: 15
Reputation: 282

Post » Fri Jun 17, 2016 2:27 pm

It can't be any simpler than that...

Variables are a basic and fundamental part of making virtually anything in any game. There is already loads of documentation, including but not limited to the CONSTRUCT 2 MANUAL ENTRY.

My example "pseudo code" should be easy enough to follow - but if it's not, I'm afraid no amount of tutorials will prepare you for anything even considered slightly more difficult - however HERE IS A TUTORIAL about using variables. Here is ONE MORE using variables for "lives" in a game - which could easily be used for things like counting ammunition, health, or which character you've selected on another screen.

Best of luck!

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474

Post » Fri Jun 17, 2016 5:24 pm

Message: DimondmanModder can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
SoldjahBoy wrote:It can't be any simpler than that...

Variables are a basic and fundamental part of making virtually anything in any game. There is already loads of documentation, including but not limited to the https://www.scirra.com/manual/83/variables CONSTRUCT 2 MANUAL ENTRY.

My example "pseudo code" should be easy enough to follow - but if it's not, I'm afraid no amount of tutorials will prepare you for anything even considered slightly more difficult - however https://www.scirra.com/tutorials/804/construct-2-basics-variables]HERE IS A TUTORIAL[/url] about using variables. Here is [url=https://www.scirra.com/tutorials/565/beginners-tips-to-using-global-variable-for-lives-with-lives-indicator ONE MORE using variables for "lives" in a game - which could easily be used for things like counting ammunition, health, or which character you've selected on another screen.
I really hate bother you but the reason why its not simple is because I'm more of a visual learner maybe you can take some pictures or make a video to help out oh and I checked those links yeah those didn't really help too much
Best of luck!

~Sol
B
6
Posts: 15
Reputation: 282

Post » Fri Jun 17, 2016 5:25 pm

Message: DimondmanModder can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
SoldjahBoy wrote:It can't be any simpler than that...

Variables are a basic and fundamental part of making virtually anything in any game. There is already loads of documentation, including but not limited to the https://www.scirra.com/manual/83/variables CONSTRUCT 2 MANUAL ENTRY.

My example "pseudo code" should be easy enough to follow - but if it's not, I'm afraid no amount of tutorials will prepare you for anything even considered slightly more difficult - however https://www.scirra.com/tutorials/804/construct-2-basics-variables]HERE IS A TUTORIAL[/url] about using variables. Here is [url=https://www.scirra.com/tutorials/565/beginners-tips-to-using-global-variable-for-lives-with-lives-indicator ONE MORE using variables for "lives" in a game - which could easily be used for things like counting ammunition, health, or which character you've selected on another screen.

Best of luck!

~Sol


I really hate bother you but the reason why its not simple is because I'm more of a visual learner maybe you can take some pictures or make a video to help out oh and I checked those links yeah those didn't really help too much
Best of luck!
B
6
Posts: 15
Reputation: 282

Post » Sat Jun 18, 2016 3:28 am

Here is an example capx file that I made - doing (I think) what you are wanting to do.

I'm trying to teach you to "Fish" for yourself - so next time you get hungry, you can catch one yourself. If someone always feeds you a fish, you will one day starve without knowledge.

I hope this helps you to learn what variables are and how you can use them.

DOWNLOAD EXAMPLE

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474

Post » Sat Jun 18, 2016 8:23 pm

Message: DimondmanModder can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
SoldjahBoy wrote:Here is an example capx file that I made - doing (I think) what you are wanting to do.

I'm trying to teach you to "Fish" for yourself - so next time you get hungry, you can catch one yourself. If someone always feeds you a fish, you will one day starve without knowledge.

I hope this helps you to learn what variables are and how you can use them.

https://dl.dropboxusercontent.com/u/604141/Public%20CAP/C2%20examples/CharacterSelect.capx DOWNLOAD EXAMPLE

~Sol

It wont open it says the textures are missing
B
6
Posts: 15
Reputation: 282

Post » Sat Jun 18, 2016 8:44 pm

Opens fine. Works perfect. Must be you.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sun Jun 19, 2016 2:00 am

DimondmanModder wrote:
SoldjahBoy wrote:Here is an example capx file that I made - doing (I think) what you are wanting to do.

I'm trying to teach you to "Fish" for yourself - so next time you get hungry, you can catch one yourself. If someone always feeds you a fish, you will one day starve without knowledge.

I hope this helps you to learn what variables are and how you can use them.

https://dl.dropboxusercontent.com/u/604 ... elect.capx DOWNLOAD EXAMPLE

~Sol

It wont open it says the textures are missing


There are no "textures".

What version of Construct 2 are you using?

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474

Post » Sun Jun 19, 2016 6:33 pm

Message: DimondmanModder can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
SoldjahBoy wrote:
DimondmanModder wrote:
SoldjahBoy wrote:Here is an example capx file that I made - doing (I think) what you are wanting to do.

I'm trying to teach you to "Fish" for yourself - so next time you get hungry, you can catch one yourself. If someone always feeds you a fish, you will one day starve without knowledge.

I hope this helps you to learn what variables are and how you can use them.

https://dl.dropboxusercontent.com/u/604 ... elect.capx DOWNLOAD EXAMPLE

~Sol

It wont open it says the textures are missing


There are no "textures".

What version of Construct 2 are you using?

~Sol

The free version I didn't buy it yet :roll:
B
6
Posts: 15
Reputation: 282

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: AekiroStudio, Lancifer, nahima, OddConfection and 18 guests