So I need a function (parameters: origin x, origin y, destination x, destination y, object x1, object y1, object x2, object y2). The object in this case would be a wall with two points (x1, y1, x2, y2). The function needs to return a true/false if the wall intersects the path. As in, does it cross between the origin and destination. In other words, we have two finite lines (path of movement and wall), and I need to know if they cross.

How do I do that?

I program in basic (small basic) but I would rather if you wouldn't add code, just plain english.

Thanks in advance!

To determine if a wall intersects the path between the origin and destination, you can use the concept of line intersection. Here's an explanation of how you can achieve this:

1. Calculate the equations of the line segments for both the path (defined by the origin and destination coordinates) and the wall (defined by the object coordinates).

2. To determine the equation of a line segment, you can use the two-point form of a line equation. Given two points (x1, y1) and (x2, y2), the equation of the line passing through these points is:

(y - y1) = ((y2 - y1) / (x2 - x1)) * (x - x1)

Note that the slope of the line is given by (y2 - y1) / (x2 - x1).

3. Use this equation to identify the equation of the line segment for both the path and the wall.

4. Once you have the equation of the line segments, you can check if they intersect. To do this, compare the slopes of the two line segments.

- If the slopes are equal, the two lines are parallel and will not intersect.
- If the slopes are different, the lines may intersect. However, this condition is not sufficient to guarantee an intersection.

5. To confirm if the lines cross between the origin and destination, you need to consider the boundaries of the line segments. If there is an intersection, it must occur within the range of the line segment defined by the origin and destination points.

- Check if the x-coordinate and y-coordinate of the intersection point fall within the ranges of the origin and destination for both the path and the wall.

- If the intersection point satisfies these conditions, then the wall intersects the path. Return true.

- If there is no intersection or the intersection point lies outside the specified ranges, the wall does not intersect the path. Return false.

By following these steps, you can determine whether a given wall intersects the path between the origin and destination.