Add Player + Player Selection

Discussion and feedback on Construct 2

Post » Mon Aug 08, 2016 6:52 am

So I am looking for the way I can make to my game 'Player settings' at start, where you can name each player and can add more player's (or delete) to the game.

I am making mobile game where at first you set to the game how many player's are going to play and what is the name of each players.

Maybe here is someone who know's how I should do this or do you have any link to ready made template or tutorial for this?
B
6
S
1
Posts: 19
Reputation: 392

Post » Mon Aug 08, 2016 9:38 am

You can use input fields and store the names in an Array.
B
135
S
33
G
17
Posts: 1,557
Reputation: 20,717

Post » Mon Aug 08, 2016 9:48 am

glerikud wrote:You can use input fields and store the names in an Array.


Thx for your reply. Yes seems one step forward. But I think I need more guidance on this.
How I make Construct 2 to check how many player's I have in Array and so on.

Is there any other template or tutorial for whole "Add player" function ?
B
6
S
1
Posts: 19
Reputation: 392

Post » Tue Aug 09, 2016 8:24 am

This is a broad topic, since it really depends on how you want your game to work - and even to some degree what distribution platform you're planning on using (NWjs for PC, or a mobile platform, etc).

I made THIS EXAMPLE for a simple character selection screen. It may have some useful methods for you to implement?

~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 » Tue Aug 09, 2016 12:18 pm

Skebab wrote:How I make Construct 2 to check how many player's I have in Array and so on.

You can make a button that sais "Add player", an input field for player name and an Array named "players". Then whenever the user click the button you can push your array with the action called "Push" and store the value from the input field. You'll get the number of players simply by checking the array's length.
B
135
S
33
G
17
Posts: 1,557
Reputation: 20,717

Post » Tue Aug 09, 2016 5:52 pm

Message: Skebab can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
SoldjahBoy wrote:This is a broad topic, since it really depends on how you want your game to work - and even to some degree what distribution platform you're planning on using (NWjs for PC, or a mobile platform, etc).

I made https://dl.dropboxusercontent.com/u/604141/Public%20CAP/C2%20examples/CharacterSelect.capx THIS EXAMPLE for a simple character selection screen. It may have some useful methods for you to implement?

~Sol


OKay thx for your example. It's really good example of Player selection but what I am looking for is "Creating players" as many as I want.

This game is going to be mobile turn-based board party game and at start needs to tell the game how many players there will be.
B
6
S
1
Posts: 19
Reputation: 392

Post » Tue Aug 09, 2016 6:35 pm

glerikud wrote:
Skebab wrote:How I make Construct 2 to check how many player's I have in Array and so on.

You can make a button that sais "Add player", an input field for player name and an Array named "players". Then whenever the user click the button you can push your array with the action called "Push" and store the value from the input field. You'll get the number of players simply by checking the array's length.


Okay thank you :) This was helping me one step forward!
B
6
S
1
Posts: 19
Reputation: 392

Post » Tue Aug 09, 2016 10:06 pm

Skebab wrote:Okay thank you :) This was helping me one step forward!

Glad I could help. If you need an example capx, just tell.
B
135
S
33
G
17
Posts: 1,557
Reputation: 20,717

Post » Wed Aug 10, 2016 5:25 am

Message: Skebab can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
glerikud wrote:
Skebab wrote:Okay thank you :) This was helping me one step forward!

Glad I could help. If you need an example capx, just tell.


Yah :) Well if you don't mind, the example would be great !

I found this tutorial, do you think this is correct way to show who's player's turn it is going on in the game?
https://www.scirra.com/tutorials/1417/r ... ays/page-2
B
6
S
1
Posts: 19
Reputation: 392

Post » Thu Aug 11, 2016 11:24 am

Skebab wrote:Yah :) Well if you don't mind, the example would be great !

I found this tutorial, do you think this is correct way to show who's player's turn it is going on in the game?
https://www.scirra.com/tutorials/1417/r ... ays/page-2

Here you go: https://dl.dropboxusercontent.com/u/166 ... array.capx

I can't see that tutorial, since you can't post URLs yet.
B
135
S
33
G
17
Posts: 1,557
Reputation: 20,717

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests