Home   Help Search Login Register  

Author Topic: blind AI sniper  (Read 4041 times)

0 Members and 2 Guests are viewing this topic.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:blind AI sniper
« Reply #15 on: 10 Apr 2005, 14:30:35 »
Quote
There's almost no difference whether I use the script or I don't use it. How can it be possible?
The AI is sophisticated.  It doesn't shoot just because it can see you.     The reason you have no difference is because, even without the reveal command, the sniper can see you just fine.    However he is waiting:  perhaps for a better shot, perhaps to see if you have any buddies with you.  

If you were a sniper and you saw somebody in your field of fire do you snap off a round immediately?   No, of course not.   You observe the situation, report in, have a look round for your mates, watch to see if you can figure out what's really going on and so on.   You shoot only when you fully understand the situation.   AI snipers are the same.

If you want to bypass this sophistication then try adding doTarget and doFire commands.
Plenty of reviewed ArmA missions for you to play

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:blind AI sniper
« Reply #16 on: 10 Apr 2005, 14:37:53 »
Hmmmm.......the point is, he did use doTarget and doFire commands and it made no difference.....that is what he is saying.

I would have thought his sniper would have done as he was told if maybe disableAI "target" or disableAI "autotarget" had been used also.

Then again.....maybe not.


Planck
I know a little about a lot, and a lot about a little.

Offline Blanco

  • Former Staff
  • ****
Re:blind AI sniper
« Reply #17 on: 10 Apr 2005, 20:30:57 »
Maybe he doesn't see you because he's watching through his scope all the time?
I think position is the most important thing to make a sniper fire, just moving him a bit could make a big difference.

I was working on an updata of my fixedpositions script a few weeks ago and i've found that AI fight better without dowatch and dotarget stuff, but they can use some scripted help when the enemy is near.
When you order them to watch a certain direction and the enemy aproach him from an other side, the dowatch stuff will override the normal AI behavoir and you can kill him easily from behind. AI like freedom, but it doesn't harm to point them in the right direction when the enemy is near, cos the engine has big trouble with close combat situations,... especially snipers.
At least that's my experience with studying the AI.
It's fun to watch the AI fight with a this switchcamera "internal" command in the init :)
 
Search or search or search before you ask.

voodzia

  • Guest
Re:blind AI sniper
« Reply #18 on: 10 Apr 2005, 21:23:20 »
@ Planck
Quote
I would have thought his sniper would have done as he was told if maybe disableAI "target" or disableAI "autotarget" had been used also.
I use both of these commands and must say that something is wrong with one of the snipers. One is firing fine - though still far from my expectations. But the other one doesn't shoot at all. And they both have exactly the same commands. However I must say that I regrouped them just in case.

@ Blanco
Quote
Maybe he doesn't see you because he's watching through his scope all the time?
That's a good point. I don't know why but they're aiming all the time. Here's list of commands I give them in the init.sqs file:
Code: [Select]
removeAllWeapons sniper1
sniper1 addMagazine "svddragunov"
sniper1 addMagazine "svddragunov"
sniper1 addMagazine "svddragunov"
sniper1 addMagazine "svddragunov"
sniper1 addWeapon "svddragunov"
sniper1 addMagazine "tokarevmag"
sniper1 addMagazine "tokarevmag"
sniper1 addMagazine "tokarevmag"
sniper1 addMagazine "tokarevmag"
sniper1 addWeapon "tokarev"
sniper1 addWeapon "binocular"
sniper1 addWeapon "nvgoggles"
sniper1 setBehaviour "safe"
sniper1 disableAI "move"
sniper1 disableAI "target"
sniper1 disableAI "autotarget"
sniper1 setUnitPos "up"
sniper1 doWatch (getPos south)
And I really have no idea why they don't watch through binoculars?
Btw Blanco - could you tell me what's wrong with this script you posted here? I get this error when I use it:
'("alive _X" count (units (_Targets select 0)+units (_targets select 1)+units (_targets select 2))>|#|0)': Error Zero divisor

Thank you in advance for your help.
Kind regards,
voodzia

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:blind AI sniper
« Reply #19 on: 10 Apr 2005, 21:55:55 »
Quote
sniper1 setBehaviour "safe"

Maybe you could change that to "combat" or "aware".


Planck
I know a little about a lot, and a lot about a little.

voodzia

  • Guest
