KeyCat 131 Posted April 22, 2003 Using the nearestobject command to have the AI find some vehicles but wonder how I can test for <NULL-object> that is returned by nearestobject if nothing is found? Tried following with no luck... </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _obj = nearestobject [(getpos (leader _group)), "UAZ"] ? (_obj == <NULL-object>) : goto "seekmore" <span id='postcolor'> /Christer (a.k.a KeyCat) Share this post Link to post Share on other sites
Spinor 0 Posted April 22, 2003 Hi, try this </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_obj = nearestobject [(getpos (leader _group)), "UAZ"] ?(isNull _obj): goto "seekmore"<span id='postcolor'> Spinor Share this post Link to post Share on other sites
KeyCat 131 Posted April 23, 2003 Thanks a lot Spinor! Suspected it was simple and it was... Sometimes it's to easy to get stuck in a bad "brain loop" /Christer (a.k.a KeyCat) Share this post Link to post Share on other sites