Oh dear oh dear oh dear.
First, its "Dagobah" not "Daegoba". Secondly, its "Obi Wan" not "Obee Wan". Thirdly, "Obee Wan" did not live on "Daegoba" (sic). He lived on Tatooine. Fourthly, you have posted what is known as a "give me da codez!" message. This is the height of newbness I'm afraid. Even if someone were kind enough to give you "da codez" it is unlikely that code would work in your game (variables won't be the same, etc.) Essentially, you should try and think of a solution to the problems you have outlined above yourself. This is the way that you will learn. If your solution does not work, then you should include the code in your post and then people can help you by commenting on it.
Lets take the first of your problems to illustrate how you might go about solving it. Your object in question probably has a viewing range which it can see. Presumably it can also only see what is immediately in front of it and a specified angle to the right and left of that - the viewing frustrum. Now then, what you need is some code that tells you whether or not the player falls within that viewing frustrum. If the player does, then you might activate a variable for the object to "alert it". For example: if player_in_object_frustrum() = 1 then object_alert = 1
If your game is effectively 2d then finding out whether the player is in the object's viewing frustrum can be solved using trigonometry.
etc. etc.
Philip
What do you mean, bears aren't supposed to wear hats and a tie? P1.3ghz / 384 megs / GeForce MX 5200 128meg / WinXP home