OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: KJAM on 14 Jun 2007, 22:36:00

Title: Is this script possible
Post by: KJAM on 14 Jun 2007, 22:36:00
 I was thinking of something for a mission I'm planning, is it possible to make a script that makes a unit as setcaptive when the unit has no weapon and then if the unit picks up any weapon, it disables the set captive?
Title: Re: Is this script possible
Post by: Mandoble on 14 Jun 2007, 22:56:55
Code: [Select]
;captive.sqs
_unit = _this select 0
#check_of_lcd
@(count weapons _unit) == 0
_unit setCaptive true
@(count weapons _unit) > 0
_unit setCaptive false
goto "check_of_lcd"
Title: Re: Is this script possible
Post by: LCD on 14 Jun 2007, 23:24:11
u forgot 2 put a #check in ur code :P

LCD OUT