Jump to content
Sign in to follow this  
mindstorm

selectWeapon not working?

Recommended Posts

Hey

I'm trying to get an AT soldier to shootdown a helicopter. For some reason they don't switch to their launcher. I tried giving them different launchers and selecting the launchers.

So they:

1. Dont automaticly switch themselve

2. selectweapon his not working for the secondary weapon (works for handgun).

Is this bug or am I doing something wrong?

this removeWeapon secondaryWeapon this; 
this addWeapon "launch_NLAW_F"; this selectWeapon "launch_NLAW_F"

Share this post


Link to post
Share on other sites

My guy fired almost immediately

removeAllWeapons this; 
this addMagazines ["rpg32_aa_f",2]; 
this addweapon "launch_rpg32_f";

Other option:

In the soldiers init:

this disableAI "AUTOTARGET";
this disableAI "TARGET";

In a trigger:

dude reveal [heli,4]; 
dude doTarget heli; 
dude doFire heli;

Also the NLAW is an anti-tank weapon, use the RPG launcher instead.

Edited by cobra4v320

Share this post


Link to post
Share on other sites

Thx for that info. I got them to fire at the chopper. But they only fire at it from like 100 meters of distance.... I have a couple of units set-up at a near mountain, from where I can easily hit the chopper with a rpg32_f. The AI however just lies down and does nothing. Same with the doTarget/doFire. They only shoot at the chopper when it's really close.

How can I change the distance from where they start shooting? Their skill is maxed out and I even set "setSkill ["spotDistance", 500];".

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  

×