![]() |
Bot spies and feigning, an old issue.
Hello all,
I've been experimenting with the idea of getting Foxbot spies to feign death. The command: FakeClientCommand(pEdict, "feign", NULL, NULL); works for making them feign death, but they then stay on the floor and refuse to get up. Issuing the same command again doesn't work, and if I insert a HostSay command in botthink() they say nothing as if they are no longer considered to be playing the game. It's an old issue that was discussed in the old HPB bot forum and without resolution. I was just curious if anyone here might have an idea on the subject. Thanks. |
Re: Bot spies and feigning, an old issue.
I can only guess that when bots feign they think they are dead so they don't go through the proper bot code, what you'll need to add is an extra check in the bot code where the dead checking code is and make sure if the bot is a spy and feigned then it is not dead, and should run past the "dead code" so it can again unfeign if it needs to.
|
Re: Bot spies and feigning, an old issue.
Cheers for the response.
I put the HostSay() code at the head of BotThink() ahead of the dead checking code. I made the bot talk once a second or so and what happened was: "Blah", "blah", "blah"... *feign* ... *silence* The bot is alive and in the game for sure but it's as if BotThink() is no longer being run for that bot. Just a random thought but maybe it's got something to do with the fact that the bots viewpoint is on the floor as if dead. Will go look at the code again. |
Mystery solved.
Oops, my bad, you were right Cheeseh.
I was sure I'd put the debug message stuff at the start of BotThink(), but I must have been mistaken about that. The dead checking code only considers a bot to be alive when: pEdict->v.deadflag == 0. When a bot has feigned death pEdict->v.deadflag is set to 5, so the bot is considered dead. I could update the dead checking code in the future or handle feigned spies beforehand. Decisions, decisions... |
All times are GMT +2. The time now is 17:17. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.