Hi, I haven't got a clue about bots but I have put the bot code from botman's "bot 10" in my MOD. I need to make the bots use the crowbar across all skill levels(the 3 lowest ones dont use it at all) but can't figure out how to make it do that. I think it's in this part of bot_combat.cpp
Code:
// if bot is carrying the crowbar...
if (pev->weapons & (1<
{
// if close to enemy, and skill level is 1, 2 or 3, use the crowbar
if (((distance <= 40) && (weapon_choice == 0)) ||
(weapon_choice == WEAPON_CROWBAR))
{
new_weapon = weapon_ptr[WEAPON_CROWBAR];
// check if the bot isn't already using this item...
if (m_pActiveItem != new_weapon)
SelectItem("weapon_crowbar"); // select the crowbar
pev->button |= IN_ATTACK; // use primary attack (whack! whack!)
// set next time to "shoot"
f_shoot_time = gpGlobals->time + 0.3 +
RANDOM_FLOAT(primary_fire_delay[WEAPON_CROWBAR][bot_skill][0],
primary_fire_delay[WEAPON_CROWBAR][bot_skill][1]);
return TRUE;
}
}
what I don't understand is, where is the skill checked?