dop2000's Forum Posts

  • This is difficult. Try searching the forum, many people have asked this question.

    I have a couple of examples, but they are quite complicated and not very good.

    howtoconstructdemos.com/avoid-overlapping-while-moving-with-pathfinding

    howtoconstructdemos.com/prevent-multiple-enemies-with-pathfinding-from-overlapping-easystarjs

  • You can use "Wait 0.2 + Sprite.count*0.5" before making the button visible.

    Or use Timer behavior instead of "wait" inside the loop. Start a timer for each sprite instance. In "On timer" event run the tweens. Then you will be able to use loopindex to detect the last instance.

  • Use "Tween On Finished" event, it's the most reliable. "Wait for previous action" may not work if there are several async actions running simultaneously.

    In "Tween On Finished" event you can pick all sprites and check if any of them are still running tweens.

    Similar with AJAX, you can make a chain of AJAX requests. When the first is finished, request the second file and so on.

  • I haven’t used them but that was mainly because the debugger didn’t let you step through loops and sub events or per condition and per action.

    Ah, yes, clicking 100 times to step past a loop is super fun.. (not)

    I use them as a last resort, but never really had much trouble getting them to trigger!

    One example is a breakpoint inside a function that returns a value. You can add it, but it never triggers.

  • In all my years of working with Construct I think I've successfully used breakpoints less than a dozen times. I feel like in 99% cases whenever I'm trying to add a breakpoint in an event, the editor doesn't allow me to do so. And even when it does, half of the times the breakpoint is never triggered.

    Has anyone had any luck with breakpoints? Am I doing something wrong, or is it just a useless feature?

  • Your screenshot doesn't show any actions which can affect animations.

    Comparing "Amayus X<Enemy1.X" may not work correctly with multiple enemies, because only the first enemy instance will be checked. You need to add For Each loop:

    Enemy1 has LOS to Amayus
    System For Each Enemy1
    Amayus X<Enemy1.X
    

    Also, DistanceBetween variable will store the distance to the last enemy only. You might need to use an instance variable instead.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When moving angle between -45 and 45 : "right" animation

    Between 45 and 135: "down"

    Between 135 and 225: "left"

    Between 225 and 315: "up"

  • You can make a hierarchy, adding each new sandwich layer as a child to the previous layer. Like a chain.

    Then when you drag any of them, all objects above (all children) will be dragged too.

  • C3 works with individual frames and animations, not spritesheets. When the game is exported, it will convert all images to spritesheets automatically.

  • Like I said, when a character with Platform behavior collides with with the ground, you can assume the collision point is at the bottom of the sprite.

    But for other scenarios there is no easy way to detect the point of collision between two objects.

    You can add several image points on the sprite A perimeter. And on collision with sprite B check which of these points overlap sprite B. (use System Pick Overlapping Point condition)

    Check out this demo, but note that it's pretty outdated:

    howtoconstructdemos.com/detecting-the-exact-point-of-collision-between-two-large-objects-capx

  • It depends on how you designed your game. You can put all sprites with countries on the layout, outside of the visible area. Pick two random sprites and display their animation names as wrong answers. Destroy those sprites.

    Then pick one random sprite, move it to the visible area and display its animation as the right answer.

    .

    Or if you have an array with all country names, display three random names. Then pick one of them at random (correct answer) and set the sprite animation to it.

  • Bl4ckSh33p Check out the pathfinding examples. Recent changes in the Pathfinding behavior allow to spread instances out and prevent them from overlapping.

  • Assuming that each item in the file is in a new line:

  • Not sure what your question is. You can save these coordinates to variables (global or local or instance).

    With Platform behavior the collision point will always be at the bottom of the sprite. You can add an image point there and use Character.ImagePointX("name"), Character.ImagePointY("name") expressions.

    Or set the origin image point at the bottom and simply use Character.X, Character.Y

  • Store the random value in a variable.

    Set randomAnim to choose("1", "2", "3")
    Country set animation to randomAnim
    Flag set animation to randomAnim
    

    It may be better to name the animations properly, by country name.