Deepsmeg 0 Posted May 28, 2005 Evening. Is there any way to detect whether an object that NearestObject has found is a map object or a unit. Pretty much, I want to be able to distinguish between a tree and a man, but not have a list of every type of tree and a list of every type of man. What I have is a particle that is moving around and damaging the nearest unit to it, by using NearestObject. The problem is that this is killing trees, buildings, bridges, ANYTHING. This is a very bad thing. Any ideas? Share this post Link to post Share on other sites
ProfTournesol 956 Posted May 29, 2005 You can try a condition like : _Tgt = NearestObject _particle ?(_Tgt == driver _Tgt) : _Tgt setdamage 0.5 Cause i don't think trees can be recognized as driver... Share this post Link to post Share on other sites
Deepsmeg 0 Posted May 29, 2005 But would a man be his own driver? Share this post Link to post Share on other sites
Rommel 2 Posted May 29, 2005 Yes I think because every man is defined as a vehicle. Though I guess you cant "get out" of yourself lol Share this post Link to post Share on other sites
Deepsmeg 0 Posted May 29, 2005 It'd be interesting if you could... 2 Driver get in man 12 o'clock! 2 Disembark! Bobby Bruning (Alpha Black 2) was killed (disembodied) Share this post Link to post Share on other sites
Guest [B.B.S.] T_D Posted May 29, 2005 or you do it like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?"man" countType [_nearestObject] > 0: _nearestobject setdamage 1 Share this post Link to post Share on other sites