Sniperwolf572 758 Posted September 14, 2014 Please allow us to toggle "automatic freefall/drop" on a per unit basis. Main gripe: http://feedback.arma3.com/view.php?id=20752 Reasons for inclusion: Preventing freefall is useful in a lot of cases where you might have units suspended in air or simply playing different animations than the freefall while freefalling, even if the above issues did not exist. Sample usage: // Disable freefall _unit freefallEnable false; // Check if freefall is disabled _freefallState = freefallEnabled _unit; Share this post Link to post Share on other sites
AgentRev 22 Posted September 14, 2014 (edited) I've been trying to get my mission working on a Linux server, but for some reason, I keep running into weird issues where calling scriptDone on some execVM threads always returns false, even if they are actually complete, which causes some waitUntil's to get stuck indefinitely. I don't have this problem on Windows. If I replace those execVM's by "spawn compile preprocessFileLineNumbers", then everything seems to work fine. I'm not quite sure what's wrong here. I don't know what exact circumstances cause this thing to happen, but it seems to change based on the presence of certain files and their size, regardless of if they are loaded at all during the mission. I do have one specific PBO for which the problem seems to happen 100% of the time, thought. Another strange observation is that it only seems to do it on Altis; swapping the mission.sqm to a Stratis one makes the problem disappear. As long as it's on Altis, regardless of the mission.sqm's contents, the problem happens if the circumstances are right. The weirdest observation I made so far is scriptDone always returning false for execVM'd files which only contain whitespaces and nothing else. Edited September 14, 2014 by AgentRev Share this post Link to post Share on other sites
dna_uk 30 Posted September 15, 2014 Added: Possibility to enable / disable UI control directly in configs From the dev changelog some time ago, however any details as to what the attribute actually is called? Share this post Link to post Share on other sites
tryteyker 28 Posted September 15, 2014 So with todays update we've got a new EH (handleRating), however I'm at a loss as to how it's supposed to work. It doesn't react to addRating at all, and rating values stop changing at -1000 and +1000 (so effectively only one friendly-fire or enemy kill is counted). Is there maybe another use to it? Share this post Link to post Share on other sites
killzone_kid 1331 Posted September 15, 2014 So with todays update we've got a new EH (handleRating), however I'm at a loss as to how it's supposed to work. It doesn't react to addRating at all, and rating values stop changing at -1000 and +1000 (so effectively only one friendly-fire or enemy kill is counted). Is there maybe another use to it? https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleRating You can override it, but there is no information whatsoever about what the rating is for. killing friendly for example returns -1400 and after a few seconds another -40...go figure. Share this post Link to post Share on other sites
Sniperwolf572 758 Posted September 17, 2014 Scripting command ‘local’ has been extended to work even for groups Well timed! I was just wondering last night why this wasn't the case. :) Share this post Link to post Share on other sites
killzone_kid 1331 Posted September 22, 2014 New commands: https://community.bistudio.com/wiki/getHit https://community.bistudio.com/wiki/deleteAt https://community.bistudio.com/wiki/deleteRange https://community.bistudio.com/wiki/select (extended) Share this post Link to post Share on other sites
f2k sel 164 Posted September 22, 2014 player getHit "head"; returns an error for me same for the editor F1 example (vehicle player) getHit "hitEngine" Type number expected nothing. Share this post Link to post Share on other sites
killzone_kid 1331 Posted September 22, 2014 player getHit "head"; returns an error for me same for the editor F1 example (vehicle player) getHit "hitEngine"Type number expected nothing. Works for me. Are you sure you're on ["Arma 3","Arma3",131,127272,"Development"]? BTW for a car it is vehicle player getHit "motor" Share this post Link to post Share on other sites
f2k sel 164 Posted September 22, 2014 How are you retuning the information? while {true} do { hint str (vehicle mycar getHit "motor"); //"hitEngine"//"head"// all return the vehicle name sleep 0.1; }; all it returns if mycar, shouldn't it be retuning a value and yes it is current version. Share this post Link to post Share on other sites
killzone_kid 1331 Posted September 22, 2014 How are you retuning the information? while {true} do { hint str (vehicle mycar getHit "motor"); //"hitEngine"//"head"// all return the vehicle name sleep 0.1; }; all it returns if mycar, shouldn't it be retuning a value and yes it is current version. hint str (mycar getHit "motor"); ???? Share this post Link to post Share on other sites
f2k sel 164 Posted September 22, 2014 Thanks it's working now, It seems a file was corrupt but allowing steam to verify and repair it seems to have fixed it. Even previous code is now working correctly. Share this post Link to post Share on other sites
das attorney 858 Posted September 24, 2014 (edited) Can we get an extension of lineIntersectsWith so that it returns the intersection position? Like: each element in the return is [object,intersectPos] { // NEW PARAM _THIS SELECT 5 RETURNS EACH ELEMENT AS [OBJECT,IMPACT POSITION] _ob = _this select 0; _intPosASL = _this select 1; // do cool stuff with the object, man1 and structure2! // more cool stuff with intersect pos like: // 1 - Spawn some particle fx there, or // 2 - Spawn a sound there, or // 3 - Attach an explosive there // 4 - Attach a rope there } forEach (lineIntersectsWith [man1,structure2,objNull,objNull,FALSE,TRUE]); At the moment, there is no way to reliably and quickly do this in the engine short of adding a "hitPart" EH, then shooting a bullet at it and returning the result. That isn't ideal though (and not quick enough anyway). Bonus points if it returns the surfaceNormal of the surface as well. Edited September 24, 2014 by Das Attorney Share this post Link to post Share on other sites
noubernou 77 Posted September 24, 2014 Can we get an extension of lineIntersectsWith so that it returns the intersection position?At the moment, there is no way to reliably and quickly do this in the engine short of adding a "hitPart" EH, then shooting a bullet at it and returning the result. The best way to do it now is to recursively walk smaller increments of known step sizes. It is still a horrible way of doing it, but better than the bullet method I feel. Share this post Link to post Share on other sites
das attorney 858 Posted September 24, 2014 The best way to do it now is to recursively walk smaller increments of known step sizes. It is still a horrible way of doing it, but better than the bullet method I feel. I tried that but I couldn't get much out of it quickly. (I might not have given it as much time as I should have done though to evaluate properly). To be fair though mate, all of the options are pretty unpalatable and they all have really bad defects (ex: can't return anything to original function). I'm sure you know all of this already so apologies if I'm preaching to the converted. I hope BI can sort something out so we don't have to spend unnecessary time coding around lack of info from the engine. Share this post Link to post Share on other sites
bad benson 1733 Posted September 24, 2014 (edited) i second that request. it seems to me that this data should already be there anyways. it would allow so many things with relatively low impact and also more accurate and faster than the suggested known workaround. another addition the intersect commands really need is being able to shoot the ray onto the geo lod or even any lod. the view geo lod is currently what is used, which severly limits this command. there's also a limitation when it comes to detecting characters. when i was looking for info on this some time ago i found that people suggested using "intersect". but that was in arma 1 and i couldn't get that to work. maybe someone has an example or confirmation that it indeed isn't working. would be much appreciated. Edited September 24, 2014 by Bad Benson Share this post Link to post Share on other sites
noubernou 77 Posted September 24, 2014 FUNC(shootRay) = { private ["_pos", "_vec", "_distance", "_resultPos", "_fidelity", "_lastPos", "_i", "_nextPos"]; scopeName "main"; _pos = _this select 0; _vec = _this select 1; _distance = 0; _resultPos = nil; _fidelity = [1000,100,10,1,0.1]; _lastPos = +_pos; { scopeName "mainSearch"; for "_i" from 1 to 10 do { _nextPos = [ (_lastPos select 0)+((_vec select 0)*_x), (_lastPos select 1)+((_vec select 1)*_x), (_lastPos select 2)+((_vec select 2)*_x) ]; if(lineIntersects [_lastPos, _nextPos] || terrainIntersectASL [_lastPos, _nextPos]) then { _resultPos = _lastPos; breakTo "mainSearch"; } else { _distance = _distance + _x; _lastPos = _nextPos; }; }; } forEach _fidelity; [_resultPos, _distance]; }; This is what I use. Share this post Link to post Share on other sites
das attorney 858 Posted September 25, 2014 FUNC(shootRay) = { private ["_pos", "_vec", "_distance", "_resultPos", "_fidelity", "_lastPos", "_i", "_nextPos"]; scopeName "main"; _pos = _this select 0; _vec = _this select 1; _distance = 0; _resultPos = nil; _fidelity = [1000,100,10,1,0.1]; _lastPos = +_pos; { scopeName "mainSearch"; for "_i" from 1 to 10 do { _nextPos = [ (_lastPos select 0)+((_vec select 0)*_x), (_lastPos select 1)+((_vec select 1)*_x), (_lastPos select 2)+((_vec select 2)*_x) ]; if(lineIntersects [_lastPos, _nextPos] || terrainIntersectASL [_lastPos, _nextPos]) then { _resultPos = _lastPos; breakTo "mainSearch"; } else { _distance = _distance + _x; _lastPos = _nextPos; }; }; } forEach _fidelity; [_resultPos, _distance]; }; This is what I use. Thanks man, I will give it a go. :) I did write a function along these lines, but mine was like the ice machine out of the Harrison Ford movie "Mosquito Coast" and made for an awkward reception when it got used. ;) BB - I'm in broad agreement with what you're talking about there. You should talk to NN directly as you both seem quite rightly pissed off that the only command to check armour penetration is broken "intersect". It's total BS for the likes of me as well as I can't work out armour penetration for any given shot either....(grr etc). Share this post Link to post Share on other sites
noubernou 77 Posted September 25, 2014 The vector add and multiply could be sped up too with the new native commands, this function is pretty old. I use it for a laser designator system, including beam spread. The performance is ok, but not great. I also use a variation of it in ACRE2 for occlusion testing. Share this post Link to post Share on other sites
das attorney 858 Posted September 25, 2014 Sweet bit of coding. Nice use of scopeName/breakTo as well. I read in the BIKI that count is faster, but from tests I've done it seems it's better to check in a forEach and quit out when you meet your condition rather than do the whole {cond} count _whatever > 0 thing. :) Share this post Link to post Share on other sites
das attorney 858 Posted September 26, 2014 The vector add and multiply could be sped up too with the new native commands, this function is pretty old. I use it for a laser designator system, including beam spread. The performance is ok, but not great. I also use a variation of it in ACRE2 for occlusion testing. Hi, I had a few drinks when I was posting the other night so apologies for some of the rubbish I was coming out with. This is a really great script so thanks for sharing. I've made an adaptation of it for something I'm helping BigPickle with. Would it be ok to use (properly credited of course)? Share this post Link to post Share on other sites
noubernou 77 Posted September 26, 2014 Sure no problem. :) Share this post Link to post Share on other sites
killzone_kid 1331 Posted September 27, 2014 https://community.bistudio.com/wiki/addWeaponTurret https://community.bistudio.com/wiki/removeWeaponTurret https://community.bistudio.com/wiki/turretLocal https://community.bistudio.com/wiki/isLightOn https://community.bistudio.com/wiki/isCollisionLightOn https://community.bistudio.com/wiki/setPilotLight https://community.bistudio.com/wiki/setCollisionLight Share this post Link to post Share on other sites
2nd ranger 282 Posted September 27, 2014 Has anybody been aware of kbTell not working in MP? Some brief tests on a hosted server yielded these results with different speakers and receivers, commands run only on the server: NPC to NPC - works NPC to player - works Host player to Client player - works Client player to anybody - doesn't work, even using BIS_fnc_MP Share this post Link to post Share on other sites
das attorney 858 Posted September 29, 2014 I thought I'd ask this here instead of mission editing. I put the following code into the debug console: varA = (1 / 10000) + (3 / 10000); varB = 4 / 10000; diag_log format ["varA: %1", varA]; diag_log format ["varB: %1", varB]; diag_log format ["varA == varB: %1", varA == varB]; diag_log format ["varA isEqualTo varB: %1", varA isEqualTo varB]; So we're checking if 0.0004 is equal to 0.0004 This is printed in .rpt: "varA: 0.0004" "varB: 0.0004" "varA == varB: false" "varA isEqualTo varB: false" Why is this? Is there some inherent inaccuracy when comparing small numbers? I'm aware there's a floating point accuracy but I wouldn't know if that's related or not. I did compare varB to varB and it returns true. Also if you set varA to 4/10000, then it returns true in comparison. So it's something to do with adding small numbers. Ie (1/10000)+(3/10000) is not the same as 4/10000. (But it is obv). I also tried turning the numbers to string and it returned true, but it's annoying not to know when to check numbers directly or when to use string comparison (which also has it's own problems with big and small numbers). Share this post Link to post Share on other sites