Jump to content
Sign in to follow this  
MiXeR

selectWeapon for AI

Recommended Posts

Hi there. I have a trouble with selectWeapon command.

I placed 2 soldiers with stinger. 1 - is me, 2 - is ai.

When i trying to switch weapon to Stinger (s1 selectWeapon "Stinger") nothing happens. It only works for player. I tryed also "s1 action ["SWITCHWEAPON",s1,s1,2]" but ai still stayng without any moves. (for player this action works fine)

I also tryed to remove all weapons and add only stinger - but still fail.

How to force ai switch to secondary weapon?

Thanks.

Share this post


Link to post
Share on other sites

Hello,

please try this one, maybe it helps you:

s1 selectWeapon (secondaryWeapon s1)

Greeting

Silola

Share this post


Link to post
Share on other sites

Thanks for you answer Silola, but ai still doesn't take stinger. :(

Maybe it's a bug?

Share this post


Link to post
Share on other sites

dont bump the thread.

you can try useing action "useweapon"

_unit action ["useWeapon",_unit,_unit,Index] 

Share this post


Link to post
Share on other sites

hi

I want AI team members to use only M9SD until alarm raised. And keep rifles/MGs on back.

But sometimes AI switches to rifles/MGs before alarm. Especially when a target is seen. help.

Using select and use together helps. Just select and they switch in seconds. Removing ammo seems the only way BUT you get "out of ammo" message.

init.sqf

removeAllWeapons Moose;

Moose addmagazine "15Rnd_9x19_M9SD";

Moose addweapon "M9SD";

Moose addmagazine "15Rnd_9x19_M9SD";

Moose selectweapon "M9SD";

Moose useweapon "M9SD";

Moose addweapon "Mk_48_DES_EP1";

I guess maybe only option is to remove gun/rifle from init.sqf...(i.e. not on back at spawn, shame)

Edited by cream-t

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  

×