OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Dajan on 06 Mar 2009, 16:44:57

Title: [SOLVED] SelectWeapon using GL
Post by: Dajan on 06 Mar 2009, 16:44:57
Hey guys, having scripting probs here:

Giving units a specific loadout via trigger, I've written a script that adds mags & weapon. With standard bullet-firing weapons UNIT selectWeapon GUN works fine;
with a GL (as in m16a2gl) however, the inserted weapon remains unselected.

It's a minor niggle, but I dislike having to scroll weapons the moment a script loads - any thoughts on the correct line I should be using please.

EDIT:

OK, hold the N00B responses! Despite looking through every copy of the COMREF that I had and missing it, I found the answer on here. Laugh now and call me names when I'm gone.

EDIT 2:

As suggested - For grenade launcher-equipped rifles (and I anything with multiple muzzles I think) code should be

Code: [Select]
UNIT selectweapon MUZZLENAME
as detailed http://www.ofpec.com/COMREF/index.php?action=details&id=284
Title: Re: SelectWeapon using GL
Post by: johnnyboy on 06 Mar 2009, 17:47:41
No name calling bro!  That's one of the things that sets this site apart.

How about posting the solution or link to other thread that has the solution.  That way the next guy that reads your thread title can find the solution.