Wsoukkachang's Forum Posts

  • Subscribe to Construct videos now

    This is a game I am working on, Super Six Card Game!

    It's a online multiplayer card game. Still under development.

    Tell me what you think?

    And give my IndieGoGo page a look as well. Thanks!

    https://www.indiegogo.com/projects/supe ... 71910#home

  • Thanks the thread is solved! This helped alot! https://www.scirra.com/manual/174/multiplayer

  • This thread is solved. I found out my the solution from the entry here. https://www.scirra.com/manual/174/multiplayer What was wrong on my part was that I had conflicting actions in each layout, so it couldn't sync the global variable correctly.

  • I don't what I did but now it is working. Maybe it is because I used the sync variable and now it works for the peers. They are receiving the value now. But I've come to another problem, before it was the host having the problem sending the card value, now, it's the peer that cannot send its value to the host. Any idea on how to update the host with the peer values? I've been reading the multiplayer tutorials over and over, and they are a big help, just kind of hard to grasp the process in your first complex multiplayer game I guess. Just when I think I got it, something else comes up. Thanks for trying to help me. It is very much appreciated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Tried that and it still doesn't work. It gives me a value of 0. :/

  • Here's some screenshots of what I am doing. I hope it helps.

    [attachment=1:3qyjn5n8][/attachment:3qyjn5n8]

    [attachment=0:3qyjn5n8][/attachment:3qyjn5n8]

  • How do I send messages to different layouts in multiplayer?

    I am trying to make a card game and one of the obstacles I am running into is sending a message across to a different layout.

    For example, the host (player one) sets a global variable to his current card value "Player1CardValue" and wants to send it to a peer who is on a different layout, how do I send this message?

  • Hmm I am trying to set the variable over two different layouts... could this be the problem?

    For example, Player 1 (the host) sets his player card value as 6. Next, Player 1 card value then is stored in a global variable, Player1Card. He then broadcast the message over to his peers (which are all on different layouts). The peers do not receive the value but a NaN value instead. (I did some research on what NaN stands for and it stands for Not A Number) SO the peers are not receiving a number value. I'm thinking maybe because they are on different layouts that the action is not being signaled to the rest of the peers. Also using the broadcast message action needs a string, no?

  • mzo I tried that but get NaN as the value... do you know what that means?

  • I am trying to sync a global variable in multiplayer where when the global variable changes from the host, it shows this to every other peer. Any help is grateful.

  • Oh wow! That was the solution! Thank you again Ashley. I am really learning so much from you. Also the new beta release was really helpful, in that it kept telling me which objects I haven't yet synced up. Cheers!

  • Hmm I tried it that way but now my players are having the same peerIDs. Can you check out what is wrong with my project please. I can't get them to be their own player.

    https://www.dropbox.com/s/cxt2auw8tv1stpx/NewThockThay.capx

  • I figured out what I was doing wrong, I was not loading the peer message as Multiplayer.Message but using the array_name.AsJSON instead.

    If anyone needs help with sending an array over multiplayer, this is how you do it:

    1. First to make the Host broadcast the message.

    Make sure you put this in the Host group.

    Use the Host "Broadcast Message" (in multiplayer feature).

    In the "tag" slot you could use whatever tag you please and in the "message" slot you should use

    (the array name you are trying to send).AsJSON

    So it should look something like this array_name.AsJSON in the message.

    2. Now to make the peer receive the message.

    Make sure you put this in the Peer group.

    Using the multiplayer feature, click on "On peer message",

    when you do, it will ask for a tag. Use the same tag you used with the Host.

    Next, you click on the array you would like to sync up and click on "Load".

    This will bring up the JSON slot and in this slot input Multiplayer.Messge .

    Now it should sync up. That is all there is to it. Hope this helps! Thanks Ashley for the help, could not have done it without you.

  • Since this is my first fourm, I was wondering how do I make this forum status "solved" ? Or is there no button for that. Thanks guys. Scirra is the best!