Home   Help Search Login Register  

Author Topic: Transferring Magazines  (Read 1142 times)

0 Members and 1 Guest are viewing this topic.

Offline Canukausiuka

  • Members
  • *
  • Iuka hate clean!
Transferring Magazines
« on: 18 Oct 2005, 05:43:31 »
I'm having trouble with a script I'm trying to get working.  It is supposed to give an empty vehicle all the weapons and ammunition that a soldier has, so that when the soldier gets in, he can still fire his weapons (as opposed to a pre-existing weapon).  However, so far all I can come up with is reading the magazines the guy holds (magazines _unit), and then using addMagazine to give the vehicles the right amount.  But if the guy has fired some, he gets a full magazine back!

I know that there is an "action" command for dropping and taking magazines.  Does anyone have any more information about that command and how to use it?
(Former) I44 Coder / Scripter / Voice Actor

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Transferring Magazines
« Reply #1 on: 18 Oct 2005, 15:58:14 »
Try here for a list of working action commands.


Planck
I know a little about a lot, and a lot about a little.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Transferring Magazines
« Reply #2 on: 19 Oct 2005, 20:22:08 »
I have a horrible feeling there is not much you can do about part-used mags.
Plenty of reviewed ArmA missions for you to play

Offline Canukausiuka

  • Members
  • *
  • Iuka hate clean!
Re:Transferring Magazines
« Reply #3 on: 20 Oct 2005, 00:13:03 »
Well, I know you can force a unit to drop a magazine, using an action.  What I want is to force them to drop their magazines, then force something else to pick them up.  Seems to me that if that works, we should be able to transfer all the ammunition intact.  The trick is, how exactly to do it.  Of course, it may not be possible (which would explain why I'm having trouble with it)  ::)
(Former) I44 Coder / Scripter / Voice Actor

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:Transferring Magazines
« Reply #4 on: 20 Oct 2005, 00:34:16 »
bedges was having the same problem IIRC, and it was decieded there really wasn't any solution...
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Transferring Magazines
« Reply #5 on: 20 Oct 2005, 09:55:45 »
Quote
Seems to me that if that works, we should be able to transfer all the ammunition intact.  
Yes that's the problem:  transferring a magazine is no problem, but the information as to how many rounds have been fired is lost.  When its picked up its always full.    At least that is my suspicion.
Plenty of reviewed ArmA missions for you to play

Kyle Sarnik

  • Guest
Re:Transferring Magazines
« Reply #6 on: 29 Nov 2005, 00:34:16 »
Force a unit to drop weapons into vehicles:

Code: [Select]
{unit action ["DROP WEAPON",vehicle,0,0,_X]} foreach (weapons unit)
{unit action ["DROP MAGAZINE",vehicle,0,0,_X]} foreach (magazines unit)

It will work at any distance from the vehicle, but it will also cause the unit to play the "Put" animation.