Page 1 of 1
AI cover
Posted: Sun Jul 07, 2002 8:51 am
by Ra_rasmus
I don't know if this is the right forum..
Anyone know how to make the ai actors in SP (germans/allies) cover behind walls and crates and shoot at you like in the maps from the game?
For now my germans/allies only stay put and shoot at me, I want them to move around, take cover and follow me if I run away!
Please respond.. I think many mappers would like to know.
cover
Posted: Sun Jul 07, 2002 11:25 pm
by tltrude
Create an info_pathnode and look at the entity properties of it--cover is one of the check boxes. The "enemy" ai will go for it if it is close by, but you may need to target it if they don't move there.
For the following thing, I think you need AI nodes all over the map (pink boxes in m4L0). I have had no luck doing that and can't get patrol to work either.
There are "friendly" nodes too for making friendies follow you.
Posted: Sat Jul 27, 2002 12:44 pm
by Slyk
As for the PATROL thing, I figured out a way to do it that isn't so terribly much like the tuts. I had some luck with the $path style in scripting except I always got a LOCALIZATION error and could never get more than one AI at a time to patrol.
But this works for bascially moving a guy around
1. Create the AI...
2. with the AI still selected, press the "I" key
3. give the AI a name, like "patroldude1" or something
4. give him a target like "dudepath1" or just "path1"
5. create an INFO_PATH node somewhere close...
6. press "N" with the path node selected...
7. give the path node a targetname (same as the AI target)
KEY: $targetname VALUE: path1
8. give the path node a target
KEY: target VALUE: path2
9. create another INFO_PATH node a distance away
10. repeat step 6
11. give this path node a targetname
KEY: $targetname VALUE: path2
12. give the path node a target
KEY: target VALUE: path1
You can link a mess of them together like this, however, you don't get the pause at each point. For that you need to use a script and this site has a tut on that. I'm sure that there is a "wait" command that can be applied to the path node, just need to look it up and apply it properly.
Posted: Sat Jul 27, 2002 5:42 pm
by Wombat
scorpios 3d entity map viewer
or
wombats Bsp_2_entMap.exe
will recompile existing.bsp files, and produce an entity.map of that level, you can load ( wombats ) into mohradiant, and peruse all the entity's for the map in question. It show relationships between patrols, and which parameters to set....It shows all the links, etc,. Beware, it is just one big map.
for example
the guy is set to
{
"classname" "ai_german_afrikacorps_grenadier"
"scale" "1.0"
"model" "human//german_afrika_grenadier.tik"
"testanim" "idle"
"origin" "4935.00 -1801.00 0.00"
"type_idle" "patrol"
"type_attack" "turret"
"type_disguise" "salute"
"type_grenade" "grenade"
"angle" "0"
"sound_awareness" "100"
"noticescale" "100"
"fixedleash" "0"
"enemysharerange" "0"
"waittrigger" "0"
"accuracy" "20"
"ammo_grenade" "2"
"disguise_range" "256"
"disguise_period" "15"
"disguise_level" "1"
"gren_awareness" "10"
"spawnflags" "256"
"patrolpath" "enemypatrol3"
"$targetname" "lock_enemy"
and the patrol
from
{
"spawnflags" "0"
"origin" "5152 -1600 8"
"classname" "info_pathnode"
"targetname" "t722"
"target" "enemypatrol3"
to
{
"classname" "info_pathnode"
"origin" "5018 -1803 8"
"spawnflags" "0"
"targetname" "enemypatrol3"
"target" "t722"
extracted from map m1l2a.bsp ( m1l2a.map )
Scripts
Posted: Sun Jul 28, 2002 5:57 am
by tltrude
Don't you have to exe some AI scripts to get them to work? I tried copying some AI patrol paths from m4L0, but never could get them to move.
Posted: Sun Jul 28, 2002 4:23 pm
by Wombat
whatever you named the guy
just run
$nameofguy exec global/enable_ai.scr
from the script, just b4 prespawn i think, in SP map
and he will patrol. just did it for the first time! got him to patrol between 3 points
took 5 minutes
Posted: Sun Jul 28, 2002 4:24 pm
by Wombat
still working on sniper and cover and duck etc.....
Posted: Tue Oct 01, 2002 3:45 pm
by jv_map
A script is not needed to get your AI to work properly.
You don't need the enable_ai thingy (especially not before prespawn).
You don't need the exec global/ai.scr
You only need some pathnodes and correctly setup enemies (mindist, maxdist, leash, interval).
If you have an enemy with idle_type set to patroller or runner, and have set waittrigger to 1, you only need a 'self activate' command.
Re: AI cover
Posted: Tue Oct 01, 2002 7:59 pm
by Guest
Ra_rasmus wrote:
Anyone know how to make the ai actors in SP (germans/allies) cover behind walls and crates and shoot at you like in the maps from the game?
.
This is answered in the Word doc that's included with MOHRadiant. It's called AI tips doc and tells you what kind of behavior to expect with certain brushes. It's a very good one and should help you out.
Posted: Tue Oct 01, 2002 8:06 pm
by Guest
How come that I'm login in, posting a message and it stills says guest.
Anyway good luck with it
Nijnrich