Forum

frikbots : Some questions

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

frikbots : Some questions

Postby Freemanoid » Sun Aug 09, 2009 6:12 pm

Can someone tell how to make so that bots could move more slowly? Still it is necessary that there was a dependence of speed from different weapons.
And how to make two teams that they did not attack members of the team?
^O,..,o^
Freemanoid
 
Posts: 52
Joined: Mon Jun 16, 2008 11:25 am
Location: BELARUS

Postby Orion » Sun Aug 09, 2009 7:01 pm

You can have a fixed sv_maxspeed, and what defines the speed of a player is cl_forwardspeed, cl_sidespeed, cl_backspeed and cl_upspeed (also these values may be above sv_maxspeed, but never exceeds the limit).

Tune all these to the specified speed, which is normally below sv_maxspeed (default 320) when you carry a heavy weapon.

I think frikbots have their own cl_forwarspeed and stuff tuned..
I think stuffcmd() doesn't work with them.

And frikbot understand teamplay by default. You'll need to set teamplay to 1 or 2. Use impulse 101 to add an enemy bot, impulse 100 to add a teammate.
User avatar
Orion
 
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Postby Supa » Sun Aug 09, 2009 9:22 pm

As for slowing down bots you'll need to modify CL_KeyMove() which is at the top of bot_phys.qc. Any changes you make to player speeds will need to be duplicated in there, though keep in mind those values are always doubled unless the bot needs to walk for some reason. So if you want to force a player to use a cl_forwardspeed of 200, you'll need to give the bot a base forward speed of 100.
User avatar
Supa
 
Posts: 164
Joined: Tue Oct 26, 2004 8:10 am

Postby Freemanoid » Mon Aug 10, 2009 2:07 am

Okay,thanks.

And another question. Is it possible to make so that one team appeared only in one place and started from it.Other team too.Like in Counter-strike.
^O,..,o^
Freemanoid
 
Posts: 52
Joined: Mon Jun 16, 2008 11:25 am
Location: BELARUS

Postby Downsider » Mon Aug 10, 2009 2:43 am

Yeah, and if I'm not mistaken there might even be a tutorial on it?

But if there's not, it's simple enough to create a new team variable in defs.qc, assign a team to each player at his or her creation using some sort of menu, create two new spawn entities, one for each team, and simply check against the player's team variable when he or she is spawned :D!
User avatar
Downsider
 
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Postby Freemanoid » Mon Aug 10, 2009 8:27 am

Yes I have found a tutorial. Thanks!
^O,..,o^
Freemanoid
 
Posts: 52
Joined: Mon Jun 16, 2008 11:25 am
Location: BELARUS


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest