.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Bug Reports (http://forums.bots-united.com/forumdisplay.php?f=49)
-   -   Bots don't switch to given weapon after stripping (http://forums.bots-united.com/showthread.php?t=6857)

AlicanC 20-07-2008 20:11

Bots don't switch to given weapon after stripping
 
I am working on a mod which players can strip eachother's weapons. It strips all weapons and gives a knife but bots doesn't use the given knife.

KWo 21-07-2008 09:02

Re: Bots don't switch to given weapon after stripping
 
So - if they are not using weapons (since You were stripped them from the bots) - what is the weapon they are using then?
How the hell they should know they don't have any weapon (since they believe they switched to - for example - ak47 and they didn't drop it)?
Another thing - whenever You want to post a bug, You have to write the exact version number of the bot You are using. Since the new beta is available every few days, saying something like "the latest version" would tell me nothing...

AlicanC 21-07-2008 12:16

Re: Bots don't switch to given weapon after stripping
 
I am using version V3B19d and AMX Mod X 1.80. When I strip and give knife, their hands stand like they are using the weapon before getting stripped, but they don't have a weapon:
http://c.imagehost.org/t/0592/hl_200...3-11-52-53.jpg

KWo 21-07-2008 13:40

Re: Bots don't switch to given weapon after stripping
 
What is the method of stripping weapons You are using?
Are You clearing the right bit in the edict structure (pEdict->v.weapons)? Use also the command (to force them to use knife):
FakeClientCommand (pEdict, "weapon_knife")
You can check in podbot mm dll.cpp How does the function FakeClientCommand look like. Eventually You can check the source code of AMX X - it's similar method.

AlicanC 21-07-2008 23:25

Re: Bots don't switch to given weapon after stripping
 
It looks like "weapon_knife" works. Thanks for the tip, but it would be nicer if they switched to what they have.

KWo 22-07-2008 07:27

Re: Bots don't switch to given weapon after stripping
 
But they aren't aware You have stripped their weapon. They believe - once they have switched to the selected weapon, they have it until droping it or dieing.

AlicanC 22-07-2008 21:51

Re: Bots don't switch to given weapon after stripping
 
Quote:

Originally Posted by KWo (Post 58553)
They believe - once they have switched to the selected weapon, they have it until droping it or dieing.

So if I make them drop it instead of removing it, will it work?

KWo 23-07-2008 08:57

Re: Bots don't switch to given weapon after stripping
 
When You are forcing the bot to dropping the weapon, the game engine automatically equipping the bot with a worse weapon (secondary or knife). The message about the current weapon is sent to the bot, so the bot knows what the weapon does he have.

AlicanC 23-07-2008 16:38

Re: Bots don't switch to given weapon after stripping
 
Thanks a lot for your help.


All times are GMT +2. The time now is 02:54.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.