How do I save syncronized changes

Get help using Construct 2

Post » Sat Oct 11, 2014 7:09 am

Message: RisenFear is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
Hello again!
Since the last time, I've read some manuals, tutorials and threads, so I'm slowly getting in S2's multiplayer... I hope =)
Thank you, guys, for helping me in , it was impossible to find that without you
I'm not near my computer now, so I cannot give you some screenshots and capx but I'll give them at evening if you won't solve the problem)
The problem is... strange. I'm making some loot on game map. When player in LOS if item and clicking on it - he will take it. When all events are triggered, I'm sending message to host (reliable ordered). On message I'm destroying object on host side and broadcasting new message. In common on message, I'm destroying object to. All's working. But when new player connecting it can interact with this object - it's dissapearing only for players what were online. I thought, all information are based on host's info... I'm syncing object in layout start

Thx a lot
B
7
S
1
G
1
Posts: 24
Reputation: 424

Post » Sat Oct 11, 2014 9:40 pm

drive google com/file/d/0B8Cc6MKKLdYkY0RJTWZ5eERCRU0/view?usp=sharing
B
7
S
1
G
1
Posts: 24
Reputation: 424

Post » Sun Oct 12, 2014 7:49 pm

Up
B
7
S
1
G
1
Posts: 24
Reputation: 424

Post » Mon Oct 13, 2014 3:49 am

RisenFear wrote:When player in LOS if item and clicking on it - he will take it. When all events are triggered, I'm sending message to host (reliable ordered). On message I'm destroying object on host side

All sounds theoretically correct in this part until...
RisenFear wrote: and broadcasting new message. In common on message, I'm destroying object to. All's working. But when new player connecting it can interact with this object - it's dissapearing only for players what were online.

Starting from this part, there are things that is unnecessary, destroy event concept is similar to creation event, you don't have to broadcast message to trigger destroy event, this is done by host. Broadcast message only when it is necessary, such as announcing the name of the peer and the item collected.

Furthermore, do not use create/destroy/spawn event in peer and common, these are restrictively host only event, whatever happen in peer will not be synced, unless you communicate the changes, which is unrecommended because you adding burden to the host.

I haven't looked at the capx, I'll look at it if I have some time later today.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Mon Oct 13, 2014 5:00 am

I've tested. It's not working without broadcasting something too =(
B
7
S
1
G
1
Posts: 24
Reputation: 424

Post » Mon Oct 13, 2014 5:21 am

RisenFear wrote:I've tested. It's not working without broadcasting something too =(

That tells me that your event is not complete on the host side or you got the wrong condition, my old tests proves there's no broadcast required, and I believe this is still valid. I haven't test with LoS before, possibly your character LoS did not overlap with your item in host, this mean you have to sync the LoS angle too.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Mon Oct 13, 2014 8:48 am

It dont want to work for some reasons
B
7
S
1
G
1
Posts: 24
Reputation: 424

Post » Mon Oct 13, 2014 9:19 am

RisenFear wrote:It dont want to work for some reasons

I guess you still don't grasp the flow of object creation. If you already can spawn peer's character without broadcast, there's no reason at all why you need to broadcast. I think you have to revisit the official example, either the shooter or pong, both shows how to do it. Or, study the flow of peer character creation on your project, it's obvious that you don't understand the flow because creating peer character and creating item on host is absolutely the same process.

I can't point out anything specific because I don't have C2 right now.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Tue Oct 14, 2014 12:44 pm

Up
B
7
S
1
G
1
Posts: 24
Reputation: 424

Post » Tue Oct 14, 2014 10:19 pm

Up
B
7
S
1
G
1
Posts: 24
Reputation: 424

Next

Return to How do I....?

Who is online

Users browsing this forum: boybacteria, dop2000, Microbex and 37 guests