Page 1 of 3

MULTIPLAYER AI

Posted: Fri Jul 11, 2003 11:26 pm
by Alcoholic
if i just place a nazi in a mp map out of the blue, no special modifications, will the game go nuts if he tries to attack a player?

Posted: Sat Jul 12, 2003 2:07 am
by HappyChappy_7000
Not if you spawn it in the script.
remember to give it health

Posted: Sat Jul 12, 2003 2:37 am
by Alcoholic
so if i just use

local.dude spawn human/german_misc_worker
local.dude.health = 100

it will work fine?

Posted: Sat Jul 12, 2003 2:47 am
by Alcoholic
i also got another question:

does everybody on the axis team count as "german" and everybody on the allied team "american"? what i mean is if i placed a german ai between the two, would he only attack the american and leave the german unharmed?

Posted: Sat Jul 12, 2003 5:00 am
by HappyChappy_7000
yes 4 the axis and allied team question

heres the proper code 4 spawning ai in scripts

Code: Select all

//put the spawn and human/multiplayer.. part in one line
spawn human/multiplayer_german_panzer_grenadier.tik "targetname" "bot1" 
$bot1.origin = ( -2249 -1011 269) 
$bot1.angle = -129 
$bot1.sight = 50000 
$bot1.accuracy = 70 
$bot1.aggresiveness = 95 
$bot1.position = crouch 

[/code]

Posted: Sat Jul 12, 2003 5:02 am
by Alcoholic
so those are all the required things i have to put in order for him to spawn right in the map?

Posted: Sat Jul 12, 2003 5:05 am
by HappyChappy_7000
I think so because when i removed part of that script area the ai would'nt die but he could kill you on one shot

Posted: Sat Jul 12, 2003 5:06 am
by Alcoholic
what about .position? is that really required?

Posted: Sat Jul 12, 2003 5:07 am
by HappyChappy_7000
dont think so..

Posted: Sat Jul 12, 2003 5:08 am
by Alcoholic
and agressiveness? never used that in any of my mapz.

Posted: Sat Jul 12, 2003 5:09 am
by Alcoholic
i know, you didnt give him .health!

Posted: Sat Jul 12, 2003 5:10 am
by HappyChappy_7000
i'm not sure about that one

but im sure you need the origin health and model

Posted: Sat Jul 12, 2003 5:12 am
by Alcoholic
ok ill try it when i get around to doing so. thanks.

Posted: Sat Jul 12, 2003 6:29 am
by jv_map
If you just spawn a german bot he will attack both allied and axis players. An american bot won't attack anyone. This is due to an error in models/players/base/include.txt which defines any player as american. For my bot scripts I used a work-around which redefines Axis players as germans.

human/multiplayer_german_panzer_grenadier.tik

I made that .tik file by the way ;)

Posted: Sat Jul 12, 2003 12:25 pm
by bdbodger
The map needs path nodes too . If you spawn into a stock dm map there aren't any , the aI will shoot but not move or chase .