How do I send an array to other players (multiplayer)?

Get help using Construct 2

Post » Tue Sep 06, 2016 7:04 pm

Hi,
In my current project I want to send an array from the host to a peer and from that peer to the host. I already added that to my project but for some reason it
doesn't want to work. :D
I also added the same AddLog function as from Ashleys multiplayer tutorial to see what it is doing right now but the function doesn't work either (only in that part of my project).
Somehow the host can actually receive the array from the peer, but the array from the peer never arrives at the host.
So I have no idea what to do to fix the problem :? Does anyone have an idea? I'll upload a screenshot of the event sheet in this post.
Thanks for any help! :)

https://drive.google.com/open?id=0B7r2W ... i1rZWUxcjg
Image
B
5
S
3
Posts: 193
Reputation: 1,063

Post » Wed Sep 07, 2016 6:19 pm

It looks like it should work. I have not used the official MP plugin though.

Did you intend to transfer the data from "Array" to "enemy"?
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Wed Sep 07, 2016 6:26 pm

Thanks for your reply @gumshoe2029,
Yes that's what I want to do. The Array contains the "blueprint" of the local player and that is supposed to be transferred to the other player, so that he can load it into the enemy array. If that would work, I would be able to load the player models of the enemys on each players computer.
Thanks again!
Image
B
5
S
3
Posts: 193
Reputation: 1,063

Post » Wed Sep 07, 2016 6:39 pm

Are your peers connecting properly? It seems like the error is further up the stream than your screenshot.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Wed Sep 07, 2016 7:37 pm

Thanks @gumshoe2029,
Yes the peers are connected properly. I can already see them moving on each computer (they are synced).
I don't think the problem has something to do with the connection because the peer is already able to send his array data to the host.
Thanks again!
Image
B
5
S
3
Posts: 193
Reputation: 1,063

Post » Wed Sep 07, 2016 8:20 pm

I am not sure then. Hopefully, someone who has actually worked with the MP plugin finds this.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Tue Sep 13, 2016 7:24 pm

bump!

Does anyone know how the multiplayer plugin works? And what I've done wrong?
I still haven't found a solution to this problem. Maybe it even is a bug.
Any help is appreciated! :)
Image
B
5
S
3
Posts: 193
Reputation: 1,063

Post » Tue Sep 13, 2016 9:14 pm

Can you post a capx? Are you testing locally to rule out any network/routing issues?
Mistakes were made.
B
53
S
27
G
114
Posts: 1,698
Reputation: 64,444

Post » Wed Sep 14, 2016 12:42 am

This works :
Image

Edit : after looking at your screenshot, I have several questions :
  • Why do Peers send their array to the Host at the same time Host sends its array to Peers? Looks like there is a conflict here.
  • Are you sure your arrays aren't empty?
  • Do you actually see your "Sending array data to…" notices?
B
12
S
7
G
7
Posts: 450
Reputation: 4,276

Post » Wed Sep 14, 2016 1:37 pm

Thanks @oosyrag , @Coin-coin_le_Canapin ,
I can't really post a capx right now because the events that you can see on my screenshot are located in a bigger (a little messy ;) ) project.
I just wanted the host and peer to send their arrays to their opponent, because the array contains the model of the players. That model is too big and consists of too many different parts so that I can't just use the sync action. After the array is received, every player will have his enemys built up by a program that I already made. The different parts that were created from the array are then pinned to the "core" of each player so that they move with him.
My arrays aren't empty and I can't see the notices in my log.
Thanks again! :)
Image
B
5
S
3
Posts: 193
Reputation: 1,063

Next

Return to How do I....?

Who is online

Users browsing this forum: banquetburger and 20 guests