Jump to content
Sign in to follow this  
RN Malboeuf

How to make ai fire from secondary fireposition ?

Recommended Posts

EventHandler "fire" works fine for both firepositions   (i mean t72 or RHIB2Turret for ex.),  but if you try

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player sidechat format ["weapons %1",weapons tank]

only {D81, PKT} is returned for t72.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">tank fire "DSHKM"

do not works

Am I missing smth ? How to get full list of weapons available via script? And  how to force AI to fire secondary weapon (DSHKM in t72 or back turret in RHIB2Turret) ?

Share this post


Link to post
Share on other sites

I can get any weapon name I like via config files wink_o.gif that's not the problem. The problem is - fire command do not works with weapons in the secondary turrets.

Share this post


Link to post
Share on other sites
How to get full list of weapons available ?

Just answering a question. smile_o.gif

Share this post


Link to post
Share on other sites

Maybe you need to command the unit manning that particular turret to fire (using dotarget/dofire or commandTarget/commandFire commands).

Although I hear there is a problem finding the gunner of a vehicle with multiple gunner positions, so it might be difficult to know who to give this order to.

Share this post


Link to post
Share on other sites

I'm having a similar issue using the fire command to get AI to throw a smoke shell. I'm guessing the fire command still needs some tweaks.

Share this post


Link to post
Share on other sites

Fire command works - it's a fact. the problem is only with the secondary turrets.

Share this post


Link to post
Share on other sites

Ok, I just tried this and it worked for me (if I understand correctly what you are trying to do). My simple test went as follows, in editor:

1. Placed a civilian bus named "bus".

2. Placed an AI T72 named "t72".

3. Placed an Opfor unit to be player to observe the test.

4. In an OPFOR present tigger I placed this code:

commander t72 dotarget bus; commander t72 dofire bus;

5. Put a waypoint on t72 so it moved into trigger area and fired the trigger.

When trigger fired, the T72 fired the MG on the bus. It did not fire the cannon.

In the T72, the Commander fires the MG, and the Gunner fires the Cannon.

Hope that helps.

Share this post


Link to post
Share on other sites

This is something that I already discussed concern about, and nobody had an answer. At the moment it looks like there's no way of targetting specific turrets with the weapon related commands, and BIS mustn't have considered this either since we don't have any commands for dealing with it. It might mike things a bit hard. confused_o.gif

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  

×