Ashley Regarding the previous bug I posted (https://www.scirra.com/forum/associate-object-with-peer-does-not-work-with-families_t111829)-- Apologies, I may have written the .capx incorrectly. However, the bug still stands when it's written differently.
The 'Associate Object with Peer' action only works with individual objects, and not with instances of a Family.
Attach a Capx
Description of Capx
The CAPX is exactly the same as the Multiplayer Real-Time Game tutorial, with a few modifications in Game Events. I've removed all of the "Associate Object with Peer" statements, and created a function that does the following (search for the comment "MODIFICATION":
Every 5 Seconds
For Each PeerFamily
Peer - Pick instance with UID PeerFamily.UID
-> Associate PeerFamily with Peer.peerid
This will cause the bug to occur. However, the bug does NOT occur if I swap out the Action for the following:
-> Associate Peer with Peer.peerid
Using this method works completely fine. All I'm doing differently is Associating the Peer instead of PeerFamily.
Steps to Reproduce Bug
- Step 1 - Run the game from the Login screen as you would normally to create a Host.
- Step 2 - Open a second game window to create a Peer.
- Step 3 - Wait for the logs to appear in both windows "Associated <Peer.uid> with ...".
- Step 4 - Close the Peer window.
In the Host window, the Peer object is not destroyed, indicating that the association did not take place.
Object associated with Peer should be destroyed.
- Chrome: (YES)
- FireFox: (YES)
Operating System and Service Pack
____ Windows 8 64-Bit ____
Construct 2 Version ID