Re:blind AI sniper
« Reply #20 on: 10 Apr 2005, 23:43:42 »
Initially all units in the base are in safe mode. There's just no need to set them at some kind of alert state. And I don't know why they are watching through their scopes all the time. They should scan horizon using binoculars I gave them. However I change their behaviour when unfriendly units come into these special zones - which are triggers of course. Then I set "combat, red" to snipers and "aware, white" to another soldiers in the base. I hope it's ok. I just would like to know why snipers don't use binoculars when I tell them to do so. Did I miss something?

Offline Blanco

  • Former Staff
  • ****
Re:blind AI sniper
« Reply #21 on: 11 Apr 2005, 00:47:31 »
Forget the script, it's old and a bad example.
There is nothing wrong with the script but it only worked with 3 snipers named (sniper1,sniper2,sniper3) and 3 groups with 3 leaders named (West_leader1,West_leader2,
West_leader3)

I have no idea why they don't use the binoc, normally when you give them one, they will use it, even without  commands like unitname selectweapon "binocular"






Search or search or search before you ask.

CrashnBurn

  • Guest
Re:blind AI sniper
« Reply #22 on: 11 Apr 2005, 04:10:55 »
One thing to mention. Snipers (east & west) already have nightvision programmed into their AI. There is NO need to give them NVGoggles. They also have the highest shot accuracy rating along with Spetz Natz and Black Ops @ 3.5. Compare that to an officer which has 2.0 and the majority of other soldier classes are 1.5.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:blind AI sniper
« Reply #23 on: 11 Apr 2005, 04:39:08 »
Haven't read this whole thread but...

I've had big trouble with AI snipers in the past as well. I don't know if there is a whole lot you can do. I believe the problem lies in the configuration of the units and/or weapons themselves. I don't think the weapons are configured to be shot by the AI past about 200m or so, and the units don't seemed to be configured to see beyond that range either...

The answer? Well, unfortunately, despite the millions of addons out there, I don't think anyone has decided to actually increase the sight distance of the AI yet. Supposedly there is some "long range engagement weapons pack" out there that might fix this problem. But I don't think you can fix this with scripting and default BIS stuff along. :(

@CrashnBurn,

I believe you are looking at the 'accuracy' property of those units, correct? In fact, that property has nothing to do with how well the unit can shoot, unless I'm mistaken. It actually just determines what is said when someone 'spots' that unit. (Example: "10 o'clock, AT SOLDIER, 400"--he said "AT SOLDIER" because the AT soldier's 'accuracy' property was low enough). How well an AI shoots is coded in the weapon's config, not the unit's.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:blind AI sniper
« Reply #24 on: 11 Apr 2005, 09:46:48 »
I have been shot by a sniper from nearly 1km.     And many times from over 600m.     No scripting on the sniper, no spotters, nothing.   Pure AI.
Plenty of reviewed ArmA missions for you to play

UNN

  • Guest
Re:blind AI sniper
« Reply #25 on: 11 Apr 2005, 10:14:13 »
Quote
I have a problem with AI sniper. I mean I can't make him shoot at enemy units

I can get the default OFP sniper to engage at about 900 meters on the Desert Island and 600m on Nogova.

I can post an example mission, but it's easy enough to test yourself. Just place a sniper on the map, with an enemy group moving towards it, at about 1000m. Name the enemy commander E1 and set the snipers skill level to max. In the snipers init field add:

Code: [Select]
This DoWatch E1
The sniper will start to think about firing as soon as he identifies units as hostile, the trick is to give him this info as soon as possible. Which the DoWatch command does.

Like I say, on Nogova he will open up at around 600M. I think OFP tries to simulate different terrain types for the AI. As players we just see flat textured terrain, it's almost as easy to see AI in grass as it is, when they are out in the open on the road or beach e.t.c

But the AI must have rules setup for it, try engaging AI while standing in the middle of the road, as opposed to standing in a bush. If your targets are moving through woods, bushes,  e.t.c it will take a bit longer for the AI to kick in. Obviously stance will have an effect and movement to. Teleport a unit in front of the enemy and the AI wont see him, move and they suddenly start to react.

Quote
I was working on an updata of my fixedpositions script a few weeks ago and i've found that AI fight better without dowatch and dotarget stuff, but they can use some scripted help when the enemy is near.

Yeah but OFP's AI has to be all things to all soldiers, if you want dedicated long range units like snipers, you have to use DoWatch. The best you can do is give him some close support.

Quote
Maybe he doesn't see you because he's watching through his scope all the time?

Binoculars are the only optics that appear to have an effect on the AI. Snipers scopes are just eye candy for as far as the AI is concerned. Sniper units just have enhanced eye sight, what weapon they carry has no effect on spotting infantry.

Quote
And I don't know why they are watching through their scopes all the time. They should scan horizon using binoculars I gave them.

Quote
I have no idea why they don't use the binoc, normally when you give them one, they will use it, even without  commands like unitname selectweapon "binocular"

Whats normal? AI only use Binoculars periodically, cant remember now but for arguments sake, say every 30 seconds. The Scan horizon command just gets the AI to rotate 360 degrees constantly. So combined together they must cover a tiny area of the front line with binoculars?

You can greatly improve the ability of dedicated AI when it comes to spotting enemy at long ranges, in the all the ways you mentioned above. But wait for it.......You have to use addons :) That's where all the important settings are for the AI when it comes to long range fire and Binoculars.

