blank1 10 Posted September 28, 2009 Is there any way that i can start my units off in a mission with weapons other then the default class weapon? For example; start a sniper unit (ghillie suit) with a assault riffle? that possible. Thanks for any help on this subject. Share this post Link to post Share on other sites
boneboys 0 Posted September 28, 2009 This may help... http://community.bistudio.com/wiki/removeWeapon Share this post Link to post Share on other sites
rekrul 7 Posted September 28, 2009 Hi. Try DLing this: http://www.armaholic.com/page.php?id=4847 I believe there are some examples there for just that. Then look here: http://forums.bistudio.com/showthread.php?t=73241 for the weapon and ammo classes. Share this post Link to post Share on other sites
blank1 10 Posted September 29, 2009 sweet thanks alot for the help guys Share this post Link to post Share on other sites
H3NRY 10 Posted September 29, 2009 sorry to steal a thread but i have been trying to use this on vehicles and have not been able to get the syntax and all that corrent, either that or it isnt possible how i am trying to... here is the "initialization" section of the vehicle.. veh = [this, 600, 600] execVM "vehicle.sqf"; addmagazine = "2Rnd_Maverick_A10"; would that add the extra 2 mav's in it ( tried it but it didnt add them, was thinking ihad to remove all the other ammo or something and then place the ammo i want) or am i just doin' it wrong? ( assuming the latter, never did any scripting like this and just trying to learn lol) Share this post Link to post Share on other sites
rekrul 7 Posted September 29, 2009 I have very little experience in this but everything I've read so far when it comes to loadouts is to run removeAllWeapons first. Take a look at page 71 in Mr Murrays editing guide that I linked to above. Share this post Link to post Share on other sites
shuko 59 Posted September 29, 2009 I have very little experience in this but everything I've read so far when it comes to loadouts is to run removeAllWeapons first. Take a look at page 71 in Mr Murrays editing guide that I linked to above. That just removes everything. If you only want to change weapon, you can just do removeweapon + addweapon (and obviously switch magazines as well if they dont use the same type). Share this post Link to post Share on other sites
H3NRY 10 Posted September 29, 2009 i was thinking that i had to remove all ammo and weapons then re-place them but i didn't try it, was just trying to ad an extra 2 mavs to the A10, i will try to remove ALL weapons and ammo then add what i want. anyone want to throw up a script that will drop all A10 standard ammo and weapons and have W+ for weapon name and A+ for the ammo?, would take me a whole day just to figure that out haha ( test syntax, test syntax, test syntax, ETC, ETC) if you dont want to then just let me know if my syntax was correct above and ill figure it out from there ( if that is the right way then all i got to do is keep goin') thanks in advance Share this post Link to post Share on other sites
Big_Daddy 10 Posted September 29, 2009 (edited) addmagazine "2Rnd_Maverick_A10"; No = and it doesn't add 2 extra rounds, it adds a magazine of 2 rounds, so you'll fire 2 rounds, reload, and can fire 2 more. so you'll have 2x2 not 4. get it? Here Weapon Class(1) = GAU8 Weapon Class(2) = MaverickLauncher Weapon Class(3) = SidewinderLaucher_AH1Z Weapon Class(4) = BombLauncherA10 Weapon Class(5) = FFARLauncher_14 Magazine Class(1) = 1350Rnd_30mmAP_A10 Magazine Class(2) = 2Rnd_Maverick_A10 Magazine Class(3) = 2Rnd_Sidewinder_AH1Z Magazine Class(4) = 4Rnd_GBU12 Magazine Class(5) = 14Rnd_FFAR removeweapon "GAU8" removemagazine "1350Rnd_30mmAP_A10" addmagazine "1350Rnd_30mmAP_A10" addweapon "GAU8" Allways add magazine before weapon, so you don't have to "reload" the magazine when you switch to that weapon. Edited September 29, 2009 by Big_Daddy Share this post Link to post Share on other sites
H3NRY 10 Posted September 30, 2009 (edited) ah thanks.. i think i tried it without the "=" ( veh = [this, 600, 600] execVM "vehicle.sqf"; addmagazine "2Rnd_Maverick_A10"; ) but it said "missing ; " hmm.... ill play with it a bit and get it workin'. thanks again Edited September 30, 2009 by H3NRY Share this post Link to post Share on other sites
galzohar 31 Posted September 30, 2009 this addMagazine "2Rnd_Maverick_A10"; http://community.bistudio.com/wiki/addMagazine Also the init line will not get run again when the unit gets respawned via a script unless the script specifically sets it and makes it execute (or just runs the command again after the respawn). Share this post Link to post Share on other sites
H3NRY 10 Posted September 30, 2009 hmm.. well thats the part i was just about to ask, will it happen every time it respawns. it wouldnt be somethign as simple as adding the line to the vehicle.sqf, it would have to be defined what vehicle it is for and when to exec ( after the if (_dead) then statement i assume.. i could even make a whole new one with the added " load" script to it and use it only on the a10's) code is gonna fry my brain :) Share this post Link to post Share on other sites
galzohar 31 Posted September 30, 2009 You could have the initialization script name (aka "tankinit.sqf") be another parameter that the vehicle.sqf script receives, and executes that script with the vehicle as a parameter every time it respawns the vehicle (or do nothing if that parameter does not exist). For example, if you currently use 3 parameters, call the script with an extra parameter such as "tankinit.sqf" which should have the same command that you run in the init (aka this addMagazine whatever). In vehicle.sqf add: _veh = _this select 0; ..... _vehicleInitScript=""; if (count _this > 3) then { _vehicleInitScript = _this select 3; }; ..... veh = createVehicle ... if (_vehicleInitScript != "") then { _veh execVM _vehicleInitScript; }; ..... Share this post Link to post Share on other sites
11_harley_11 0 Posted December 24, 2009 Is it possible to change your enemies particular weapon in a mission? I'm currently using the FFAA_terrorista's in a mission and most of them use that AKM popgun thing and the sound of it is driving me nuts'o'rama! I can barely play my own mission. *sniff* Share this post Link to post Share on other sites
shuko 59 Posted December 24, 2009 Yes it is. Same remove/add weapon and magazine commands. Share this post Link to post Share on other sites