Bohemia Interactive Forums  

Go Back   Bohemia Interactive Forums > BI MILITARY GAMES FORUMS > ARMA 2 EDITING > ArmA 2 & OA - MISSION EDITING & SCRIPTING

ArmA 2 & OA - MISSION EDITING & SCRIPTING For discussing the technical aspects of creating custom ArmA 2 & the standalone expansion Operation Arrowhead missions as well as scripting.

Reply
 
Thread Tools Display Modes
Old 10-30-2009, 07:14 PM   #1
bartkusa
Corporal
 
Join Date: Aug 2009
Posts: 70
Bartkusa's Artillery Battery Officer script

Artillery Battery Officer

I play a lot of ArmA multiplayer, and I really like using the Artillery Module to aim mortars at targets spotted by other players. However, I found that I wasn't happy with the amount of firepower a single mortar offered me, and there was no way to have, for example, AI subordinates shooting their own mortar tubes. Also, multiplying the number of explosions you drop is always more fun.

With this pile of scripts, you can order AI subordinates to man indirect-fire weapons, mimic your own gun's azimuth and elevation, and fire coordinated volleys for effect.

You'll need to use the built-in Artillery module (or some other addon) to aim the battery. You could also use the Construction module to allow players to place their tubes where they want. All these scripts do are coordinate aim and coordinate fire.

Downloads
Demonstration Instructions
  1. Order your AI dudes into some mortars.
  2. Sit down in a mortar, and use the "Open Targeting" action to aim your mortar.
  3. Once you're happy with your aim, toggle Freelook to freeze your aim, and hit 0-0-9 to tell your AI dudes to aim in the same direction.*
  4. Hit 0-0-1 to order them to fire. Shots should rain down roughly in the same arrangement as your men's tubes are layed out.
  5. Use the Team Switch keys to jump into an aerial observer helicopter, and use freelook to watch the mortars fall.

* Once you order your men to aim, some of their AI ("MOVE", "TARGET") will be turned off. To reactivate the AI, you must issue an aim or fire command while sitting in a mortar that's different from the one they're in; this reactivates their AI. **

** Yes I know this is dumb as hell.

Caveats
  • I don't think this will work for anything larger than the ~80mm mortars, for now. With bigger artillery, I think the distance between the gun's position and the gun's muzzle's position screws up my aim-coordinating math. I've only successfully tested the M252 and the PODNOS 2B14 so far.
  • Very little of this code is inside "isServer" checks, so it might not work in multiplayer.
  • It uses Radio Alpha and India to order your men to fire. This might cause scripts to execute on all clients, which would therefore make it difficult to have multiple arty officers in a multiplayer mission.
  • Sometimes the men spontaneously explode themselves. I haven't the fainted clue why.
  • If your subordinates drop rounds on friendly units in the field, nearby friendly units might execute them
  • Artillery officers can only be defined at mission start currently; I'd like to be able to promote people to artillery officers at any time.
  • Friendlier support for AI subordinates who are doing security instead of firing tubes.

Please report bugs.

Last edited by bartkusa; 10-30-2009 at 07:19 PM.
bartkusa is offline   Reply With Quote
Old 10-30-2009, 07:38 PM   #2
DTM2801
Sergeant
 
DTM2801's Avatar
 
Join Date: Aug 2009
Location: The Netherlands
Posts: 115
I like this idea, step 3 not so much. Could this also be achieved by a global mapclick? making the arty 1/3 map screen absolete.
__________________
My projects

Last edited by DTM2801; 10-30-2009 at 07:49 PM.
DTM2801 is offline   Reply With Quote
Old 10-30-2009, 07:51 PM   #3
bartkusa
Corporal
 
Join Date: Aug 2009
Posts: 70
Quote:
Originally Posted by DTM2801 View Post
I like this idea in general, step 3 I'm not very happy with and would be a problem to use in a combat mission... the opened map targetframe is very hard to control, especially in a time critical situation. Could this also be achieved by a global mapclick? making the arty 1/3 map screen absolete.
So far, the only interface for that is the built-in Artillery module. Doing it via mapclick requires even more math than that module already uses. I'm not going to reinvent that entire wheel.

As for the other steps, when you hit 0-0-9, the units in your group near-instantly align to the new aim. Luckily, the 0 and 9 keys are close to each other on most keyboards.

Toggling freelook is not required. It only prevents you from bumping the mouse with your hand and screwing up your aim.

Last edited by bartkusa; 10-30-2009 at 07:59 PM.
bartkusa is offline   Reply With Quote
Old 10-30-2009, 08:18 PM   #4
DTM2801
Sergeant
 
DTM2801's Avatar
 
Join Date: Aug 2009
Location: The Netherlands
Posts: 115
Wheels are there to be reused , thinking about the existing call arty scripts (BIS and custom).. which require a mapclick, arty takes that as targetlocation. Maybe its more like reverse-engineering, as the target is now called by the arty officer. It might also mean a "lighter" variant while less calulation is needed.

Just bluring what comes to mind... although it might miss its purpose that you had in mind with these scripts
__________________
My projects

Last edited by DTM2801; 10-30-2009 at 08:20 PM.
DTM2801 is offline   Reply With Quote
Old 10-30-2009, 08:24 PM   #5
bartkusa
Corporal
 
Join Date: Aug 2009
Posts: 70
If you want to aim mortars with a map click, then there's no reason to actually sit on the tube. People have already implemented forward-observer scripts; I'm not trying to duplicate that.

I want a manual process. I want a human spotter to work with a human mortar commander. If you think that's too much work, then there's already solutions out there for you.
bartkusa is offline   Reply With Quote
Old 11-07-2009, 06:55 PM   #6
gunterlund21
Staff Sergeant
 
Join Date: Apr 2009
Location: Napa, Ca
Posts: 289
One think you might want to try is jones arty module. It provides elevation and azimiuth for targeting and you could have the ai line up to that. I believe the old wgl had you punch in coordinates and the ai would hit that.
__________________
My System
Motherboard - Asus Striker II Extreme 790i
CPU - Intel E8500 Duo 3.16GHz overclocked to 3.8
Memory - OCZ Gold DDR3 SDRAM 1600 2Gig
Drive - Western Digital Caviar RE2 500Gig Sata
Drive - Kingston 128Gig SSD
Video -BFG 285GTX
Drivers - Nvidia 195.
Artic Cooling Freezer 7 Pro CPU Fan
Power - Antec TPQ-850 850 Watt
Microsoft Windows 7 64-Bit
gunterlund21 is offline   Reply With Quote
Old 06-20-2010, 11:34 AM   #7
tromac
Corporal
 
Join Date: Oct 2009
Location: Newcastle, Australia
Posts: 75
Hi guys,

Just wondering if anyone has tried this with R3F Artillery scripts and 105mm guns?
tromac is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:44 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.