Doing custom loadouts, the easy way with @fhq_debug - 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: Doing custom loadouts, the easy way with @fhq_debug (/showthread.php?tid=2487) |
Re: Doing custom loadouts, the easy way with @fhq_debug - Outlawz7 - 08-18-2014 Actually, I did add something of my own at the end of the loadouts in that particular mission: Code: private ["_unit", "_backpack"]; Could that wreck it? Re: Doing custom loadouts, the easy way with @fhq_debug - Alwarren - 08-18-2014 (08-18-2014, 08:20 PM)Outlawz7 link Wrote: Could that wreck it? No, I really couldn't think of a reason why it would. Re: Doing custom loadouts, the easy way with @fhq_debug - Varanon - 08-18-2014 Did you call these scripts on the machine that the unit is local to ? The problem might be locality, since it works in single player... You must call the loadout scripts on the machine the object is local to (and only those), otherwise, it won't work. Re: Doing custom loadouts, the easy way with @fhq_debug - alias - 08-18-2014 There is a way to deal with ammo also loadout via fhq_debug? Re: Doing custom loadouts, the easy way with @fhq_debug - Varanon - 08-19-2014 (08-18-2014, 10:32 PM)alias link Wrote: There is a way to deal with ammo also loadout via fhq_debug? There is a button in FHQ DebugConsole that will save a script that will restore the inventory of the units as it was when the button was pressed. I've included another function to edit the loadout, but it's limited. You can also use Arsenal and once done, use the function to create the script. The resulting script is better than arsenal, since the latter just assumes that the loadout should be added to player Re: Doing custom loadouts, the easy way with @fhq_debug - alias - 08-19-2014 I've tested the script and loadout system, bu at that time i didn't find a way to change magazines to replace for instance normal magazines with tracers. Re: Doing custom loadouts, the easy way with @fhq_debug - Varanon - 08-19-2014 (08-19-2014, 12:57 PM)alias link Wrote: I've tested the script and loadout system, bu at that time i didn't find a way to change magazines to replace for instance normal magazines with tracers. I don't know what you mean ? The console can only save the loadout, or you can modify it (ammo isn't handled by the console's customization). You can modify the scripts after you pasted them from clipboard, to replace the magazines with tracers. Apart from that, you can use Arsenal to do that as well, and save afterwards with the console. I guess I'll add a shortcut to Arsenal into the console, too Re: Doing custom loadouts, the easy way with @fhq_debug - Outlawz7 - 08-19-2014 (08-18-2014, 09:36 PM)Varanon link Wrote: Did you call these scripts on the machine that the unit is local to ? [this, "loadout.sqf"] call OTL7_fnc_safeAddLoadout; in each unit's init field. Also I exported a loadout from Arsenal and added it the same way and it didn't seem to have issues in dedicated (aside from one mag less in inventory as they were loaded into their weapons), then again I didn't have issues with loadouts exported from FHQ debug until now, either. Re: Doing custom loadouts, the easy way with @fhq_debug - alias - 08-19-2014 The loadout script works fine. I have no problems on test, when hosting, but on dedicated if i try to pick up a weapon (NATO SF for instance) the game crashes. This is what i use in the unit init: Code: this call compile preprocessFileLineNumbers "Scripts\fia_at.sqf"; Where fia_at.sqf is the script generated in FHQ debug. Re: Doing custom loadouts, the easy way with @fhq_debug - Varanon - 08-19-2014 (08-19-2014, 05:20 PM)alias link Wrote: I have no problems on test, when hosting, but on dedicated if i try to pick up a weapon (NATO SF for instance) the game crashes. I had that problem in Choplifter: If I picked up a weapon, I'd crash. Turns out that I had two pistols so the script was running too often. What you should do is only run the script when the unit is local to the machine. Use Alwarren's safeAddLoadout function here Re: Doing custom loadouts, the easy way with @fhq_debug - alias - 08-19-2014 Thanks , i''ll give it a try! Re: Doing custom loadouts, the easy way with @fhq_debug - Lightspeed - 06-07-2015 Can someone plz explain. If loading the units loadouts using the script created by debug console placed in the init file of each unit Then What is the purpose of the safe_addloadout function? Re: Doing custom loadouts, the easy way with @fhq_debug - Alwarren - 06-07-2015 (06-07-2015, 01:54 PM)Lightspeed link Wrote: Can someone plz explain. Scripts can be executed multiple times. For example, the init field of units is executed every time a player JIP's. And unless you take precautions, the init.sqf will run the same every time a player JIP's. That basically means that every time a player JIP's, you run the loadout script again. FHQ_fnc_safeAddLoadout only ensures that the script runs once. Thus, it will never overwrite a loadout on JIP. Re: Doing custom loadouts, the easy way with @fhq_debug - Lightspeed - 06-07-2015 ok now i understand. thanks. |