OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Silencer on 09 Jan 2005, 21:11:04
-
I want this in my script:
? (Unittype = air) : goto "AIR"
goto "GROUND"
How can i detect if the unit is a chopper or plane and not a jeep or truck?
-
How exactly are you running your script??
Anyway, here's simple example:
_unit = this select 0
? "Air" countType [_unit] > 0: goto "air"
goto "ground"
-
Thank you very much! :-*
-
mmm it is not working :(
I am running one script on different vehicles.
If the vehicle is a ground vehicle than the script must go to "GROUND"
If the vehicle is an air vehicle than the script must go to "AIR"
So I want something like this, but working:
? ( _Vehicle = air ): goto "AIR"
goto "GROUND"
-
That example of mine does just what you ask...
And it works...
That example should be executed like this:
[vehiclename] exec "blah.sqs"...
Here's an example just for debugging so you see that it works:
_vehicle = _this select 0
; check if vehicle is in base class "Air", if so, goto label #air
? ("Air" countType [_vehicle]) > 0: goto "air"
; if not, goto label #ground
goto "ground"
#air
hint "air"
exit
#ground
hint "ground"
exit
-
Thanks again :-*