Jump to content
Sign in to follow this  
Deepsmeg

NearestObject

Recommended Posts

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

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

Yes I think because every man is defined as a vehicle. Though I guess you cant "get out" of yourself lol tounge_o.gif

Share this post


Link to post
Share on other sites

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×