Hi friends! I trying to port a game of mine from GMS to Gideros. I made a class for a stone. I will use a lot of that stone instances in a lot of levels. The stone will change the texture when the player collide with it. I will make a very simple collision detection using x, y, width, and height for the player and each stone instance. I already got it working by coding the collision for each stone instance (some WET). I would like to code the collision and the texture change inside the class definition but I do not know how to get the player position inside the stone class definition. Thanks in advance!
Comments
There is a heap of information about collision in there.
For simple 2d collision, bump.lua is fantastic. It detects and resolves collisions and you could just change your texture at resolution time.
If you have any code you would care to post I and others can have a look and see what else might work for you
Likes: uederson