GML
if( distance_to_object( bohater ) < 400 ) && ( !collision_line( x, y, bohater.x, bohater.y, sciana, 1, true ) )
{
// jest w zasięgu wzroku i nawet nie przez ścianę :>
}
EDIT:
A co do pierwszego posta
GML (CollisionLineExt)
// collision_line_ext( x poczatkowe, y poczatkowe, max odleglosc, kierunek, obiekt, precyzja, notme );
return collision_line( argument0, argument1, argument0 + lengthdir_x( argument2, argument3 ), argument1 + lengthdir_y( argument2, argument3 ), argument4, argument5, argument6 );