How do I Make a team which contains players and player cont

Get help using Construct 2

Post » Sun Mar 27, 2016 7:24 am

Hello guys, I am making a sports game and I want to make teams roster in it . It is a Cricket game similar to Baseball where every team have 11 players and every player will keep their records (like how many a player scored, matches, out, strike rate etc) too. I know it is possible but i dont know how ! Please help if anyone know!
..
If you can provide a helpful link it will be a great help too !
B
17
S
5
Posts: 45
Reputation: 1,240

Post » Sun Mar 27, 2016 2:55 pm

Hey Nav,

It depends a bit on how you set up your game but what I would do is use an array and give my players a numbered instance variable (1 through to 11) and use that number to add stats to the index of that array (based on the players number).

For example, say player 11 catches someone out. You then add a point to the array at 11(x) and 1(y). If player 11 strikes out then you could add a point to 11(x) and 2(y) and so on.

Kind of sounds harder than it is but it is very effective.
ImageImage
B
112
S
23
G
7
Posts: 1,064
Reputation: 12,787

Post » Mon Mar 28, 2016 4:25 pm

Thank-you a lot @GenkiGenga ! Thanks for details! It will help me a lot thankyou. ☺ There will be around 15 players and I will select only 11 in team . Thanks for help!
B
17
S
5
Posts: 45
Reputation: 1,240


Return to How do I....?

Who is online

Users browsing this forum: htmlgames and 4 guests