Jump to content
Mr_Sideburns

How to make a static weapon shoot a far away target

Recommended Posts

Hello ! 

I'm creating a mission in wich an Ai mortar team has to shoot a target located in an other area of the town. 

 

I've tried many things without succeeding.

 

To try to figure out my problem, in a simplier scenario, I made a soldier shoot a car with this :

team1 reveal car1;

soldier doTarget car1;

soldier dofire car1;

 

ps : it work fine with a trigger, but the car must not be hidden from the soldier's view

 

Then I tried placing the soldier in a mortar or a DShKM UAZ. He targeted the car but didn't shoot.

 

So where the problem comes from according to you ? Am I missing a command somewhere ? Must the unit see it's target ? 

 

Thanks for your answers ! :wink_o:

Share this post


Link to post
Share on other sites
On 25/06/2017 at 9:04 PM, sarogahtyp said:

I think u need artillery specific commands here like

doArtilleryFire

Yes, it looks like what I am looking for ! Thanks !

I will try this tomorrow.

Do you know where I can get the exact name of mortar ammo ?

In my mission the mortar team is supposed to (constantly) shoot flares (so I will have to loop that and add some sleep).

 

Edit :
Here's what I managed to do. It works as intended with a trigger.

[]spawn { 
while  {alive OfficerMortar} do { 
mortar1 doArtilleryFire [[4333.463,4411.297,0],"rhs_mag_3vs25m_10",1];
sleep (random 1 +2);
mortar2 doArtilleryFire [[4346.318,4333.674,0],"rhs_mag_3vs25m_10",1];
sleep (random 3 +1);
mortar3 doArtilleryFire [[4379.654,4261.604,0],"rhs_mag_3vs25m_10",1];   
sleep 30 ; 
 }; 
};

You can even write

_unit doWatch [direction];

in the init. field of each mortar so that it doesn't move between each salve.

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

×