-
Content Count
4313 -
Joined
-
Last visited
-
Medals
Everything posted by Grumpy Old Man
-
Put Vest/Backpack with items in a vehicle - how to check their contents?
Grumpy Old Man replied to Grumpy Old Man's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Knew about everycontainer, things would be unadequately complicated (if possible at all) without it. Cheers -
Put Vest/Backpack with items in a vehicle - how to check their contents?
Grumpy Old Man posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey folks, basically I want to return the contents of a vest/backpack when it's been put inside a vehicle/ammocrate. I use the Put/Take eventhandlers to check if a unit has put something into a crate but I'm running into problems to return if a vest/backpack or uniform and even more so their contents have been stored in the vehicle. Any hints? Cheers ---------- Post added at 08:36 ---------- Previous post was at 08:06 ---------- Oh well, just discovered the somewhat new backpackcontainer, vestcontainer and uniformcontainer commands, they return unique container IDs so you can access them with ease using something like: _backpackID = backpackcontainer player; _backpackmags = magazinecargo _backpackID; this will let you check the content of the backpack wherever it is. -
How do loop foreach allUnits+vehicles thoughout the game?
Grumpy Old Man replied to BEAKSBY's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm using something like this: while {true} do { { if (isNil {_x getvariable "somefancyvariable"}) then { [_x] call GOM_fnc_somefancyfunction; _x setvariable ["somefancyvariable",true,true]; }; } foreach allunits; sleep 5; }; Got a few of these loops running (for various selections of units) and didn't notice any performance difference between running the check for a good chunk of units or not. Is there an actual better way of doing this? -
doArtilleryFire/commandArtilleryFire - unreliable as hell now?
Grumpy Old Man replied to Grumpy Old Man's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Sounds similar, added a note to your ticket. Also noticed that when in the gunner seat of any artillery except the mortar the azimuth indicator doesn't work and is stuck at 15. -
doArtilleryFire/commandArtilleryFire - unreliable as hell now?
Grumpy Old Man posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey folks, tried to rework my Artillery script and was kinda surprised that most of the time artillery guns simply refuse to fire. The script has been working fine last time I tried it, I even set up an entirely new mission using nothing else than doArtilleryFire or commandArtilleryFire commands on artillery units to no avail. Most of the time you can see the turrets moving into the correct direction, then turning back without firing a single shot. When it works they're firing way more rounds than I gave them in the command. I'm not running any mods or other scripts... Did anyone notice similar stuff happening? Cheers -
Any chance of posting your sqf compatible formula for that? How exactly is ± (plus or minus symbol) used in this formula? I take it that both results (either + or -) are valid numbers? I split it up into multiple parts to avoid bracket errors and this is what I've got so far: _gunner = player; _target = _this select 1; _getdir = [vehicle _gunner,_target] call BIS_fnc_relativedirto; _maxspeed = getnumber (configfile >> "CfgMagazines" >> currentmagazine vehicle player >> "initSpeed"); _maxspeedoperator = getnumber (configfile >> "CfgWeapons" >> (currentweapon vehicle player) >> (currentweaponmode (player)) >> "artillerycharge"); _muzzlespeed = _maxspeed * _maxspeedoperator; _altdifference = (getposaSl _gunner select 2) - (getposaSL _target select 2); _distance = getposASL _gunner distance getposASL _target; _v = _muzzlespeed; _g = 9.81; _y = _altdifference; _d = _distance; _solution1part1 = _v^2; _solution1part2 = sqrt (_v^4 - (_g * ((_g * (_d^2)) + (2 * _y * (_v^2))))); _solution1part3 = _solution1part1 + _solution1part2; _solution1 = atan (_solution1part3 / (_g * _d)); _solution2part1 = _solution1part1 - _solution1part2; _solution2 = atan (_solution2part1 / (_g * _d)); hint str [_getdir,_solution1,_solution2]; Shells are landing within 50m - 150m of the target, but they'll never hit dead center. Maybe it's some minor oversight or the ± symbol I probably misinterpreted? (hence the split into 2 solutions) Already double checked that the muzzlespeed is being calculated properly. Cheers
-
Whether to use BIS_fnc_spawnGroup or createUnit?
Grumpy Old Man replied to drunkenjawa's topic in ARMA 3 - MISSION EDITING & SCRIPTING
FPSMAX = should be the average fps you get when playing (best case: 60) FPSMIN = when fps is reaching this value the maxdelay will be the number you entered at maxdelay example: _AdditionalUnitCreationDelay = ((abs(50 - diag_fps) / (50 - 10))^2) * 1.337; sleep(_AdditionalUnitCreationDelay); my maxfps in editor is usually somewhere around 60, just to be sure I set it to 50 in the script. I don't want my fps to drop more than 10 frames when spawning units, so I set the FPSlimit to 10. Now when the fps drops down to 40 the maxdelay will be 1.337 seconds. When fps is at 50 the maxdelay will be 0. At least that's what I think it does. Cheers -
Whether to use BIS_fnc_spawnGroup or createUnit?
Grumpy Old Man replied to drunkenjawa's topic in ARMA 3 - MISSION EDITING & SCRIPTING
By my old, dried out eyes, I totally forgot to add the link! -
Whether to use BIS_fnc_spawnGroup or createUnit?
Grumpy Old Man replied to drunkenjawa's topic in ARMA 3 - MISSION EDITING & SCRIPTING
BIS_fnc_spawnGroup is a horrible way to spawn groups if you care about performance. If you only plan to spawn a few groups it should be ok I guess, if there's constant spawning going on you might wanna refer to createUnit and add a performance sleep between each spawned unit. With this awesome performance sleep you can dynamically adjust the sleep to your fps, so in a best case you won't even be able to tell that the game is currently doing something. Which can be a good thing, everyone knows there's something happening when the fps are dropping all of a sudden. ;) As to your custom layout you could make a small .sqf file where you remove the headgear, uniform, and add your custom outfit. Just execute it on the entire group and you're set. -
How to get AI in parachute to fly towards player?
Grumpy Old Man replied to BEAKSBY's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Very interesting, this was working extremely well in arma2. Halo insertions in Arma3 are lacking, to say the least. You can't even reach horizontal speeds above 54km/h, in arma2 it was easily possible to reach authentic real life speeds. Unfortunately this ticket of mine has been assigned but is still unresolved. Just tried the same thing in arma 2, hell, even a parachuting squad will try to keep formation when floating towards their destination. In arma3 they just circle until they land... Not to mention that you needed to execute a specific halo script in arma2 to open AI parachutes, this is really weird. -
Correct code for deleting lots of markers...
Grumpy Old Man replied to ange1u5's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Why not just use drawIcon instead? Just curious -
Saving is a good thing, especially on longer missions. I guess everyone who played A2 can agree with me that the amount of nonsensical deaths has been greatly reduced in arma3. (remember those "turn around inside a doorframe" deaths and the likes?)
-
Correct code for deleting lots of markers...
Grumpy Old Man replied to ange1u5's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hundreds? wow What do you need hundreds of markers for? just curious -
Names in radiocalls
Grumpy Old Man replied to cobra5000's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Take a look at setNameSound. -
CFG Groups/fnc_spawnGroup
Grumpy Old Man replied to Duke101's topic in ARMA 3 - MISSION EDITING & SCRIPTING
oh wow what the hell, this is incredible, would have never thought of using format like that... just wow -
Bootcamp / VR Discussion (dev branch)
Grumpy Old Man replied to LuLeBe's topic in ARMA 3 - DEVELOPMENT BRANCH
Me too, kinda sad that the mission editor is basically still the same since ArmA, while zeus and VR are getting nice features that have been requested by the community for a long time. -
AI squads: Assigning and commanding units in fireteams like team "RED" via scripts?
Grumpy Old Man posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey folks, currently trying to figure out a way to assign AI squad members to fireteams, the team is not being controlled by the player and the commands from the biki are confusing/mixed up with the ancient "team" commands (replaced by "group" commands in a2). I know you can assign units to a team using _unit assignTeam "RED"; and it's working, but how can I issue commands to team "RED" or team "GREEN"? Doesn't look like there's any command that can achieve this, by using assignedTeam I only get the "RED" or "GREEN" string returned, not the actual team members. Basically I want to achieve that an AI squad leader gives orders like "Team Red, move to xyz" for individual AI scripts. Cheers! -
Bootcamp / VR Discussion (dev branch)
Grumpy Old Man replied to LuLeBe's topic in ARMA 3 - DEVELOPMENT BRANCH
Really? I joined my own LAN game with 2 instances just moments ago. -
"Killed" event handle not working on created units from addAction
Grumpy Old Man replied to BEAKSBY's topic in ARMA 3 - MISSION EDITING & SCRIPTING
make the snippet from initServer.sqf look like this: _nul = [] spawn { _checklist = []; while {alive player} do { { if !(_x in _checklist) then { _x addeventhandler ["killed",{hint "unit killed as executed from the Killed EVH";}]; _checklist set [count _checklist,_x]; }; } foreach allUnits+vehicles+allUnitsUAV; sleep 5; }; }; This will check if all your specified units are in a checklist, if not they'll get the eventhandler, runs every 5 seconds. You could add a marvelous performancesleep within the foreach command for performance reasons. Cheers -
Weapon on back script for Arma 3
Grumpy Old Man replied to jd3527's topic in ARMA 3 - MISSION EDITING & SCRIPTING
wow that's awesome! too bad it doesn't work for AI units -
problem with remote fire
Grumpy Old Man replied to quantenfrik's topic in ARMA 3 - MISSION EDITING & SCRIPTING
What exactly are you trying to achieve? Get in the gunner seat, adjust elevation and azimuth, then hop out and remotely fire the gun? -
Bootcamp / VR Discussion (dev branch)
Grumpy Old Man replied to LuLeBe's topic in ARMA 3 - DEVELOPMENT BRANCH
That's what arma is all about, it's been interesting to watch the development of A2 and it's interesting to see where A3 is heading right now, all the good stuff they added like new stances, usable UAVs, video live feeds, new weather, physx for vehicles, it all adds up. -
AI squads: Assigning and commanding units in fireteams like team "RED" via scripts?
Grumpy Old Man replied to Grumpy Old Man's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yeah, it's a pretty extensive script on itself, but it's only a small part of what I got so far (around 140 functions in total, all interacting with each other), don't know if I want to turn it into a sandbox or a sandbox campaign for now. After doing some performance tests around 100 units in a single group yields around 30 fps, 10 groups with 10 units is a whole different matter, gonna play a bit more with the setDestination command, as for now I think it's not doing much at all... Cheers -
Soldiers should not refill their ammo
Grumpy Old Man replied to Voltagez's topic in ARMA 3 - MISSION EDITING & SCRIPTING
AI units will always try to rearm if they are running low on ammo (had that in a few custom loadouts that I made, looks like it's intended behavior). Just place a rifleman in the editor and set his ammo a bit above 0, then place a basic ammo box of the same faction in a small distance to the rifleman and watch what's happening. Hence my suggestion to add more ammo with the commands I posted. -
AI squads: Assigning and commanding units in fireteams like team "RED" via scripts?
Grumpy Old Man replied to Grumpy Old Man's topic in ARMA 3 - MISSION EDITING & SCRIPTING
UPS is using multiple groups, just as you spawn or place them in the editor. Right now I got a script to filter individual units within a group and assign them to a fireteam depending on their roles (depending how many units died from the original units group they'll join up with other groups nearby, in case you were wondering). It just doesn't look too good if you're issuing around AI units with dostop and domove commands since they won't keep formation after using the dostop command. I guess having individual fireteams within a group just isn't possible with AI squad leaders, looks like there's always only one formation leader within an AI group.