Post your scripting questions / solutions here
Moderator: Moderators
Alcoholic
General
Posts: 1470 Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:
Post
by Alcoholic » Fri Jul 11, 2003 11:26 pm
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?
HappyChappy_7000
Warrant Officer
Posts: 146 Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:
Post
by HappyChappy_7000 » Sat Jul 12, 2003 2:07 am
Not if you spawn it in the script.
remember to give it health
What? You know who I am?
Alcoholic
General
Posts: 1470 Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:
Post
by Alcoholic » Sat Jul 12, 2003 2:37 am
so if i just use
local.dude spawn human/german_misc_worker
local.dude.health = 100
it will work fine?
Alcoholic
General
Posts: 1470 Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:
Post
by Alcoholic » Sat Jul 12, 2003 2:47 am
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?
HappyChappy_7000
Warrant Officer
Posts: 146 Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:
Post
by HappyChappy_7000 » Sat Jul 12, 2003 5:00 am
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?
Alcoholic
General
Posts: 1470 Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:
Post
by Alcoholic » Sat Jul 12, 2003 5:02 am
so those are all the required things i have to put in order for him to spawn right in the map?
HappyChappy_7000
Warrant Officer
Posts: 146 Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:
Post
by HappyChappy_7000 » Sat Jul 12, 2003 5:05 am
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?
Alcoholic
General
Posts: 1470 Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:
Post
by Alcoholic » Sat Jul 12, 2003 5:06 am
what about .position? is that really required?
HappyChappy_7000
Warrant Officer
Posts: 146 Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:
Post
by HappyChappy_7000 » Sat Jul 12, 2003 5:07 am
dont think so..
What? You know who I am?
Alcoholic
General
Posts: 1470 Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:
Post
by Alcoholic » Sat Jul 12, 2003 5:08 am
and agressiveness? never used that in any of my mapz.
Alcoholic
General
Posts: 1470 Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:
Post
by Alcoholic » Sat Jul 12, 2003 5:09 am
i know, you didnt give him .health!
HappyChappy_7000
Warrant Officer
Posts: 146 Joined: Thu Jul 10, 2003 1:14 pm
Location: Australia
Contact:
Post
by HappyChappy_7000 » Sat Jul 12, 2003 5:10 am
i'm not sure about that one
but im sure you need the origin health and model
What? You know who I am?
Alcoholic
General
Posts: 1470 Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:
Post
by Alcoholic » Sat Jul 12, 2003 5:12 am
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 » Sat Jul 12, 2003 6:29 am
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
bdbodger
Moderator
Posts: 2596 Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:
Post
by bdbodger » Sat Jul 12, 2003 12:25 pm
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 .