Jump to content
Sign in to follow this  
wamingo

Deprecate Cargo scripting commands + more

Recommended Posts

There are currently 25 commands directly related to adding & removing weapons and magazines.

If Cargo and Unit container types were "merged", then, with a bit of clever overloading (think C++ overloading), and some new parameters, you could bring that number to about 10, less than half.

However, container-keywords for: Backpacks, Turrets and Weapon Pool, will also be required.

There may be technical differences between Cargo and Unit containers, but as far as I can tell no object has or at least, needs, both. If they ever do, a new keyword could be created for that purpose.

One downside is that some code would be less verbose. The designers may have to use the variable name to identify object types: eg Man vs Vehicle.

Another downside is, that it probably wouldn't be backwards compatible (not with the commands suggested).

So, if people want it, arma 3 would be the ideal time to get it done, and now would be the time to ask for it. Not after the fact.

The commands would then be (7 new, 4 improved):

  addWeapon + Local
 addMagazine + Local
 removeWeapon + Local
 removeMagazine + Local
 removeAllWeapons + Local

 vehicleTurret    (returns vehicle's turret given turret path)
 gearPool         (returns weapon pool)
 unitBackpack

Deprecated commands (20):

removeMagazines,
addWeaponCargo, addWeaponCargoGlobal, clearWeaponCargo, clearWeaponCargoGlobal,
addMagazineCargo, addMagazineCargoGlobal, clearMagazineCargo, clearMagazineCargoGlobal,
addMagazineTurret, removeMagazineTurret, removeMagazinesTurret,
addBackpack, removeBackpack, addBackpackCargo, clearBackpackCargoGlobal,
addWeaponPool, clearWeaponPool, addMagazinePool, clearMagazinePool

Examples of new commands and parameter syntax:

add:
 1 mag of type      _any addMagazine "class"
 x of type          _any addMagazine ["class", _count]
 multiple params    _any addMagazine ["class", _count, "class", _count ...]

 a backpack         _any addWeapon "backpack_class"
 to backpack        unitBackpack _any addMagazine ...

 to turret          vehicleTurret _vehicle [turret_path] addMagazine ... //suggested syntax

 to weapon pool     gearPool addMagazine ...

Remove:
1 mag                   _any removeMagazine "class"
X mags of type          _any removeMagazine ["class", _count]
All mags of type        _any removeMagazine ["class", 0]
All mags of Any type    _any removeMagazine [0]

Note that I decided on LOCAL versions rather than Global ones. I think this would be prefered.

I would have put this on the CIT, but I'm a liiittle tired of not getting any feedback.

discuss

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×