MULTIPLAYER AI

Post your scripting questions / solutions here

Moderator: Moderators

User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

MULTIPLAYER AI

Post 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?
User avatar
HappyChappy_7000
Warrant Officer
Posts: 146
Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:

Post by HappyChappy_7000 »

Not if you spawn it in the script.
remember to give it health
What? You know who I am?
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

so if i just use

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

it will work fine?
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post 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?
User avatar
HappyChappy_7000
Warrant Officer
Posts: 146
Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:

Post 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]
What? You know who I am?
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

so those are all the required things i have to put in order for him to spawn right in the map?
User avatar
HappyChappy_7000
Warrant Officer
Posts: 146
Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:

Post 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
What? You know who I am?
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

what about .position? is that really required?
User avatar
HappyChappy_7000
Warrant Officer
Posts: 146
Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:

Post by HappyChappy_7000 »

dont think so..
What? You know who I am?
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

and agressiveness? never used that in any of my mapz.
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

i know, you didnt give him .health!
User avatar
HappyChappy_7000
Warrant Officer
Posts: 146
Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:

Post by HappyChappy_7000 »

i'm not sure about that one

but im sure you need the origin health and model
What? You know who I am?
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

ok ill try it when i get around to doing so. thanks.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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 ;)
Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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 .
Post Reply