Jump to content

Recommended Posts

is no fun at all...especially for multiple vehicles...

That's why you write the code once into a function and then you have a 1 liner per vehicle as a scripting command would do. Sure it's not as efficient, but how frequently do you need to check these conditions?

I'm still waiting on more drawing options for polygons. Why can we still not fill the polygon with a solid colour or have the various brushes from the other 2 shapes.

Share this post


Link to post
Share on other sites

What I would find useful is lockCommander. We already have a general lock, lockCargo and lockTurret, but nothing to prevent the player from entering the commander seat, as far as I am aware.

  • Like 1

Share this post


Link to post
Share on other sites

Talking of commanders, it would be super if the getin eventhandler could return commander when that's the seat the unit jumps into 

Share this post


Link to post
Share on other sites

What I would find useful is lockCommander. We already have a general lock, lockCargo and lockTurret, but nothing to prevent the player from entering the commander seat, as far as I am aware.

A commander position is a turret or a cargo position... For standard MBT and IFV/APC it is always the "child turret" of the main turret.

You can check if it is a commander turret by checking up the config for primaryObserver=true;

  • Like 1

Share this post


Link to post
Share on other sites

What I would find useful is lockCommander. We already have a general lock, lockCargo and lockTurret, but nothing to prevent the player from entering the commander seat, as far as I am aware.

There is no lockGunner either because both gunner and commander positions can be locked via lockTurret.

Share this post


Link to post
Share on other sites

There is no lockGunner either because both gunner and commander positions can be locked via lockTurret.

 

wuold be nice to round out that command family with    lockInventory

  • Like 1

Share this post


Link to post
Share on other sites

A commander position is a turret or a cargo position... For standard MBT and IFV/APC it is always the "child turret" of the main turret.

You can check if it is a commander turret by checking up the config for primaryObserver=true;

 

Ah, good to know. I've expected as much, but couldn't get it to work when I've checked it out the first time (didn't know about primaryObserver=true thingy either).

 

Something like lockInventory or canDisassemble would be nice too. I hate the current workarounds with event handlers and stuff, as the action menu entry still always remains.

Share this post


Link to post
Share on other sites

I know its probably not the right thread, but, after years, are we able to get a proper length or size command.

 

count takes way to long in some cases.. a proper engine based command to get the length of an array or string would improve a lot of scripts that I wrote and also many BIS functions..

It cant be this hard to implement this command and "count array" simple doesnt feel right if you ever written in c or java

 

Just for performance consideration: (depending on implementation)

count _array    is in linear time O(n)

length _array   (with saved length as attribute) is always 1 (O(1)) the saved time is equal to the amount of elements...

length _array   (linear run just as count but done by the engine) still faster than sqf

length _array   (the c way... memory size / size of elements .. dunno if this is possible for generic arrays which are(?) used in arma) another way doing it O(1)

 

if you ask yourself what I mean by O(x), here: WIKI LINK

 

 

Thanks for your attention

  • Like 1

Share this post


Link to post
Share on other sites

I know its probably not the right thread, but, after years, are we able to get a proper length or size command.

Oh yes please sounds like an excellent idea.

While were at it can we add some extra operators as well, inc/dec ++ --, and assignments like += *= etc

  • Like 2

Share this post


Link to post
Share on other sites

Oh yes please sounds like an excellent idea.

While were at it can we add some extra operators as well, inc/dec ++ --, and assignments like += *= etc

It atstounds me such basic things aren't in yet. It's been 15 years, you know... I suppose the upcoming Enscript will support all the "modern abstractions".

Share this post


Link to post
Share on other sites

I know its probably not the right thread, but, after years, are we able to get a proper length or size command.

 

count takes way to long in some cases.. a proper engine based command to get the length of an array or string would improve a lot of scripts that I wrote and also many BIS functions..

It cant be this hard to implement this command and "count array" simple doesnt feel right if you ever written in c or java

 

Just for performance consideration: (depending on implementation)

count _array    is in linear time O(n)

length _array   (with saved length as attribute) is always 1 (O(1)) the saved time is equal to the amount of elements...

length _array   (linear run just as count but done by the engine) still faster than sqf

