oosyrag's Recent Forum Activity

  • For future reference, when you drag them over another tab, you'll see a little cross of icons that kinda looks like a controller d-pad in the middle, drag over that to choose above/below/side/tabbed.

  • My mistake. I would have the host send a message with the relevant peer's index. The peer can then store it in a variable locally to access if necessary. Either do it on request by having the peer send a message requesting the number and the host responds with it, or do it on peer joined have the host send the number and the peer save it.

    Or if peers need to be constantly updated as people leave and join, the host can just broadcast the relevant information regularly via messages.

  • I didn't check if the connection was maintained or if everyone has to reconnect via signaling. If they do stay connected, they will probably retain the same peerids from the original layout. The host can probably keep track of all the peers/peerids in an array and sync/create/assign the objects on the new layout accordingly.

  • Multiplayer.MyID

  • When working with layouts, you can try including a global event sheet on every layout that sets common parameters On Start of Layout for situations like this.

  • Also you can go to file - preferences, at the bottom of the general tab there is a button to reset all dialogs and bars to default.

  • In your screencap it looks like they are both subevents for something else, did you split the host and peer groups? The message received event needs to be in a peer group,and the host will also need its own action to go to the new layout.

    Here is an example. Tested by previewing and duplicating a couple tabs/windows.

    https://www.dropbox.com/s/sjtjilffjvtdu ... .capx?dl=0

  • Actually sorry that was bad advice. In this case, where you are destroying overlapping objects of the same sprite, UID might not work as well. You want to use Pick Nth instance instead:

    [quote:23lxchy3]Pick Nth instance

    Pick the instance at a given place in the internal list of picked objects. This is most useful used in sub-events to act on separate instances. For example, in a "Sprite collided with Sprite" event, Pick 0th instance and Pick 1st instance can be used to act on each instance involved in the collision separately.

    If all objects are currently picked, this condition can also be used to pick an object by its index ID (IID). For more information, see common features.

    You can pick Nth instance and destroy that instance in a loop until the Sprite collided/overlap with Sprite is no longer true (there is only one instance left).

  • (angle(x1,y1,x2,y2)+360)%360

    I forgot modulo! That is a much more elegant solution.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Another issue I had a lot of trouble with in the past.

    Method 1 - use families. Have your object in a family, then for each A, if overlapping with family containing object A, destry A.

    If you are using trial version of C2, you don't have access to families. In that case:

    Method 2 - use UIDs to identify/pick an "active" instance, then pick all and compare if overlapping against that specific instance. You'll also need to use for each in this case, so not all A objects are destroyed at the same time.

  • System compare two values. You might not even need that, if you use a message tag that is unique.

  • I've run into this issue before. I ended up using an intermediate function:

    On angle360(x1,y1,x2,y2)

    If angle(params) < 0 | return 360+angle(params)

    Else | return angle(params)

    This will give you the standard 360 degree angles starting from 0 at 3oclock going counter clockwise.

oosyrag's avatar

oosyrag

Member since 20 Feb, 2013

Twitter
oosyrag has 38 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

21/44
How to earn trophies