View previous topic :: View next topic |
Author |
Message |
Orion

Joined: 12 Jan 2007 Posts: 413 Location: Brazil
|
Posted: Sat May 12, 2007 5:25 pm Post subject: OrionBots - third release, rocket arena support |
|
|
Hi there.
I'm releasing my bots, with improved AI, and rocket arena support.
Download
Enjoy! _________________ There's no signature here. Stop looking for one.
Last edited by Orion on Sat May 12, 2007 6:29 pm; edited 2 times in total |
|
Back to top |
|
 |
xaGe

Joined: 01 Mar 2006 Posts: 329 Location: Upstate, New York
|
Posted: Sat May 12, 2007 5:43 pm Post subject: |
|
|
I tried... FYI:I got a 404... |
|
Back to top |
|
 |
Orion

Joined: 12 Jan 2007 Posts: 413 Location: Brazil
|
Posted: Sat May 12, 2007 6:17 pm Post subject: |
|
|
The file's directory was changed.
I've edited my post above, now you can download! _________________ There's no signature here. Stop looking for one. |
|
Back to top |
|
 |
Orion

Joined: 12 Jan 2007 Posts: 413 Location: Brazil
|
Posted: Thu May 17, 2007 3:58 pm Post subject: |
|
|
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: |
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: |
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: |
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!  _________________ There's no signature here. Stop looking for one. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2004 phpBB Group
|