• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code Trouble with multiplayer controls

Etendo

Member
Hey there, so I started this simple block game in GM2 and added lan to it. All that fully works, creating a server, connecting, ect, but I cannot figure out the controls for the other computer. The game uses the mouse, and it makes it the first player on both computers. Is there any way to identify the other pc as the second player? I tried using if device_mouse_check_button(0, mb_left), but no avail. The mouse wheel is also a bit difficult. Any help would be very appreciated. Thanks.
 

FrostyCat

Member
Just because you have a connection, it doesn't mean input or anything else would magically fly over to the other machine. You should have learned from the get-go that you need to send messages for player input as well, not just instance information. Re-read whatever learning material you used, look up how to send messages with it, and use that whenever user input is triggered. Then read back those messages on the other side and replicate the input with it.
 
Top