Home   Help Search Login Register  

Author Topic: Is this script possible  (Read 1143 times)

0 Members and 1 Guest are viewing this topic.

Offline KJAM

  • Contributing Member
  • **
  • Why Me, Whats it For?
    • Nightstalker mod
Is this script possible
« 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?

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Is this script possible
« Reply #1 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"
« Last Edit: 14 Jun 2007, 23:36:10 by Mandoble »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: Is this script possible
« Reply #2 on: 14 Jun 2007, 23:24:11 »
u forgot 2 put a #check in ur code :P

LCD OUT
« Last Edit: 14 Jun 2007, 23:24:57 by bedges »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta