When using Multiplayer Sync action with a Container object, contained objects are not created on the peers side.
Attach a Capx
Description of Capx
Open the Capx
Steps to Reproduce Bug
On the first tab, a blue circle with a green circle inside is created
On the second tab, only the blue circle is created
On both tabs, a blue circle with a green circle inside must be created
Operating System and Service Pack
Construct 2 Version ID
I have the exact same bug, it affects really badly my project design
OP. You might want to do some more studying on how the MP works. It doesn't look like so much a bug, but lack of primary network development.
The container is creating both objects. However based on our design logic there are flaws.
1. The host only creates 1 Container set(ie both sprites)
2. The client creates 2 Container sets. The blue sprite is covering the first one and the green sprite is -1000,-1000. This results in the look that the green sprite isn't being spawned.
Seriously while c2 MP plugin I think is the easiest. You both might want to consider going through the tutorials of just C2 core learning tuts. Rather than jumping into the MP.
*here are some stuff
*You don't sync objects to peers
*there is no peer tracking
*don't assume that containers fall into a shape. Assume they are off screen. So always make sure to set there position.
* since the client get's 2 instances and the host gets 1 instance of your object your not handling peer connections.
I get the feeling there is a lot of guess work going on in this MP capx. I don't see a bug. Just not a solid logic flow and proper use of the MP plugin or C2 moderate functionality.
jayderyu thanks for your reply
I think you're not getting the point of my bug report, I wanted to create the least amount of events, so no I'm not doing peers sync/tracking/whatever
Indeed the synced object is created at (-1000, -1000) but on the host side is created at the origin point and not on peer side? the behavior is different, don't you think it's not a bug?
Closing as not a bug. You only sync one of the objects, so the other object in the container will be created, but not synced.
Develop games in your browser. Powerful, performant & highly capable.
Thanks for your answer, I spot this line in the multiplayer login code
inst = this.runtime.createInstance(type, this.runtime.running_layout.layers[type.default_layerindex], -1000, -1000);
It makes sense now, the object is created at -1000, -1000 with contained objects.