How do I change what weapons soldiers start with?

#1chowdig69Posted 12/27/2009 7:15:42 AM
Im making a spec ops mission in Operation Flashpoint (im sure this could apply the same for arma/arma 2) but I don't want all of the soldiers to carry mp5s. Is it possible to make them start with different weapons (ideally I would like to have m16/m203 and m60 for each fireteam i have in the mission) This would also help with this sniping mission I'm trying to create (I want a my scout/sniper team to start with 1 m21 and 1 m16).
---
RIP Michael Jackson 1958 - 2009
#2InficiusPosted 12/27/2009 1:27:19 PM
Here's what I got from my old Arma mission:

removeAllWeapons this; this addMagazine "15Rnd_9x19_M9"; this addMagazine "15Rnd_9x19_M9"; this addMagazine "15Rnd_9x19_M9"; this addMagazine "15Rnd_9x19_M9"; this addMagazine "15Rnd_9x19_M9"; this addMagazine "15Rnd_9x19_M9"; this addMagazine "15Rnd_9x19_M9"; this addWeapon "m9";

That'll make the soldier spawn with an M9 pistol and several rounds of ammo (may not work for OFP). I know that the BI Wiki has the other weapons as well.
---
Intel Q6600 - BFG 8800GTX 768MB - OCZ 2GB RAM - 250GB 7200 RPM 16MB HDD - Gigabyte GA-EP45-DS3L - 600W StealthXStream
#3jackandbloodPosted 12/27/2009 2:13:44 PM

BIS should have made a simple addition to their editor, a unit gear editor, ages ago. As it is the editor in ARMA 2 is almost a straight copy/paste job from ARMA 1. Pretty lame. What I do is when I make a mission, I give a 60 second period of inactivity before any sort of action takes place. Put the desired ammo caches next to spawn, and gear command the units that I want to have specific weapons. I'm not comfortable with written scripts, as when I have gaming time, I like to do just that, gaming, not writing and debugging scripts.

#4jackandbloodPosted 12/27/2009 2:16:44 PM

Oh the original OFP. Dunno, that was a long time ago.

#5InficiusPosted 12/27/2009 2:52:22 PM
It really isn't that difficult though. You basically just have to put:

removeallweapons this;

this addmagazine "XXX";

this addweapon "XXX";

XXX values for Arma II can be found here: http://community.bistudio.com/wiki/ArmA_2:_Weapons
You can add multiple magazines by repeating the addmagazine command, as seen in my first post.
---
Intel Q6600 - BFG 8800GTX 768MB - OCZ 2GB RAM - 250GB 7200 RPM 16MB HDD - Gigabyte GA-EP45-DS3L - 600W StealthXStream
#6chowdig69(Topic Creator)Posted 12/27/2009 8:40:27 PM
Ok thx, um while we're on the subject of Opflash, how to use the laser designator? As in the mission "Laser Guided" (single mission) and how to use in editor? Also, how do i make it so can call airstrikes or artilerries in the editor?
---
RIP Michael Jackson 1958 - 2009
#7MarquisPosted 1/3/2010 12:51:57 AM
In the editor hit F7 and add the SecOp Manager. Synchronise it to yourself. Then create a trigger with Zero "A" and "B" range.

Set "Activation" to "Radio Alpha " and "Repeatedly."

Then, in "On Activation" copy and paste --

[["transport", "aerial_reconnaissance", "supply_drop", "tactical_airstrike", "artillery_barrage"], player] call BIS_SOM_addSupportRequestFunc;

Make sure the axis "A" and "B" ranges are zero so it can affect you anywhere on the map. Now you have an Airstrike (takes time to hit plus you must keep the laser on the target) an Artillery Barrage (9 of them) a Huey to transport you anywhere, a supply drop and the UAV to overfly areas and report hostiles to you.

Once you use one, just hit 0-0-1 (radio alpha) to refresh your options.

If you add this: this setVariable ["settings", [[], true, nil, nil, false]]; to the SecOp Manager INIT line you will be able to enjoy support without having to deal with secondary missions.

As for the ACM --

[BIS_ACM, 300, 600] call BIS_ACM_setSpawnDistanceFunc; [["RU", "USMC"], BIS_ACM] call BIS_ACM_setFactionsFunc; [0, 0.4, BIS_ACM] call BIS_ACM_setSkillFunc; [0.2, 0.5, BIS_ACM] call BIS_ACM_setAmmoFunc; ["ground_patrol", 1, BIS_ACM] call BIS_ACM_setTypeChanceFunc; ["air_patrol", 0, BIS_ACM] call BIS_ACM_setTypeChanceFunc;

Is a very basic script to set conditions. The big thing to note with this script is that the air_patrol is set to 0. While ground_patrol will NOT spawn only infantry, there will be no choppers/fw to deal with. You can check at -- http://forums.bistudio.com/showthread.php?t=73393 -- It's a bit of read but you'll get the hang of it.


---
Turning the car into oncoming traffic is counter-productive.
#8InficiusPosted 1/8/2010 10:39:49 PM
Wow, awesome. Thanks for that, I got the SpecOp script working great.

But I'm still having problems with the ACM. It really just seems to have no effect. I read through the topic and found that, with your script, we have to name the module "BIS_ACM", which I did but it still didn't work.
---
Intel Q6600 - BFG 8800GTX 768MB - OCZ 2GB RAM - 250GB 7200 RPM 16MB HDD - Gigabyte GA-EP45-DS3L - 600W StealthXStream