Ship Platform Usage

  • Offline Sp4wN7
  • Geared Up
  • **
  • Posts: 22
  • mercgeist.com

Ship Platform Usage

« posted: Feb 04, 2019, 11:35 PM »
Is there a way to add the ship platform weapons systems like the Mk 41 VLS (B_Ship_MRLS_01_F), but keep players from being able to acquire ownership and move them at will? Any help with what to add on the init would be helpful!

Re: Ship Platform Usage

« Reply #1 posted: Feb 08, 2019, 08:03 AM »
That wouldn't be terribly hard. How are you envisioning them working?
  • Offline Sp4wN7
  • Geared Up
  • **
  • Posts: 22
  • mercgeist.com

Re: Ship Platform Usage

« Reply #2 posted: Feb 11, 2019, 09:04 AM »
I would like to put the destroyer down, and then allow people to use the missile system of the Mk41 VLS (B_Ship_MRLS_01_F). I know how to put it on the map, but I forgot how to prevent the acquisition / ownership by a player and then subsequent movement of the item. Thanks for the reply btw.

Re: Ship Platform Usage

« Reply #3 posted: Feb 13, 2019, 06:39 AM »
To prevent players from moving it, just make sure that none of the class names that it inherits from are listed in R3FLOG. This might require you to specifically whitelist the other static weapons, instead of using the high level class name already there.
  • Offline Animatek
  • SNET Admin
  • First Blood
  • ***
  • Posts: 72
  • Editor de Profesión - ArmA III Admin from Cuba

Re: Ship Platform Usage

« Reply #4 posted: Feb 13, 2019, 08:22 PM »
Did you try to put
Code: [Select]
[this] call A3W_fnc_setupMissionObject in the object's init?
Soy administrador de ArmA III en una intranet en Cuba. No tengo experiencia en códigos ni programación, pero con ayuda he logrado un servicio eficiente y duradero, todo offline y sin internet.
  • Offline Sp4wN7
  • Geared Up
  • **
  • Posts: 22
  • mercgeist.com

Re: Ship Platform Usage

« Reply #5 posted: Feb 15, 2019, 02:47 AM »
I can't seem to get it to work. Here is my github mission file link: https://github.com/Sp4wN7/Mercgeist.Stratis/tree/master/Mercgeist.Stratis

Any help would be much appreciated!

Re: Ship Platform Usage

« Reply #6 posted: Feb 15, 2019, 09:01 PM »
Spawn how you placing the objects on the map?
  • Offline Sp4wN7
  • Geared Up
  • **
  • Posts: 22
  • mercgeist.com

Re: Ship Platform Usage

« Reply #7 posted: Feb 20, 2019, 05:11 AM »
In the editor, and adding the destroyer as a static ship, and then the MRLS as a turret with no crew. I cannot seem to keep the "acquire ownership" option away from the object. This enables one to own the turret and move it from its static location.

Re: Ship Platform Usage

« Reply #8 posted: Feb 20, 2019, 11:55 AM »
Okay. So R3F has a class in it that the MRLS inherits from, so that's why it's getting the option to move/lock/load. I generally like to use the lowest level class names so that I don't get any extra things (I also switched R3F to require an affirmative variable on objects even if the class names match)

However, if that seems a bit much you can try putting this in the init for the MRLS:
Code: [Select]
this call A3W_fnc_setupMissionObject
note that the call function doesn't take brackets around "this"

Without a crew in the MRLS it wont be usable. To get around this create a player action when they're looking at it that calls fn_createCrewUAV. Then they should be able to take control of it.

I use this to turn UAVs back on (it goes in playeractions.sqf):
Code: [Select]
["Re-Initilize UAV", "client\actions\reinitializeUAV.sqf", ["Re-Initilize"], 1, false, false, "", "{_x in ['B_UavTerminal','O_UavTerminal','I_UavTerminal']} count assignedItems player > 0 && {cursorTarget iskindof _x} count ['UAV_02_base_F', 'UAV_04_base_F', 'UAV_03_base_F', 'UGV_01_base_F', 'StaticWeapon', 'UAV_05_Base_F'] >0"]
which calls this file:
https://github.com/TheGreatMonkey/ArmA3_Wasteland.Altis/blob/GMG_Main/client/actions/reinitializeUAV.sqf
  • Offline Sp4wN7
  • Geared Up
  • **
  • Posts: 22
  • mercgeist.com

Re: Ship Platform Usage

« Reply #9 posted: Feb 23, 2019, 12:16 PM »
Thanks for the reply, but I already tried that. Try to put it in your mission file and let me know if you're successful... I'll just dissect your mission pbo :)

Re: Ship Platform Usage

« Reply #10 posted: Feb 25, 2019, 12:08 PM »
So I'm assuming by MLRS you mean the Mk41 VLS.

The reason R3F offers to let you load it into stuff, and pick it up and such, is because it inherits from "StaticWeapon". This is a base class for every static weapon (tripod .50, tripod GMGs, etc).

So you need to check R3F_ARTY_AND_LOG/R3F_LOG/config.sqf

look for R3F_LOG_CFG_objets_transportables

a couple line down you'll see ["StaticWeapon", 5],

Below that you'll find R3F_LOG_CFG_objets_deplacables

the first entry in that array is "StaticWeapon"

These are whats allowing the player to load the VLS and Move it. You'll need to remove "StaticWeapon" from both of those arrays, and replace it with the class names for each static weapon you want to able to load and move. You can use base classes such as "GMG_01_base_F" instead of child classes such as "B_GMG_01_F".

I've been messing around with it a bit in the editor, as well as placing one on my map, and the thing seems majorly broken. In the editor it functions as a UAV, using the UAV operator character whether it has a crew or not I'm able to activate it and use it as a Remote turret. When I placed it in my mission, when I approached it I was able to simply enter the thing as a gunner. No UAV shenanigans required.

This commit has a quick and dirty proof of concept implementation of the VLS in my mission. If you run this PBO you'll see plenty of extra actions available because of "StaticWeapon" used for their criteria.

https://github.com/TheGreatMonkey/ArmA3_Wasteland.Altis/commit/13b1880466f766075c4bddcabcf74903c33566c8
  • Offline Sp4wN7
  • Geared Up
  • **
  • Posts: 22
  • mercgeist.com

Re: Ship Platform Usage

« Reply #11 posted: Feb 26, 2019, 11:23 PM »
Ok, thanks for your help. I will check it out! I know that the 509th server has successfully put it in their map, but they appear to be using a different R3F, or perhaps an older version.