Jump to content
skitz.

Forcing AI to shoot [HELP]

Recommended Posts

Hey guys I am asking for help to make a qilin armed (with just a gunner) to shoot in a certain direction activated by a trigger! thank you
 

Cheers,

Share this post


Link to post
Share on other sites

what did u try already? What code did u use? What exactly is ur question?

Share this post


Link to post
Share on other sites
13 hours ago, sarogahtyp said:

what did u try already? What code did u use? What exactly is ur question?

I tried this but for a qillin but wont work I changed it around
 

blackfoot forceWeaponFire ["gatling_20mm", "close"];

I want it too shoot in a direction! Thank you

Share this post


Link to post
Share on other sites
9 minutes ago, skitz. said:

I tried this but for a qillin but wont work I changed it around

What did you try? Nothing?

 

 

10 minutes ago, skitz. said:

I want it too shoot in a direction! Thank you

spawn a target at the position u want to fire at.

maybe this way:

_lasertarget = "LaserTargetW" createVehicle getPosATL _position;

and then u can give ur AI Gunner the command to target and fire at it:

Bob doTarget _lasertarget; Bob doFire _lasertarget;

 

Share this post


Link to post
Share on other sites
59 minutes ago, sarogahtyp said:

What did you try? Nothing?

 

 

spawn a target at the position u want to fire at.

maybe this way:


_lasertarget = "LaserTargetW" createVehicle getPosATL _position;

and then u can give ur AI Gunner the command to target and fire at it:


Bob doTarget _lasertarget; Bob doFire _lasertarget;

 

Wont work, first off I cant do this because its a global namespace and instead of laser target I want it to shoot in my direction even if im behind a wall

Share this post


Link to post
Share on other sites

Man!! In this thread is all u need. just read it and do some thinking on your own.

But I m feeling helpful today. So I ll give you some more hints.

 

use doTarget to give your gunner the target to shoot at.

use forceWeaponfire to force those AI gunner to use the weapon trigger one time.

if the AI shall shoot more than one time then execute forceWeaponfire as often as the AI shall pull the trigger.

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

×