Jump to content

Grumpy Old Man

Member
  • Content Count

    4330
  • Joined

  • Last visited

  • Medals

Community Reputation

3473 Excellent

About Grumpy Old Man

  • Rank
    Second Lieutenant

core_pfieldgroups_3

  • Occupation
    Audio Engineer

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 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
  2. 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
  3. 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
  4. 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
  5. Hey GOP, 

    I know this is out of the blue, but I really admire your work and your ability to script really well. By chance can you give me a hand with some issues I'm having with some AI aircraft? I'm trying to get Pook's Soviet Air Planes to drop bombs, I can get forceWeaponfire to work and fireAtTarget to work to a certain extent however whenever working with multi-seater aircraft especially ones with 2+ crew inside nothing seems to work for me. I understand ASL to a certain extent, but I'm still a basic understanding of it. As for what I'm working with it's the pook_tu22_RU with the bombs pook_FABLauncher.  Also if you can, can you help me understand how to make a spawn object script for dropping bombs as well for the USAF mod GBU-43/B which has no vehicle that can hold it. Thank you for your time.

    1. LaggersJR

      LaggersJR

      So looking through the vanilla assets, there isn't an aircraft that is a multi-crew seater. And even with the vanilla helicopters using the Y-32, I'm still struggling to get it to work with multi-seat units. Though as a side note the vanilla aircraft (single seat) I have gotten it to work. Still unsure how to properly use the BIS_fnc_fire maybe that would work? 

      Thank you for your time. 

  6. 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
  7. 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
  8. 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
  9. A simple GetIn or GetInMan eventhandler should do the trick. From there on you can apply anything you want, addAction, variables, etc. Cheers
  10. 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
  11. Hey, just try the link again, I reuploaded the file. Cheers
  12. 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
  13. 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
  14. 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
×