dop2000's Forum Posts

  • Does this bug happen when you preview the game in the editor? When you restart the preview, is the data from LS loaded correctly?

  • The principle is the same - you can use an instance variable TargetFrame on the blade sprite. When it arrives, increment the variable, pick the invisible box with that frame and move to it. If the variable=4, reset it back to 0 to make a loop.

    However, you have multiple groups of blades+boxes in your video, this makes it a bit more difficult, because you also need some way to pick the box from the same group. I would probably use hierarchies - create another invisible sprite, say Room. Add blades and boxes to the Room as children. When a blade arrives, pick its parent room, and then pick the room's child boxes.

    I suggest you try to make it working with one group of blades+boxes first.

  • 1. Use "On collision" event instead of "Is overlapping".

    "Is overlapping" will continue to fire every tick, about 60 times per second, while the objects are overlapping. "On Collision" is a trigger, it will happen only once at the moment two objects touch. I'm guessing this is what you want?

    And remove "Trigger once"! This condition can cause a lot of damage when not used correctly, I suggest forgetting about it until you have a good understanding of how events in Construct work. And never use "trigger once" with objects that have multiple instances.

    2. Use instance variable on the Ball sprite. Then each ball instance will have its own health.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can save the current target's frame in a variable. When the object has arrived, increase the variable by 1, pick the box instance with animation frame=variable and move to it.

    Object On Arrived : Add 1 to frameVar
    
    .. Box compare animation frame = frameVar : Object move to Box
    
  • Right-click on function name -> "Replace with built-in function"

  • There's likely a mistake in your JSON string (like a missing bracket), that's why it can't be parsed. If you press F12 and open browser console you will see an error message about it.

    I suggest you use any of the online JSON validator tools to fix the syntax.

  • I doubt the data is erased. Most likely it's get overwritten when you re-open the app. You need to post your project file or a screenshot of your events where you read and write to Local storage.

  • AJAX is a standard object in C3. You can add it the same way you add other objects to your project, for example double-click on an empty area in layout view.

    If you don't see AJAX in the list of objects, either you've already added it earlier (and possibly renamed). Or perhaps you have "Simplified interface" enabled in Construct settings, in this case disable this checkbox.

  • It still feels like the same problem to me. I'll try to monitor the memory usage more closely, perhaps it is increased with time, but not very dramatically.

    The editor is much more likely to lag when the project has been open for several hours. But I've seen it happening just 10 minutes after opening.

  • In my case, when I open my project in Chrome, it uses around 3.5GB of memory, and this number doesn't change much with time.

    I tried forcing Chrome to use the dedicated GPU, it made no difference. And as I mentioned, the editor still lags on my gaming PC with a powerful graphics card.

    I also tried Edge browser, closing all search windows, different editor themes, disabling hardware acceleration in Chrome, disabling spell check, disabling auto-fill for addresses, disabling Windows Defender and many other things. Nothing helps.

    Same Large project that's been open for hours (Total blocking time: ~4.3 seconds):

    I posted very similar results in this comment.

  • 1StepCloser Thanks! For me this also happens only in one large project.

    Is the issue intermittent in your case? One minute the editor is very slow, and the next five minutes it may be running perfectly fine?

  • Do you mean you can't find your project file?

    Do you remember how you saved it - to local drive or to cloud? What browser did you use?

    It may be saved in browser storage. Try to open Construct in the same browser and select "Project open from local browser"

  • able to test if a layer is visible directly in an expression

    For some unknown reason Construct doesn't have such boolean conditions.

    You can make a function which checks if a layer is visible, and use it in "Pick by evaluate" expression.

  • You can create a function with all the actions which should run when left mouse button is clicked. And call this function from two events - from "Mouse On Left click" and from "Touch On Tap".

  • So I guess now I have to figure out another way to get it to check the result for each of my individual AJAX calls.

    Like I said, you can use AJAX.tag expression inside the "On any error" trigger to see which request has failed.