Home   Help Search Login Register  

Author Topic: Change from OFP  (Read 999 times)

0 Members and 1 Guest are viewing this topic.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Change from OFP
« on: 29 May 2008, 04:21:04 »
How do I convert this so it will work in ArmA?

Code: [Select]
_unitarray= units group player
?("_x hasweapon {soandsoweapon}" count _unitarray)>0:goto "hasradio"
~1
goto "blah blah blah"

#hasradio
blah, blah, blah.

Cheers.  :D
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Change from OFP
« Reply #1 on: 29 May 2008, 04:48:46 »
ArmA no longer uses those wiggly brackets and quotes interchangably: wiggly bracket = code, quotation marks = string.

So:

Code: [Select]
?({_x hasweapon "soandsoweapon"} count _unitarray)>0:goto "hasradio"
Should work, unless there's something wrong in the count thing (those thingies always confuse the heck out of me)

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re: Change from OFP
« Reply #2 on: 29 May 2008, 16:28:40 »
Yeah, that did it. Cheers man.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."