Image bm125.GIF Item in front of Peter
Peter
 
The item in front of Peter element represents an item on a square in front of Peter. As a square in front of Peter a square is considered that is located at a distance of one step from Peter in the direction of his orientation. By redefining the Peter sprite the number of orientations can be raised to 8, thus making the squares in the diagonal direction accessible, too.
 
The element of the item in front of Peter can be treated as a normal logic variable of an item. By using it in a term containing items the contents of the square in front of Peter can be tested. If the square in front of Peter is situated outside the sheet, the item of the sheet border is returned. By using it as a command the item on the square in front of Peter can be adjusted. In case a preceding command to shift to a specified coordinate has been given Peter will first finish the shift before the item change can be achieved.

Full Html Context Help of The Peter - Gemtree Software & Children Programming