Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Exactly.  It's pretty rare that you are checking a collision at your exact position, so the argument passed in is usually your position + an offset.  But more importantly is that we are combining this with bbox_ variables.  Since bbox is also a variable that is always "relative" to the x position of the calling object, combining it with the offset gives us final range of tiles that needs to be checked for collision.

(+1)

Cheers! I think what confused me was the conversion of the script into the 2.3+ format. I replaced argument0 and argument1 in the function declaration with x and y (as that's what you had in the @param comments) and that changed the x and y already in the script to be script variables instead of instance variables (and thus, would always result in zero for the aforementioned calculations). All good now!