Page 1 of 1
ai scripting question
Posted: Sun Mar 30, 2003 4:11 pm
by coolmintyice
I have noticed numberous times that when i reveal myself to the AI, he waits a few seconds before shooting. this gives the player plenty of time to aim and pack the ai with bullets. i want the ai to shoot as soon as he spots the player. how can this be done. do i go into the ai.scr file and modify the script or do i change the ai parameters?
Entity Properties
Posted: Sun Mar 30, 2003 6:48 pm
by tltrude
I think the vision and hearing properties can be changed in each ai entity (key N).
This is from the AI tips text file in the docs folder of MOHTools:
- noticescale: This scales how long it takes AI to see an enemy. At 100, it takes 100% as long as normal to see something; at 50, it takes half as long; at 200, it takes twice as long.
Have a look at the properties of one of the ai in m4l0 (a map file that came with the editor).
Posted: Sun Mar 30, 2003 7:41 pm
by jv_map
As far as I know noticescale doesn't make any difference at all.
I tried noticescale 1 and noticescale 100000 and couldn't say there was any significant difference in reaction speed.
Posted: Mon Mar 31, 2003 12:47 am
by nuggets
you could always edit the ai.scr,
for $player *sees* $target
$target shootat $target
//not sure on the sees command but that's generally what you need
or create a new ai and enable that instead of the default ai
Posted: Mon Mar 31, 2003 11:09 am
by Angex
I think scripting a decent AI would involve more than:
if($AI isAlive && $AI cansee $player){
$AI aimAndShootAt $player
}
It's probably best to check the AI characters settings.
I also had a though about the noticescale, maybe it ranges from 0 - 1 say, therefore 1 and 1000000 wouldn't make a difference. I haven't tested it yet as it was just an idea.