fn_Quiksilver 1636 Posted May 21, 2017 8 hours ago, f2k sel said: According to Hint F1 editor the following command should return an array of known targets within a specified distance player targets [[EAST, GUER], 100] However when run it gives:- error type array expected bool full description Unit targets [[side..],distance,age,centre] I suspect this command hasn't been implemented, any chance it could be finished or fixed. the command is fine but the syntax documentation is wrong proper use looks more like <unit> targets [true,300]; 1 Share this post Link to post Share on other sites
f2k sel 164 Posted May 22, 2017 15 hours ago, fn_Quiksilver said: the command is fine but the syntax documentation is wrong proper use looks more like <unit> targets [true,300]; Thanks I got close myself I did try using true but placed it before the Filter array which gives a different error. It should have worked though according to the WIKI _targets = _unit targets [true, [], 300]; //enemy targets in 300m I did look for the WIKI entry for the targets description but I must have looked in A2/OA section previously. Share this post Link to post Share on other sites
R3vo 2654 Posted May 29, 2017 Can anyone explain to me how BIS_fnc_saveGame is supposed to return a boolean? test = [player] call BIS_fnc_saveGame; //at the time it's executed, return value is BIS_fnc_kbisSpeaking, after saving happened, test becomes <NULL-script> It would be nice if this function would return true if saving was successful and false if it wasn't (saving disabled) Share this post Link to post Share on other sites
killzone_kid 1330 Posted May 29, 2017 8 hours ago, R3vo said: Can anyone explain to me how BIS_fnc_saveGame is supposed to return a boolean? If you think this is important enough to be looked at, consider making a ticket on FT Share this post Link to post Share on other sites
Sniperwolf572 758 Posted May 30, 2017 Can we please get some docs on the new force and torque functions that were recently added? Some yuuuuuge numbers are needed to get any kind of effect from them, I'm concerned I'm using them wrong. 1 Share this post Link to post Share on other sites
SilentSpike 84 Posted May 30, 2017 36 minutes ago, Sniperwolf572 said: Can we please get some docs on the new force and torque functions that were recently added? Some yuuuuuge numbers are needed to get any kind of effect from them, I'm concerned I'm using them wrong. Have you tried putting them into the debug console and hitting F1 with the caret on them? Share this post Link to post Share on other sites
x3kj 1247 Posted June 2, 2017 On 30.5.2017 at 9:28 AM, silentspike said: Have you tried putting them into the debug console and hitting F1 with the caret on them? this doesnt help much, because it only tells you what input it expects, but not what the input represents (for the addForce). On 30.5.2017 at 8:51 AM, Sniperwolf572 said: some docs on the new force and torque functions reyhard notified me that this has been added today: https://community.bistudio.com/wiki/addForce https://community.bistudio.com/wiki/addTorque Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted June 2, 2017 11 minutes ago, x3kj said: https://community.bistudio.com/wiki/addForce https://community.bistudio.com/wiki/addTorque Played around with those for a bit. I guess torque makes an object rotate, factoring in its mass, no idea about addForce, that one just made the vehicle turn towards the position. At least that's what I think it does. Having those wiki entries is great but they don't tell you what these commands actually do. Cheers Share this post Link to post Share on other sites
x3kj 1247 Posted June 2, 2017 50 minutes ago, Grumpy Old Man said: no idea about addForce, that one just made the vehicle turn towards the position. At least that's what I think it does. Having those wiki entries is great but they don't tell you what these commands actually do. addForce is a bit quirky, as it uses the Worldspace for the direction of force, but a modelspace position on the vehicle for force application. A force that is not applied at the objects center of mass will result in a torque as a byproduct. So depening on the models orientation, it will lead to different results for the same addForce parameters. Since center of mass does not coincide with center of the models origin for every model, it is very tricky to just apply a force without creating a "by-product" torque. Also, addforce and torque is quirky when applied to vehicles with "active" simulation like helicopters that are quirky in their own way. These simulation may have artificial limiters and so on to deal with simulation instabilities, and their simulation is not necessarily physically correct in certain aspects. So adding certain forces/torques may not have a reallistic effect. Edit: I actually dont know if the force is applied to center of origin of model, or to center of mass. I assume however that its center of origin Share this post Link to post Share on other sites
Sniperwolf572 758 Posted June 2, 2017 2 hours ago, x3kj said: this doesnt help much, because it only tells you what input it expects, but not what the input represents (for the addForce). reyhard notified me that this has been added today: https://community.bistudio.com/wiki/addForce https://community.bistudio.com/wiki/addTorque Haven't had much time to respond to that, but that was exactly the problem! Thanks for this info that this was documented. As for the center of mass, it can be retrieved and set if necessary. Share this post Link to post Share on other sites
x3kj 1247 Posted June 2, 2017 oh ok, didnt have those commands on the radar. This makes it easier. You basically have to create your new coordinate reference to the center of mass all the time then when applying force. Smaller amounts of torque can still result, because of numerical inaccuracy. Depending on the objects moments of inertia this effect may be smaller or greater. Share this post Link to post Share on other sites
dscha 147 Posted June 4, 2017 When your FPS is > 60, problems occur with addForce (not reacting/no Force added). I was in VR, ~200-250FPS -> maybe 1 of 10 addForce commands had an effect on the model. While with VSync-Enabled (max 60FPS) -> 10/10 had an effect. EDIT: also: Since the MTW Positions can change in a model, while it is moving, it can have some "unwanted Results". Draw3D Visualization with HEMTT Mover while some Tests:https://i.gyazo.com/b1ba068b9bca3aafcff47b679d6d050e.mp4 Old BugReport from ~ 3 Years ago Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted June 7, 2017 really impressed with the improvements to SQF and new scripting commands added in the past 12 months, great work 3 Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted June 12, 2017 On 7.6.2017 at 1:43 PM, fn_Quiksilver said: really impressed with the improvements to SQF and new scripting commands added in the past 12 months, great work params, select, apply... The amount of convenience these 3 commands alone added to the scripting engine is incredible! Then improvement on BIS functions by glorious KK on top of that! Can't praise good work enough, so thanks anyone involved in this! On a sidenote, would it be possible to enhance getCompatiblePylonMagazines to accept classname as alternative syntax? Cheers 6 Share this post Link to post Share on other sites
R3vo 2654 Posted June 13, 2017 Can anyone tell me if BIS_fnc_cutDecimals is working correctly? 154 / 60 = 2.56667; [154 / 60,0] call BIS_fnc_cutDecimals;// 3 Shouldn't it return 2 ? Otherwise I could simply use round. toFixed seems to do the same. Edit: Nevermind. Read the wiki description Quote Function that rounds specified number to specified amount of decimals. Share this post Link to post Share on other sites
pierremgi 4850 Posted June 13, 2017 1 hour ago, R3vo said: Can anyone tell me if BIS_fnc_cutDecimals is working correctly? 154 / 60 = 2.56667; [154 / 60,0] call BIS_fnc_cutDecimals;// 3 Shouldn't it return 2 ? Otherwise I could simply use round. toFixed seems to do the same. Edit: Nevermind. Read the wiki description Not a bug but you're right, cutting should not round anything. Round and toFixed already do that. So this function could be different. Share this post Link to post Share on other sites
killzone_kid 1330 Posted June 13, 2017 On 6/12/2017 at 7:15 AM, Grumpy Old Man said: On a sidenote, would it be possible to enhance getCompatiblePylonMagazines to accept classname as alternative syntax? Apparently this was possible from the start. Updated biki https://community.bistudio.com/wiki/getCompatiblePylonMagazines 2 Share this post Link to post Share on other sites
froggyluv 2135 Posted June 20, 2017 Did I go full ReeRee or is getUnitTrait "camouflageCoef " returning Bool rather than numbers? _ct = cursortarget getunittrait "camouflageCoef "; hint str _ct Returns: False as before I used to get a value?? Share this post Link to post Share on other sites
bad benson 1733 Posted June 22, 2017 got a question about BIS_fnc_getTurrets. when i make it output config paths it seems to give me the path to the vehicle itself, if it has no turrets. is that intended or am i doing something wrong? it's kind of weird because when i make it output the turret path array it outputs an empty array for those vehicles without turrets. seems kind of counter intuitive. but maybe i did something wrong. was late yesterday and i can't test again right now because it's loading the update right now. Share this post Link to post Share on other sites
killzone_kid 1330 Posted June 22, 2017 2 hours ago, bad benson said: is that intended This is how it has always been and most likely intended, though I don't know exact reason myself. What were you going to use this function for, if not secret? 1 Share this post Link to post Share on other sites
bad benson 1733 Posted June 22, 2017 Just now, killzone_kid said: This is how it has always been and most likely intended, though I don't know exact reason myself. What were you intended to use this function for, if not secret? using it as part of my function to get all vehicle seats, their turret paths (if turret) and the name of the seat in the scroll menu. i do that to populate my own seat UI. i was just wondering why. maybe because of the way it is used in another BIS_fnc or something. thx for the answer though. Share this post Link to post Share on other sites
killzone_kid 1330 Posted June 22, 2017 1 minute ago, bad benson said: using it as part of my function to get all vehicle seats, their turret paths (if turret) and the name of the seat in the scroll menu. i do that to populate my own seat UI. i was just wondering why. maybe because of the way it is used in another BIS_fnc or something. thx for the answer though. Maybe so that one can query driver turret somehow? I don't know. What about allTurrets or even fullCrew? Those are faster and probably better than any config searching Share this post Link to post Share on other sites
bad benson 1733 Posted June 22, 2017 15 minutes ago, killzone_kid said: Maybe so that one can query driver turret somehow? I don't know. What about allTurrets or even fullCrew? Those are faster and probably better than any config searching i just started testing methods and stuff. so this is what i did for now. fnc_getTurretDta = { params ["_veh"]; _paths = [_veh, []] call BIS_fnc_getTurrets; _cfgs = [_veh, config] call BIS_fnc_getTurrets; _turrets = _cfgs apply { [ getText (configfile >> "CfgVehicles" >> typeOf _veh >> "Turrets" >> configname _x >> "gunnername"), _paths select (_cfgs find _x) ] }; _turrets }; hint str (cursorObject call fnc_getTurretDta); i will take a look at allTurrets but as you can see above i need some more data. you can see the first entry there being weird. and i also just noticed the last one returns null for the path. not sure why. i might've fucked it up along the way. EDIT: ok so just adding _cfgs deleteAt 0; right after _cfgs is declared pretty much solved it. i guess i was looking for meaning too much. will test and see, if it causes any anomalies this way but so far it makes sense. Share this post Link to post Share on other sites
f2k sel 164 Posted June 22, 2017 Why don't the AI turn around when they hear friendly gun fire it looks silly to have one unit possibly engaging an enemy and the other units a few feet away not even looking at what he's shooting at. Only if the AI return fire do they respond, I just don't find it realistic. I know I could use the fired EVH and then run a script to alert others in the area but wouldn't that be a resource eater all those units running scripts on every shot. Maybe an EVH that would run once when a unit spots and engages an enemy unit and resets when area is clear. Share this post Link to post Share on other sites
das attorney 858 Posted June 23, 2017 Hi, I wasn't sure where to put this question - if it's in the wrong place, then mods please move it. I'm using remoteExecCall to delete groups (given that in the mission I'm working on, the groups could be created on server,hc, or client). I keep seeing these messages in the report file (note that the timestamp is identical): 0:10:54 A nil group passed as a target to RemoteExec(Call) 'deletegroup' 0:10:54 A nil group passed as a target to RemoteExec(Call) 'deletegroup' 0:10:54 A nil group passed as a target to RemoteExec(Call) 'deletegroup' 0:10:54 A nil group passed as a target to RemoteExec(Call) 'deletegroup' 0:10:54 A nil group passed as a target to RemoteExec(Call) 'deletegroup' 0:10:54 A nil group passed as a target to RemoteExec(Call) 'deletegroup' 0:10:54 A nil group passed as a target to RemoteExec(Call) 'deletegroup' 0:10:54 A nil group passed as a target to RemoteExec(Call) 'deletegroup' 0:10:54 A nil group passed as a target to RemoteExec(Call) 'deletegroup' This is strange to me as the groups passed to it have definitely been previously created, so I would expect them to be grpNull, and not nil. Plus the amount of messages I get in the report file are larger than the amount of groups that are scheduled to be deleted. I have checked to make sure that the code is not executed multiple times via debug messages so everything seems ok there. Here is my code (pretty standard I think). if ([] isEqualTo units _grp) then { _grp remoteExecCall [ "deleteGroup", _grp ]; }; I have a debug hint onscreen to keep track of how many empty groups there are, and it always says: [] so it looks like remoteExec is doing it's job, but then why the nil group... log messages? I recently changed over to using remoteExec from an older function that worked OK. It checks if the group is null and if not, then sends it to group owner to delete. I would have thought that if any group was nil, there would be an error in the log because there is no check for nil variable passed to it. Here is the older (but working) function: // _this = group; local can be used for groups (since Arma 3 v1.31.127204) if not (isNull _this) then { if (local _this) then { deleteGroup _this } else { if (isServer) then { _this remoteExecCall [ "horde_fnc_deleteGroupGlobal", groupOwner _this ]; } else { _this remoteExecCall [ "horde_fnc_deleteGroupGlobal", 2 ]; }; }; }; true Am I doing something wrong, or is there some sort of engine quirk with remoteExec??? Many thanks. Share this post Link to post Share on other sites