Quote
I've had big trouble with AI snipers in the past as well. I don't know if there is a whole lot you can do. I believe the problem lies in the configuration of the units and/or weapons themselves. I don't think the weapons are configured to be shot by the AI past about 200m or so, and the units don't seemed to be configured to see beyond that range either...

Cant speak for all other addons but the default OFP sniper rifles will fire at ranges of 900 meters given the right conditions. Inv 1944 snipers wont, but that's probably down to the weapons config. SEBNAM snipers have the best range I've seen under normal conditions, 800 meters on Malden.

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:blind AI sniper
« Reply #26 on: 11 Apr 2005, 11:32:35 »
Try removing the pistols from the sniper. I tried to make a hostage situation with the resistance snipers as terrorists on the roofs. They wouldn't fire at me until I was about 50m out and then they used their ingrams.
Similarly, I switched the units to Russian snipers without pistols, they would snipe me from 800+ metres.
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

voodzia

  • Guest
Re:blind AI sniper
« Reply #27 on: 11 Apr 2005, 12:55:52 »
First of all I'd like to thank you all for your great support - I really appreciate your help and all your suggestions are very useful for me since it's my first mission I'm trying to make and without you I could make a sh*t.
Now let's get back on topic.
Here's my present situation:
1. I still can't figure out why they don't use binoculars? I'd say that they even aren't in safe mode - they're watching though the scopes all the time.
2. Today I've made some tests and discovered quite odd thing. Namely one of the snipers doesn't fire even when I fire at him. He is standing still and aiming at me but doesn't pull the trigger at all. I even removed "disableAI target and autotarget" from his init field and that changed nothing. I guess the problem is the third command "disable AI move" but I can't remove it. I mean when I do so he jumps off the tower and then starts to fire. And I'd like him to be in the tower all the time. Do you think that this tower can be some kind of obstacle for him? To find out if it's possible I took his place in this tower as a player but imo everything should be fine. I mean there're some places where he can't see because of bars but not all the time.
3. There's one thing I forgot to tell you. I mentioned yesterday that one of the snipers fires a way much better than the other one. At first I thought that it's because I regrouped them. But I forgot that I also changed his tower to another one - House WireTower from Kegetys' Editor Addon 1.11. Initially his tower was same as that second which is placed in this base by BIS - it's steel tower iirc. But now I'm starting to think that there's something wrong with the tower - not the sniper. Do you think it's possible?

@ Tyger
Quote
Try removing the pistols from the sniper.
They didn't have pistols at the beginning. I added them Tokarevs only yesterday. And besides I don't want to remove pistols because they might be useful for snipers when enemy units somehow come closer to the base.

@ UNN
Quote
I can get the default OFP sniper to engage at about 900 meters on the Desert Island and 600m on Nogova.
I can hardly believe that it's possible but haven't tried it out yet. And besides my mission is on Koglujev island where there's almost no flat grounds there - at least in my mission's area ;)

Offline Blanco

  • Former Staff
  • ****
Re:blind AI sniper
« Reply #28 on: 11 Apr 2005, 13:09:41 »
I think this is the effect
Quote
He is standing still and aiming at me but doesn't pull the trigger at all
and this is the cause...
Quote
Do you think that this tower can be some kind of obstacle for him?
Try another tower than the claustrophobic steeltower. :P





Search or search or search before you ask.

voodzia

  • Guest
Re:blind AI sniper
« Reply #29 on: 11 Apr 2005, 13:13:20 »
But how can I replace this towe since it's on the map by default - I mean BIS placed it there.