Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Bot players cannot select weapons unlocked by progression #593

Closed
rierei opened this issue Jan 24, 2021 · 2 comments
Closed

[Bug] Bot players cannot select weapons unlocked by progression #593

rierei opened this issue Jan 24, 2021 · 2 comments
Labels

Comments

@rierei
Copy link

rierei commented Jan 24, 2021

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.

bot-unlocks-test.zip

@OrfeasZ
Copy link
Contributor

OrfeasZ commented Jan 29, 2021

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.

@OrfeasZ OrfeasZ added the bug label Jan 29, 2021
@rierei
Copy link
Author

rierei commented Jan 30, 2021

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.

@OrfeasZ OrfeasZ closed this as completed Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants