Syncing Global Variables, what am I missing here?

Get help using Construct 2

Post » Sun Apr 19, 2015 4:29 pm

Image


Scorekeeper has the instance variables to sync up to the peers global variables. When someone is killed the host adds it to the player kills and the scorekeeper. However in-game it doesn't update the global variables.
B
9
S
2
Posts: 37
Reputation: 729

Post » Sun Apr 19, 2015 5:11 pm

remove the tags for marinekills and monsterkills on the synch variable action and remove setting their input state on the peers action.


If the host sets the variables, they should get synched.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567

Post » Sun Apr 19, 2015 6:58 pm

lennaert wrote:remove the tags for marinekills and monsterkills on the synch variable action and remove setting their input state on the peers action.


If the host sets the variables, they should get synched.


Image


Still not working for me, do I need to add something here?
B
9
S
2
Posts: 37
Reputation: 729

Post » Sun Apr 19, 2015 7:33 pm

Is it not updating for the host either ?

I mean, when you check the debugger, on the host, is the Scorekeeper's MonsterKills variable increasing ?
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567

Post » Sun Apr 19, 2015 7:51 pm

It works for host. Everything I've tried has worked fine for host, but it's something with the peer. On the debugger scorekeeper's kills raises for host, but on peer it looks there's 2 scorekeepers. When I click on the scorekeeper option it shows

#0
#1

On host it only shows #0 which gets updated. #1 is getting updated on peer, but not #0.
B
9
S
2
Posts: 37
Reputation: 729

Post » Sun Apr 19, 2015 8:00 pm

blackhorse09 wrote:It works for host. Everything I've tried has worked fine for host, but it's something with the peer. On the debugger scorekeeper's kills raises for host, but on peer it looks there's 2 scorekeepers. When I click on the scorekeeper option it shows

#0
#1

On host it only shows #0 which gets updated. #1 is getting updated on peer, but not #0.




http://i.imgur.com/NXDrDPl.png
B
9
S
2
Posts: 37
Reputation: 729

Post » Sun Apr 19, 2015 8:03 pm

And is one of the Scorekeepers for the peer increasing ?

If so, its something in your logic or setup causing there to be 2 scorekeepers.

If you have a scorekeeper on the layout by default, make sure to destroy that one for the peer on start of layout, the hosts Scorekeeper should get synched and created on the peer side.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567

Post » Sun Apr 19, 2015 8:09 pm

lennaert wrote:And is one of the Scorekeepers for the peer increasing ?

If so, its something in your logic or setup causing there to be 2 scorekeepers.

If you have a scorekeeper on the layout by default, make sure to destroy that one for the peer on start of layout, the hosts Scorekeeper should get synched and created on the peer side.



Yup I had one on default. Thanks so much for your help, it's working perfect now
B
9
S
2
Posts: 37
Reputation: 729


Return to How do I....?

Who is online

Users browsing this forum: dop2000, namaewayukidesu, Yahoo [Bot] and 5 guests