How do I make this multiplayer game selectable ?

Get help using Construct 2

Post » Wed Mar 19, 2014 9:28 am

Ideally what I want is a game where you click on your team and the control that instance of the team. Each team member is determined by a variable called TeamNumber. As the host you are in control of TeamNumber = 0, and each new peer that joins would get the next number, up to 4 players.

Attached is the code I've bashed out, and I know it's wrong, but I just don't have enough literature for the new multiplayer function to get it working. Would someone be kind enough to have a look and see if you can help ?

https://dl.dropboxusercontent.com/u/108 ... elect.capx
Using R248 for all examples
B
70
S
21
G
6
Posts: 382
Reputation: 9,812

Post » Wed Mar 19, 2014 10:33 am

Can't look at your capx, but you could use the expression Multiplayer.PeerCount for assigning a number to a peer.
On peer connected -> set variable TeamNumber to Multiplayer.PeerCount-1
B
40
S
15
G
5
Posts: 295
Reputation: 6,129

Post » Sun Mar 23, 2014 12:02 am

Thought I'd give this a bump, as I've managed to get it working to some degree on the guest/peer side, with a slight side effect of all the sprites turning red at first, and peer movements not showing on the host, but host movements showing on the peer.

Still kind of desperate :'(
Using R248 for all examples
B
70
S
21
G
6
Posts: 382
Reputation: 9,812


Return to How do I....?

Who is online

Users browsing this forum: Slug101 and 5 guests