oosyrag's Forum Posts

  • Here is the issue from the OP (I haven't looked at your last post yet). Since we can't sync strings in instance variables, we send a message instead. This is also better because the PID doesn't actually need to be synced, since it shouldn't be changing after being initially set anyway.

    However, if the host creates an object and sends the message with the peerID associated with it, we won't be able to know if the sync feature will create that object on peer clients first, or if the message will arrive first.

    When the message arrives, it will check if the last created object has a PID already. If it does, store the PID in a variable, for use when the new object is created. Otherwise, set the PID in the last created object has an empty PID.

    Similarly, when an object is created (from syncing with the host), check if there is a PID in the variable, and use that and clear the variable if there is. Otherwise, do nothing, and wait for the message to arrive to assign the PID.

    Edit: link removed, bad example

  • Set text to sliderbar.value.

  • What do your conditions look like? Trigger once should work.

    Allen described an achievement type system, which should also work. Basically it consists of:

    Trigger Condition
    If achievement=false
    
    Add one to trophy
    Set achievement to true
    

    This should only be able to run once, as after it has run the condition will no longer be met.

  • Try the persist behavior.

  • I used to use these alll the time in C2, when modifying a condition/action to another action.

    It keeps my hand on the keyboard, which I use to search and choose conditions and actions from the dialogue, instead of switching back and forth from the mouse or hitting tab 5 times to get to the back button. Although usually Enter is used to go forwards...

    In C3 I haven't used it as much due to the mentioned wonkiness when autofocusing text fields.

    I find myself working with really fat expressions often, and I like that the contents of particular fields are sometimes preserved when changing conditions/actions. So instead of copying the expression I used in one event, creating a new one, and pasting, I'll copy and paste the entire condition/action, and then go in and change it to whatever new thing I wanted.

  • How easy it is depends on the subject and your own familiarity with the subject. In particular, how well you can describe the mechanics and logic behind how something works too a computer.

    I would hardly say this is a new application of software, it's just not what most people are here to make.

    If you give it a shot, you should be able to see very quickly if Construct 3 is suitable for you. There is a free demo after all. The event system will either make sense to you or not. I find it very intuitive, other people might not.

    I'd recommend following the ghost shooter beginner's tutorial, even if your goal is not to make a traditional game. It will give you a good idea of how C3 works.

  • You do not have permission to view this post

  • You'll need some way to differentiate the gun object instances so that you can pick them properly. Can be done with an instance variable.

    For example, when spawning a gun for a player, set an instance variable in the gun object to playerSprite.UID. This will associate the gun to that player, and you can pick that gun in particular by comparing instance variables.

    Better yet, use the same method you're already using to pick the correct player sprite to move for your controls.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My mistake, I forgot strings like peerID cannot be synced through the sync instance variable action. I'll revisit this shortly.

  • 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]