DiegoM's Forum Posts

  • As for criteria when arrays and generators are used... I think our Javascript API is just a little bit inconsistent in that regard, so you'll have to work with what you find in different parts.

  • The children method returns a generator function

    developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator

    The result of a generator function is an iterable that can be placed in a for of loop just like an array would.

    const ObjectA = runtime.objects.ObjectA.getFirstInstance();
    
    for (const child of ObjectA.children()) {
    	// Do things here
    }
    

    That is the most common way in which you will use generator functions and likely won't need to know more than that. If you want to know more about them I recommend looking at the MDN documentation.

  • I just tried using the new instance signals to get around signals not directly receiving parameters and it looks like you can set up what is effectively and Event-based observer pattern.

    At the end of your function create a new instance with the "Create Object" action, set any instance variables you want to be available in the "On Signal" triggers and then have the newly created instance fire the signal.

    The instance will then be available in the trigger with all the instance variables that where set.

    After firing the instance signal destroy the instance to save memory.

    It's pretty much the same as creating an event and then have a dispatcher fire it in traditional programming languages.

  • Maybe I am misunderstanding this so if this doesn't make sense don't think too much about it, having said that...

    Have you tried adding a Signal at the end of your function? You can then have different "On Signal" triggers in different event sheets and each can do different actions.

  • I haven't really been able to look at any of this, but thanks for the additional info.

  • Someone pointed out that Advanced Minification is causing problems and I was able to confirm this, still trying to figure out what the problem is with the new Cordova plugin we are using.

    If ads are not showing for anyone trying this out, try using Simple or None minification.

  • This has to do with a browser extension.

    Try disabling all extensions to quickly check if it solves the problem.

    After that you can disable extensions one at a time, until you find out which one is causing the problem.

  • 5 MB might not seem like much, but it can feel like it takes ages if you sit down to wait for it, specially in slower or spotty connections.

    Asides from building the UI with the expectation that a video is going to take a little while to show up (showing a spinner or some other kind of feedback where the video is supposed to go), you should also try to compress them as much as possible until they have an acceptable quality.

    Another common strategy is to start loading videos as soon as you can, while the user is busy paying attention to something else or getting to the part of your app that needs to show the videos. This way you get a little bit of "free" loading time, by the time a video actually needs to be shown, the perceived wait time can seem lower.

  • I see what is going on.

    Set Time changes the timeline time, and it also pauses it there, which means it can be taken out of the pause state using the Resume action.

    In the case of setting the time in the same action block as the timeline is played, the the timeline should start playing from that point in time without the need of explicitly calling Resume.

    I say it SHOULD because it's not doing that! For now you can place a Resume action right after Set Time and it should do what you want.

    I think I will change the behaviour of Set Time because it's a little bit strange that it stops the timeline and it's not very useful either.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Have you tried using the Set Time action right after playing a timeline? I think that should do what you want.

  • New in R398.2 is the Instance Bar, a new way to view and organize all the instances in a layout. Next, a short description about some of the features off the top of my head.

    Hierarchies

    One of the bar's primary objectives is to help visualize and build complex hierarchies, which can get a little bit tedious and confusing just by using the layout view. Hierarchies can be made by dragging and dropping tree items on top of each other and also by dragging an instance from the layout view into the Instance Bar.

    Folders

    The other main feature is that now there is a way to organize instances in a folder structure which is independent of how they look in the layout and has no impact at runtime.

    Additional Information

    A secondary feature is showing, in a compact way, information which was previously not easy to see at a glance. By left clicking on the bottom of the bar or right clicking anywhere else, you can bring up a context menu option called "Show more information for", to toggle additional information about each instance, such as if they are a template or belong to a timeline among a few others. This was done like this because there is quite a bit of this instance specific information and showing it all at the same time could become messy very quickly.

    Search

    The search bar at the top of the bar can be used to search by the display name of items, if there is no match with the display name though, the search will also attempt to match, with the object type name, the plugin name or any tags an instance might have. Typing a layer name will filter the tree to show only the instances in that layer.

    Additionally there are a couple of "special" search terms. Typing "mesh" (or the translated name if you are not using C3 in English) will search for all the meshes in the layout. Something similar happens with the word "hierarchy", which filters the tree to show only the root level hierarchies.

    Tags

    The bar also has a minor integration with the new Tags feature. Any instance which has tags will show the first tag as it's display name instead of the object type name which is shown by default. The other tags can still be used in the search bar though!

    Global layers

    There are a couple of features which are not obvious and they have to do with how the bar displays instances coming from global layers. If any, these instances are also shown, but in a slightly different way because as it turns out, showing them like any other instance caused some problems. When toggling the "Layers & Layouts" options, an icon will be shown next to global instances to quickly identify them.

    Under certain conditions, items in the tree might become highlighted in red. This cases are tied to global layers. Since it's possible to make hierarchies from instances in a local layer to instances in a global layer, it is possible for an instance to show up in hierarchy, but be no where to be seen, those instances will be highlighted and toggling the "Layers & Layouts" options will tell you a little bit more information about what is happening.

    Another edge case caused by global layers is that a hierarchy might only be shown partially, because the rest of it comes from another layout, that case is highlighted as well.

    Performance

    Due to an initial bone headed implementation the bar is quite sluggish when a layout has a lot of instances. That is already being fixed.

    I think that's all about it. If you have any feedback or have already written some elsewhere, it is a good idea to put it in here so everything is in the same place.

  • Going to have to take a closer look on this one, because it doesn't look right at all.

    Thanks for the example project, it will be very useful to figure out what is going on.

  • The plugin hasn't received any changes in the loading process in over 2 years.

    Since initialization needs access to remote resources unexpected problems which we can't control can be introduced at any time.

    On top of that the plugin needs to do this on start up, so it can show the consent dialog for GDPR as soon as possible.

  • This sounds like a subtle bug.

    The icon is supposed to be updated when you close the animations editor after making changes, when you change the initial animation or initial frame from the properties bar and when you undo/redo any of those changes.

    The best is to file a bug in our tracker, and make sure to include the reproduction steps.

  • You can see it for yourself by saving two different files, one with the property checked and another one unchecked.

    If you then open the TMX files with a text editor you'll be able to see they are different. C3 only understands the save format when the properly is unchecked.