FullCup
Member
I'd like to put an instance of an object into a "collidable group" in some cases. For example:
If the player collides with a "water coin" INSIDE the water, he CAN collect it (just an example).
My first thought was to change the parent just before the collision check and then return to the original.
But... I can't change the parent, there's another way?
If the player collides with a "water coin" INSIDE the water, he CAN collect it (just an example).
My first thought was to change the parent just before the collision check and then return to the original.
GML:
//Set the collidables
with (obj_water_coin) {if (in_water) object_set_parent(obj_collidable);}
//Collision
if place_meeting(x,y,obj_collidable) {...
//Normal state
with (obj_water_coin) {object_set_parent(main_parent);}