oosyrag's Recent Forum Activity

  • OK so the situation is different than OP's use, which was changing levels or progressing stages. Crops continuing to grow while hidden.

    There are a few approaches you can try.

    If I had to label one "proper" way, it would still be to use a separate layout. This is assuming you're talking about moving around, to another area or inside a building or something. You would keep track of the time that passed (there are, as usual, few ways to do this), or save the time you left the layout via a global variable. When you go back to the layout with your crops, you would compare the current time with the time you left to get the time that passed, and reconcile that with anything that needs to keep track of time on start of layout. Basically keep track of and just add the time that passed to anything that has a timer, or your global timer.

    Or, you can simply teleport your character to another x/y location on the same layout, representing a building or a different area of the map. Then you wouldn't have to layer things on top of each other at all.

    If you're talking about menus and dialogues, then you probably have issues with clicking and not solids for movement (you don't move around when there's a menu open right?). This would be solved, like I mentioned before, adding a "layer is visible" condition to your clicking events for the main layer and menu layers. For clicking crops, add a "Menu layer is not visible" condition, and for clicking menu items, add "Menu layer is visible".

    Either way, collision tagging is probably not suitable for your situation.

  • There are many data storage options you can use, including instance variables, local variables, arrays, dictionaries, and local storage, among others. They can be manipulated independently of each other. Don't just use global variables for everything.

  • It's not a bug.

    You also don't need object uid or alias or anything.

    If you have a list of peerids, then you simply create a object for each of them. Set the instance variable to each peer id in order, and sync it.

  • Without analyzing or testing this too closely, I think the problem you're having is that the Multiplayer.PeerID expression is supposed to work specifically in certain triggered conditions, like OnPeerConnected. When you use it like that outside the trigger, you won't get the right PeerID.

    An approach I would try (but have not tested), would be to store the relevant peerIDs of each player in an array upon joining, and use that array to look up and assign/associate peerIDs to objects for each player when you want to create player objects.

  • For additional control you can:

    Use one of the outline addon effects

    Use an html element instead of a text object and style it with CSS

    Create/edit a sprite font with the outline baked in, in your image editor of choice

  • Use BBCode by setting the text to

    [outline=white]Text[/outline]
    
  • Add trigger once condition?

  • C2 will also still work after July 1st... Same as it always has.

  • Upload your minimal/new project file, otherwise can't say without more information.

  • Well firstly in this situation where levels are involved, I would use a separate layout instead, or at least destroy the old level upon transitioning to the new. If I needed to preserve the level to revisit later, I would definitely use a separate layout.

    If in the case of a menu and clicking, I usually have the "layer is visible" condition in the menu events.

    I can't think of much for the layer off the top of my head, but I can definitely say there are a billion and one uses for invisible helper sprites, and I definitely want those interactable. I don't see why layer visibility should behave different than object visibility. The question is why make an entire layer invisible to begin with? I'd imagine maybe for inventory or menus and other interface elements, but again a single condition on the input event solves that. Usually doesn't involve solids.

    The main use case for having solids on layers that become visible and invisible would be maybe something like floors in a building. IIRC this is one of the big issues the collision filtering and tag feature was developed to address, besides stuff like half height objects that block movement but not visibility/bullets ect.

    You don't even need to manually enter a lot of collision tags for solids - just use a loop on start of layout to set the tag to the layer name the object is on. When the player changes layers, set their solid collision filter to the layer they are on, so they can only interact with things on that layer.

    Also, the solid behavior can be enabled or disabled. If you're already changing layer visibility, you can enable solids on the new layer and disable on the old just as easily. There are many ways to deal with this.

    One use case I just thought of for hiding a layer and still have solid interactions is if you wanted a certain set of information hidden from the player, say they got blinded, or hidden enemies. They still need to pathfind, bullets still need to hit walls, ect. even when they are not visible.

    Anyways sorry that was a bit long and rambly, so TLDR back to "So is there a way to make a layer 'not interactable'?". There are a few options, as usual, depending on what the situation requires.

    A. Use the "Layer is visible" condition

    B. Use collision filters. Doesn't necessarily mean a lot of work, and it was designed for stuff like this.

    C. Disable solids on the layer that isn't in use.

    D. Don't use a layer like this to begin with (ie. destroy and create objects as needed instead of just making them invisible), or move to a different layout instead.

  • Invisible means not visible. It does not mean not interactable.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I believe you should be able to, if you include a websocket server in your app. That is probably outside the scope of these forums though. I suspect you might have less trouble just including a local signalling server instead.

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