[SOLVED]Help with hitboxes?

kaerpaenen

Member
I have a problem with hitboxes and such, but it's hard to explain so I'll let this badly described image speak for itself:
problem.PNG
So basically, the problem is that when you are on that "ledge" it's okay to break the bushes and read the sign, but when you are off the ledge, I want to prevent that from happening. Is there any way to accomplish this without just repositioning the objects so they are further from the edge?
 

kaerpaenen

Member
I think I got it, I just have to use collision_line, can't experiment right now, but I'll post my solution here for anyone else who needs it!
So here's my solution:
Code:
!collision_line(obj_slime.x,obj_slime.y,x,y,obj_hitbox_env,false,false)
obj_slime is the player, obj_hitbox_env is the hitbox between player and the sign/bush.
 
Last edited:
Top