ArmA3.de

ArmA3.de - News, Mods, Addons und Missionen für ArmA3

Logo ArmA3.de
Montag, 19. Februar 2018
Downloads » ArmA3 Editing » Loadout get/set functions and Loadout Manager von aeroson (25.03.2014) [Skripte] Download-Infos
Loadout get/set functions and Loadout Manager von aeroson (25.03.2014) [Skripte]
26.03.2014 von miller

Loadout get/set functions and Loadout Manager

Info:
Nützliches Speichern und Laden von Ausrüstungen.

Author:
aeroson

Version:
25.03.2014

Benötigte Addons:
Keine

Weitere Infos:
BIS-Forum







Zitat

Summary / info
These scripts allows you set/get (load/save)all of the unit's gear, including:
- uniform
- vest
- backpack
- contents of backpacks
- all quiped items
- all three weapons with their attachments
- currently loaded magazines and number of ammo in magazines.

All this while preserving order of items.
Useful for saving/loading loadouts.
Ideal for revive scripts where you have to set exactly the same loadout to newly created unit.
Uses workaround with placeholders to add vest/backpack items, so items stay where you put them.

Why should i use it ?
Well i was sceptical at first as well, i was like hell i don't need to use 200 lines script if i can just write it with 20 lines. That's basically how i started. After days of testing and debuging i found out that Arma 3 is not perfect. And to make the loadout set/get functions work as expected i had to figure out many workarounds and spend much more time on this than i would expect. In the end it turns out to be this big but it does also works perfectly and exactly how you would expect it to work. If you are interested in the workarounds scroll to the bottom of this post. Also if you decide not to use this, i will most likely come to your thread and tell you all the bugs your loadout saving/loading code has (which you could have avoided by using this), by now i can tell it only by looking at the code.






Readme:
Keine



Changelog:

Zitat

fnc_get_loadout.sqf
v3.4
- Added: "repetitve" option flag, will not use selectWeapon, means no visible effect on solder, but will not save magazines of assigned items such as laser designator batteries
- Added: weapons magazines are now saved using the new magazinesAmmoFull command
v3.3
- Fixed: assigned items magazines are saved only if you can select it
v3.2
- Added: Saving magazines of assignedItems (laser designator)
- Fixed: Error when trying to add empty googles or headgear
v3.0
- Fixed: In dev branch, goggles and headgear are no longer part of assignedItems
v2.9
- Fixed: Backpacks in backpack are now saved
v2.8
- Minor fixes
v2.7
- Added: Option to save magazines ammo count
- Fixed: Gunlight is turned on again
v2.6
- Fixed: currentMuzzle returns 0 if your are passenger in some vehicles, this caused the script to crash on string comparison (you can't compare integer and string)
v2.5
- Minor fixes
v2.4
- Added: Saves currently selected firing mode
v2.3
- Edit: No need for it anymore Added: Saving currently loaded magazines is now optional, you can disable it. Good if you want to respawn with same loadout, so it doesn't reset your firing mode every 2 seconds.
v2.2
- Added: Saves currently loaded magazines, and currently selected weapon/muzzle
v2.1
- Added private statement to prevent inconsistencies

fnc_set_loadout.sqf
v4.2
- Fixed: Goggles and headgear are now removed before adding assigned items
v4.1
- Better vest/uniform placeholder filling (madbull)
v4.0
- Added: Loading magazines of assignedItems (laser designator)
- Fixed: Launchers ammo should not disappear anymore
v3.9
- Removed: pointless use of removeItemFromPrimaryWeapon
v3.8
- Minor fixes
v3.7
- Added: Option to load magazines ammo count
v3.6
- Minor fixes
v3.5
- Added: Loads saved firing mode.
v3.4
- Added: Loads saved loaded magazines and selects saved selected weapon/muzzle, backwards compatible
v3.3
- Fixed: Magazine for MXM ends with Mag but once you check for it in magazines player it ends with mag, this caused the script to waitUntil forever >_<
v3.2
- Fixed: Both weapons and glasses are now added to backpack
- Various tweaks and code cleanup by Nimrod
v3.1
- Added placeholder solution for vest as well, glasses are now properly added to backpack
v3.0
- Added waitUntils for uniform, vest and backpack, to make sure we have them before adding items
v2.9
- Added private statement to prevent inconsistencies
v2.8
- Removed micro sleeps and added waitUntils for magazines, to make sure that weapon's are added loaded under any circumstances
v2.7
- Fixed: Improved item type check, now it does properly recognize Binocular as weapon
v2.6
- Added: Now adds one magazine for each muzzle (UGL comes loaded)
v2.5
- Added: Micro sleep to fix spawn in underwear issues (thanks to sxp2high)
v2.4
- Added: Better item type check
- Fixed: Handgun attachments are now added
v2.3
- Fixed: Backpack items adding is now functional
- Added: You will switch to weapons if they do exists in following order: primary weapon, handgun, secondary weapon (launchers)
- Fixed: Default primary/secondary weapons are now removed even if you don't have them in loadout
- Fixed: No more error messages, due to non existing attachments

loadout_manager.sqf
v1.3
-
v1.2
-
v1.1
- Added: You can now load VAS saved loadouts both new and old
v1
- Initial release





Enthaltene Dateien:
loadout_fncs/fnc_set_loadout.sqf
loadout_fncs/fnc_get_loadout.sqf
loadout_manager.sqf
example mission




Tags
a3aeroson


Quelle: Bi-Foren
Download starten
Grösse 9,9 KB
Downloads 520
Datum 26.03.2014
Kommentare 0
Download empfehlen
Wertung ø 8,00
1 Stimme(n)

Downloadserver
beta.arma3.de
  Seitenanfang nach oben
 
Aktuelle News, Mods, Addons und Missionen für ArmA3
Seite in 0.01154 Sekunden generiert


Diese Website wurde mit PHPKIT WCMS erstellt
PHPKIT ist eine eingetragene Marke der mxbyte GbR © 2002-2012