S
stepup2000
Guest
is there anyway you could use a collision line going in the same direction your enemy is facing? lets say you use a collision line as a detector for your enemy to check if he sees you or not. i dont have extremely much experience with gml yet but i tried this:
//step event
image_angle = direction
if collision_line(x, y, direction, direction, obj_player, false, false) {
room_restart()
}
it doesnt seem to work tho. the collion line is always aimed towards the top left corner and will never change direction even when the object changes direction
//step event
image_angle = direction
if collision_line(x, y, direction, direction, obj_player, false, false) {
room_restart()
}
it doesnt seem to work tho. the collion line is always aimed towards the top left corner and will never change direction even when the object changes direction