killzone_kid 1331 Posted October 6, 2015 Is there any documentation about all possible "map types" used with nearestTerrainObjects? It seems to work with such filters as "tree", "rock", "bush", "chapel" etc. But I can't find anything like these in configs? Or are they defined in the map itself or something? Have a look in class RscMapControl Share this post Link to post Share on other sites
Greenfist 1863 Posted October 6, 2015 Have a look in class RscMapControl I thought I did, but apparently not closely enough. Found them now. Thanks! Share this post Link to post Share on other sites
bad benson 1733 Posted October 12, 2015 is there any ETA on when GetMousePosition is going to make it into Stable? i kind of don't want to make a workaround that is going to be obsolete for sure very soon. Share this post Link to post Share on other sites
killzone_kid 1331 Posted November 1, 2015 An overview of some recent scripting changes/additionsPrivate keywordA pretty much unknown keyword has existed in Arma series for a long time called "local" (not to mistake for "local" MP command), that allowed creation of private variables on the fly. Considering that this functionality has not been documented anywhere until recently and practically not used by the community, it has been decided to rename this keyword to "private" for clarity and convenience. If you happened to start using it recently, please update your scripts (see example usage: private).Param, paramsparam and params commands have been modified and will now show error message on screen and log to .rpt when wrong type of argument is passed. The difference to the original functionality is only that type mismatch errors cannot be suppressed. If you would like to handle data types by yourself, several handy type comparing commands have been also added:isEqualType - compare types of 2 valuesisEqualTypeAll - match type of all array values to type of a valueisEqualTypeArray - compare types and order of values from one array to anotherisEqualTypeParams - compare types of passed params to a given templateisEqualTypeAny - match type of a value to any type of value in arrayas well as configNull - non-existent configIn other news:addWeaponItem command had a long awaited fix (and all addXXXWeaponItem counterparts).productVersion now also returns platform (Windows..etc)throw and try commands have been extended so it is now possible to pass argument to try {} scope and use if () throw ... construct instead of if () then {throw ...}.New CommandsStamina implementationallowSprintenableStaminagetAnimSpeedCoefgetStaminaisSprintAllowedisStaminaEnabledsetAnimSpeedCoefsetStaminaUIpixelH - UI height of a pixelpixelW - UI width of a pixelctrlAngle - rotation angle of control ST_PICTUREctrlSetAngle - set rotation angle of control ST_PICTUREMiscnearestTerrainObjects - allows to return map objects, such as "Rock", "Tree", "Bush"...etcgetAimingCoefflagSide - return current flag side, to complement setFlagSideflagTexture - return current flag texture, to complement setFlagTexturecheckVisibilityinPolygon - command for finding point inside polygon, fast algorithmsetObjectMaterialGlobal - JIP persistent object material setting, to complement setObjectTextureGlobaldisableNVGEquipment - disables Night Vision equipment of a vehicle, disableTIEquipment now only disables Thermal VisiongetMousePosition - to complement setMousePosition 8 Share this post Link to post Share on other sites
bad benson 1733 Posted November 1, 2015 New Commands Stamina implementation getAnimSpeedCoef isSprintAllowed setAnimSpeedCoef UI ctrlAngle - rotation angle of control ctrlSetAngle - set rotation angle of control getMousePosition - to complement setMousePosition awesome stuff! quick (possibly stupid) questions. ctrlSetAngle is for 2d controls? :o setAnimSpeedCoef will actually allow anim speed change at runtime? :o Share this post Link to post Share on other sites
Greenfist 1863 Posted November 2, 2015 ctrlSetAngle is for 2d controls? :o setAnimSpeedCoef will actually allow anim speed change at runtime? :o I guess the angle is for 2d controls, yes. I briefly tried it with default RscText: the angle values change but visually it stays the same, so I guess there's some prerequisites. Some config values? Style? player setAnimSpeedCoef 15; //enter Road Runner mode. Meep meep! Doesn't seem to apply to all animations though. Share this post Link to post Share on other sites
bad benson 1733 Posted November 2, 2015 awesome thx! Share this post Link to post Share on other sites
killzone_kid 1331 Posted November 2, 2015 ctrl is ST_PICTURE, edited the post Share this post Link to post Share on other sites
seba1976 98 Posted November 4, 2015 Private keyword A pretty much unknown keyword has existed in Arma series for a long time called "local" (not to mistake for "local" MP command), that allowed creation of private variables on the fly. Considering that this functionality has not been documented anywhere until recently and practically not used by the community, it has been decided to rename this keyword to "private" for clarity and convenience. If you happened to start using it recently, please update your scripts (see example usage: private). You confuse me. Private is documented since OFP, was used since then in almost every script I could see, and without it functionality is compromised most of the time. Share this post Link to post Share on other sites
seba1976 98 Posted November 4, 2015 Nevermind. Got it. Share this post Link to post Share on other sites
gossamersolid 155 Posted November 5, 2015 I'm curious about inPolygon. Does this mean we'll be getting something along the lines of drawPolygon as well? It would be neat if we could draw sectors on maps without using elipses or rectangles. Share this post Link to post Share on other sites
ruPal 143 Posted November 5, 2015 Just want to let know that "ammo" command always return 0 for players in vehicles (not FFV positions).Feedback entry: http://feedback.arma3.com/view.php?id=26459 Share this post Link to post Share on other sites
h - 169 Posted November 5, 2015 Added: execVM and spawn command now define a _thisScript variable containg a handle to the SQF script Added: execFSM now defines _thisFSM parameter containing a handle to the FSM file Had to actually like a post because this is just awesome sauce :627: Share this post Link to post Share on other sites
SilentSpike 84 Posted November 17, 2015 Since Arma 3 v1.53.132691, onscreen errors are displayed for when the input is of the wrong type or size. Why was this change made to the params command? It kinda negates the entire point of having an elegant way to safely handle incorrect input. :mellow: Share this post Link to post Share on other sites
noubernou 77 Posted November 17, 2015 To be honest I sort of like it, though the RPT error is backwards, it complains about the type provided being the type expected, and the type expected being the type provided. But yea, it gives hard validation to input in a way that matches the rest of the language. I just wish there was a way to do it on non-optional params. Right now you can not define non-optional params as having a required type (which I guess kinda makes sense in terms of the SQF engine, in that it doesn't stop the actual execution, though that'd be nice too). The best would be if it threw the RPT error and threw an exception as well. Share this post Link to post Share on other sites
killzone_kid 1331 Posted November 17, 2015 To be honest I sort of like it, though the RPT error is backwards, it complains about the type provided being the type expected, and the type expected being the type provided. But yea, it gives hard validation to input in a way that matches the rest of the language. I just wish there was a way to do it on non-optional params. Right now you can not define non-optional params as having a required type (which I guess kinda makes sense in terms of the SQF engine, in that it doesn't stop the actual execution, though that'd be nice too).The best would be if it threw the RPT error and threw an exception as well. you mean optional? you can use param commad separately for optional params, or use isEqualTypexxx commands to handle optional param type Share this post Link to post Share on other sites
rübe 127 Posted November 18, 2015 Tweaked: The random command now accepts an array as alternate syntax to support Gaussian distribution That's nice. :lol: However, I'd really prefer to use mean and variance instead of min, mid, max. Any chance this could be implemented as well? random x: uniform distribution random [mu,variance]: gauss random [min, mid, max]: non-symmetric gauss? How is this even implemented? Like a piecewise function that isn't really C2 continuous at mid? :wacko: Edit: okay, either I'm too dense, or the given examples might need some more explanation. random [0,5,10]: okay, I guess I can imagine what's happening here. Mean at 5, with a variance of ~5/4. random [0,10,0]: so now max < mid. What does this mean? Is max simply irrelevant here? Or is the actual max mid+max or something? From the given data, mean is simply at 10 now, but what about the variance? random [0,10,5]: uhm... okay what now? Variance got smaller (with a larger max.)?! I don't get it. :( Double edit: oh... so that just flips/mirrors back around the mean? I.e. random[0,10,0] is actually the left side of mu=10, variance=5/4... just with twice the amplitude? And random[0,10,5] works similar, just that the flipped right side is now also skewed (or has a different variance) before it merges/overlaps with the righthand side? Okay, that makes kind of sense, I guess... Share this post Link to post Share on other sites
h - 169 Posted November 18, 2015 Missed this new random thingy completely, BIS is on a awesome roll right now :) Share this post Link to post Share on other sites
inlesco 233 Posted November 24, 2015 With terrainSpeedCoef finally public now, we can affect vehicle movement depending on weather conditions or any special custom cases? Does the engine handle the terrainSpeedCoef already depending on weather? Any insight welcome. Share this post Link to post Share on other sites
killzone_kid 1331 Posted November 24, 2015 Just want to let know that "ammo" command always return 0 for players in vehicles (not FFV positions). Feedback entry: http://feedback.arma3.com/view.php?id=26459 Should be fixed tomo. 1 Share this post Link to post Share on other sites
Larrow 2822 Posted November 27, 2015 Can we have a missionEventHandler entityCreated so we can tell when things have been spawned. Would solve all those scripts that iterate allUnits waiting for units to be spawned. I realise there is the init eventHandler but this is of little use to mission makers. And i realise that things should be added when you spawn something but if your trying to catch units that are spawned by someone else's script package and they have not given you a sciptedEvent your either stuck iterating allUnits or editing others scripts. I think it would be quite a handy feature, not just for units but anything from CfgVehicles/CfgNonAIVehicles. What do the rest of you think? worth while? or am i missing something? 5 Share this post Link to post Share on other sites
SilentSpike 84 Posted November 27, 2015 -snip- Nevermind :) I thought VBS had that functionality, but I must have misremembered. Seems like a reasonable request to me. Share this post Link to post Share on other sites
Sniperwolf572 758 Posted November 27, 2015 ... What do the rest of you think? worth while? or am i missing something? Do want. Share this post Link to post Share on other sites
gossamersolid 155 Posted November 28, 2015 An overview of some recent scripting changes/additions nearestTerrainObjects - allows to return map objects, such as "Rock", "Tree", "Bush"...etc inPolygon - command for finding point inside polygon, fast algorithm Anybody know if there's going to be a BIKI document on these two? Also as stated before, I do hope they're adding in a drawPolygon command to complement being able to check if a position is within one. We'd finally be able to draw sectors on maps that aren't rectangles or ellipses! 1 Share this post Link to post Share on other sites
h - 169 Posted December 2, 2015 Changed: setVariable and getVariable now also work with <display> and <control> allVariables doesn't seem work with these. The Biki claims it should work with controls but seems to just return empty array (or I'm doing something wrong).. In case of display gives an error about display not supported obviously. So if at all possible allVariables should be amended accordingly. Share this post Link to post Share on other sites