Kyatric's Forum Posts

  • Use the provided AJAX plugin instead of the JS function you mention.

    Check the How do I FAQ in the section AJAX for actual examples of use of what you are asking.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As far as I can tell, this has nothing to do with multiplayer specifically.

    As mentioned, global layer works the same way.

    A global layer is set in a specific layout, contains instances, but for it to work in a consistent manner over the whole project, you need to have the same number of layers (or at least the same layer number) over all the layouts of the project or the instances won't appear/be created in the "non-original" layouts.

    In your project, on the host side you are displaying a specific layout (MAP_AREAF_0) which has 6 layers.

    But when having a peer joining the host, the peer is displaying a different layout (MAP_TRAINING) that originally only has 2 layers.

    The peer layout DOES not have the appropriate layer to spawn/sync an instance on.

    From your host, you ask your peer to create instances in a layer that does not exists. Hence the error your encountered.

    Syncing is just there to transmit infos from an instance to another from a computer to another. But if the instance does not logically exists, it cannot be synced.

    And for it to exist, it requires the same number of layers.

    Nevertheless, you still need to make a proper report as asked by Ashley.

  • Kyatric, All layouts that the objects will be synced on need to have the same layers? Not a problem, but kinda weird. Thanks for the help! Fixed my problem!

    Well, I'm not sure how this is weird. It makes perfect sense to me.

    Consider a main layout on which you have an object standing in the layer n°5.

    Now take another layout that is supposed to display the object by syncing, but the layout contains only a single layer. How is Construct supposed to sync an object existing on a missing layer in the current layout ?

    It is the same for a global layer. You ARE to have the same name/number for the layer in a consistent manner over all your layouts, even if the layer is empty/contains nothing. It has to be there in order to be accessed/used.

    It makes sense to me that in the case of syncing (creating the same instances as in a different layout) that the same behavior/constraints applies.

  • Quick fix for now, add 5 layers to the "MAP_TRAINING" layout.

    As mentioned earlier, it is missing the correct amount of layers to correctly create the instance as it exists in the "MAP_AREAF_0" layout which is the one used by the host.

    Still not sure I'd consider that a C2 bug, more of an oversight on your part I'd say, this kind of JS error pops up "often" when dealing with non-existing layers.

    Let's see if Ashley thinks he may clarify the message, or give a more accurate explanation.

  • You should post your complete capx to let other people see if they encounter the same issue.

    As it stands, it is too difficult to investigate and any theory would just be a shot in the dark.

    The message means that you have some kind of object on the peer side that is a world instance (so it's not your mask and player sprite, but rather something like a Function object) that is attempted to be created like on the host side and is attempted to be created in a layer that exists on the host's and not on the peer's side.

    Before telling if this is a C2 bug or not, first your project needs to be correctly investigated and posted for others to reproduce the error.

  • For a few releases now the installer has changed indeed, and you aren't asked anymore the path where to install C2 when you already have an install on.

    Anyway, it has always been recommended to uninstall the previous version when installing the new one, so keeping two releases is not considered a good practice anyway.

    Now my install workflow has changed to first uninstalling C2 and then installing the new release in order to have the prompt that asks what path to install it to.

  • Over the years, members of the community have been willing to gather over some chat services in order to have a direct way to communicate and exchange around Construct Classic and Construct 2.

    Historically the IRC channel "#construct" on the server irc.esper.net (irc.eu.esper.net) has hosted some of those conversations.

    Since, other channels on different servers/communication tools also were put in place by the community.

    Here is a non-extensive list of those. In no way are those channels officially endorsed by Scirra, they are user-managed, filled and moderated.

    Use common courtesy and if you have a question, don't expect an answer in the second as it depends on the user's availability on those channels.

    If ever you start your own server/group/whatever communication mean, consider posting in this topic.

    But before you do, ask yourself if it is not worth trying to join one of the existing channels first.

    You can also find some Facebook groups (possibly in different languages than English). You can find some URLs to those in the "Non-English communities" topic.

    Some of the services/channels listed may not be available anymore, as mentioned, it is all user-managed.

    Moreover on top of the actual forums you may also want to check the Construct2 Sub-reddit.

    It is not exactly a direct messenger style of chat but still can be a good way to communicate with other users as well.

  • "On object clicked" is the same as "Button released".

    The thing is that your two object are taking the event and you should at least try to prevent this from happening to one if it is invisible.

    If those are regular "Button" objects, add a condition "Layer X is visible" where X is the layer the button is on to your "On button clicked" event.

    If you did things correctly, Layer 2 is by default set to be invisible and this should prevent the button from being clicked until the layer it is on is visible.

    Adding a "Wait 0" system action before setting the layer visible will even help further preventing the click action to be taken into account by the button.

  • Whenever you are starting your layout, RandomAdvt is set to be equal to 6.

    In the very next event, it is set to be equal to 0.

    On start of layout will execute every time you execute/start your layout.

    So a "Go to layout" and a "Restart layout" will execute this loop and skip the whole part that checks if RandomAdvt value is between 1 and 5, because it simply never is.

  • XML is explained in the manual and you can also check out this other example of use making an XML file for dialogs and displaying them.

    In your case you will need to use the content of the XML to create your list in the list object, shouldn't be too hard (in regards to the tutorial and changing the display from a text object to a loop creating list items/indexes)

    Also check the How do I FAQ at the category "List" for examples of use out of an array which can be adapted to your needs though.

    For displaying "media", as long as it is an image, I guess you could use the "Load image from URL" action from a dedicated sprite object to display the selected picture (as long as your xml would contain the appropriate URL for the image to display).

    Other medias like sound, I'm afraid cannot be dynamically streamed that way (not that I know of at least).

  • Or even simpler add the common condition "Pick top instance" from the "Z Order" category which is specifically dedicated to this kind of issue.

  • Sounds like the CSS for the website doesn't reach your browser.

    Could be a problem of slow internet connexion either from the server (if it is in time of a new release, there are a lot of concurrent connexions on the website) or from your end.

    Generally, checking out at a later time should fix the issue.

  • AS yet another alternative, you may check this tutorial that deals with the subject.