length _array   (the c way... memory size / size of elements .. dunno if this is possible for generic arrays which are(?) used in arma) another way doing it O(1)

 

if you ask yourself what I mean by O(x), here: WIKI LINK

 

 

Thanks for your attention

 

You ASSUME that count ARRAY actually counts the ARRAY, where in fact it just accesses array.size() property and returns the result. Which means the speed of the command is identical whether it is 3 elements or 300 elements array, BTW  easily verified by code performance test in game.

I would also like to add that baseless requests like this one, which have nothing in common with how things really are, make it quite difficult to get real, legit issues addressed.

  • Like 4

Share this post


Link to post
Share on other sites

with is supposed to return a value (cf https://community.bistudio.com/wiki/with )

I tried it those ways:

a=1;
b=2;

res= with missionNamespace do { 
        a = a + b;
    };
a=1;
b=2;

my_fnc = {
    with missionNamespace do {
        a = a + b;
    };
};

hint str ( call my_fnc);

but both are generating error.

 

Am I doing something wrong ? Is the wiki not uptodate ? is with not working as it should do ?

Share this post


Link to post
Share on other sites

"a = a +b" isn't supposed to return anything.

Simply use "a+b" instead.

 

Working like a charm !! Thank you a lot !!!

Share this post


Link to post
Share on other sites

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

This is nice!

Is there currently a way of detecting who executed the Function? Searching this Thread didnt offer an answer
Its surely possible to give a unit/owner as param but this is easy to manipulate..

 

A command for that would be really cool if its not in place already

Share this post


Link to post
Share on other sites

Can we please get drawMode debug commands for the diag.exe:

https://resources.bisimulations.com/wiki/diag_drawmode

https://resources.bisimulations.com/wiki/setDrawMode

https://community.bistudio.com/wiki/diag_drawMode => none available atm

It's been some years since I had access to the internal version, yet some of these are drawMode or diagToggles:

http://pastebin.ubuntu.com/23140461/

(taken from the diag.exe binary - internal version may have even more neat stuff these days)

Useful too:

https://resources.bisimulations.com/wiki/disableRendering

  • Like 5

Share this post


Link to post
Share on other sites

The one thing I would really really wish for is a native command that allows us to move an item from one container to the other. And I mean move, not create a new item and delete the old one.

 

Right now the only way to do that is to let a dummy unit (or gamelogic) execute the TakeWeapon / DropWeapon actions...

  • Like 4

Share this post


Link to post
Share on other sites

The one thing I would really really wish for is a native command that allows us to move an item from one container to the other. And I mean move, not create a new item and delete the old one.

 

Right now the only way to do that is to let a dummy unit (or gamelogic) execute the TakeWeapon / DropWeapon actions...

 

Exactly, It would be nice if every item had an ID, so you can actually track the journey of a weapon, who picked it up etc.

Currently not possible.

The workaround with the dummy is really odd.

 

Cheers

  • Like 1

Share this post


Link to post
Share on other sites

I suggest to (at least optionally) allow to export the 'setUnitLoadout' array from the arsenal, as this is becoming the default command for dressing up someone.

  • Like 1

Share this post


Link to post
Share on other sites

I wish there was a way to script the creation of playable units, some way to execute some sqf prior to the lobby screen being shown. As far as I know it is not possible as we rely on mission.sqm and description.ext for defining playable units and player numbers. But I still think it would be handy.

  • Like 3

Share this post


Link to post
Share on other sites

It seem like BIS_fnc_show3DENMessage can not display two messages at the same time. One message will simply get lost. This can be an issue when multiple mods use this to display a message via onMissionPreviewEnd Eden EventHandler. (Just an example)

 

I would apprechiate it, some modifications would be made to queue all messages and display them after one another.

Share this post


Link to post
Share on other sites

Is there an easy way to find out whether or not a vehicle can swim? If not I'd like to request that.

 

Maybe something like:

canSwim _object;

 Would return true for infantry, amphebian and boats?

  • Like 1

Share this post


Link to post
Share on other sites

do you mean like canMove or checking the class name for general swimming capabilities?

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

×