Home   Help Search Login Register  

Author Topic: Detect the type of vehicle  (Read 478 times)

0 Members and 2 Guests are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
Detect the type of vehicle
« on: 02 Dec 2003, 18:36:11 »
How can I detect type (car,plane,tank,helicopter...) of the player's vehicle :
In the com ref I found two commands :

- Typeof
- Counttype

AFAIK typeof returnes the classname of the object
Counttype count the object of a certain type "car, "plane"...

But how can use this in a chasescript. Every type needs a different kind of pursuit...

It goes like this :

Code: [Select]
_chaser = _this select 0
_chased = _this select 1

@_chased != vehicle _chased
#checktype
? vehicle _chased == ...."car" : goto "chasecar"
? vehicle _chased == ..."plane" goto "chaseplane"
...



I hope you understand...





 
« Last Edit: 02 Dec 2003, 18:37:20 by Blanco »
Search or search or search before you ask.

Harkonin

  • Guest
Re:Detect the type of vehicle
« Reply #1 on: 02 Dec 2003, 19:06:06 »
well a quick and dirty way would be make to make triggers with -

this && "typename" CountType ThisList > 0"; in the Condition and name it accordingly

Example if  you wanted "land" name it landtrig
if "Air" name it "airtrig
or "Tank" or "APC"  or "man" yada yada.....

then in your script do a check with

_list = list triggername