dop2000's Forum Posts

  • Is there a reason why you are using particles object to create dust sprites? Can you just spawn a bunch of them randomly?

  • Well, sometimes logcat doesn't have much useful info.. Seems like there is some issue with disk index (whatever this means). Does this happen on other devices? Maybe there's some problem with your phone.

    You can try exporting debug APK, it may give you more detailed error logging.

    Also, you can add Browser Log messages into all key events in the project, for example "Checking Local Storage", "Loading from Local Storage" etc. If you export debug APK, you will be able to see these messages in logcat and will know exactly in which event your app fails.

  • As with any other object in Construct, you can create multiple instances of an array using "System Create" action. So you can have 20 instances of the same array, and pick them by instance variables, or by UID, or using some other method.

    One common implementation of multiple array instances is when array is added to a container with another object like a sprite. For example, you may have Enemy sprite and EnemyStatsArray. When they are in the same container, then each enemy will have its own instance of the array with its own unique data.

  • Your game? Or any game?

    Try incognito mode in the browser, or a different browser. Press F12 and check errors in the console.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That official instruction is outdated, you should tell CoolMathGames that.

    .

    "Browser Execute Javascript" is an old method. I think you should use inline scripts - see my fist comment in this post about how to add them.

    Also, click on the Coolmath.js script in the project and on the left toolbar choose its purpose: "Import for events".

  • where to execute?

    In your event sheet! You probably have an event like "Touch On Touched StartButton" or something similar - add the script to that event.

  • You need to connect the JS library first.

    In your event sheet in the event where a level is selected, right-click on "Add action" and choose "Add script". Add this script (without quotation marks):

    coolmathCallStart();
    

    Try running the game, press F12 and check if there are any error messages in the browser console.

    If the previous code works fine, you can add the other functions:

    coolmathCallLevelStart(runtime.globalVars.currentLevel);
    
    and 
    
    coolmathCallLevelRestart(runtime.globalVars.currentLevel);
    
    
  • No, that's not it. Search for multi-line exceptions or error messages, they may look something like this:

    Also check that the error is related to your app, and not about some random android service.

    The log file may be huge, so it's important to know the exact time of the crash.

  • Detecting which word was clicked will not be possible with Text object, because fonts are rendered differently in every browser and system.

    It is possible with SpriteFont, but will still be quite difficult. You will need to calculate the position of the word by adding up the sizes of all letters..

  • If the image is simple like an ellipse, you can save ellipse parameters in variables or in an array, and just draw the same ellipse on the second canvas.

    To copy some random image from one canvas to another you need to save it, load into a sprite and then paste the sprite on canvas. It's a lot of work..

    Another option is to make the Canvas1 object global. Then when you switch to another layout, Canvas1 will not be destroyed and you could paste it directly onto Canvas2.

  • + Keyboard: Z is down
    -> Sprite: Set scale to min(lerp(Self.Width÷Self.ImageWidth, (Self.Width÷Self.ImageWidth)×1.1, dt×10), 2)
    
    + Keyboard: X is down
    -> Sprite: Set scale to max(lerp(Self.Width÷Self.ImageWidth, (Self.Width÷Self.ImageWidth)÷1.1, dt×10), 0.5)
    
    
    
  • Let's say you have Label sprite and TimelineLabel sprite, and both objects have the same set of animations. The default animation for TimelineLabel sprite is "Blank". Then you can do this:

    Player on collision with Label
    
    .. TimelineLabel Is Animation "Blank" playing
    .. TimelineLabel Pick nearest to (-1000000, 0)
    
    ...... TimelineLabel Set animation to Label.animationName
    ...... Label set collisions disabled
    

    This will pick the leftmost TimelineLabel instance which is still blank and assign it the same animation as the Label.

    Instead of choosing by nearest to position you can use an "ID" instance variable. Manually set IDs for each TimelineLabel and then pick an instance with the lowest ID.

  • You can use a font which supports these foreign characters. Or create a spritefont with them.

  • I think what you are looking for is Persist behavior. Read about it in the documentation:

    construct.net/en/make-games/manuals/construct-3/behavior-reference/persist

    Don't set objects global unless you need to have the same object instance in multiple layouts. I very rarely use global objects in my games.