lionz's Forum Posts

  • You can use jackhammer is overlapping at offset rock > offset x is jackhammer.imagepointx, offset y is jackhammer.imagepointy

  • If they are on the same layer then look at Z order : https://www.scirra.com/manual/157/z-order-bar

  • You probably want the condition:

    Is on-screen

    True if any part of the object's bounding box is within the screen area. This is not affected by the object's visibility or opacity.

  • Have you tried it? Seems like you already know what you're doing.

  • Yes, look at layers... https://www.scirra.com/manual/85/layers

  • heyguy np

    MatheusCastellar sorry, debug masterer. You put more effort in with a screenshot though

  • Because of the way you've set this up it's always picking the closest movement square on screen to the player regardless of which enemy it's next to. You'll have to do some checks for each enemy pick the closest movement square to the enemy that is also the closest to the player.

  • Mmmm I like this answer.

  • Yeah similar thing, the important factor is it's only possible to move to one of the 8 squares surrounding you, that's what I wanted to confirm. There's a few ways to do it I guess but I setup this kind of detection for when I had to stamp down rides in a roller coaster tycoon type thing. I had the centre object have a square attached that is slightly bigger than the square it is on. This then overlaps the 8 surrounding squares slightly. Then you put in events to say that the squares it is overlapping are 'clickable', you could change the opacity of the clickable squares for debug purposes to see what is clickable. Then you have a check for when clickable square is clicked, move player to here. That should just work. You'd obviously have to put in some checks so that the middle square cannot be accepted too and fix some other minor bugs around it during gameplay.

  • if it's player health then use a global variable, that way it is just consistent across the game. If it's any other health such as enemy HP then you're unlikely to need it between layouts.

  • What do you mean, so you are in the middle of a 3x3 grid and you can only move to one of the 8 squares around you at a time and to do this you click on it then you move to that square?

  • You can use image points for this but the origin image point which comes with the original object is in the centre, so it should be in the centre already when you set the position to the square?

  • event 37 should be obj_floor1 instead of obj_floor2

  • Whichever layer is global, you just add it to each layout you want it to appear in.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Probably use line of sight to detect if player is in range of enemy. Then they seem to move when you move so have so have them move towards the player by a certain number of pixels on player movement. You'll need loads of detection though for what spaces are free on the level to move to, you could have a detection sprite around each charac to check for overlaps with walls and then pick a free square to move to each time. The enemies move in exactly the same way as the player right? So once you have the player moving as you want, it would just be the same movement. Also check for if player is colliding with enemy then once this happens you can enable the sub-battle system.