Home   Help Search Login Register  

Author Topic: Does "player action []" interfere with "vehicle addaction []"?  (Read 1770 times)

0 Members and 1 Guest are viewing this topic.

Offline mr_book.PXS.Pvt

  • Members
  • *
Hi everyone,

so I'm working on this little script for ArmA II here. It adds actions to an ammobox and gives you the opportunity to take weapons and ammo the old OFP kind of way.

Because, IMHO, the ArmA ammobox menu might be some nice eye candy, but it's far away from being practical. I've seen it too many times now, people need minutes to get their favorite kit together. Baaah!

Anyway, here's what it basically looks like:

This is put into the init line of the ammobox:
take_mag = this addaction ["Take 30 Rnd Stanag", "takemagazine.sqs", ["30rnd_556x45_stanag"], 10, false, false]

takemagazine.sqs is nothing but:
_ammobox = _this select 0
_parameters = _this select 3
_magazine = _parameters select 0
player action ["takemagazine", _ammobox, _magazine]
exit

Not a big thing really. The problem is: I want what the B.I.S. Wiki calls "hideOnUse" (the 2nd "false" in the "addaction" line) to be deactivated, so the action menu stays opened and the action selected all the time. As you can imagine, I don't want to go through the whole list of actions again and again just to find that one particular magazine.

But I simply can't get it to work! The action menu gets closed and reset every time I confirm the action. Looks like the parameters after "priority" are being totally ignored or something. And it seems to be a problem with the "player action [so-and-so]" command, because if I use the "player addmagazine "so-and-so"" command instead, everything works fine!

But, for obvious reasons I want to avoid "addmagazine" at all cost, because I hate stuff that's created out of thin air, I want actual stuff from the box that's right in front of me!

Can it be done? Please help!

Thank you very much!

Torsten/mr_book