• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

[SOLVED]Help with hitboxes?

K

kaerpaenen

Guest
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?
 
K

kaerpaenen

Guest
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 by a moderator:
Top