dop2000's Forum Posts

  • There are many ways to do that, but in your case you need to organize the events properly. And remove all "Wait for previous action", you don't need them and you are not using them correctly.

  • Pathfinding behavior, just need to correctly configure the grid.

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

    Another option is this plugin, but it may not work in future versions of Construct. (unless someone updates it for SDK2)

    construct.net/en/make-games/addons/1140/easystar

  • Your JSON string should be formatted like this:

    {"c2array":true,"size":[30,20,1],"data":[[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]],[[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]]]}

    As you can see, each value is in square brackets - [0]. Basically each value is an array consisting of one element.

  • So you can open the project, but can't preview it? Then it's not a total loss. It's possible that some images or files got corrupted.

    I’d try removing objects, layouts, event sheets one by one until the preview starts working. Then narrow it down to find the corrupted element.

    But of course make sure to back up the project file first! And definitely consider doing daily backups in the future!

  • I suggest starting small and developing the game in stages. Forget the cooking part for now — just create a sprite with 2–3 simple meals like pizza, hamburger, and lasagna.

    Randomly spawn customers and assign each one a random meal request. Serve the meals and remove the customers once they're served.

    Once that’s working, you can move on to developing the crafting mechanic for different meals.

  • I think when you do a coyote jump, both events 18 and 22 are performed, so the JumpPhase is set to 1.

    Try these changes:

  • Did you copy everything correctly from my project?

    Please post a screenshot of the code or share your project file.

  • If you set the character sprite as 'global', it will not be deleted when you switch to another layout, and it will remember its instance variables.

    But be very careful not to create duplicate instances of the character object - this will likely cause bugs. Make sure that there is only one character instance in the project, on the first layout. Remove it from all other layouts. Use the debugger to verify.

  • You can copy the events from my project into yours. That's what the demo is for. Just remove irrelevant stuff like sliders.

  • I really suggest combining all cards into a single sprite - as separate animations or animation frames. It will be a lot easier to deal with them.

    Here is a example of cards shuffling:

    dropbox.com/scl/fi/67chooq4lm9kqwpq7bzvk/CardShuffleNew.c3p

  • The order of events is wrong. Here is how you can fix it:

  • I believe Construct tries to optimize the spritesheets on export, so there's no way to control in which order the images will be added.

    You can probably save the project as a folder and use some external tool like TexturePacker to combine images (in Images folder) into spritesheets.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Then you need a function.

    Create a function SpawnNewMolecule, move all that code into the function. When a molecule becomes attached - call the function. Every 5 seconds - also call the function.

    But if you need to wait 5 seconds after each attached molecule, then I suggest you use Timer behavior on one of the objects (with a single instance). You can add an invisible sprite just to host the timer.

    On start of layout
     : Start recurring Timer "spawn" for 5s
    
    When molecule becomes attached
     : Call SpawnNewMolecule
     : Start recurring Timer "spawn" for 5s (this will restart it from the beginning)
    
    On Timer "spawn"
     : Call SpawnNewMolecule
    
  • So when the last instance of Molek is attached, or after a certain amount of time passed, I hoped to spawn another in the designated place, all dependent on what color the last one was and where it spawned, which, due to instance variables, are supposed to be one and the same.

    Ok, then pick the last created Molek, get all the important values from it (its position, color etc.) and save them in local variables. Then create a new Molek instance.

    This is just a mockup, I don't know how exactly you want to calculate the position for a new instance: