Jump to content
Sign in to follow this  
Funkman

AI not aiming at head

Recommended Posts

Hello,

I am in the process of making a scene, one soldier is kneeling, the other is aiming at him. However, using the command

C1 doTarget US1
Leads to the following result:

http://img20.imageshack.us/img20/4715/arma22010062619562863.jpg 445 kb

Uploaded with ImageShack.us

As you can see, the AI still thinks he is standing, so it looks a bit silly.

Any suggestions as to what I can do.

Thanks in advance,

Funk.

---------- Post added at 10:48 AM ---------- Previous post was at 10:04 AM ----------

I tried setUnitPos down, but still we get this:

http://img145.imageshack.us/img145/9015/arma22010062620455012.jpg 429 kb

Uploaded with ImageShack.us

Edited by W0lle
Images > 100 kb

Share this post


Link to post
Share on other sites

My AI does target me and does follow me when I go low or prone. Both of us are regular riflemen with weapons, and not grouped (in case it matters). What does matter though is the size if your image - hurry hurry :p

Share this post


Link to post
Share on other sites

Carl, if you will, can you do me a favour and try setting one of the units PlayMove ""AmovPercMstpSnonWnonDnon_AmovPknlMstpSnonWnonDnon";

that will make it kneel. Does the other AI still target correctly?

Share this post


Link to post
Share on other sites

Sorry, not able to fire up Arma2 right now, memory stuff and pc doing background tasks that takes a while. But try to use _unit setUnitPos "MIDDLE" (or "DOWN") instead and see if that helps. I'm really not confident with playMove/switchMove as I tend to get in trouble with those.

Share this post


Link to post
Share on other sites

I don't think it's necessary to post two 1920x1080 images with 400+ kb file size which also totally screw up the forum layout just to show the aiming of the AI. :rolleyes:

Share this post


Link to post
Share on other sites

Mine will target the unit correctly even using the playmove which as you have it posted contains errors.

Share this post


Link to post
Share on other sites

Place a rabbit (with this disableAI "ANIM") behind the soldier and make the other aim at the rabbit? For me he always follows the target's stance though.

Edited by Celery

Share this post


Link to post
Share on other sites

Hmm, ok Ill try the rabbit.

I was going to just have him holding his rifle rather than aiming for this scene, because I cant seem to get the aiming correct.

---------- Post added at 12:56 AM ---------- Previous post was at 12:54 AM ----------

Hmm, I tried it using a rabbit and a goat. The character just keeps his rifle pointed at head level, he never lowers it.

Share this post


Link to post
Share on other sites

Is there any chance you can upload a test mission so we can take a look as I can't repeat your findings.

Share this post


Link to post
Share on other sites

Yep, one min...

---------- Post added at 01:23 AM ---------- Previous post was at 01:21 AM ----------

Ok, folder here:

http://www.filedropper.com/scene1testchernarus

Thanks for going to this effort for me.

---------- Post added at 01:24 AM ---------- Previous post was at 01:23 AM ----------

O, you have to go to "Intro", not Mission.

Share this post


Link to post
Share on other sites

I think I have it, you need to give him some ammo C1 addMagazine "5Rnd_762x51_M24"; and then use C1 dotarget US1;C1 dowatch US1 he will track him if a bit reluctantly. Using his original weapon he has no problems.

Share this post


Link to post
Share on other sites

Ok sweet thanks.

He only needs ammo if he is going to shoot him though right? (Seeing as my hero of the story is the one with no gun, there is no need to give the Colonel some ammo :) )

BTW, you dont happen to understand why it wont lip sync the file do you?

---------- Post added at 10:57 AM ---------- Previous post was at 10:51 AM ----------

NM, for some reason the lip synching is now working much to my relief.

However, the Colonely still only aims at head hight. Even though I have done what you suggested.

Share this post


Link to post
Share on other sites

It's weird the Colonel will track the unarmed soldier if I give the soldier a waypoint to move to but he won't track his stance.

This problem only happens when you remove the original weapons, this look like a bug but it's only a problem when targeting unarmed units.

I thought as it was tracking the soldier it would follow that it would track his stance.

Wrong again, the only fix so far is not to remove his weapon.

Edited by F2k Sel

Share this post


Link to post
Share on other sites

Hmm, ok.

Thanks a lot for your insights into it, nice to know how it works.

it is for a machinima, and there is no way that the soldier can be armed (as it is a key story point)...So I might just have to have him standing rather than kneeling.

Thanks again.

Share this post


Link to post
Share on other sites

It doesn't mater about the unarmed guy just don't change the Colonels weapons from the default one.

Share this post


Link to post
Share on other sites

If this is for a movie, why not fix it in post! Will he aim at a rabbit? If so, film him aiming at the rabbit, then composite in the kneeling target later. :)

Share this post


Link to post
Share on other sites

I've made a slightly better demo of the problem so it's easy to see the difference between a unit with default weapons and a unit with replaced weapons.

http://www.sendspace.com/file/v2q1kg

Things tried

He won't track the rabbit in a down elevation.

You can't make the target an enemy and set him captive.

You can't leave him as enemy and remove ammo.

Targeting genuine enemy isn't a problem.

Edited by F2k Sel

Share this post


Link to post
Share on other sites

Not tested, and a bit whacky, but have you tested giving your character a dummy weapon he won't be able to use, like a Bushmaster? I'm not sure if that is even possible though, but...

Oh, too late. Virtual sigars on the way :)

Share this post


Link to post
Share on other sites

Ok to sum up all you need to do is put this in the init of the Colonel

 removeAllWeapons this; this addMagazine "5Rnd_762x51_M24";this addWeapon "M40A3"; this selectWeapon "M40A3"; this dotarget us1;this dowatch us1;this setunitpos "up";this setCombatMode "BLUE" 

and this in the unarmed unit

removeAllWeapons this; this exec "Camera.sqs"; this setDamage 0.3;this allowfleeing 0

Place an enemy unit on the map with probability of presence 0% (high rank just to be safe) and group the unarmed man to the enemy unit.

I've included the fix in a file if you get stuck.

http://www.sendspace.com/file/lhl1am

Simple really.

Share this post


Link to post
Share on other sites

Ah, you have a fix?

Sweet, I will try it in a few mins. Much obliged.

Share this post


Link to post
Share on other sites

Well, I copied and pasted your lines in, but still he aims at head height.

Share this post


Link to post
Share on other sites

I'm lost now.

I thought the problem was that when the unit crouches or lies down the captain didn't change from the original head shot stance.

The code above fixes that for me, the captain will now change his aim to follow the soldier.

He will be aiming at his head but it will be his current head position.

Are you trying to get him to shoot another part of his body?

I copied the code back and it works fine, did you group the solder to an OPFOR not present and give OPFOR higher rank.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×