*[Solved]* How do I check a position 32 pixels away

0 favourites
  • 7 posts
From the Asset Store
Vintage steam pixels for your UI! 125 unique assets in a single pack!
  • I'm having a bit of trouble on how to add the following to my event sheet:

    When the right arrow key is pressed

    check if the area 32 pixels to the right of the player is empty and doesn't have a 32x32 sprite from the 'NoGo' family

    > if that area is clear then move the player (32x32 sprite) 32 pixels to the right.

    basically everything is top-down 32x32 px and the player 'jump-moves' in 32 px increments from square to square but i don't want him moving to a square that has something there. I did something similar in GameMaker (

    ) and I'm trying to do the same thing here.

    Any help would be appreciated.

  • Is overlapping another object

    Is overlapping at offset

    True if any instance is overlapping any instance of another object. The collision polygons are taken in to account if set, as well as the object's size and rotation. The 'offset' variant will test for an overlap at an offset from the first object. For example, testing for an overlap at an offset of (100, 0) will temporarily move the object to the right 100 pixels, test for the overlap, then move it back again.

  • Thanks granpa.

    How to I check an offset of an imagepoint?

  • Thanks granpa.

    How to I check an offset of an imagepoint?

    What exactly are your trying to do , is this related to last question or a different check ?

  • It was related to the last question but it's OK. I created a 'location' sprite that moves ahead of the character to check if there's anything there and now it works fine. Thanks for your help though.

  • No problem , think of overlap offset as similar to place_free or place_empty in gamemaker .

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, that's what I was looking for but I was having trouble with the offset so I created a locator sprite which did the job.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)