OrionBots - third release, rocket arena support

Discuss Artificial Intelligence and Bot programming.
Post Reply
Orion
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

OrionBots - third release, rocket arena support

Post by Orion »

Hi there.

I'm releasing my bots, with improved AI, and rocket arena support.
Download

Enjoy!
Last edited by Orion on Sat May 12, 2007 6:29 pm, edited 2 times in total.
xaGe
Posts: 465
Joined: Wed Mar 01, 2006 8:29 am
Location: Upstate, New York
Contact:

Post by xaGe »

I tried... FYI:I got a 404...
Orion
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Post by Orion »

The file's directory was changed.
I've edited my post above, now you can download!
Orion
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Post by Orion »

Well, let me post a tut here, to fix the water pain and death sounds bug, and making the bot swim up when in lava, slime, or out of air.

After downloading the file above and reading readme, open 'bot.qc', scroll down to BotJump and you'll see something like this:

Code: Select all

if (self.air_finished < time + 3 || self.watertype == CONTENT_SLIME || self.watertype == CONTENT_LAVA)
{
	self.velocity_z = 1000; // go fuckin' fast upwards, this is life or death (trying to improve the swimming ai)
	return;
}
You have to delete that statement, that was just for testing, but going 1000 qu/s upwards is VERY unrealistic!

Now scroll down to BotThink. After CheckPowerups add this:

Code: Select all

if (self.air_finished < time + 5 || self.watertype == CONTENT_SLIME || self.watertype == CONTENT_LAVA)
{
	self.angles_x = 30;
	if (self.waterlevel >= 2)
	{
		self.flags = self.flags - FL_ONGROUND;
		self.velocity_z = 320;
	}
}
	
if (self.waterlevel && !self.velocity_x && !self.velocity_y)
{
	if (self.velocity_z < -40)
		self.velocity_z = self.velocity_z + 1;
}
Well, it will now be called in BotThink instead of BotJump. He'll swim upwards when out of air, or when in lava or slime.
The second statement controls the water falling velocity. He won't sink like a rock like the previous versions.

Now scroll down until BotDie. Before DeathSound, just add:

Code: Select all

self.waterlevel = SetWaterlevel ();
When a non-client entity dies, its waterlevel resets to zero, that's why the bot is dying in water playing normal pain and death sounds.

Scroll up to bot_pain, and add the code in blue.

void() bot_pain =
{
if (self.weaponframe)
return;

if (self.invisible_finished > time)
return; // eyes don't have pain frames

self.waterlevel = SetWaterlevel ();

if (self.weapon == IT_AXE)
bot_axpain1 ();
else
bot_pain1 ();
};


Now compile! :wink:
Post Reply