Page 1 of 1

How do i give player weapon instead of using player Loadout!

Posted: Sat Sep 11, 2021 10:01 pm
by Luddeisbad
I want to know how to "delete" Player loadouts because i am trying to implement a buy menu for each game !

Re: How do i give player weapon instead of using player Loadout!

Posted: Sat Sep 11, 2021 10:44 pm
by Lovatto
First, you will have to modify bl_GunManager.cs to not equipped the weapons from the player class loadout,
check the Awake() and Start() function of that script.

To set a weapon to a specific slot you can call the function of bl_GunManager.cs -> ChangeTo(int AllWeaponsIndex);
where 'AllWeaponsIndex' is not the GunID (from GameData) but the index of the FPWeapon in the AllGuns list of bl_GunManager.

I hope this help,
Regards.

Re: How do i give player weapon instead of using player Loadout!

Posted: Sun Sep 12, 2021 12:28 am
by Luddeisbad
I do not understand i wrote the code and took the index "5" from the "all gun" and it should give me "Pistol1" but it dosen't! please help

Re: How do i give player weapon instead of using player Loadout!

Posted: Sun Sep 12, 2021 5:28 pm
by Lovatto
Show me your code modification and a screenshot of your player bl_GunManager inspector with the AllGuns list fold out.