whiztler 137 Posted October 21, 2015 MP BIS_fnc_MP has a dedicated command: RE https://community.bistudio.com/wiki/remoteExec https://community.bistudio.com/wiki/remoteExecCall Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted October 22, 2015 Hi! I think spawnGroup should have implemented some delay and be spawned, as it freezes the game for a sec everytime you use it. Very used functions (among others, I use a lot): selectRandom (someone said it should be a command and I agree if it adds performance) dirTo arrayShuffle relPos MP spawnVehicle (dont ask me why, vehicles respond better to WPs than just creating vehicles and units) For heavy functions like BIS_fnc_spawnGroup, try spawning them instead of calling, then a waitUntil scriptDone to hold the initial script until the group has spawned. _spawnGroup = [args] spawn BIS_fnc_spawnGroup waitUntil {scriptDone _spawnGroup}; Share this post Link to post Share on other sites
Igitur 43 Posted October 22, 2015 If requests are allowed, I think a BIS_fnc_arraySwitch could prove very useful. Something like : [array, [2,5], [7,9]] call BIS_fnc_arraySwitch would help me a lot in my current project. Share this post Link to post Share on other sites
R3vo 2654 Posted October 22, 2015 If requests are allowed, I think a BIS_fnc_arraySwitch could prove very useful. Something like : [array, [2,5], [7,9]] call BIS_fnc_arraySwitch would help me a lot in my current project. If BI can create such a function, so can you. Share this post Link to post Share on other sites
killzone_kid 1331 Posted October 29, 2015 To all: Could you please post example params you use for BIS_fnc_findSafePos? Share this post Link to post Share on other sites
barbolani 198 Posted October 29, 2015 To dynamically find flat positions for choppers to land and unload troops. Works well, never seen weird things. _landpos = [_posdestino, 300, 500, 10, 0, 0.3, 0] call BIS_Fnc_findSafePos; Share this post Link to post Share on other sites
barbolani 198 Posted October 29, 2015 For heavy functions like BIS_fnc_spawnGroup, try spawning them instead of calling, then a waitUntil scriptDone to hold the initial script until the group has spawned. _spawnGroup = [args] spawn BIS_fnc_spawnGroup waitUntil {scriptDone _spawnGroup}; Can you believe I've never thought about that? Thanks! will check it!! Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted October 30, 2015 To all: Could you please post example params you use for BIS_fnc_findSafePos? _foundSpawnPos = FALSE; for '_x' from 0 to 49 step 1 do { _spawnPos = [_centerPos,700,1200,10,0,0.5,0] call BIS_fnc_findSafePos; if ((count _spawnPos) > 0) then { if (({((_x distance _spawnPos) < 400)} count allPlayers) isEqualTo 0) then { if ((_spawnPos distance2D _centerPos) < 1201) then { // incase it selects the safePositionAnchor pos instead of doing its job _foundSpawnPos = TRUE; }; }; }; if (_foundSpawnPos) exitWith {}; }; Share this post Link to post Share on other sites
killzone_kid 1331 Posted November 13, 2015 On Monday, the following commands should be extended/added to the DEV branch: https://community.bistudio.com/wiki/getDir => BIS_fnc_dirTo https://community.bistudio.com/wiki/getRelDir => BIS_fnc_relativeDirTo https://community.bistudio.com/wiki/getPos => BIS_fnc_relPos https://community.bistudio.com/wiki/getRelPos Please test if working correctly 8 Share this post Link to post Share on other sites
R3vo 2654 Posted November 13, 2015 On Monday, the following commands should be extended/added to the DEV branch: https://community.bistudio.com/wiki/getDir => BIS_fnc_dirTo https://community.bistudio.com/wiki/getRelDir => BIS_fnc_relativeDirTo https://community.bistudio.com/wiki/getPos => BIS_fnc_relPos https://community.bistudio.com/wiki/getRelPos Please test if working correctly Awesome news. Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted November 14, 2015 thanks mr tom, KK and everyone else involved ... keep em comin ;) Share this post Link to post Share on other sites
h - 169 Posted November 16, 2015 Please test if working correctly Seem to work just as intended. Good, good stuff.. :) Maybe the commands 'direction' and 'position' should also be extended with the new getDir/getPos functionality since they are the same commands anyway? Share this post Link to post Share on other sites
whiztler 137 Posted November 16, 2015 Please test if working correctly Great stuff! Works like a charm. Share this post Link to post Share on other sites
killzone_kid 1331 Posted November 17, 2015 Another engine solution, probably Wednesday DEV https://community.bistudio.com/wiki/selectRandom=> BIS_fnc_selectRandom Share this post Link to post Share on other sites
R3vo 2654 Posted November 17, 2015 Awesome. Will be interesting to see if I can improve the performance of some of my scripts. Share this post Link to post Share on other sites
h - 169 Posted November 17, 2015 Awesome, really appreciated additions :) Keep 'em coming guys :627: (the lists are still long ;) :P ) Although kinda off-topic, one thing that came to mind since there's now the new _thisScript and _thisFSM whatchamacallits added would it be possible to add _thisParentFile or something (kinda what the functions get, _fnc_scriptNameParent) that would return the script/function/fsm that executed the given script/function/fsm and then update BIS_fnc_log family of functions to utilize those, would be a tad easier to do debugging with massively scripted stuff..? Share this post Link to post Share on other sites
2legsakimbo 1 Posted November 18, 2015 BIS_fnc_findSafePos useful. but could be better. it doesn't always find the safepos and might deposit units in rocks or sea despite the option not to be near water. a fundamental that could be improved imo. Share this post Link to post Share on other sites
barbolani 198 Posted November 18, 2015 Hi just a question from a curious ignorant mission maker. I assume perforamce improvements comparing a command than using a function. Is it quantifyied? How much? Share this post Link to post Share on other sites
killzone_kid 1331 Posted November 18, 2015 Depends on complexity of a function, if I were to take an average guess... makes things run around x10 faster? 2 Share this post Link to post Share on other sites
SilentSpike 84 Posted November 18, 2015 I'm not sure if there's a respective BIS function, but it's be nice to have some kind of command like so: { _x % 2 != 0 } filter [0,1,2,3,4,5]; Whereby any element that returns false is removed from the array. Currently there's no convenient way to do this using forEach and deleteAt (and modifying an array while iterating over it is sketchy at the best of times in any language). Share this post Link to post Share on other sites
Larrow 2822 Posted November 18, 2015 I'm not sure if there's a respective BIS function, [ [0,1,2,3,4,5], [], {_x}, "ASCEND", { _x % 2 != 0 } ] call BIS_fnc_sortBy It was something i was hoping would of been addressed by the inclusion of the sort command or a sortBy command but at the moment BIS_fnc_sortBy is closest your going to get i think. 1 Share this post Link to post Share on other sites
killzone_kid 1331 Posted December 14, 2015 Brace yourselves ;) 2 Share this post Link to post Share on other sites
R3vo 2654 Posted December 15, 2015 Tweaked: Some of the frequently used functions have been optimised due to the availability of new engine script commands. The optimisation work is still ongoing so if you have any suggestions, please leave them here. Tweaked: Optimised script headers Tweaked: Optimised Vector functions Tweaked: Optimised Array functions Tweaked: Optimised Config functions Tweaked: Optimised Geometry functions Tweaked: Optimised Number functions Tweaked: Optimised Strings functions Tweaked: Optimised Vehicles functions Tweaked: Optimised Sides functions Tweaked: Optimised Misc functions Tweaked: Secure variables swapping Tweaked: BIS_fnc_rscLayer optimised, new storage format Tweaked: BIS_fnc_camera modified to accept new a BIS_fnc_rscLayer format Tweaked: BIS_fnc_codePerformance improved, removed possible interference with tested code Tweaked: BIS_fnc_error no longer will break when the message contains HTML-like symbols Tweaked: BIS_fnc_returnConfigEntry now has better handling of undefined input Added: BIS_fnc_deleteCounter to complement the BIS_fnc_counter function Awesome! Share this post Link to post Share on other sites
Tankbuster 1746 Posted December 15, 2015 Yes, some good stuff there. Share this post Link to post Share on other sites