Jump to content
Sign in to follow this  
STiT

Counting men...

Recommended Posts

Please, I need help!

I want to make a script that detects if a man (regardless which side he's on, which units he is, ...) get close to a certain object!

Can somebody help me?

Also, I already thought about using a trigger, but I need this script for a addons, therefore I shouldn't use triggers, just outside scripts! If somebody figures out something, let me know! I've spent the whole last night... sad_o.gif

If I wasn't clear enough, I'll explain again. I'm sorry, english is not my native language and I still have to learn some about it!

Thanks everybody in advance!

Share this post


Link to post
Share on other sites

Well, you could try the nearestObject way, but I advice you not to use it in long-lasting loops for cause of performance.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_nO = nearestObject[_unit,""]

? ((_nO countType "Man") > 0) : hint ("_nO is a man of side" + (side _nO))

Share this post


Link to post
Share on other sites

I've already tried the NearestObject, but that way I would have to define the unit type!

I'll try what you said, anyway. Thanks a lot! smile_o.gif

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  

×