Can I spawn an ai and ask him to do a certain task? In my level script? And if so can I get him to stick to that task?
Because they are scripted to change tasks from time to time am I right?
Well you can set .notask = 1 to prevent a bot from using the taskhandler to evaluate tasks... however if you just spawn an AI it won't be recognized as a bot so it won't perform any tasks anyway.
Probably the easiest way to go is to just spawn your AI and make it exec the required task script directly, like this:
^~^~^ Script Error: Field 'runners' applied to NULL listener
[BoT]---Coublacka--- has joined the Axis
LOCALIZATION ERROR: 'Press Use(e) to follow a player.' does not have a localization entry
if(local.sniper_location.nocrouch == NIL) (global/jv_bots/task_sniper.scr, 141)
if(local.sniper_location^
^~^~^ Script Error: Field 'nocrouch' applied to NULL listener
Yes they do, well as per your instuctions the sniper node exits targetname sniper and the mg node exists but with a targetname of mg_node thats why I called it mg_nodenode so it would be in line with the other peice of code. Anyway this still leaves me hangin in the wind and I am only online once a week now on thursdays. So if between now and then and you have a look at the map I sent you the tutorial one, if you would please add some code to the second one that has bots spawning that have just one task or a shortlist of available tasks for them, eg sniper camper.
This tutorial I am going to put a lot of work into and I hope that lots of guys who have had hard times making simple obj maps will jump at the chance to do it easily with your code your bots. As you know and I will point this out jv_bot01 is exellent for making obj maps without bots.
Anyway thanks for your help and I hope you help me get past this one.
Yeah I'm here but still busy figuring out this sentence:
Yes they do, well as per your instuctions the sniper node exits targetname sniper and the mg node exists but with a targetname of mg_node thats why I called it mg_nodenode so it would be in line with the other peice of code.
Oops sorry about that, I commented out the origins on my second try (after it didnt work) to see if cos you called them bots in the thread they might need to use the standard bot spawns, that didnt work either.
Its like the spawned ai has missed some bot setup things and doesnt know he is a bot?
Anyway I would love for this to work, it would make my bot maps much more interesting.
Errors are in the 4th posting for this thread, youll see some for the sniper and some relating to the mg guy. You should try it on one of your bot maps.