dop2000's Forum Posts

  • 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)

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • there are 8 objects on that layout that i selected to debug!

    so...

    does that mean I just cant see them?

    So... Did you click any of those objects? They should be highlighted on the layout. Click and check their properties - their coordinates, layer, visible/invisible etc. Then click System and check that the layout is correct, layer is visible, opacity=100, scroll values are correct and so on. This is what the debugger is for!

    Here is the updated file that you can open in r432

    dropbox.com/scl/fi/riyhcnb24conokcr3zulv/cats-and-dogs-cars-and-vans-computers-and-phones-r432.c3p

  • This is strange. Changing the Z-order in the layout editor definitely fixes the gap, you can test it yourself:

    dropbox.com/scl/fi/0a0coxqeyq8a20qowjt9s/PlatformerTestBug2.c3p

    But for some reason, doing the same via events doesn't work. I’m still convinced the issue lies in the order in which the Platform behavior processes objects, but I don't know how to control that order.

  • The engine processes objects with the Platform behavior one by one. When Player #1 is standing on top of Player #2 and both are falling, the engine handles it like this:

    • Player #1 is standing on a solid object → don't move it.
    • Player #2 doesn't have a solid below → move it down a few pixels.

    That’s why a gap appears between them.

    Now, when Player #2 is on top of Player #1:

    • Player #1 doesn’t have a solid below → move it down.
    • Player #2 also doesn’t have a solid below → move it down.

    So both fall at the same speed, and no gap appears.

    I believe the processing order is based on the objects' Z-index. A simple fix could be:

    If Player1.Y < Player2.Y → Move Player1 in front of Player2 
    Else → Move Player2 in front of Player1
    
  • 1. Make a backup copy.

    2. Open the project in the current release or Construct.

    3. Save it as a folder project.

    4. Close Construct

    5. Open that folder in Windows and edit project.c3proj file with Notepad

    6. Change savedWithRelease value

    7. Open the folder project in r432

  • Events 2 and 3 on your screenshots are running on every tick. So they will be increasing WellenCounter and Welle 60 times per second or even faster! You can launch the game in Debug Mode (Shift+F4) and check these variables for yourself to see what's happening.

    Create NewWave function and move the code to it.

    If you need to start a new wave, say, every 20 seconds - use Timer behavior and call the function in "On timer" event.

    If you need to start a new wave when no enemies left, then do this in an event where an enemy is destroyed: check if it was the last one and call the function.