.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Half-Life and HL1 Mods (http://forums.bots-united.com/forumdisplay.php?f=22)
-   -   Let's kill the bots (http://forums.bots-united.com/showthread.php?t=5581)

The Storm 06-08-2006 11:33

Re: Let's kill the bots
 
Ok if you are 100% sure that your pointer is correct try to kill the bot in BotThink() fucntion. Btw I don't understand why you have this line:
Code:

if(current->pEdict->v.deadflag != DEAD_NO){
botnumber++;
if(
botnumber >= 7){
botnumber = 0;
}

First problem, remove that check for is the bot alive, thats wrong and second why you have max bots hardcoded to 7 ? And why you reset botnumber to zero if so ?

The_Hard_Mission_Guy 06-08-2006 14:58

Re: Let's kill the bots
 
for a very simple reason!
I'm deliberatly running only ONE bot at the same Time!......so when the bot dies the next gets spawned......it's as easy as that.
and about the number of bots (why do you have only 8 bots?) because I'm trying to keep the error margin as low as possible untill the current bot-kill dilemna is resolved!......(there is nothing more easier that replacing 7 with gpGlobals->maxClients .......)

but anyways ,
I think I have discovered the bug :) ......and it's in one of those least expected places!
it's somewhere ,Where I don't have access at all.......it's in the MOD to be precise!

Yes , Yes:)
I'm talking about Ricochet , Ricochet is the Sinner ........and if you want a very very clear proof without making any coding .....then just load Ricochet and type the "kill" command!
and you will see that it does nothing (at least that happend for me) while all other mods responded as needed!

so the conclusion is that : It's not my codes fault (I knew from the start that my lines are clear!) but because the ClientKill() function is disabled in the mod somehow for some reason...

So the troublesome Question remains : How can I kill the bots in Ricochet???

The Storm 06-08-2006 21:37

Re: Let's kill the bots
 
If so try to set pEdict->v.health = 0; :)

The_Hard_Mission_Guy 06-08-2006 22:51

Re: Let's kill the bots
 
WOOWOOWOO:clown:
I think.....I think it's working.....Yes:)
Thaaanks Maaan! :thumbsup:

Now that's what I was talking about!

but there is a little problem , which is that there is no default death animation for such a case in this mod , so what happens now is a "half-death"

in other words: the bot dies but the model stays visible and the deadflag doesn't change too(I'm changing it manually)! but this doesn't effect the game since the model becomes hallow and after the next respawn everything gets as it should....

P.S so what remains is a graphical bug , which I think can be solved by playing pfnRunPlayerMove another step.....I'll try that now.
but thanks again!

The Storm 07-08-2006 00:16

Re: Let's kill the bots
 
You must run RunPlaerMove() even if the bot is dead but if the animation is wrong again then get the HLSDK, the Ricochet source code is released, check there what code you must execute to make normal dead. :)

The_Hard_Mission_Guy 07-08-2006 19:37

Re: Let's kill the bots
 
Hmmmm , not a bad Idea!
but I think I'm set for now (I'll check ricochet's source another time), since the bots are "dying" , we can close this discussion:P

P.S ah maybe it would be better to make the models just disappear in this case , instead of editing ricochet's code to add a suitable animation!


All times are GMT +2. The time now is 23:01.

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