hello...people

Right now i'm writing a simple strategy game about mech. but i'm having a problem for environtment detecting. I want to make the mech I'm controlling be able to be aware of the object around it wether it's a tree, a wall, or an enemy mech. I don't have the slightest idea for the syntax nor the algorithm for it, anybody can help me with this problem ??

PS : do you know the syntax in VB6 wich stands for the syntax GET in QBasic ??