Page 1 of 1
Need REALLY Aggressive AI - help.
Posted: Wed Sep 24, 2003 2:27 pm
by Franaticus Satanii
I have added dogs via a script by bdbodger and for the life of me I can't get the variables correct to make the dogs more aggressive. I have increased and decreased the numbers but it is very hard to isolate the individual traits to test it. These are the present settings in the script:
Code: Select all
local.dog.mindist = 0
local.dog.maxdist = 2
local.dog.leash = 10000
local.dog.fixedleash = 0
local.dog.sight = 4000
local.dog.health = 50
local.dog.noticescale = 4000
local.dog.enemysharerange = 500
local.dog.hearing = 2500
local.dog.fov = 180
Can somone please help me learn what these parameters mean and possibly provide some insight on how to make my AI more aggressive...actually, I guess the word would be more responsive.
As always, thanks for any help.
Posted: Wed Sep 24, 2003 5:12 pm
by Franaticus Satanii
Well,
I found most of the answers to my own questions in the g_allclasses document. Are there any maximum or minimum numbers for some of these settings?
I have modified the settings to look like this
Code: Select all
local.dog.mindist = 0
local.dog.maxdist = 2
local.dog.leash = 10000
local.dog.fixedleash = 0
local.dog.sight = 5000
local.dog.health = 40
local.dog.noticescale = 100
local.dog.enemysharerange = 5000
local.dog.hearing = 4000
local.dog.fov = 270
These settings seem to work pretty well...but the dogs are still fairly dumb...but I guess that gives the player some time to react to the attack.
Anyone know how to set the rotation of a script spawn AI? I know how to set the origin....but the rotation is giving me heartburn. All my dogs are facing the same way when spawning....any clues?
Posted: Wed Sep 24, 2003 6:33 pm
by jv_map
Well your current settings will result in LD errors and the game will reset some of the values you set.
For example maxdist has to be at least 128 units (I think) greater than mindist, and leash never may exceed maxdist (I don't know why, but the game doesn't like it).
Use the angles command to rotate your dog, angles are (pitch yaw roll). For example, to rotate your dog 90 degrees about its z-axis, type:
local.dog angles (0 90 0)
Instead, you could also use either the angle command or the yaw variable (latter might be read-only):
local.dog angle 90
or
local.dog.yaw = 90
Posted: Wed Sep 24, 2003 7:40 pm
by Franaticus Satanii
Thanks for the response. I will change per your recommendations to the following to see if I get any better results:
Code: Select all
local.dog.mindist = 0
local.dog.maxdist = 128
local.dog.leash = 128
local.dog.fixedleash = 0
local.dog.sight = 5000
local.dog.health = 40
local.dog.noticescale = 100
local.dog.enemysharerange = 5000
local.dog.hearing = 4000
local.dog.fov = 270
I my script I have the dogs individually spawning as such:
Code: Select all
exec global/dmdog.scr::dogspawn ( 4523 2322.16 0.12 ) 1 5 "axis" 0
How would I go about modifying / adding the rotation per spawn point rather than globally?
Posted: Wed Sep 24, 2003 7:55 pm
by jv_map
No idea. I think bdbodger wrote that script so you'd have to ask him

Posted: Thu Sep 25, 2003 12:55 am
by Franaticus Satanii
Well,
Thanks for the help/input. I will try and PM him and see what happens.
Posted: Thu Sep 25, 2003 10:01 am
by bdbodger
I did repost and say to change the noticescale to 50 and yes I thought about the angle that it spawns at but didn't do the changes yet what you can do is change the global/dmdogs.scr like this
dogspawn local.dogorg local.dogangle local.dogrespawn local.dogspawntime local.team local.light :
if (local.dogspawntime < 1)
local.dogspawntime = 1
respawn:
local.dog=spawn models/animal/german_shepherd "type_idle" "dog_idle" "type_attack" "dog_attack" "targetname" "dmdog"
local.dog.origin = local.dogorg
local.dog.angle = local.dogangle
local.dog.mindist = 0
local.dog.maxdist = 2
local.dog.leash = 10000
local.dog.fixedleash = 0
local.dog.sight = 4000
local.dog.health = 1000
local.dog.noticescale = 50
local.dog.enemysharerange = 2048
local.dog.hearing = 4000
local.dog.fov = 180
local.dog.dmteam= local.team
local.dog notsolid
then call the script like this
exec global/dmdog.scr::dogspawn <origin> <angle> <respawn 0 or 1> < respawntime> < team axis/allies > < light 1 or 0 >
exec global/dmdog.scr::dogspawn ( 4523 2322.16 0.12 ) 45 1 5 "axis" 0
where the 45 is the angle you want to spawn at . I will make the changes to the script for downloading thanks for the reminder .
Also depending when you downloaded the script you might have this line in the script
self.runanimrate=5
it should be taken out or lowered to self.runanimrate=2
in spearhead the 5 is too high I would take it out not nessasary and makes the dogs superdogs that fly though the air in mohaa you can change it or take it out it just raises the animation rate .
Posted: Thu Sep 25, 2003 1:35 pm
by Franaticus Satanii
bdbodger,
Thanks for the detailed response, I did not see your last post for some odd reason
This script is really useful to me in my map. I have been trying to take it apart in my feeble attempt to learn scripting. It ain't easy. Time...I need lots of time

The wife just doesn't understand the addiction.
Would you do me a favor and repost where I can download that script update again...can't seem to fin the original thread I got it from the first time.
Now, if I could only get someone to critique my first map as it stands so far and give my some experienced advise, I would be a happy camper.
Again, thanks for the reply.
Posted: Thu Sep 25, 2003 2:41 pm
by bdbodger