Jump to content
Sign in to follow this  
chartier

Ai chopper pilot and firing manually

Recommended Posts

Another one problem:

AI pilot is flying alone with his AH-1. He spots me driving a Hummer and should start an attack. He's making attack manouvres on me but I can't make him fire manually!

Already tried:

_AIunit action ["MANUAL_FIRE",vehicle _AIunit]

_AIunit doTarget player

_AIunit doFire player

None of the above cases work. So, is that even possible to do?

Share this post


Link to post
Share on other sites

Manual fire is only for human players.

All AI units are controlled by behaviour files (which should be the .rtm-files). The AI units are only able to do what is written in this files and using the weapons is only in the "gunner".rtm file.

That's why it should be not possible to make your pilot shot at you.

A workaround could be to create an gunner by the camcreate command and delete him after he shot at you.

Maybe you could also create an "invisible" gunner, but that would be a bit more work.

Share this post


Link to post
Share on other sites

Thanks Rastavovich! I'll try your suggestion. It would be a nice addition of intelligence to AI when enabling him to shoot at me biggrin.gif

Share this post


Link to post
Share on other sites

That was a very good idea indeed, and it works! But only with createUnit -command.

CamCreate somehow crashes to Win desktop when unit created with that should start shooting (maybe AI pilot commands a target for him -> crash). I tested camCreate also by creating a SoldierEPilot close to me and noticed that he will just stand there. Maybe I missed some vital initializations for the unit??

Share this post


Link to post
Share on other sites

Hi there!

The CamCreate command somehow disables the AI for spawned units. Instead you should create a 'real' gunner in the editor and use MoveInGunner when he should fire + SetPos when he should be removed from the gunner seat. You could place him somewhere remote, so nobody accidently will see or kill him ...

Share this post


Link to post
Share on other sites

I found out that unit created with createUnit -command and moved in chopper's gunner position is hard to delete away. So, I made it with niki's suggestion and now the script works as I wanted it to. Thanks again people!

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  

×