Home   Help Search Login Register  

Author Topic: Counttype empty stuff  (Read 608 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
Counttype empty stuff
« on: 16 Jul 2004, 19:52:57 »
Code: [Select]

_objlist = _this select 0

_i = 0
#loop
_obj = _objlist select _i
?("tank" counttype [_obj] > 0) : hint "_obj is a tank";exit
_i = _i + 1
~0.5
?_i < count _objlist : goto "loop"


This little script checks all objects in the _objlist and when it's a tank, a hint is shown and the script exit.
How can I count empty vehicles with the counttype command?

I tried this :
Code: [Select]
...
?(("tank" counttype [_obj] > 0) && (count crew _obj == 0)) : hint "_obj is an empty tank";exit
...


Nope.  :-\
It doesn't count an empty tank as a tank in the first place!

Anybody a solution for this?   :(
Search or search or search before you ask.