Closed Webman97 closed 7 years ago
Gear setup is what goes in the inventory, my diver thing is just for clothing: https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/blob/dev/client/functions/getDefaultClothing.sqf
Ahh. So you didn't extend the diver variable for gear? I'm trying to add gear to the Assault Diver role and end up breaking everything in the process.
For example:
case (["_diver_", typeOf _player] call fn_findString != -1):
{
//Add Underwater Rifle and two 20Rnd Mags
_player addWeapon "arifle_SDAR_F"'
_player addMagazine "20Rnd_556x45_UW_mag";
_player addMagazine "20Rnd_556x45_UW_mag";
//Diver Items
_player addVest "Vest_V_RebreatherB";
}
That breaks the entire file.
What needs to be changed to allow divers to spawn with gear?
You do not add the vest in playerSetupGear. In fact, you do not need to add rebreathers, because divers already spawn with rebreathers, as defined in getDefaultClothing.
You do not add the weapon first, you need to add the magazine first, and then the weapon, so that the magazine is auto-loaded.
Your code is correct but has syntax errors. Please start the game with -showScriptErrors
Wow, just noticed many things at once. Easy syntax problems, got that.
So you excluded the diver role because there isn't any special gear you want to give the diver?
"Why is X missing" - usually because it's not been ever brought up before.
I got everything I needed to work working, thank you!
I figured it had been brought up before because your last update to this file states:
Re-added NVGs, added custom loadouts for all classes
The Assault Diver is missing a case, therefore assuming that note is true, you would have excluded the case on purpose because there was nothing to add to the Assault Diver role.
Nothing else to really note outside of the obvious:
case (["_diver_", typeOf _player] call fn_findString != -1):
{
//Add diver items here (Keep getDefaultClothing.sqf in mind, I broke the entire file by adding a Slash Bandolier after the backpack and trying to remove it here.)
};
It's easy to add this manually if someone wishes to add it. Thanks for the help!
https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/blob/dev/client/functions/playerSetupGear.sqf
The switch statement does not have a case for the Assault Diver role. Calling diver and assaultdiver doesn't work. What is the variable for the Diver? Why isn't there a case for the Assault Diver role?
I'm aware that other servers have this function working, and I see them calling diver. However, it seems that they had to redefine the role of Assault Diver.