lionz's Forum Posts

  • So you need swap logic? You should also give the boxes some kind of ID or like an initial order number. When you select the first box, you can store its value temporarily to a local variable and also save the ID of the box. Then when you find the end box, set that box's value to the local variable value, then set a local variable to the end box's value, pick the first box based on that stored ID and set that box's value to the second local variable's value. Or you can do similar logic but with functions and pass through picking values as parameters.

  • I think you use object.8direction.movingangle to track the angle of motion.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If the grids are placed manually beforehand on all layouts then it is simple to set the instance variables on the boxes that need swapping.

  • Can't see any image but I guess it's a simple condition, on clicked, if box.variable=1 set box.variable to 2 ?

  • You can use line of sight behaviour on the player where if player has sight of the enemy then the enemy will stop, you can set the line of sight to a 360deg range around the player. Or from the enemy perspective you can stop moving along a path if distance between enemy and player is a certain value, use distance() command with the two objects enemy and player.

  • 'Move at angle' or you can use bullet behaviour which is the same thing

  • Yep problem was with the second frame where the object is smaller np

  • The collision box of the object is not the size of the visual box if you open up the orange sprite in the image editor and check it. The collision is huge and so you can't move.

  • You have a reset global variables action that runs when you exit the level...

  • Object A on collision with Object B (or overlapping with) pin (behaviour) Object B to Object A.

  • Tilemaps are better for performance than Sprites, it explains it in the manual under Tilemaps.

  • In a general sense, add a 'for each enemy' condition to your events.

  • If you add the enemy and health bar to a 'container', when you create an enemy it will have its own health bar. Events will also work to relate the health bar to the enemy such as set bar.health to enemy.health

  • You didn't share your current approach because it would only be a matter of tweaking that. You can have an instance variable for level and increase it by 1 every time you press upgrade, fairly simple.

  • So you're saying the issue is it upgrades two levels at once if there are enough coins? Then only allow it to increase one level at a time. Structure your events so that when you hit upgrade it increases the level by 1 only, regardless of amount of coins.