tomturner 10 Posted May 26, 2013 (edited) Is anyone else having problems when used with the new arma3server.exe for Alpha Stable ? The saving of the loadouts and selection process seems very unstable after the 0.58 update. Of course, the dedicated arma3server.exe is very iffy at best so I'm not surprised at having problems with the GET/SET features. Everything works perfectly in MP when hosted and played on and by the same machine. But not if the machine runs it with the new dedicated server. Edited May 26, 2013 by tomturner Share this post Link to post Share on other sites
aeroson 8 Posted June 3, 2013 (edited) Updated / Fixed (sorry, took me a while) Was looking through Tonic's VAS, seems like he found a way to get currently loaded magazines. Improved it a bit and added into my scripts ^.^ This will make you respawn with same gear as well as same number of bullets in magazines you had when you died. waitUntil { !isNull player }; // Wait for player to initialize // Compile scripts getLoadout = compile preprocessFileLineNumbers 'fnc_get_loadout.sqf'; setLoadout = compile preprocessFileLineNumbers 'fnc_set_loadout.sqf'; // Save loadout (including ammo count) every 2 seconds [] spawn { while{true} do { if(alive player) then { loadout = [player,["ammo"]] call getLoadout; }; sleep 2; }; }; // Load saved loadout (including ammo count) on respawn player addEventHandler ["Respawn", { [player,loadout,["ammo"]] spawn setLoadout; } ]; Regarding the IRLaser, there is an action for it but it doesn't work. @tomturner No idea. set/get functions are (should be) executed locally, server shouldn't matter, but its Arma... fnc_get_loadout.sqf v2.7 - Added: Option to save magazines ammo count - Fixed: Gunlight is turned on again fnc_set_loadout.sqf v3.7 - Added: Option to load magazines ammo count Edited June 3, 2013 by aeroson Share this post Link to post Share on other sites
Guest Posted June 3, 2013 Updated versions frontpaged on the Armaholic homepage. Loadout get/set functions and Loadout manager [ALPHA] v2013-06-03 Share this post Link to post Share on other sites
mariodu62 5 Posted June 8, 2013 Hi, With the new version, il lost all in my backpack any idea why ?? Share this post Link to post Share on other sites
aeroson 8 Posted June 10, 2013 Updated / Fixed @Mariodu62: Thank you. While i was trying to reproduce the bug i found various little bugs and fixed them. Could you try the updated functions and if the bug remains give me more information (possibly add me on steam) ? fnc_get_loadout.sqf v2.8 fnc_set_loadout.sqf v3.8 just Minor fixes Share this post Link to post Share on other sites
Guest Posted June 10, 2013 Updated versions frontpaged on the Armaholic homepage. Loadout get/set functions and Loadout manager [ALPHA] v2013-06-10 ** All scripts are available in one package :) Share this post Link to post Share on other sites
mariodu62 5 Posted June 10, 2013 HI, thx, i will try this new version on our server. As i see for the first test, it looks like working but i need to do some more test. Share this post Link to post Share on other sites
banky 4 Posted June 12, 2013 I always use this script in my missions and I'm just wondering, since the script already runs constantly, would it be possible to squeeze in some code to set an actual respawn limit for the players instead of having to run it in a separate script? Share this post Link to post Share on other sites
Flo 1 Posted June 13, 2013 very cool !! update mirrored... :) Share this post Link to post Share on other sites
Janez 530 Posted June 13, 2013 Hi, great set of scripts but I have some questions. I set a custom loadout that units starts with at mission start. I set an ammobox with save and load actions and it works great. When you save a loadout, you respawn with it. But how can I respawn with loadout that I set prior to mission start without saving the loadout at ammobox? I used player addEventHandler ["Respawn", { [player,loadout] spawn setLoadout; } ]; to have the loadout you save at ammobox after respawn. If I use loadout = [player] call getLoadout; I respawn with default unit loadout not the one I set. Without this code I respawn in underwear. Is there any solution? Share this post Link to post Share on other sites
aeroson 8 Posted June 14, 2013 (edited) @Banky: Everything is possible, but it would then turn into clumsy limited respawns save/load loadout scripts. Which would defeat the purpose of being universal. You can edit it yourself and put everything into one script. If you want simple limited respawns replace: player addEventHandler ["Respawn", { [player,loadout] spawn setLoadout; } ]; with outOfRespawns = { systemChat "You have no respawns left"; hint "You have no respawns left"; hideObject player; player enableSimulation false; player setPos [0,0,9999]; player allowDamage false; while{ alive player && numberOfRespawnsLeft<=0 } do { [] exec 'camera.sqs'; sleep 1; }; }; if(isNil{playersOutOfRespawns}) then { playersOutOfRespawns = []; publicVariable "playersOutOfRespawns"; }; if((getPlayerUID player) in playersOutOfRespawns) then { numberOfRespawnsLeft = 0; [] spawn outOfRespawns; } else { numberOfRespawnsLeft = 5; // set your respawns count here }; player addEventHandler ["Respawn", { numberOfRespawnsLeft = numberOfRespawnsLeft - 1; if(numberOfRespawnsLeft>0) then { systemChat format["You have %1 respawn(s) left",numberOfRespawnsLeft]; hint format["You have %1 respawn(s) left",numberOfRespawnsLeft]; [player,loadout] spawn setLoadout; } else { if((getPlayerUID player) in playersOutOfRespawns) then { playersOutOfRespawns set[count playersOutOfRespawns, getPlayerUID player]; publicVariable "playersOutOfRespawns"; }; [] spawn outOfRespawns; }; } ]; Once you run out of respawns you go to camera mode, you can't cheat it by respawning or rejoining. @Janez: Instead of loadout = [player] call getLoadout; use this if(!isDedicated) then { [] spawn { waitUntil {!isNull player}; sleep 5; loadout = [player] call getLoadout; }; }; Edited June 14, 2013 by aeroson Share this post Link to post Share on other sites
banky 4 Posted June 14, 2013 Thanks a ton my friend! I figured there would be a way to put the respawn limit in there somewhere, but i wasn't brave enough to go messing around with it. Probably doesn't make a huge difference, i just like to keep the number of different scripts running at once as low as possible. Thanks again. Share this post Link to post Share on other sites
Janez 530 Posted June 16, 2013 @Janez: Instead of loadout = [player] call getLoadout; use this if(!isDedicated) then { [] spawn { waitUntil {!isNull player}; sleep 5; loadout = [player] call getLoadout; }; }; Thanks, works great. Share this post Link to post Share on other sites
elwood_ita 1 Posted June 16, 2013 Works very well, thanks a lot.:cool: Share this post Link to post Share on other sites
aeroson 8 Posted June 17, 2013 Updated / Fixed fnc_get_loadout.sqf v2.9 - Fixed: Backpacks in backpack are now saved example mission up to date Share this post Link to post Share on other sites
Karmichael 11 Posted June 17, 2013 Updated / Fixedfnc_get_loadout.sqf v2.9 - Fixed: Backpacks in backpack are now saved example mission up to date Thank you aero:yay: Share this post Link to post Share on other sites
vrcraptor 11 Posted June 17, 2013 (edited) fnc_set_loadout.sqf is having an issue with the latest dev build... line 133 :) -Raps edit: actually, you may want to load up the example mission, as it is showing errors too.. this all started after the last dev build this morning... we played last night without issue... :) Also, wanted to say... I absolutely love this set/get system you have... awesome >> trying to get somewhere... :D -Raps Here is a more detailed view... :) fnc_set_loadout.sqf, line 142 Error in expression < { if(_x!="") then { _target removeItemFromPrimaryWeapon _x }; } fo> Error position: <removeItemFromPrimaryWeapon _x }; } fo> Error Missing ; Edited June 17, 2013 by VRCRaptor Share this post Link to post Share on other sites
kadinx 12 Posted June 17, 2013 fnc_set_loadout.sqf is having an issue with the latest dev build... line 133:) -Raps edit: actually, you may want to load up the example mission, as it is showing errors too.. this all started after the last dev build this morning... we played last night without issue... :) Also, wanted to say... I absolutely love this set/get system you have... awesome >> trying to get somewhere... :D -Raps Here is a more detailed view... :) fnc_set_loadout.sqf, line 142 Error in expression < { if(_x!="") then { _target removeItemFromPrimaryWeapon _x }; } fo> Error position: <removeItemFromPrimaryWeapon _x }; } fo> Error Missing ; I am getting the above error with also a VAS error too Error in expression <s player) select 2 != "") then { player removeItemFromPrimaryWeapon ((primaryWea> Error position: <removeItemFromPrimaryWeapon ((primaryWea> Error Missing ; File C:\Users\NDK0\Documents\Arma 3 Alpha - Other Profiles\Kadin\mpmissions\HUNT_Begun_PH.Stratis\VAS\functions\fn_handleItem.sqf, line 254 Error in expression <s player) select 2 != "") then { player removeItemFromPrimaryWeapon ((primaryWea> Error position: <removeItemFromPrimaryWeapon ((primaryWea> Error Missing ; File C:\Users\NDK0\Documents\Arma 3 Alpha - Other Profiles\Kadin\mpmissions\HUNT_Begun_PH.Stratis\VAS\functions\fn_handleItem.sqf, line 254 Share this post Link to post Share on other sites
1para{god-father} 105 Posted June 17, 2013 removeItemFromPrimaryWeapon was renamed to: removePrimaryWeaponItem so you need to replace all of them ! Share this post Link to post Share on other sites
kadinx 12 Posted June 17, 2013 (edited) rgr that. Thanks Excellent...no more errors in either scripts. Much obliged, again :) Edited June 17, 2013 by KadinX Share this post Link to post Share on other sites
vrcraptor 11 Posted June 18, 2013 removeItemFromPrimaryWeapon was renamed to: removePrimaryWeaponItem so you need to replace all of them ! awesomeness... :) Share this post Link to post Share on other sites
aeroson 8 Posted June 18, 2013 (edited) Updated / Fixed Tested and works both in stable and dev. fnc_set_loadout.sqf v3.9 - Removed: Pointless use of removeItemFromPrimaryWeapon fnc_get_loadout.sqf v3.0 - Fixed: In dev branch, goggles and headgear are no longer part of assignedItems Edited June 18, 2013 by aeroson Share this post Link to post Share on other sites
Guest Posted June 20, 2013 Updated versions frontpaged on the Armaholic homepage. Loadout get/set functions and Loadout manager [ALPHA] v2013-06-18 ** all scripts + example mission combined in one archive. Share this post Link to post Share on other sites
mariodu62 5 Posted June 21, 2013 hi, With this new version sometime i respawn without no ammo in my RPG, sometime i loose my nades... any idea ? Share this post Link to post Share on other sites