Assertion Failure

Get help using Construct 2

Post » Thu Sep 22, 2016 3:55 pm

KTML5 wrote:@Kyatric, All layouts that the objects will be synced on need to have the same layers? Not a problem, but kinda weird. :) Thanks for the help! Fixed my problem!


Well, I'm not sure how this is weird. It makes perfect sense to me.

Consider a main layout on which you have an object standing in the layer n°5.
Now take another layout that is supposed to display the object by syncing, but the layout contains only a single layer. How is Construct supposed to sync an object existing on a missing layer in the current layout ?

It is the same for a global layer. You ARE to have the same name/number for the layer in a consistent manner over all your layouts, even if the layer is empty/contains nothing. It has to be there in order to be accessed/used.
It makes sense to me that in the case of syncing (creating the same instances as in a different layout) that the same behavior/constraints applies.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
293
S
117
G
96
Posts: 7,310
Reputation: 71,069

Post » Thu Sep 22, 2016 6:39 pm

@Kyatric, So, does this mean that objects that are told to sync, although not in the current layout, would sync anyways? I guess I didn't think of it this way, I kind of just assumed that it'd sync the objects that exist within the current layout. But the objects exist within other layouts, so they must all be constructed the same way.
Makes sense though, I just have to keep that in mind.

Then, considering this it's obviously not a bug.
Again, I apologize. I haven't used Multiplayer in Construct 2 much, so I wasn't aware of this. :P
ImageImage
B
49
S
15
G
2
Posts: 270
Reputation: 6,649

Post » Fri Sep 23, 2016 7:02 am

As far as I can tell, this has nothing to do with multiplayer specifically.
As mentioned, global layer works the same way.

A global layer is set in a specific layout, contains instances, but for it to work in a consistent manner over the whole project, you need to have the same number of layers (or at least the same layer number) over all the layouts of the project or the instances won't appear/be created in the "non-original" layouts.

In your project, on the host side you are displaying a specific layout (MAP_AREAF_0) which has 6 layers.
But when having a peer joining the host, the peer is displaying a different layout (MAP_TRAINING) that originally only has 2 layers.
The peer layout DOES not have the appropriate layer to spawn/sync an instance on.
From your host, you ask your peer to create instances in a layer that does not exists. Hence the error your encountered.

Syncing is just there to transmit infos from an instance to another from a computer to another. But if the instance does not logically exists, it cannot be synced.
And for it to exist, it requires the same number of layers.

Nevertheless, you still need to make a proper report as asked by Ashley.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
293
S
117
G
96
Posts: 7,310
Reputation: 71,069

Post » Sat Sep 24, 2016 9:15 pm

@Kyatric, Sorry I didn't read this until just now, I'll make the report, then. :)
ImageImage
B
49
S
15
G
2
Posts: 270
Reputation: 6,649

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests