Telling bots to use weapons

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

LedZep

k last title kinda gay :p
Hi people

I am trying to add a feature to my mutator that tells a bot to use a specific weapon, all i could dig up is this (example for enforcer):

weap = bot.findinventorytype(class'enforcer');
bot.pendingweapon = weap;
bot.changedweapon();

i also tried:

bot.adjustdesirefor(weap);
and
bot.favoriteweapon = weap.class;

with those code lines, the bot switches to the enforcer only for a couple of seconds and then brings back the weapon it was holding before.
help anyone?
 

LedZep

k last title kinda gay :p
I tried it but it didnt work, i even did this:

weap = bot.findinventorytype(class'enforcer');
bot.pendingweapon = weap;
bot.changedweapon();
for(inv = bot.inventory; inv != NONE; inv = inv.inventory)
{
inv.maxdesireability = 0;
}
weap.maxdesireability = 5000;

it still did the same thing, the bot changed his weapon to enforcer for a couple of seconds and then brought up again the weapon he held before.
please help.
 

LedZep

k last title kinda gay :p
it works! Thanks alot EasyrideR_/\.

one last question, when i change the AIRating of the weapon, it doesnt change the Default AIRating right? so i can return the regular AIRating of a bot by:

for(inv = bot.inventory; inv != NONE; inv = inv.inventory)
{
weapon(inv).AIRating = weapon(inv).default.AIRating;
}

this will work right?
 

LedZep

k last title kinda gay :p
thats ok, i dont need the redeemer there anyway...
I have another question, how do i get the bot to keep using this weapon after he dies (i know how to tell him to go look for it) without subclassing the bot class? I also want to try to prevent using the timer for this since my timer has already lots of different features that can barely share the timer with each other (barely).

thanks.
 

LedZep

k last title kinda gay :p
Anyone knows ,how can i get the bot to keep using this weapon even after he dies (i know how to tell him to go look for it) without subclassing the bot class? I also want to try to prevent using the timer for this one since my timer has already lots of different features that can barely share the timer with each other (barely).

thanks.