dop2000's Recent Forum Activity

  • 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
    
dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 265 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies