ACE Loadouts - Printable Version +- Comrades in Arms Discussion Board (http://forum.ciahome.net) +-- Forum: Comrades in Arms Life (http://forum.ciahome.net/forumdisplay.php?fid=3) +--- Forum: Mission Making (http://forum.ciahome.net/forumdisplay.php?fid=8) +--- Thread: ACE Loadouts (/showthread.php?tid=3639) |
ACE Loadouts - Alwarren - 08-26-2017 I thought this might be useful for mission makers. It's a small script function that can be used to add a diversity of ACE specific stuff to players. It makes sure that ACE is loaded, and that multiple invocations (for example through JIP) don't mess things up. Invocation is simple, just add the following to the init field: Code: [this, [<list of classes>]] call FHQ_fnc_aceLoadout; The list of classes can be one of "default", "maptools", "sapper", "sniper", "spotter", "vector" and "vectorday". "default" adds Fulton and ear plugs "maptools" adds map tools (doh) "sapper" adds clacker "sniper" adds a rangecard "spotter" adds a rangecard and a spotting scope "vector" and "vectorday" add a vector with or without night vision, respectively. Example: Code: [this, ["default", "sniper", "vector"]] call FHQ_fnc_aceLoadout; will add the Fulton, Earplugs, a range card and a vector 21 Nite to the inventory if ACE is loaded. The function can be stacked, i.e. the above could be done as Code: [this, "default"] call FHQ_fnc_aceLoadout; Can also be called later in the game, and as you can see in the first line, you can omit the array if you only want a single class loadout to be added. Anyway, here's the code Code: /* RE: ACE Loadouts - CptTobi - 12-14-2017 Does this script still works for Arma 3? Tried to implement it to a mission, but I don´t get it working ... Placed this at the soldiers INIT Line (Eden Editor) Code: [this, ["default", "sniper", "vector"]] call FHQ_fnc_aceLoadout; Created a script with the code mentioned by Alwarren and named the script Code: FHQ_fnc_aceLoadout.sqf Mission tested, but I don´t find any of the equipment in the soldiers inventory. What did I messed up? Any ideas to solve? Thx guys! RE: ACE Loadouts - Varanon - 12-16-2017 The code snippet Alwarren posted is assuming that you have the script in a function library. To use it directly, try this: You already put it into a file FHQ_fnc_aceLoadout.sqf. So all you need to do is call it like this: Code: [this, ["default", "sniper", "vector"]] call compile preprocessFileLineNumbers "FHQ_fnc_aceLoadout.sqf"; |