dop2000's Forum Posts

  • If you load the game on start of layout, but also want sometimes to restart the layout without loading, here is the easiest solution:

  • See the "Text editor" example above. "Read" action is asynchronous, you need to wait for "On file operation complete" trigger.

  • Find out what's using the most space. My guess would be music and sound files. If that's the case, try re-encoding them at a lower quality, for example, using mono instead of stereo.

    If you have a lot of graphics, try exporting with lossy compression. It’s not like JPEG, and it won’t ruin your pixel art. Chances are, you won’t even notice the difference.

    Another option is to export with PNG images and then compress them using Pngquant. Again, you likely won’t see any visual difference, but image sizes can be reduced by 30–50%.

  • How big is the project? Do you have enough free space on your hard drive?

    If you have multiple drives, make sure there are at least a few gigabytes free both on the drive you're trying to save to and on the system drive.

  • You can also use ternary operator. Say, to increase the number up to 10, then reset to 0:

    Set var to (var<10 ? var+1 : 0)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The easiest way to link three objects together is to use a container. That way, you won’t need the ID variables — picking one instance (like the hitbox) in events will automatically pick the other two objects in the same container.

    Another option is to use a hierarchy, with one object as the parent and the others as children. Then you can use "Pick parent" and "Pick children" conditions. Hierarchies also let you move all the objects as one unit.

    You can even combine both approaches: container+hierarchy for ultimate flexibility!

    .

    The way you organize your events is pretty inefficient. Running a For Each loop on every tick and nesting everything inside it (even triggers) will hurt performance, especially with many enemies. Triggers should generally not be placed inside other events.

    Never use "Trigger once" condition with objects that have multiple instances or inside loops - it only leads to bugs that are hard to debug.

    Finally, you need to tell the DEATH function which enemy instance to destroy, otherwise it may destroy the wrong enemy. Add a parameter EnemyUID, and pass enemy.UID in this parameter when calling the function.

    So the correct code should look like this:

    // Parent event
    Player on collision with Enemy
    Player is not dead yet
    
    ... // sub-events
    ... Player is immune -> Call function ENEMY_DEATH(Enemy.UID)
    ... Else -> kill the player
    
  • You don't need JS. The core logic can be done with like 5 events.

    I don't know why you chose that tutorial and not my example which is a lot simpler.

  • i tried: Emil#1,

    It should be in double quotes: "Emil#1"

    Any string values in expressions always require quotes.

  • The easiest option is MoveTo behavior - move to (Mouse.x, Mouse.y)

    Or do you want it to move in a curly line, as on your picture?

  • Why are you using "Is key down" conditions? You should change them to "On key pressed".

  • Your MovingRailHorzontal object has different collision masks in animation frames. So it launches and drops the player up and down all the time.

  • i cant see any differneces except for at the top left where it says for the new version -webgpu but for the old version -webgl2

    This actually may be the reason of white screen. You can try changing "Enable WebGPU" setting in project properties.

  • Timescale doesn't stop the game completely, events continue to run. So if you move enemies with events, they will continue moving.

    But of course this shouldn't happen when the event group is deactivated.

    So my guess is that some other event in your project re-activates the group and perhaps restores the time scale.

  • Please share your project file or screenshots of your code.