lionz's Forum Posts

  • If you use your method but have a slightly larger non-solid sprite around the enemy object that you use for collision detection do they still drag?

  • martdsam nice! yeah pinning is a better way.

  • Do the enemies have to be solid?

  • To help you understand what's happening here with the logic. When you destroy the first yellow, because of your logic in event 2, it then moves one of the other yellows to the same position and because the explosion is still there it destroys it. Even though it looks like they are being destroyed in their positions, what's actually happening is the yellows are moving to the green sprite/ explosion position as each one is destroyed. I would set up the set yellow sprite to green sprite position a bit differently, not based on the animation but through pinning.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • imothep85 did you give it a go? or find a different method?

  • This is why I shouldn't answer posts before coffee, also I misread what was wanted, I don't even use that method at all. I normally use Pick overlapping object > jackhammer overlapping rock.imagepointx, rock.imagepointy.

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