Page 1 of 1
friendlies dont follow
Posted: Wed Aug 07, 2002 8:53 pm
by UBER_SOLDAT
i'm making a SP map based on all the M3 normandy levels, w/ a radar, artillery battery etc. I've got a ranger and a medic who are activated when u go thru a trigger once. I've set the ranger to say 'you're on point', which he does. I then set all his values the same as captain ramsy's in M3L2, and the medics the same, but his friendtype as 5 [medic]. They both stare at me, and the ranger shoots germans, and uses pathnodes, but wont follow me. Please help.
test
Posted: Wed Aug 07, 2002 11:43 pm
by tltrude
Try changing the name of the BSP and script to "test" and see if it works. I think there is a list where you have to add your BSP name to get it to work. Test is already on the list, but I don't remember where it is.
Posted: Thu Aug 08, 2002 5:00 pm
by Wombat
officially to test sp maps, you should call your map test.
In the models/human/new_generic_human.tik file is the list of animations set to run on a certain map, by using the
include test utils{
.....
}
everything inside the curly brackets is added if your map starts with test etc
I have modified that particular file, to get ai to work in MP maps, by commenting out those lines above.
This brings all of those commands into the main loop. Making them available, to all, no matter what mapname or game type.(SP or MP)
Also you may have to turn on the ai's ai. If he has a name then
$histargetname exec global/enable_ai.scr
somewhere in your script, when you want him to do his thing?
Posted: Thu Aug 08, 2002 7:01 pm
by UBER_SOLDAT
my map is called test_radar, so does that mean the ai should work? the enemies all shoot at me and the friendlies, and the friendlies shoot back. I've checked all the mohaa scripts that have friendly ai, and cant find anything different to mine.
Posted: Fri Aug 09, 2002 5:00 am
by Wombat
if they are shoooting, and returning fire, then your map is running the sp stuff. so the name is ok.
will have to have a look
m1l2a has some friendlys i think.........i'll look at that.
but i don't have yur script. I will try and make a test map ok
you set the tether command etc
extract from m1l2a.scr
level.friendly1.leashvalue = 450
level.friendly1 leash level.friendly1.leashvalue
level.friendly1 tether level.friendly1
level.friendly1.fixedleash = 1
level.friendly1 exec global/disable_ai.scr
level.friendly3 exec global/disable_ai.scr
level.friendly3 threatbias ignoreme
did you set friendlynodes?
Posted: Fri Aug 09, 2002 6:23 am
by Kentaro-K.21
I referred to m4l0, because the complete map file was contained in the SDK.
I created a map individually to examine before, with following ai entities (my one is named intr5.map).
----------
{
"classname" "ai_allied_2nd-ranger_lieutenant"
"scale" "1.0"
"model" "human/2nd-ranger_lieutenant.tik"
"testanim" "idle"
"origin" "-576.00 -576.00 0.00"
"$targetname" "friendly"
"#fnum" "1"
"angle" "45"
}
{
"classname" "ai_allied_2nd-ranger_lieutenant"
"scale" "1.0"
"model" "human/2nd-ranger_lieutenant.tik"
"testanim" "idle"
"origin" "-576.00 -448.00 0.00"
"$targetname" "friendly"
"#fnum" "2"
"angle" "45"
}
{
"classname" "ai_allied_2nd-ranger_lieutenant"
"scale" "1.0"
"model" "human/2nd-ranger_lieutenant.tik"
"testanim" "idle"
"origin" "-448.00 -448.00 0.00"
"$targetname" "friendly"
"#fnum" "3"
"angle" "45"
}
----------
the script file example (my one is named intr5.scr):
----------
exec global/ai.scr
main:
level waittill prespawn
exec global/friendly.scr
level waittill spawn
level.friendly1.friendtype = 1
level.friendly1 thread global/friendly.scr::friendlythink
level.friendly2.friendtype = 1
level.friendly2 thread global/friendly.scr::friendlythink
level.friendly3.friendtype = 5
level.friendly3 thread global/friendly.scr::friendlythink
end
----------
I extracted and modified a kind of script file.
The file is "human\new_generic_human.tik".
I placed it in like "mohaa\main\human\new_generic_human.tik".
I added the following lines.
----------
includes moh/intr
{
$include models/human/animation/human_bar.tik
$include models/human/animation/human_bazooka.tik
$include models/human/animation/human_grenade.tik
$include models/human/animation/human_mg42.tik
$include models/human/animation/human_mp40.tik
$include models/human/animation/human_pistol.tik
$include models/human/animation/human_rifle.tik
$include models/human/animation/human_thompson.tik
$include models/human/animation/human_unarmed.tik
$include models/human/animation/scripted/balcony.tik
$include models/human/animation/scripted/hiding_cabinet.tik
$include models/human/animation/scripted/level_m1l1.tik
$include models/human/animation/scripted/opeltruck.tik
}
----------
Posted: Fri Aug 09, 2002 12:15 pm
by UBER_SOLDAT
i got the ranger to follow me, by putting info_pathnodes with no flags set every 128 units. He started following me everywhere where i'd put the nodes. The medic still doesn't follow though, or heal me. I've set his friendtype as 5, and the rest the same as Captain ramsey's in M3l3.
Posted: Fri Aug 09, 2002 12:41 pm
by Surgeon
try looking at the captured tiger series of maps (I can't remember their map numbers) - Theres an allied medic there that follows you about the place
Posted: Sat Aug 10, 2002 4:39 pm
by Wombat
maybe try and change the line
$include models/human/animation/scripted/level_m1l1.tik
to
$include models/human/animation/scripted/level_m3l1.tik
in your human/new_generic_human.tik file
at least this has an animation for the medic......
Posted: Sat Aug 10, 2002 4:51 pm
by Wombat
also in the global/friendly.scr file it says to execute the call, then set the friendly type
ie
level.friendly3 thread global/friendly.scr::friendlythink
level.friendly3.friendtype = 5
level.friendly3.distance = 128 // set how close to follow
level.friendly3.waitime = 2 // set how long to wait b4 following
the call starts the ai, then you set everything.
also
an extract from friendly.scr
// To determine where a friendly will follow in relation to the player, set his .mins and .maxs. For example to make a
// friendly lead the player, like in m1l1, set his .mins to 20 and .maxs to 40. To make a friendly follow the player, like
// m5l1a and m5l1b, set the mins to -40 and maxs to -20. Don't set the mins higher than the maxs.
Posted: Sun Sep 01, 2002 12:25 pm
by Mirek
try this...
http://www.eventideimaging.com/AI_behaviour1.zip
I made this a little while ago to get the Friendly follow behaviour to work. See if they follow throuh doors etc.
I no longer have the original map file but the script is pretty much nothing but AI friendly stuff, there is a script explanation file included, little limited but it says a few things.
Also read the txt which explains how I had the map setup.
In the little house near the start there is also a card game going on.
Set up just the way global/cardgame.src instructs. Same targetnames etc.
I hope it helps you,
it took some hours of my life to workout how these little bastards work and still more to learn.....
Cheers
Mirek
Posted: Sun Sep 01, 2002 3:13 pm
by Mirek
OOPS!!!
I made a slight error..
in the read_me_first.txt AI map setup should be -
AI Friendly target names set up as follows -
level.friendly 1 -
KEY/VALUE
$targetname - friendly
#fnum - 1
level.friendly 2 -
KEY/VALUE
$targetname - friendly
#fnum - 2
level.friendly 3 -
KEY/VALUE
$targetname - friendly
#fnum - 3
level.friendly 4 (level.medic) -
KEY/VALUE
$targetname - friendly
#fnum - 4
I also forgot to mention at the start that the BSP is called test_friendly1.bsp
Well, it's a Sunday.
Mirek
Posted: Sun Sep 01, 2002 3:23 pm
by Mirek
I've just fixed the download file
Mirek