Jump to content

Grumpy Old Man

  • Content Count

  • Joined

  • Last visited

  • Medals

Everything posted by Grumpy Old Man

  1. GOM_fnc_ambientArtilleryFire V1.2 Purpose of this script: Gives mission makers access to simple ambient artillery units that fire just for decorative purposes into random directions. Features: Dedi and local MP compatible Takes pre placed vehicles and uses their main guns to engage artillery fire at simulated targets for the given salvo/rounds number. Works fine with with vanilla artillery assets and multiple third party vehicles. It's also possible to immediately stop the script and free up all units to fire on actual threats, so you can use the same units for the vanilla artillery support module/other arty scripts. How to use this script: At first copy the spoiler contents into a file inside your mission folder and name it accordingly. init.sqf: _initAmbientArty = [] execVM "scripts\GOM\ambient\GOM_fnc_ambientArtilleryFire.sqf"; scripts\GOM\ambient\GOM_fnc_ambientArtilleryFire.sqf: In the editor: Place few grouped or ungrouped artillery units put the following into their init fields: this setVariable ["GOM_fnc_ambientArtyBatteryID","Battery01",true]; _fire = ["Battery01",3,4] spawn GOM_fnc_ambientArtilleryFire This will make arty guns assigned to "Battery01" fire 3 salvoes with 4 rounds each. Parameters: _battery = "Battery01"; //battery ID assigned through objects init field _salvoes = 3; //(OPTIONAL) how many salvoes will be fired _rounds = 6; //(OPTIONAL) rounds per salvo _debug = false; //(OPTIONAL) displays debug messages _fire = [_battery,_salvoes,_rounds] spawn GOM_fnc_ambientArtilleryFire To abort the script simply call GOM_fnc_abortAmbientArtilleryFire wherever you like. _abort = [] call GOM_fnc_abortAmbientArtilleryFire; By executing the script again guns will fire as usual. For best effect place multiple groups executing the code simultaneously, this way you'll get multiple groups firing at multiple simulated targets. Known Issues: None so far. Changelog: V1.2: Made script local MP and dedi compatible Improved firing Arc Improved projectile deletion Guns are now assigned to batteries to allow multiple batteries for ambient artillery fire SP Demo Mission Enjoy!
  2. Here's the file again. Note that indeedPetes animation mod is needed for it, as mentioned above. Cheers
  3. GOM_fnc_aircraftLoadout V1.35 by Grumpy Old Man Features: Change serial (tail) number on compatible aircraft (currently supported: Gryphon, Shikra and Black Wasp) Change pylon priority (makes multiple pylons act as a single weapon if they have the same priority) Works with all addon aircrafts with properly configured pylons Preset function to save presets and load them, mission/server independent deleting a preset works only when holding down CTRL to prevent mishaps Option to set pylon ownership to either gunner or pilot, also works with presets Change the livery of the aircraft if it's configured for one Allows certain players to modify aircraft loadouts, as well as rearm the pylons and repair/refuel the aircraft Can be restricted to work only if fuel/ammo/repair sources are within 50m of the object holding the menu You can simultaneously only refuel as many aircraft as you have fuel sources Can sort for compatible weapons or allow to mount all weapons on all pylons Ability to set reporting, receiving of remote targets and own position One click to clear all pylons if you changed your mind Can be operated by a lone pilot or a designated logistics crew Multiple players can install multiple pylons on the same plane, one pylon at a time Pylon installation will take some time, depending on mag size (twin cannons or gatlings will install faster than a 12 missile dagr pod) Rearming with engines on How to use this script: Unpack the downloaded .rar and check out the demo mission. Copy the file structure besides init.sqf and mission.sqm into your own mission. Don't forget to back up before overwriting any files! Functions for mission makers: List of commands used by remoteExec (changed in 1.33😞 Read: The addAction on objects will only show up if the players weapon is lowered. Make sure you have aircraft placed that are dynamic loadout compatible (especially for missions made pre 1.70!). The script now by default needs to have at least one ammo source, repair source or fuel source within 50m of the object that is holding the loadout menu. The respective options will be greyed out otherwise. This can be changed however. Simply adjust the variables in the of GOM_fnc_aircraftLoadoutParameters.sqf to your liking, the comments tell you what each variable does. (!) Check out the included mission file on how to add this menu to objects, players or triggers, dedicated server and local hosted server compatible. Aircraft Loadout V1.35 Download Known issues: If you encounter any errors please send me a PM containing details (screenshots,.rpt,error messages etc). If you encounter vehicle resources not working with ACE3 check out the functions for mission makers section above. Changelog: V1.35 Fixed: Players are no longer able to load presets created with a different pylon restriction setting, thanks @magicsrp Due to this change all presets needed to be reset V1.342 (Most likely) Fixed: Error with CUP Aircraft not returning getAllHitPointsDamage V1.341 Fixed: "Unknown attribute t" .rpt spam, thanks @magicsrp Previous changes: 10.07.2021: Added the file to google drive, so it should be permanent. Also removed the armaholic link. RIP. Enjoy
  4. Grumpy Old Man

    [Release] GOM - Aircraft Loadout V1.35

    Added the file to google drive, should be permanent now. Also RIP Armaholic. Thanks @beno_83au and @sarogahtyp for the reminders. Cheers
  5. GOM - Carpet Bombing V1.1 This simple script will simulate carpet bombing and is easy to use. Air Raid sirens will sound an alarm before the bombing takes place (directional sound). Custom placed objects will also play the air raid sound (i.e. "Land_Loudspeakers_F"). Bombs will make a bomb dropping sound before impact. init.sqf: call compile preprocessFileLineNumbers "scripts\GOM\GOM_fnc_carpetBombing.sqf"; scripts\GOM\GOM_fnc_carpetBombing.sqf: Update: V1.1 Script and sound handling is now MP and dedi-Server compatible improved bomb spread and spacing Enjoy!
  6. Grumpy Old Man

    [Release] GOM - Aircraft Loadout V1.35

    Hey, I believe the current functionality to reduce priority by 1 is by using shift+LMB. Cheers
  7. Just how it says in the example. If the preInit parameter is set to 1, the function will run once during preInit. This is also the point where the function can run at full speed. You can't change how the init.sqf is handled, it's pretty much set in stone. If you have other functions that you want to run during pre/postInit or pre mission start you have to define them within CfgFunctions inside description.ext. Just give it a try and goof around with it, worst thing to happen could be a game crash. Cheers
  8. It is, you need to define the function inside the description.ext as a CfgFunction, as seen in the example slightly above where the link leads you. Cheers
  9. You can always run the script on the entire map with the preInit parameter, should speed things up quite a bit. Pre_and_Post_Init Worth a shot! Edit: Just realized this was dug up from the dead. Cheers
  10. Grumpy Old Man

    HELP With ai detecting script

    Ah interesting, it's also on the wiki, so getPos should work fine, no idea when that was added. Cheers
  11. Grumpy Old Man

    HELP With ai detecting script

    You're getting an array of locations from nearestLocations. getPos _x won't work on a location, you'd need locationPosition for that. Edit: See my post below. Also the entire thing doesn't make much sense. Why search for locations within 600m just to see if any is closer than 500m? Simply search for 500m and count the returning array instead, if that count is above 1, there's a location within 500m. Also don't name an array containing locations _markers, that can be confusing later down the line, since markers and locations are different data types (string vs location). Cheers
  12. Don't iterate over an array while simultaneously deleting its elements: _array = ["myArray", "myArray1", "myArray2", "myArray3", "myArray4", "myArray5","myArray6", "myArray7", "myArray8"]; _result=[]; while {count _result < 4} do { _result pushBack (_array deleteAt (random floor count _array)) }; hint str _result DeleteAt already returns the deleted element, so might as well use it. Cheers
  13. A simple GetIn or GetInMan eventhandler should do the trick. From there on you can apply anything you want, addAction, variables, etc. Cheers
  14. Grumpy Old Man

    Stopping a script

    You're using while {true} do Just use a variable instead and set that to false when you want the loop to stop. That's the main usage of while loops, being able to be stopped at any time. Cheers
  15. Hey, just try the link again, I reuploaded the file. Cheers
  16. Where exactly are you running it from? Do you mean initServer.sqf? Is there a similar snippet running from a trigger or similar that might cause this? Also try running this spawned with a time conditional to make sure it only runs with the mission already running: _addBomb= [] spawn { waitUntil {time>1}; waitUntil {count allUnits>=1}; _units = allUnits select {side _x == EAST}; _unit = selectRandom _units; _unit addItem "UMI_Weed_Bale"; _unit setVariable['bombUnit', true, true]; }; Might not make a difference though, all I can think of without further detail, heh. Cheers
  17. Grumpy Old Man

    Delaying unit Init until trigger is activated

    You can use setVariable on the unit and retrieve it later at any point by filtering allUnits, like this: //unit object init this setVariable ["TAG_fnc_huntPlayer",true]; //someplace else _playerHunters = allUnits select {_x getVariable ["TAG_fnc_huntPlayer",false]};//will contain all flagged units Cheers
  18. Grumpy Old Man

    artillery barrage script

    Cut out the random dir/dist lines, which increase inaccuracy: _ammo = getArtilleryAmmo [art1] select 4; art1 doArtilleryFire [s1,_ammo,10]; Cheers
  19. No surprise, don't know a function that didn't receive his treatment, heh. Good work, he did. Cheers
  20. Nice, never seen that one. Cheers
  21. Wrong classname maybe? {_x removeWeapon binocular _x} forEach crew _vehicle This snippet never failed me. Cheers
  22. The binocular command returns a string, maybe you got it mixed up somewhere? Cheers
  23. You can also work with a simple parabolic formula for bullet trajectories, since arma doesn't simulate coriolis force, earth curvature or air friction for bullets. This page has saved me many headaches, heh. You can get all values either from config (ammo muzzle speed at launch, etc.) or from model (barrel direction vector), just make sure you're using ASL positions. This way your artillery gun will be able to do direct fire and actually hit its target. Cheers
  24. Grumpy Old Man

    [Release] GOM - Aircraft Loadout V1.35

    Was there? Can't remember, heh. Should be in \scripts\GOM\functions -> GOM_fnc_aircraftLoadoutInit.sqf Line 1952: _obj nearEntities ["Air",50] With 50 being the distance, if I'm not missing anything. Cheers