.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Bot spies and feigning, an old issue.
Old
  (#1)
Zybby
Member
 
Status: Offline
Posts: 8
Join Date: May 2009
Location: Smelly Brighton UK
Default Bot spies and feigning, an old issue. - 19-06-2009

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.
  
Reply With Quote
Re: Bot spies and feigning, an old issue.
Old
  (#2)
Cheeseh
[rcbot]
 
Cheeseh's Avatar
 
Status: Offline
Posts: 361
Join Date: Dec 2003
Location: China
Default Re: Bot spies and feigning, an old issue. - 19-06-2009

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.
  
Reply With Quote
Re: Bot spies and feigning, an old issue.
Old
  (#3)
Zybby
Member
 
Status: Offline
Posts: 8
Join Date: May 2009
Location: Smelly Brighton UK
Default Re: Bot spies and feigning, an old issue. - 24-06-2009

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.
  
Reply With Quote
Mystery solved.
Old
  (#4)
Zybby
Member
 
Status: Offline
Posts: 8
Join Date: May 2009
Location: Smelly Brighton UK
Default Mystery solved. - 26-06-2009

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...
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com