How do I create unique players in multiplayer?

  • Hey,

    I've made a function to create a new player, which works, but! On window 1, I see 2 cars, on window 2, I see 1 car. On window 1, I control both cars rather than my own. I know I need to set an id of sorts and create an event of something like [if myID = carID then control your car], but I can't figure out the actual logic, and how can I see the first car on Window 2?

    Thanks!

  • Are you talking about the multiplayer plugin? Follow the official tutorials, they cover everything you asked.

    For local multiplayer you need two set of controls. They should be under parent events with conditions that pick the correct car to control, such as an instance variable like you mentioned.

    As for your display windows, there is no way to help you based on your vague description without seeing what you have done in the first place. Post an example.

  • I read somebody's post about the Multiplayer plugin was buggy and to use the Photon one. I think the Photon one would be a better match anyhow as I want an 'always on' solution. The 2 tutorials for it are confusing as they both do it differently.

  • Hey man, try this,

    http://s000.tinyupload.com/?file_id=028 ... 5309673895

    You'll have to put your own photon app id in before it will work <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Hey man, try this,

    http://s000.tinyupload.com/?file_id=028 ... 5309673895

    You'll have to put your own photon app id in before it will work <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" />

    Thanks dude I shall take a look now!

  • Hey man, try this,

    http://s000.tinyupload.com/?file_id=028 ... 5309673895

    You'll have to put your own photon app id in before it will work <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" />

    This looks great, did you make it?

  • Yeah man, just made it for you then

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • In case you wanted the images.

    http://kenney.nl/assets/racing-pack

  • Thanks man, it's essentially what I wanted, but when I tried to trace your steps and rebuild it from scratch to understand it, and for some reason when a second player joins, it can't see player 1. Could you take a look, please?

    Capx: https://

  • ah yeah you need to add it to cache

    [photon: on join room] raise event 1 with car_select

    click that and under cache

    yours is set to donotcache it needs to be addtoroomcache

  • Thanks for the reply man.

    That worked great, but whilst playing about say, on player 2, on player 1's screen, player 2 will stop dead and wont update again. Do you know what causes that and if there's a solution to it?

    I really appreciate your help dude, it has taken me 4 days of banging my head against the wall prior to you helping

  • Hey man I couldn't message you since my reputation is low, but how did you learn Photon?

    I'm trying to add a turret to another project based on the example you gave me but I can't figure out how to have unique turrets (i.e. if I move my turret, yours doesn't move on my screen, and vice versa).

    I wish I understood the process so I can build without bothering people lol

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)