dop2000's Forum Posts

  • I was hoping there was a dynamic method

    You can paste your text on a drawing canvas - it also supports meshes.

  • I think it would be easier to save the timestamp for 0:00 on the most recent Monday in Local Storage. Then, each time the game runs, check if more than 7 full days have passed since that timestamp (7×24×60×60 seconds). If so, reset the tasks and save a new timestamp — again, rounded to 0:00 on Monday.

    ChatGPT gave this formula:

    const MILLIS_IN_WEEK = 7 * 86400000;
    const MONDAY_OFFSET = 4 * 86400000;
    const mondayMidnight = Date.now() - ((Date.now() - MONDAY_OFFSET) % MILLIS_IN_WEEK);
    
    
    Date.now() - 345600000 shifts the epoch so that Monday 00:00 aligns with multiples of 604800000.
    Taking modulo % 604800000 gives the time since the last Monday midnight.
    Subtracting that gives the timestamp of the most recent Monday at 00:00, cleanly.
    

    But I think it would be for GST, you'll need to adjust it to local time zone.

  • I made this a few years ago:

    dropbox.com/scl/fi/8e36p0902dxolxfgu6bzm/StarWarsText.c3p

  • Here is an example:

    Chemic pick children Molek
    For each Molek
    ... Dictionary add key Molek.dx & "," & Molek.dy
    
  • With all this in mind, where would you suggest the overhaul begin?

    I don't know.. Perhaps you could build the dictionary when needed from the hierarchy.

    I'm not saying that your current approach is bad. But sometimes it's worth the effort to step back and replace a system that's overly complex or hard to maintain with something more manageable in the long run.

    One other thing to consider about the hierarchy system: it doesn't support loops. So if you need looped chains, like in the image below - you’ll have to connect all Moleks directly to Chemic.

    In that case, when any Molek is removed, you'll need to check which Moleks are still connected to Chemic and rebuild the hierarchy accordingly.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I sort of get your idea, but I think it's overly complicated and hard to troubleshoot. You're destroying and recreating all markers and repopulating the dictionary on every tick, which makes it even more confusing.

    I’d strongly suggest using the hierarchy feature instead, it will be A LOT easier. Attach Moleks to Chemic as children - this way, they’ll automatically move together and stay logically connected. You won’t need dictionaries or extra variables at all. You can find parent or child object at any time with "Pick parent/child" condition.

    There are two ways to build the hierarchy: either attach all Moleks directly to the parent Chemic, or create a chain. I’m guessing the chain would be more suitable in your game. If a middle (blue) Molek in the chain is removed, it will automatically break into two smaller chains. Or you can detach pink molek from yellow as well.

  • I don't understand what you're calling a chain then. I don't see any physical connection between objects in your screenshots — so what exactly is the chain, and what do you need to do to break it? What are the markers used for?

    The very first event in your screenshot probably creates hundreds of markers every second, because it runs on every tick. So that’s definitely wrong — unless the third event immediately destroys them? Have you tried running the game in Debug Mode? Run the debugger, create a chain, hit pause, and check all objects, their instance variables, the dictionary content, and so on.

    Your code is confusing, and I’m afraid you might be the only person who fully understands it...

  • How do you make the chain? With hierarchy, physics, pin, or something else?

    Which sprite is attached to which sprite? Molec to Chemic?

  • How do I see the memory consumption of each sprite? In the debug screen I can only see the total memory consumption.

    You can put it on an empty layout and check in the debugger.

    and increase it to one above the recommended size for the sprite (for example: 8192px), is that a problem?

    The size (resolution) of the image in the Animation Editor is what matters. 8192x8192 px image is too large. If the image is 1024x1024 px and you stretch or tile it on the layout - this is fine.

  • Conditions like "Every X seconds" really should not be used in sub-events or loops.

  • Can you draw a picture of that spiral path?

    Here is another behavior you can use:

    construct.net/en/make-games/addons/198/spline-movement-c3-runtime

    Demo project:

    dropbox.com/scl/fi/b7znsclmmgnkzpi8cracv/spline_demo.c3p

  • I guess you can put obstacles to form a spiral path.

    Why does it have to be with pathfinding? There are other options - MoveTo, Tween, timelines.

  • I don't have a solution, but I would try these things:

    • export/unpack into a different folder - local, not OneDrive
    • disable Windows Defender temporarily
    • reboot your PC
    • try running the exported game on another PC - if it has the same issue, it's likely your browser caching the exported ZIP
    • rename the project, to force generating a ZIP with a different filename
  • Does it work with only one enemy, which is mirrored? Maybe a mirrored sprite doesn't have LOS to the player for some reason.

    Are there any events which are parent to event #719? Perhaps they set the picked scope to only one enemy instance.

    I also suggest using Timer behavior for spawning bombs and for throwing/exploding bombs - instead of "every 1s" and "waits".

  • Superxonic is right — The first time you press the Up button and the function is called, the frame is still 0. Events 3 and 4 will only update the animation frame on the next tick. Move Events 3 and 4 inside the reload_position function to fix this particular issue.

    I imagine something similar is happening with your texts — likely due to the wrong order of events. Though it's hard to tell from your screenshots. For example, if you’re receiving data via AJAX and want to display it immediately, the correct sequence should be: Load the data into variables -> Then update the texts

    It looks like you might be updating the texts before setting the variables. But again, not possible to tell with the provided screenshots.