すいません、GML初心者です。

if relative position (4,0) is collision free for Only solid objects
 move relative to position (4,0)
else

 if relative position (4,-8) is collision free for Only solid objects

 move relative to position (4,-8)

 move in direction 270 at most 8 till a contact with solid objects

と、ある場合GMLで記述するにはどうすれば良いのでしょうか。教えてください。