Jump to content
killzone_kid

[FEEDBACK] Do you use BIS_fnc_xxxxx functions? If you do....

Recommended Posts

hi,

 

I think it would be nice to use pushBack instead of set in BIS_fnc_enemyTargets and BIS_fnc_enemySides (and maybe others BIS_fnc) to have better performance.

 

cya.

 

Nikiller.

 

enemySides has been optimised already, current code on DEV:

private _enemy = [];

{
	if (_side getFriend _x < FRIENDSHIP_CONST) then 
	{
		_enemy append [_x];
	};
} 
count [east, west, resistance, civilian];

_enemy

enemyTargets will also be optimised, after some more consultation

 

There are also 2 new functions

BIS_fnc_sideIsEnemy and BIS_fnc_sideIsFriendly

Share this post


Link to post
Share on other sites

note quite a bis_fnc, but I believe a missing command is 'between'

 

exactly how it sounds check if _valueA is betwen _valueB and _valueC

this would be so much more simpler than having to code using case {_val >0 && val <150} all through your scripts. Make for tidier code too. 

_checkValue between [_valueA,_valueB];
  • Like 1

Share this post


Link to post
Share on other sites

Nice idea actually.

 

Although to be more useful such command should be made so that you could check if A is at or between A and B (_val >= 0 && _val <= 150).

  • Like 1

Share this post


Link to post
Share on other sites

Currently there isn't a function that does this (afaik) but would it be possible to extend setDir and similar commands that change the orientation and attitude of an object so that it would be possible to define a "origin" point around which the rotation would be calculated instead of always 0,0,0? Currently if you set the direction of an object the world position of [0,0,0] in modelspace doesn't change. It would be handy if it were possible to define an arbitrary point on modelspace which stays stationary while the rest of the object rotates around that point.

 

for example

// 2nd part of the array would be the modelspace coordinates around which the rotation would be done
object setVectorDir [[0,0,1],[0,-3,0]];

Share this post


Link to post
Share on other sites

Any chance we could see an "improved" version of these two functions?

 

https://community.bistudio.com/wiki/BIS_fnc_ambientAnimCombat

https://community.bistudio.com/wiki/BIS_fnc_ambientAnim

 

I am currently working on a mod which integrates both functions into the 3den attributes. However, there are a few issues:

 

1. Since the units are attached to a game logic, one can't move the units around anymore in 3den

2. It would be awesome, if we could have an optional parameter to disable the attaching to a game logic.

3. There is no way to deactivate the function, calling the function with empty parameters like "" should turn the unit back to normal state. There is one, hidden in the function....

4. I'd like to see more animation especially for ambientAnimComb.

Share this post


Link to post
Share on other sites

* inArea command https://community.bistudio.com/wiki/inArea is added to check if position is in areas defined by trigger, marker, location, array [center, a, b, angle, isRectangle].  BIS_fnc_inTrigger reworking is WIP

* cutText, cutRsc, cutObj and cutFadeOut could use named layers. 

https://community.bistudio.com/wiki/allCutLayers returns all named layers

  • Like 2

Share this post


Link to post
Share on other sites

Polygon can't exactly be a sector, so inAngleSector will still be the best choice for that.

And I assume angle in inArea is for ellipses and rectangles, not sectors.

Share this post


Link to post
Share on other sites

So I guess, one could use inArea now instead of https://community.bistudio.com/wiki/BIS_fnc_inAngleSector, since inArea also takes and array with an angle?

 

Not quite sure what you mean. Area is a rectangle or an ellipse. Sector is ...well is sector. Dunno how can you adapt one for the use as another

Share this post


Link to post
Share on other sites

So I guess, one could use inArea now instead of https://community.bistudio.com/wiki/BIS_fnc_inAngleSector, since inArea also takes and array with an angle?

Angle here does not mean an angular section, but means rotation angle of the shape created by centre A B.

Share this post


Link to post
Share on other sites

So what's the difference between the following two lines?

_position in _location
_position inArea _location

Are they both actually the same or is one better than the other?

Share this post


Link to post
Share on other sites

So what's the difference between the following two lines?

_position in _location
_position inArea _location
Are they both actually the same or is one better than the other?

The same, alias is added for consistency.

  • Like 2

Share this post


Link to post
Share on other sites

Hey KK, have you taking a look at BIS_fnc_taskPatrol? Seems like it is not yet using param/params, additionally 60 * (pi / 180) could be replaced by 0.0175 in the following line:

_newPos = [_prevPos, 50, _maxDist, 1, 0, 60 * (pi / 180), 0, _blacklist] call BIS_fnc_findSafePos;

Last but not least, if the radius parameter in BIS_fnc_taskPatrol is set to smaller 50, a warning should pop up or something, since then in BIS_fnc_findSafePos, _minDist would be greater than _maxDist and I am not sure if that wouldn't lead to undesired behaviour.

 

All in all, nothing major, but I thought it'd be worth mentioning.

Share this post


Link to post
Share on other sites

 Seems like it is not yet using param/params

Because it doesn't use BIS_fnc_param it didn't make it into mass replace. I will have a look.

Share this post


Link to post
Share on other sites

The function BIS_fnc_moduleSector is using typeName XXX == typeName YYY multiple times(line43,48,57,459,469) which could be replace by isEqualType.

 

Additionally, would it be possible to make this thread pinned? It's always burried somewhere on page 3-4 and it's in my opinion quite an important one.

 

Edit:

 

Still using BIS_fnc_param:

 

BIS_fnc_paramWeather,

BIS_fnc_paramRespawnTickets,

BIS_fnc_paramGuerFriendly,

BIS_fnc_paramDaytime ,

BIS_fnc_paramCountdown,

BIS_fnc_3DENCamera,

BIS_fnc_3DENFlashlight,

BIS_fnc_3DENInterface,

BIS_fnc_3DENMissionPreview,

BIS_fnc_3DENVisionMode,

BIS_fnc_highlightControl -> typeName XXX == typeName YYY

Share this post


Link to post
Share on other sites

I guess I use these the most:

  • BIS_fnc_selectRandom
  • BIS_fnc_MP / BIS_fnc_remoteExec (especially if I can get it to work for moving popup targets!)
  • bis_fnc_dynamicText
  • BIS_fnc_inString

I'd like to see:

  • BIS_fnc_forceServerToUseAllCores ;)
  • Like 1

Share this post


Link to post
Share on other sites
  • BIS_fnc_selectRandom //There is an engine command for that called selectRandom
BIS_fnc_forceServerToUseAllCores

 

 

Good one!

Share this post


Link to post
Share on other sites

 

I guess I use these the most:

  • BIS_fnc_selectRandom
  • BIS_fnc_MP / BIS_fnc_remoteExec (especially if I can get it to work for moving popup targets!)
  • bis_fnc_dynamicText
  • BIS_fnc_inString

I'd like to see:

  • BIS_fnc_forceServerToUseAllCores ;)

 

https://community.bistudio.com/wiki/selectRandom

 

Instring is really hard on the cpu, could you not use find instead?

Share this post


Link to post
Share on other sites

* What functions need improvement?


 


BIS_fnc_fadeEffect, have an error, maybe this is not the thread but FeedTracker is closed and I can't start new Threats on Forum, new user :). Have two errors related with sleep command. First error, an if-else block where else block is only a sleep command, this cause a script error. The other is a script error too, sleep without const time (using a var to set time to sleep).

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×