Some weapons cannot be equipped using Player:SelectWeapon() on created bot players. I wrote a server script that, when someone send a message in the chat, will call the Player:SelectWeapon() method with every SoldierWeaponUnlockAsset available in the game on a created player bot and on the message sender player. This is what the output looks like:
TESTING BOT
OK Weapons/M16A4/U_M16A4_M320_SMK
FAIL Weapons/M39EBR/U_M39EBR
OK Weapons/M16A4/U_M16A4_M26_Slug
FAIL Weapons/FGM148/U_FGM148
OK Weapons/XP2_SCAR-L/U_SCAR-L_M26_Flechette
OK Weapons/G3A3/U_G3A3_M26_Frag
FAIL Weapons/PP2000/U_PP2000
FAIL Weapons/XP4_Crossbow_Prototype/U_Crossbow_Scoped_Cobra
FAIL Weapons/MagpulPDR/U_MagpulPDR
FAIL Weapons/P90/U_P90
FAIL Weapons/Gadgets/M26Mass/U_M26Mass_Frag
FAIL Weapons/Gadgets/M224/U_M224
...
TESTING PLAYER
OK Weapons/M16A4/U_M16A4_M320_SMK
OK Weapons/M39EBR/U_M39EBR
OK Weapons/M16A4/U_M16A4_M26_Slug
OK Weapons/FGM148/U_FGM148
OK Weapons/XP2_SCAR-L/U_SCAR-L_M26_Flechette
OK Weapons/G3A3/U_G3A3_M26_Frag
OK Weapons/PP2000/U_PP2000
OK Weapons/XP4_Crossbow_Prototype/U_Crossbow_Scoped_Cobra
OK Weapons/MagpulPDR/U_MagpulPDR
OK Weapons/P90/U_P90
OK Weapons/Gadgets/M26Mass/U_M26Mass_Frag
OK Weapons/Gadgets/M224/U_M224`
...
When the weapon was not equipped the FAIL message is shown. The bot created player is unable to equip most of the weapons, while the connected player have no problem to equip all of it.
I've pushed a possible fix for this with build 17494 but I'm unable to verify it works. You can give it a try by running VU with -updateBranch dev to get the latest update from the dev branch. Please verify it when you get a chance and let me know. This may also fix bots being able to do damage, but I'm not sure.
The Player:SelectWeapon() for player bots is now working properly on build 17494, as the testing script output shows:
TESTING BOT
OK Weapons/M16A4/U_M16A4_M320_SMK
OK Weapons/M39EBR/U_M39EBR
OK Weapons/M16A4/U_M16A4_M26_Slug
OK Weapons/FGM148/U_FGM148
OK Weapons/XP2_SCAR-L/U_SCAR-L_M26_Flechette
OK Weapons/G3A3/U_G3A3_M26_Frag
OK Weapons/PP2000/U_PP2000
OK Weapons/XP4_Crossbow_Prototype/U_Crossbow_Scoped_Cobra
OK Weapons/MagpulPDR/U_MagpulPDR
OK Weapons/P90/U_P90
OK Weapons/Gadgets/M26Mass/U_M26Mass_Frag
OK Weapons/Gadgets/M224/U_M224
...
Unfortunately bots still are unable to deal damage.
Some weapons cannot be equipped using
Player:SelectWeapon()
on created bot players. I wrote a server script that, when someone send a message in the chat, will call thePlayer:SelectWeapon()
method with everySoldierWeaponUnlockAsset
available in the game on a created player bot and on the message sender player. This is what the output looks like:When the weapon was not equipped the
FAIL
message is shown. The bot created player is unable to equip most of the weapons, while the connected player have no problem to equip all of it.bot-unlocks-test.zip
The text was updated successfully, but these errors were encountered: