Hmm...AI?
Moderator: Moderators
Hmm...AI?
Well, I can't find anything in the search about AI so I guess I'll try posting instead. I haven't seen AI in multiplayer so is it possible? I mean the AI like in single player, not bots like jv_map made. If so, does someone know of a map that has AI so I can look at it and get started on it?
-
Master-Of-Fungus-Foo-D
- Muffin Man
- Posts: 1544
- Joined: Tue Jan 27, 2004 12:33 am
- Location: cali, United States
-
Master-Of-Fungus-Foo-D
- Muffin Man
- Posts: 1544
- Joined: Tue Jan 27, 2004 12:33 am
- Location: cali, United States
YepDo you know how to add AI in stock maps?
I have 6 ai spawned in brest from triggers, 3 axis 3 allies at each end of the map. They move about the map and protect the objective triggers and spawn areas. Then I have two super ai drop in on parachutes packing explosives strapped to them, they head for the enemy spawn areas and also call in artillery aimed at the enemy spawn areas... Heheh
Needless to say it get's intense at times.
This is all done server side, but the clients need to download a small add in pk3 for ai dialog and skins only.
All the above is spawned into the map, the new scr is put in a standalone pk3 in mainta, when the map is called for the new scr is loaded instead the old one in the stock pk3. For this to work you must follow the same directory and file naming structure as the stock ones.
It can be done, but it took me a long time to sort out bugs and strange behavior, also you need to make a path file for the stock map if it dosn't have one so the ai know where they can move.
Thanks again to bdbodger for the node maker script
Grassy
Ahhh... heheheh yeah nasty aint I ?
Oh dear maybe I should have kept my mouth shut....
I made it sound easy but in reality trying to explain the whole process is even more difficult..
Firstly the ai I used have modified tiks to include the required anims.
These modified tiks are in the server map mods pack, thus leaving the stock ones alone, they are also in the client side pack with the required skins, as I didn't use stock skins.
Here is what is needed to add to the human models tikis.
Also he needs to make a path file for the AI to use, without a path file the ai will only move a small distance to keep within the min max distances set for them.
That's the most of the behind the scene stuff, the rest is done via the map script . I spawn the AI into the map the usual way like this...
And then if all else is ok you should be able to issue move commands and stuff like so:
Howzat? 
Grassy
Oh dear maybe I should have kept my mouth shut....
I made it sound easy but in reality trying to explain the whole process is even more difficult..
Firstly the ai I used have modified tiks to include the required anims.
These modified tiks are in the server map mods pack, thus leaving the stock ones alone, they are also in the client side pack with the required skins, as I didn't use stock skins.
Here is what is needed to add to the human models tikis.
Code: Select all
{
server
{
classname Actor
american
setsize "-16 -16 0" "16 16 92"
health 100
weapon "M1 Garand"
// Make him mumble but not breathe steam
exec global/breathe.scr 0 1
}
}
//
// include the base animations definition
//
//$include models/player/base/include.txt
$include models/human/new_generic_human.tik
$include models/human/animation/dialogue/generic_dialogue_US.tik
/*QUAKED ai_allied_russian_crazy_boris (1.0 0.5 0.0) (-16 -16 0) (16 16 96)
*/That's the most of the behind the scene stuff, the rest is done via the map script . I spawn the AI into the map the usual way like this...
Code: Select all
local.al_bomber = spawn models/human/allied_crazy_boris.tik
local.al_bomber.origin = ($para_start.origin + ( 0 0 -76 ))
local.al_bomber.angles = ( 0 179 0 )
local.al_bomber targetname "albomber"
local.al_bomber.sight = 10000
local.al_bomber.hearing = 10000
local.al_bomber.fov = 180
local.al_bomber.enemysharerange = 6000
local.al_bomber.leash = 10000
local.al_bomber.gun = "thompson"
local.al_bomber.health = 900
local.al_bomber.noticescale = 50
local.al_bomber touchtriggers
Code: Select all
wait 1
$albomber playsound tac_boris
$albomber runto $radio2
wait 10
iprintlnbold_noloc "Crazy Boris has called in an Atillery strike... Run for cover!"
wait 1
$albomber playsound boris_wohoo
$albomber thread allies_artillery
Grassy
