lionz's Forum Posts

  • Look at the 'Persist' behaviour, it's for this kind of thing where destroyed objects stay that way when you return to the layout.

  • You can only have one instance of each object per container so it's creating the missing instances for two more containers. You won't be able to use Foliage 2 twice in the same tree for example.

  • Hi, you can use system compare condition when enemy.count=0. Count tracks the number of enemy objects that exist. You could also set a global variable to enemy.count so you can clearly see the number remaining.

  • Don't use families and containers, just containers. You can say on collision with trunk, move the foliage, and it'll move the foliage that is in the container with the trunk you touched. If you try and pick the foliage as a family it'll start picking every foliage.

  • Because both layouts use the same event sheet, when zombies=0 it keeps reloading layout 2. If they must use the same event sheet then you can add a condition, zombies=0 and layoutname=layout1. Also if you set a target number for zombies on start of layout it would stop the constant refresh.

  • Whatever the logic is, some kind of player movement I'm guessing, put it into a function.

    Then use two events -

    Controller stick block : call function

    D is down : call function

  • Your logic says : if the array contains AValue then set every array value to 5. You need to compare curx,cury = AValue in a loop.

  • It is possible to do this with tilemap and array but you'll have to track everything in an array and know what you're doing. If you are making a player and storage inventory similar to that game then that will use an array.

  • I'm not familiar with using tilemaps in that way but I imagine if you are tracking the cell in an array, then the status is going to have to be also tracked as I'm not sure how else you would check if a tile was both a generator and switched on/off. As the game becomes more complex it seems like it would be difficult to handle as you are putting what would be the entire game into an array. My approach would be to use sprite objects with instance variables, and they add to a global variable for power.

  • The power grid system appears to be using variables and maths. Each generator object adds X amount of power, while other objects use X amount of power. Then you compare 2 totals, generated and used. If it's using more power than you are generating then it begins to deduct an amount from the battery.

  • Sounds like the player is a bullet? If you use platform behaviour then collisions are taken care of and you won't go through walls, you will collide with them. Instead of move forward you could use vector x to push the player left and right.

  • Depends what you want to happen in that scenario. If you want nothing to happen then I guess you do another check first, on button press, you can check if the player is overlapping another object 'at offset', so 25 pixels from where the player is currently. If this is true then don't do the roll. You can group all possible solid objects into a family to check against the one object type.

  • Hiya, I guess the player is always at the same angle which is what 'move forward' uses for direction, you are likely using mirrored/not mirrored for the animations. So you can say if looking right(not mirrored?) then move forward 25 pixels, if looking left(if mirrored), move forward -25 pixels. They would be sub events of the press button event.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you die you just restart the layout, you need to ask it to load from the slot same as when you are outside the layout.

  • Usually that only triggers if you're trying to find a path with a bunch of obstacles around the location. Although you are finding a path to a very small space, only 20 pixels out either side, it should still move there. It could possibly fail if the soldiers are solid or obstacles themselves..