OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Blanco on 16 Jul 2004, 19:52:57

Title: Counttype empty stuff
Post by: Blanco 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?   :(