Bot problem after adding DP extension
Moderator: InsideQC Admins
3 posts
• Page 1 of 1
Bot problem after adding DP extension
Trying to use the darkplaces botclient built-in to resolve a scoreboard problem in my ctfbot+ mod. Was able to get them to spawn in the game via impulse by hacking up the old code a bit, but they seemed to be thinking incorrectly. I was told that since we are calling clientconnect() and putclientinserver() the bot entities will essentially be using playerprethink() and playerpostthink() and wont use the assigned think functions in the initial spawn...is that correct?
I tried pasting the think routines directly into those routines and using the clienttype floats to seperate bot from player, but after I did that, the bots wont even spawn into the map, and if I track them on the camera they are always at location ' 0 0 0 ' in the map....which is usually part of the solid bsp.
I tried pasting the think routines directly into those routines and using the clienttype floats to seperate bot from player, but after I did that, the bots wont even spawn into the map, and if I track them on the camera they are always at location ' 0 0 0 ' in the map....which is usually part of the solid bsp.
-

Cobalt - Posts: 445
- Joined: Wed Jun 10, 2009 2:58 am
- Location: New England, USA
you need to call clientconnect and putclientinserver yourself.
the builtin does not recurse back in to QC code.
however, bots WILL progate from one map to the next, in which case then the engine will call clientconnect/putclientinserver for you at the start of the *next* map.
botclients have no AI.
bots will move around like a player only if you set the .movement field on them, to the same values that would be readable from a player, otherwise they're effectively AFK.
you don't have to treat them identically to players if you're willing to make the various player functions ignore them. You could just spawn them as team scoreboard placeholders (assuming you clean them up on map changes). :)
the builtin does not recurse back in to QC code.
however, bots WILL progate from one map to the next, in which case then the engine will call clientconnect/putclientinserver for you at the start of the *next* map.
botclients have no AI.
bots will move around like a player only if you set the .movement field on them, to the same values that would be readable from a player, otherwise they're effectively AFK.
you don't have to treat them identically to players if you're willing to make the various player functions ignore them. You could just spawn them as team scoreboard placeholders (assuming you clean them up on map changes). :)
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Thanks for the reply, I set the movetype to movetype_walk, did not help. I guess you are saying that when those 2 calls are made, we are using playerprethink() and playerpostthink() as the default think routines then? Its confusing, because my original hack got the bots thinking somewhat with their original botthink routine, but for sure there were some calls made as if it were a real live player, and I guess thats why it would stop thinking until attacked. So are we locked into the thinks being in those routines, or can work by re-assigning thinks outside those paramaters?
-

Cobalt - Posts: 445
- Joined: Wed Jun 10, 2009 2:58 am
- Location: New England, USA
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest