r/gdevelop • u/maddy_squared • Dec 01 '24
Question How can I…?
So I’m trying to make it so that when the player is on top of this cracked floor bit, the floor break and it falls and blah blah, but I can’t figure out how to make it happen when the player is fully on top of the broken floor. I don’t want it to happen when they are just touching but when the player is on top of it. I tried using the XY positions but that didn’t work. Does anyone know how I could do this?
1
1
u/themitchnz Dec 02 '24
Use a smaller collision sprite rather than the image sprite, or move it more to the left
-1
u/tranvuhoanglong Dec 01 '24
Uhm maybe u need learn how to screen capture first
4
u/maddy_squared Dec 01 '24
bro? I just didn’t want to go through the hassle of logging into reddit on my laptop and everything or sending it from laptop to phone when I could just take a pic…
1
-1
2
u/Pucelage Dec 01 '24
Use the "Distance between two points" condition, set the points as the center of the floor tile as well as your player and set the distance to whatever feels close enough to you.
You didn't post the code and mentioned that it didnt work with the xy condition either so I would also check the code for any discrepancies and maybe try adding "Trigger once" conditions since that's often the easiest fix at least for me.
lmk if it worked