lionz's Forum Posts

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

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

  • Not sure on this one, logic seems fine. Right click doesn't seem to interfere with anything. Check that the soldiers are definitely 'selected' I suppose, that the selection box logic has worked. There might also be a small chance the green selection object isn't hooked up correctly, so it's visible but that soldier is not actually selected, you can check the boolean in debug mode for each soldier.

  • Logic seems fine, except the for each is kind of redundant. Post a screenshot of the new events.

  • If it's working as intended then that's good, we'll say resolved :P

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Move along path is done a little differently. You have find path for soldiers, keep that the same, then in a different event you have soldier on path found > move along path.

  • Tile movement behaviour is disabled?

  • There are several ways to do it I guess but a simple one would be to toggle a variable. In the FloorDraw function but outside of the for each loop, set a variable to 1. Then at the bottom you have your for each loop to run when variable=1. At the end of the for each loop you set the variable back to 0 so it runs once.

    Also your nested loop seems a bit wrong there, it will run both loops for each instance in turn, so you probably need to separate those out and have them run in order, not sure of its purpose though so couldn't say 100%.