-
Content Count
4333 -
Joined
-
Last visited
-
Medals
Posts posted by Grumpy Old Man
-
-
Here's the file again.
Note that indeedPetes animation mod is needed for it, as mentioned above.
Cheers
-
Added the file to google drive, should be permanent now.
Also RIP Armaholic.
Thanks @beno_83au and @sarogahtyp for the reminders.
Cheers
- 1
- 1
-
On 10/13/2020 at 2:40 AM, beno_83au said:@Grumpy Old Man At the moment when selecting priorities for weapons/pylons you can only click to count up, until it resets back to 1. Is it possible to get a right-click added to the UI to count back down? I don't know if it's just me but I tend to click my way past a number and have to keep clicking to get back around to it again. Other than that this system still works really well!!
Hey, I believe the current functionality to reduce priority by 1 is by using shift+LMB.
Cheers
- 1
-
2 hours ago, zagor64bz said:Is the function called by default at the mission start, without any command? And, furthermore, if I have a mission with the "regular" init.sqf, how do I make that init run as pre-init? Just define the class in the description?
Sorry for my ignorance in this matter...
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
-
19 minutes ago, zagor64bz said:And how you use the pre-init..it's not very clear in the wiki mentioned...
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
- 1
- 1
-
You can always run the script on the entire map with the preInit parameter, should speed things up quite a bit.
Worth a shot!
Edit:
Just realized this was dug up from the dead.
Cheers
- 2
-
Ah interesting, it's also on the wiki, so getPos should work fine, no idea when that was added.
Cheers
- 1
-
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
- 3
-
Indeed, well spotted.
Cheers
- 2
-
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
- 2
-
-
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
- 2
- 1
-
Hey,
just try the link again, I reuploaded the file.
Cheers
- 2
-
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
- 1
-
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 minutes ago, fawlty said:This Script Mike needed help with I have a question about a few of the entries
_ammo = getArtilleryAmmo [art1] select 4;
_dir = round random 360; **360** ?
_dis = 50 + round random 100; **50+ and 100** ?
_tgt = s1 getRelPos [_dis,_dir];
art1 doArtilleryFire [_tgt,_ammo,10]; // Fire 10 times
I'm trying to have the rounds land a little closer to the target, any suggestions.
Thanks
Cut out the random dir/dist lines, which increase inaccuracy:
_ammo = getArtilleryAmmo [art1] select 4; art1 doArtilleryFire [s1,_ammo,10];
Cheers
- 1
-
12 minutes ago, Harzach said:I think it's one of KK's babies.
No surprise, don't know a function that didn't receive his treatment, heh.
Good work, he did.
Cheers
- 1
-
4 hours ago, Harzach said:BIS_fnc_attachToRelative
Nice, never seen that one.
Cheers
- 2
-
Wrong classname maybe?
{_x removeWeapon binocular _x} forEach crew _vehicle
This snippet never failed me.
Cheers
- 3
-
2 minutes ago, CryptEarth said:As I'm developing a new mission with persistent saving of players loadouts (using extDB3 on server) I noticed that the slot for binoculars is an array. As I couldn't find any information about it: What's the reason for binoculars has an array instead of just a string for a class name? Can anyone hint me in the right direction?
Thanks in advance ...
The binocular command returns a string, maybe you got it mixed up somewhere?
Cheers
-
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
- 3
-
1 hour ago, Rich_R said:Quick question. In one of the earlier versions there was an option to change the distance of aircraft serviced by the script, in other words they could be spread further out. I can't seem to find that anywhere in the latest version. Is this still doable?
BTW this is one of the required scripts in everyone of our missions:)
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
- 1
-
53 minutes ago, LSValmont said:So I believe that random does help reduce that chance of overloading. (In some very specific cases)
I believe you won't even notice 200 of those checks happening at the same time.
Cheers
- 1
-
Glad you got it sorted, and posted the solution instead of [solved], heh.
As @Harzach stated, string is a data type that can contain text. Variable handles (or identifiers) like _value can hold any data type (like numbers, arrays, code, etc.).
The format command automatically converts any passed variable into string, like so:
_text = "Ten"; _number = 10; _howToGetTen = {5 + 5}; hint format ["How to get %1(%2): %3",_text, _number, _howToGetTen];
Cheers
- 1
[Release] GOM - Vehicle Tuning V1.01
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
Of course, added a more permanent link and removed the Armaholic one.
Cheers