dop2000's Forum Posts

  • I use console logging all the time! In many cases it's the fastest and most efficient method of debugging in Construct.

    Any cool functions anybody has made to make the logging more robust and easily repeatable across different events?

    I have a _LOG function, but only so that I could easily disable all logging when I prepare a release build.

    ChatGPT gave me this function that allows to override the default implementation of "Browser Log" action and it works.

    (function() {
     // Save the original console.log method
     const originalLog = console.log;
    
     // Override console.log with your custom implementation
     console.log = function(...args) {
     // Add additional information, such as a timestamp
     const timestamp = new Date().toISOString();
     // Call the original console.log with modified arguments
     originalLog(`[${timestamp}]`, ...args);
     };
    })();

    However, I don't think it would be possible to include an event sheet name or event number, because these expressions are not available in scripting.

  • Mouse on Sprite clicked
    ..Sprite frame=0 : Play audio, Sprite set frame to 1
    ..Else : Stop audio, Sprite set frame to 0
    
  • Just testing to make a simple triangle before trying it with the chain links, but a triangle is not drawn. Am I missing a step?

    Check that the coordinates are correct - they should be within the canvas width and height. (not layout coordinates)

  • You can draw a polygon on Drawing Canvas, using the coordinates of your chain links.

  • Instead of destroying you can make it invisible. And disable collisions if needed.

  • Can you share your project file?

    When you just switch to another layout, global variables definitely don't reset.

  • You can change the content of the iframe - use "Display HTML string" action.

    Or prepare several iframes on another layout and spawn one of them when a button is pressed.

  • You do not have permission to view this post

  • That's a paid addon, you need to contact the developer:

    construct.net/en/game-assets/users/risingpixel-574476

  • See oosyrag's comment above.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would use "Opacity=100" condition. Because once it has start tweening down, the button should probably not be clickable.

  • Here is how to fix the shaking:

    Don't forget to use delta-time (dt) in events that run on every tick.

    Also, check out this demo:

    howtoconstructdemos.com/auto-zoom-and-scroll-the-screen-to-fit-multiple-characters

  • The Tile Movement behavior feels unpolished, I almost never use it.

    C3 has plenty of quirks and oddities. Things like OR-blocks, the Else condition, and Trigger Once could each have a dedicated chapter in the documentation.

    One recent discovery that caught me completely off guard (although mentioned in the manual) - restarting a layout also resets all groups in the entire project to their initial state. I had to go through many of my projects and replace "Restart layout" with "Go to layout". I still don’t understand why "Reset all groups" is not a separate action.

  • Text: replace(currentDialog, "your_tag_here", newline)

    Duration: len(currentDialog)/10

    But if you need to break the text first into blocks and display one block at a time, it's easier to use a local variable.

    The first action extracts one block of text from currentDialog into t variable. The second replaces line breaks in it and typewrites it.

    Or you can do it in one expression if you wish:

    replace(tokenat(currentDialogue, index, "^") , "{line_break}", newline)