DiegoM's Recent Forum Activity

  • If you don't want to share your whole project, try removing as many things as you can from it, while still reproducing the problem.

    If you could share a trimmed down project, it would help a lot to solving this.

  • The crash suggests that there is a problem loading the state of a tween or a timeline. So maybe it has to do with a save being done while a tween or a timeline is playing and then there is a problem restoring that state.

    That might explain why it doesn't happen consistently... I am just guessing though, so the conditions that cause the crash might be different.

  • Can you share the project, and give steps to reproduce the problem?

    Without that it's very hard to figure these problems out.

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

DiegoM's avatar

DiegoM

Member since 24 Apr, 2015

Twitter
DiegoM has 1,399,519 followers

Trophy Case

  • 9-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies

Blogs