Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
Von_Lipwig

Mobile Mortar Team, How?

Recommended Posts

First off, I'll say that I have tried searching for this and I have also gone through about 5-10 pages of the editing forum but I haven't found a solution yet. If there already is a solution to this that you know of, please send me in the right direction and sorry for bothering you ;)

In a mission I would like to have a mobile mortar team (human players, don't worry) to support the frontline troops. Arrowhead offers the ability to actually pack up and move a mortar, but this does create a problem for me: I have no idea how to make it so that you can get the targeting system appear for the gunner. In the editor preview I have not yet been able to set it up so the gunner is able to target by anything than pure luck and intuition.

So far, I've tried:

-doing it all clean, no modules (set up mortar by picking up mortar back and assembling on tripod, no targeting system appears)

-artillery module synchronised to the tripod and the mortar bag (hey, I'm desperate!)

-artillery module synchronised to tripod, mortar bag and player

So, it's probably something real simple that I'm missing, but in my defence I'm a bit stupid sometimes, I mean inexperienced. :p

Thanks in advance for any help. :)

Share this post


Link to post
Share on other sites

place down a static mortar (all assembled and shiznit), synch with module and sync module to whoever needs to be firing it.

Share this post


Link to post
Share on other sites

And then you can still disassemble it?

Or in other words, can you by default disassemble all static weapons in OA? because the critical part of the mission is that the mortar team must be mobile. :)

Thanks already, I'll try it asap. :)

---------- Post added at 04:01 PM ---------- Previous post was at 03:31 PM ----------

I just saw that you can! I never knew that!

OK, one more question: is it possible to re-arm the mortar? I see it only comes with 8 shells and I was wondering if it's possible to either increase this amount or pick up more ammunition. :)

Thanks in advance!

Share this post


Link to post
Share on other sites

It just might be possible to access the aiming system used for human players outside of normal sync means, but it would take some heavy scripting magic. Have not tried it myself ( yet ) but it seems so based on what I read in the arty module source.

Another thought is that ACE has a slightly modified version of that module, supposedly tweeked to eliminate the need for sync.

Share this post


Link to post
Share on other sites

In a few weeks the BAF DLC will be out and that includes a new system for mortars so might see how that will work.

Share this post


Link to post
Share on other sites

I'll be looking forward to that!

So far I have gotten it to work in the editor preview at least whichis a blessing. ;)

Edited by Von_Lipwig

Share this post


Link to post
Share on other sites

You dont need to sync it in OA.

zgPagbMPuNs

To reload, place this in the init field:

this addAction ["Get more ammo","reloadmortar.sqf",[],1,true,true,"","(count magazines _target) < 1"];

reloadmortar.sqf (pick right ammo):

(_this select 0) addmagazine "ARTY_8Rnd_82mmHE_2B14";

Share this post


Link to post
Share on other sites

Oh thanks! So as long as there's an arty module present ni the map, no synchronisation is required! Awesome!

Also thanks for the reload thing, great stuff!

I'll start a seperate thread ont he revive issue I'm having.

Share this post


Link to post
Share on other sites

Hey I was wondering, does this also work if you want to add ILLUM and WP shells to a mortar unit's inventory? How exactly would I do that? Add three different reloadmortar.sqf-esque files, or can I do it with one script?

Because now that I see this, I also see the possibilities of having several different kinds of mortar rounds, should make things more interesting! :)

Thanks in advance!

Share this post


Link to post
Share on other sites

You just need to find the class name for the ammo you need

"ARTY_8Rnd_82mmHE_2B14" is one type - there are several other types. Search for 'object classnames' and you'll find something you like.

Share this post


Link to post
Share on other sites

Thanks :)

Yet another question: is it possible to zoom in on the targeting screen? Right now all I get is a two-digit grid which doesn't make for very accurate fire missions. Also, as the numbers on the aiming reticule are pretty small (the ones giving the time before impact in seconds) it's kind of hard to see when the shells will arrive.

Is there any way to zoom in on this or make it bigger (I already changed my interface size from very small to small with no real noticeable difference, and still not three-digit grid), or is there no option but to start looking for scripts/addons to provide an alternate way of manually aiming artillery?

Actually, on that subject, would this certainly have to be an addon or is a script around for this?

Share this post


Link to post
Share on other sites

There are few Artillery scripts around.

As for zooming the default targeting screen, I'm going to say that no. The Arty module uses a hard coded value of 0.3 for zoom, which is used inside a loop with 0.1sec interval. :(

Share this post


Link to post
Share on other sites

I'd like to hijack this thread and ask a related question.

I would like to start a mission with a mortar team equipped with the bags on their backs. Is it possible to change the loadouts in the bags to equip them with the proper ARTY_ rounds? Will this approach work with the artillery module? Editor testing shows that simply placing mortar bags on the ground and assembling a mortar out of them doesn't give it the targeting interface.

Share this post


Link to post
Share on other sites

[] spawn {
 private ["_isVeh","_veh"];
 while {true} do {
   waituntil {vehicle player != player};
     _veh = vehicle player;
     _isVeh = getNumber(configFile >> "CfgVehicles" >> typeOf(_veh) >> "ARTY_IsArtyVehicle");
     if (_isVeh == 1) then {[_veh] call BIS_ARTY_F_initVehicle};
   waituntil {vehicle player == player};
 };
};

I guess you could add a vehicle type check in there and replace the ammo as well.

Share this post


Link to post
Share on other sites

Good idea shk. So I take it this would go in init.sqf?

If I wanted to replace the ammo, I suppose I could put it in this line...

if (_isVeh == 1) then {[_veh] call BIS_ARTY_F_initVehicle};

...using addmagazine/removemagazine and referencing _veh? There will likely only be one kind of artillery per mission so an extra check is unnecessary.

Thanks for the code!

Share this post


Link to post
Share on other sites
Sign in to follow this  

×