
Originally Posted by
My Fing ID
EDIT: This works. Needs improvement but it does function.
Here's what I've been working on. It doesn't require secops and let's you set up custom fire missions in the function call. You would call it like this:
Nul=[bat,type,ord,delay,rnds,disp] execvm "FireMission.sqf";
Bat = name of artillery game logic
Type = timed or immediate fire, can use t for timed
Ord = type of round used like HE, WP, etc
Delay = time between rounds fired. If timed then how long rounds fire for
Rnds = total rounds fired
Disp = dispersion.
The rounds are shot from the weapons so don't stand infront of a mortar tube! This script was only tested with US mortars but has at least 1 fatal flaw, I can't get the mapSingleClick command to work properly. Due to this the artillery will always target the player. I tried turning the code into 2 blocks so the mapSingleClick would call the rest of the code, but then my vars went bad. So I changed the vars to global but then mapSingleClick stopped calling the rest of the script. Hope one of you can fix it.
Got to be honest I can't remember which version of the script this is so it may not work at all. Also the splash over and such hints don't work well. Also I'm at work and had to post from my BB so if it doesn't look pretty, sorry
EDIT:
K I think this may work. I'm using the marker (ty Wiper) to store the pos and then transfer that pos to _tPos. Hope this works.
If anyone would like to test it here's a quick instruction.
Make a map with you as a player. In your units 'INIT' field put this radio code:
1 setRadioMsg "Fire HE"; 2 setRadioMsg "Fire WP";
3 setRadioMsg "Fire Illum";
Next make some artillery. Don't worry about adding ammo, it'll work as long as you use the right name.
K. Now add an artillery Game Logic. Name it Battery1. Synchronize it with the mortar team leader.
Finally were going to add 3 triggers, one for each ammo type (HE, WP, ILLUM). Make the three triggers, set them to repeatable. Then for activation select the radio codes Alpha, Bravo, and Charlie. Next on the On Activation line enter the following:
under the Alpha radio command:
Nul=["Battery1","I","HE",2,10,50] execVM "FireMission.sqf";
under the Bravo radio command:
Nul=["Battery1","I","WP",2,10,50] execVM "FireMission.sqf";
under the Charlie radio command:
Nul=["Battery1","T","ILLUM",6,30,500] execVM "FireMission.sqf";
Finally cut and paste his code into notepad. Then save it in your mission file (my documents/documents/Arma 2/missions/ I think). Name it FireMission.sqf
If everything worked you should have a radio on the map screen with 3 options.