dop2000's Recent Forum Activity

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

  • if you don't destroy the object on the previous layout, it shows up & i just cant understand why

    Because it's global :)

    From the documentation:

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 257 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies