How do I destroy an object on the peer's side?

0 favourites
  • 4 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Hello,

    I'm destroying a synced object on the host's side, and my assumption was that it would automatically disappear on the peer's side when that happened. The object does seem to get destroyed because it freezes on the spot and it no longer appears in an object count, but the sprite remains on-screen.

    I've tried all sorts of things like sending a message to the peer to destroy it from their side, but that doesn't work either.

    Does anyone know the correct way to make it disappear for the peer please?

  • Destroying a properly synced object on the host should destroy it for the peers as well. Are you able to recreate this in a minimal project? Could be a bug.

    The other reason would be that you actually had two copies of the same obect overlapping each other. The synced one gets destroyed and leaves the other. The peer should destroy any "orphan" synced objects that already exist on the layout upon joining as a peer.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for the response, oosyrag. I did a bit of further experimentation and it seems it was because I was using a tween that had Destroy On Complete set to True. When I just use a normal Destroy action, it works. Is this the expected behaviour? I'd have thought that a Destroy would work regardless.

  • Unknown, it could be an oversight. The tween feature was added much after the multiplayer.

    Logically I agree the tween destroy shouldn't be different than a direct destroy, but I don't know what happens under the hood.

    If you create a minimal project showcasing both methods and the difference between them, you could file a big report on GitHub and get an answer pretty quickly, either as a bug or unexpected behavior.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)