View Full Version : Help a UScripter in need
6th Feb 2002, 01:56 AM
allright, a couple of questions:
How do i tell a bot to go to a specific vector (and look at a specific rotator but thats optional) and stay there for a specific amount of time?
how do i get a bot to support a specific pawn, i think its:
var pawn P;
var bot B;
B.supportingplayer = P;
but im not sure.
and last, how do i tell a bot to hunt down a specific pawn (not only attitude or setenemy but actually HUNT DOWN the pawn)
i hope someone can help me with that.
thanks in advance.
17th Feb 2002, 10:12 AM
I found these parts in the bot class interesting:
var(Orders) name Orders; //orders a bot is carrying out
var actor OrderObject; // object referred to by orders (if applicable)
var(Combat) float TimeBetweenAttacks; // seconds - modified by difficulty
Orders is a string, like
Orders = 'FreeLance';
'Attack' = attaching something
'Hold' = hold position
'Defend' = defend something
The OrderObject is the actor that the bot should focus on...
If you tell it to attack, the object is some pawn out of the other team, the closest visual one, so it roams until it finds one.
it can also be like the enemy's flag or an assault objective or so, you get the point.
Defend works the same way.
Hold is special, it spawns a "holdspot", a keypoint, at a place, and the bot guards this place...
Dig around in the bot code a bit yourself, cause I think this is what you're looking for.
Say you want it to support another player:
Say you want it to attack another player:
You want it to spand still, guarding a point.
local vector mylocation;
local holdspot hs;
The SetOrders function ends with:
BotReplicationInfo(PlayerReplicationInfo).OrderObject = OrderObject;
So I guess this is important.
It sets the botreplications object to the bot's object (I have no idea if it's important, might be...)
Then there's also the posibility that you can subclass the bot and make your class do the things you do, and then replace the botclasses with your class before they are spawned (spawnnotification) or by changing their login (if it's a gametype)
But that's a bit overkill...
18th Feb 2002, 04:02 AM
Well, i found all i was looking for by myself in the bot class about two weeks ago :D
Thanks anyway though!
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.