beno_83au 1369 Posted September 14, 2017 (edited) Download: MIL_airburst - Dropbox / Armaholic Description: I created this for VBS3 and converted it across (and fancied it up) for ArmA 3. It allows required ammunition types to be detonated for use as an airburst round. This was converted primarily for the ADF Uncut Carl Gustav 84mm HE round, however it could conceivably be used for any explosive round (also tested on vanilla RPG-42 HE and HEAT rounds). Features: - GUI for quick input of range. - Engagement distances: - Range setting under 40m will have no affect (i.e. impact detonation). - Range setting between 40m and 70m will have a chance to fail to detonate. - Can be applied to only selected players (e.g. units who would be trained in the application of HE rounds for airburst). - Can account for numerous ammunition types (customisable). - Range setting will be "remembered" until a round is fired (pre-set a range into the next round). - More of a sacrifice on realism in favour of gameplay: - Range can be re-adjusted, including closer, without "breaking" the fuse. - AT gunner is the one making fuse adjustments. - Can potentially be used on any explosive round not featuring an adjustable fuse in reality (e.g. HEAT rounds). - Support for multiple languages (if required). - ACE3 compatibility. To use: - English only: - Copy the folder MIL_Airburst to your mission folder. - Multi-language: - Copy the folder MIL_Airburst(MultiLanguage) to your mission folder and remove the (MultiLanguage) from the folder name. - Copy stringtable.xml to the mission's root directory. OR - Copy the project under <Project name="MIL_Airbust"> into an existing stringtable.xml. - Add these lines to your description.ext #include "MIL_airburst\defines.hpp" //(basic level of GUI defines, nothing flash) #include "MIL_airburst\fuseSetting_dialog.hpp" - Run this command from initPlayerLocal.sqf for MP (or init.sqf for SP) before the mission starts: private ["_units","_ammo"]; _units = ["_unitName"]; _ammo = ["_magazineName"]; if ((str player) in _units) then { nul = _ammo execVM "MIL_airburst\initAirburst.sqf"; }; _unitName - string - unit/s to be allowed to set ranges. _magazineName - string - magazine/s to be allowed to have their range set. Example: private ["_units","_ammo"]; _units = ["p1","p2"]; _ammo = ["RPG32_HE_F"]; if ((str player) in _units) then { nul = _ammo execVM "MIL_airburst\initAirburst.sqf"; }; Credits: - @madpat3 for his German translation. Media: Demo (1:06): Employing Airburst (8:42): If anyone finds any problems please let me know (particularly with the translations, my Google assisted German ones were pretty bad). Thank you. Change log: Spoiler v1.10: Fixed - ACE3 interaction menu was adding extra actions after respawning. v1.9: Added - ACE3 compatibility. Added - Custom coloured icon for ACE3 interaction menu. v1.8: Fixed - "Fuse: Impact" wasn't showing on English only version when "Confirm" button was clicked with the mouse. Changed - Removed "0" from the text box. Text box now starts empty to be more user friendly when entering ranges. Changed - Action menu action now coloured instead of being plain white. v1.7: Added - Created two versions: - English only. - Multi-language (stringtable.xml). Fixed - Corrected readMe instructions for using stringtable.xml. Fixed - Some minor translation fixes. Changed - Some dialog controls were adjusted to allow for different length text (depending on language). Changed - Fuse set below 40m will now return "Impact" instead of the range entered into the text box. Changed - Hint displaying the fuse setting will disappear after round detonates. v1.6: Added - stringtable.xml translations. Changed - Pressing backspace or delete will now clear the range text field, as opposed to resetting it to "0". v1.5: Fixed - Range text field couldn't be changed after confirming. v1.4: Fixed - initAirburst.sqf was not saving ammunition natures as intended, due to small change in the execution in initPlayerLocal.sqf that had been made. initAirburst.sqf now reflects the change that was made. v1.3: Added - Pressing backspace or delete will reset the range text field. Added - Range text field tool-tip now also includes minimum range setting (40m) required. Fixed - Multiple ammunition natures now properly supported. v1.2: Added - JIP compatible. Changed - Re-worked how the function is launched (check To use). v1.1: Added - Can now close dialog with enter keys. Pressing enter will perform the same as clicking confirm. Changed - Reduced the chance for a fuse failure when set between 40m - 70m. Changed - Fuse setting hint now displays "Impact" if set to 0m. Changed - Dialog now opens with text field focused (no need to click inside text field to start typing). v1 - Release. Edited July 11, 2018 by beno_83au Update v1.10 10 2 Share this post Link to post Share on other sites
das attorney 858 Posted September 14, 2017 Good job there - downloading now :) 1 Share this post Link to post Share on other sites
Guest Posted September 14, 2017 An Armaholic mirror is now available:Airburst HE v1.0 Share this post Link to post Share on other sites
beno_83au 1369 Posted September 15, 2017 Had a few thoughts on some changes while at work today (plus I remembered one change I wanted to include to begin with), so I've updated the script, plus the OP, to reflect the changes. v1.1: Added - Can now close dialog with enter keys. Pressing enter will perform the same as clicking confirm. Changed - Reduced the chance for a fuse failure when set between 40m - 70m. Changed - Fuse setting hint now displays "Impact" if set to 0m, instead of "0m". Changed - Dialog now opens with text field focused (no need to click inside text field to start typing). 2 Share this post Link to post Share on other sites
Guest Posted September 15, 2017 The Armaholic mirror has been updated with the new version:Airburst HE v1.0 Share this post Link to post Share on other sites
madpat3 29 Posted October 7, 2017 i can't get work properly on dedicated server. when i'm selfhosting, everything works fine, but when i start it on our clan-server it only works when i start the mission. when i return to lobby and rejoin the game, i have no fuse-setting option anymore. i restart the mission and everything works again. maybe got something to do with JIP funktion? Share this post Link to post Share on other sites
Belbo 462 Posted October 7, 2017 28 minutes ago, madpat3 said: maybe got something to do with JIP funktion? Taking a look at it: It's not JIP compatible at all. But that results simply from the way the fuse action and fired-evh is added to the units. That could be handled JIP compatible without much hazzle - the execution on the server is not at all necessary (no function is actually executed on the server, they're all local to the player who's firing). You only have to edit the initAirburst.sqf to make sure that the remoteExec-Call is changed into a regular call (with an if (str player in _units)-check for example) and the publicVariable-command is removed. Then you can execute the script from init.sqf or even initPlayerLocal.sqf. Like so (not tested): params ["_units","_ammo"]; missionNamespace setVariable ["MIL_AirburstAmmo",_ammo]; MIL_fnc_addAirburstToPlayer = compileFinal preprocessFileLineNumbers "MIL_airburst\addAirburstToPlayer.sqf"; MIL_fnc_airburst = compileFinal preprocessFileLineNumbers "MIL_airburst\airburst.sqf"; MIL_fnc_fuseSetting_updater = compileFinal preprocessFileLineNumbers "MIL_airburst\fuseSetting_updater.sqf"; waitUntil {({!isNil _x} count ["MIL_fnc_addAirburstToPlayer","MIL_fnc_airburst","MIL_fnc_fuseSetting_updater"]) == 3}; _units apply {toUpper _x}; if ( hasInterface && toUpper (str player) in _units ) then { call MIL_fnc_addAirburstToPlayer; }; Share this post Link to post Share on other sites
madpat3 29 Posted October 7, 2017 so i changed the initAirburst.sqf to this: params ["_units","_ammo"]; missionNamespace setVariable ["MIL_AirburstAmmo",_ammo,true]; MIL_fnc_addAirburstToPlayer = compileFinal preprocessFileLineNumbers "MIL_airburst\addAirburstToPlayer.sqf"; MIL_fnc_airburst = compileFinal preprocessFileLineNumbers "MIL_airburst\airburst.sqf"; MIL_fnc_fuseSetting_updater = compileFinal preprocessFileLineNumbers "MIL_airburst\fuseSetting_updater.sqf"; waitUntil {({!isNil _x} count ["MIL_fnc_addAirburstToPlayer","MIL_fnc_airburst","MIL_fnc_fuseSetting_updater"]) == 3}; _units apply {toUpper _x}; if ( hasInterface && toUpper (str player) in _units ) then { call MIL_fnc_addAirburstToPlayer; }; {publicVariable _x} forEach ["MIL_fnc_addAirburstToPlayer","MIL_fnc_airburst","MIL_fnc_fuseSetting_updater"]; deleted the initServer.sqf and put this into the init.sqf: nul = [[commandant, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, z1, z2, z3, z4, z5, z6, z7],["BWA3_CarlGustaf_HE", "rhs_mag_maaws_HE"]] execVM "MIL_airburst\initAirburst.sqf"; but it doesn't work Share this post Link to post Share on other sites
Belbo 462 Posted October 7, 2017 Of course it won't. You have to put in the strings of the units (["commandant","a","b",...,"z7"]). The publicVariable-line has to go as well. And at best remove the boolean from the missionNamespace setVariable ["MIL_AirburstAmmo",_ammo]; too. Share this post Link to post Share on other sites
madpat3 29 Posted October 7, 2017 like this? //if (!isServer) exitWith {}; params ["_units","_ammo"]; //missionNamespace setVariable ["MIL_AirburstAmmo",_ammo,true]; MIL_fnc_addAirburstToPlayer = compileFinal preprocessFileLineNumbers "MIL_airburst\addAirburstToPlayer.sqf"; MIL_fnc_airburst = compileFinal preprocessFileLineNumbers "MIL_airburst\airburst.sqf"; MIL_fnc_fuseSetting_updater = compileFinal preprocessFileLineNumbers "MIL_airburst\fuseSetting_updater.sqf"; waitUntil {({!isNil _x} count ["MIL_fnc_addAirburstToPlayer","MIL_fnc_airburst","MIL_fnc_fuseSetting_updater"]) == 3}; _units apply {toUpper _x}; if ( hasInterface && toUpper (["commandant", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "z", "z2", "z3", "z4", "z5", "z6", "z7"]) in _units) then {call MIL_fnc_addAirburstToPlayer; }; //{publicVariable _x} forEach ["MIL_fnc_addAirburstToPlayer","MIL_fnc_airburst","MIL_fnc_fuseSetting_updater"]; //remoteExec ["MIL_fnc_addAirburstToPlayer",_units]; but then this happens:https://www.dropbox.com/s/sl0p4j8kwsjkbh0/Unbenannt.jpg?dl=0 sorry for asking so much, but i'm a total beginner in this scripting thing Share this post Link to post Share on other sites
beno_83au 1369 Posted October 7, 2017 @belbo @madpat3 I'll make the changes to it in a couple of days when I've got some time off. I don't usually do anything that involves JIP so i guess i didn't consider it for this. Share this post Link to post Share on other sites
madpat3 29 Posted October 7, 2017 COOL. it's a cool script, considering realism, for what all arma players long for!! 1 Share this post Link to post Share on other sites
Belbo 462 Posted October 8, 2017 16 hours ago, madpat3 said: sorry for asking so much, but i'm a total beginner in this scripting thing You replaced the toUpper (str player)-part with the array that belongs to the execVM-command. I don't know why, but you did. This is the way it has to be in the initAirburst.sqf: _units apply {toUpper _x}; if ( hasInterface && toUpper (str player) in _units ) then { call MIL_fnc_addAirburstToPlayer; }; And this must be the line in the init.sqf/initPlayerLocal.sqf: [["commandant","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","z1","z2","z3","z4","z5","z6","z7],["BWA3_CarlGustaf_HE","rhs_mag_maaws_HE"]] execVM "MIL_airburst\initAirburst.sqf"; Share this post Link to post Share on other sites
madpat3 29 Posted October 8, 2017 uh, i've had it all right in first place, but i didn't know, that i had to put the names of the playable units into quotation marks inside the init.sqf. now i get nor error massage, but the script doesn't work. i think i'll wait until beno changes the script by himself, for i'm not able to do so. but i want to thank you for trying to help me, never the less. good community Share this post Link to post Share on other sites
beno_83au 1369 Posted October 10, 2017 Updated. v1.2: Added - JIP compatible. Changed - Re-worked how the function is launched (check To use). @madpat3 @belbo Thanks for the heads up. Please let me know how it goes if you can. I tested it hosted and dedicated with a JIP client and it worked, but this is the first time I've made anything to be JIP compatible, so hopefully it works as intended. Share this post Link to post Share on other sites
Belbo 462 Posted October 10, 2017 7 hours ago, beno_83au said: @madpat3 @belbo Thanks for the heads up. Please let me know how it goes if you can. I tested it hosted and dedicated with a JIP client and it worked, but this is the first time I've made anything to be JIP compatible, so hopefully it works as intended. It's not magic. :D But thus far it looks good. :) 1 Share this post Link to post Share on other sites
beno_83au 1369 Posted October 10, 2017 31 minutes ago, belbo said: It's not magic. :D But thus far it looks good. :) Haha, cheers. Sometimes feels like I'm working with magic. 1 Share this post Link to post Share on other sites
Guest Posted October 10, 2017 The Armaholic mirror has been updated with the new version:Airburst HE v1.2 Share this post Link to post Share on other sites
madpat3 29 Posted October 11, 2017 now it works! good job and thank you very much. 1 Share this post Link to post Share on other sites
madpat3 29 Posted October 15, 2017 do i realy have to give all playable unit a variable name or can i just say "player" in the "playerLocalInit" file? Share this post Link to post Share on other sites
beno_83au 1369 Posted October 15, 2017 If you want every player to be able to use it, just comment out the _units line and don't use an if...then statement. Try this instead: _ammo = ["_magazineName"]; nul = _ammo execVM "MIL_airburst\initAirburst.sqf"; Just be sure to still include the ammunition natures that will be used as airburst. 1 Share this post Link to post Share on other sites
madpat3 29 Posted October 16, 2017 can it be that there is only one ammo type allowed? 'cause i've tried it with two, like this: _ammo = ["_magazineName","_magazineName2"]; //and only the first one works. if i chenge the order like _ammo = ["_magazineName2","_magazineName"]; still only the first one (in this case _magazineName2) works. Share this post Link to post Share on other sites
beno_83au 1369 Posted October 16, 2017 Updated. v1.3: Added - Pressing backspace or delete will reset the range text field. Added - Range text field tool-tip now also includes minimum range setting (40m) required. Fixed - Multiple ammunition natures now properly supported. @madpat3Thanks for doing all the bug finding I should be doing, I appreciate it. Priorities are always shifting and changing :) Share this post Link to post Share on other sites
madpat3 29 Posted October 17, 2017 Np. well, if you don't have the time, then s.b. needs to help you out a bit, i'd say ;) Share this post Link to post Share on other sites
Guest Posted October 17, 2017 The Armaholic mirror has been updated with the new version:Airburst HE v1.3 Share this post Link to post Share on other sites