Dr_Nomz
Member
I've always used this when checking if an enemy can see the player, but I don't really understand it.
Why does it need to be under 0 for the enemy to see the player? If it's over 0, would they see the player regardless of the walls in front of them?
Code:
if collision_line(x,y,obj_Character.x,obj_Character.y,obj_Wall,true,true) <0