#arma3_scripting

1 messages · Page 497 of 1

still forum
#

to get the async's out faster

tough abyss
#

What are we talking about speed wise?

still forum
#

well ideally double

#

but 0 difference in arma land

#

just less backlog inside extdb end

waxen tide
#

closed the game, deleted the table, checked back 5 minutes later and found the table had 20MB because still being written to.

#

@torn juniper
I wrote this a while ago to check if players are not close to a position to do some spawning/despawning.

private _pos             = param [0,[0,0,0],[[[0],[0],[0]],[[0],[0]]]];
private _radius          = param [1,3000,[0]];
if (_pos isEqualTo [0,0,0]) then {diag_log "fn_check_player_distance.sqf - WARNING - no center coordinates provided!"};

private _all_headless_clients = entities "HeadlessClient_F";
private _real_players = allPlayers - _all_headless_clients;

private _return = true;
{
    private _distance = _pos distance2D (getpos _x);
    if (_distance < _radius) exitWith {_return = false};
} forEach _real_players;

_return

I don't call that often and it seems reasonably quick thing to do.

tough abyss
#

The database has to be crawling to have any backlog, what does one have to do to it?

torn juniper
#

@waxen tide thanks 😃

#

Basically making a custom trigger for each location, rather than 60+ triggers all checking themselves as I don't need instant results

#

just checking over them every little bit

high marsh
#

"custom trigger" ?

waxen tide
#

if you have an array with all your locations and an array with all your players, checking the distance between all of them is really fast if you just do distance2D between them.

still forum
#

inAreaArray :u

high marsh
#

Lol.

waxen tide
#

WHY DO I EVEN TRY TO GIVE ADVICE

#

shuts up

#

heh

#

i'm running extDB3 debug variant 😄

torn juniper
#

🙏 inAreaArray, but yes @high marsh instead of a trigger activating when a player enters X location I will just have a HC monitoring all locations for new players on a random delay since I don't need anything fast/accurate just handled in a way with the least impact on the server

waxen tide
#

maybe i should change that.

high marsh
#

Yes, I was under the impression you were already using inAreaArray by your description. So that's what confused me, cool stuff. Glad you got it working.

torn juniper
#

😄

tame lion
#

is there any way to do a smoother version of progressSetPosition that doesn't look like the bar is just jumping to the next value instead of sliding to the next value?

neon snow
#

The only thing that comes to my mind is to have more values inbetween

tame lion
#

yeah, i tried this:

for "_i" from 0 to 1 step 0.05 do {
        _bar progressSetPosition _i;
        sleep 0.1;
    };```
and its pretty close
#

but i still notice it, guess i just have to sleep shorter times

carmine abyss
#

When scripting do the pros write it the long way at first then optimize the code later?

neon snow
#

or use perframe

#

I am not a pro but I try to optimize it as early as possible but sometimes when I am testing things I just write it dirty

ruby breach
#

@carmine abyss Make it work, and then make it fast. If you can do both at the same time, great. If not, better to optimize working code than to write fast code that doesn't work.

carmine abyss
#

Thank you that's the answer I was looking for.

neon snow
#

Is there a way to make vehicles hot for FLIR via script?

carmine abyss
simple solstice
#

Is there a way of checking how "much" ambient light there is near a player

#

?

carmine abyss
#

What's the source of the light?

proven crystal
#

how can i check whether a unit is remote controlled by zeus?

high marsh
#

isRemoteControlled, can't remember the exact name

#

could be a fnc

proven crystal
#

hmm cant find either

proven crystal
#

hm thanks. although that did not seem to work for that guy. will try it out

#

could i check for isPlayer and whether the unit is in playable units?

#

so true and false would mean remote controlled?

#

although... remote controlled units dont seem to be in allPlayers. not sure if isPlayer would work then

grizzled cliff
#

yawns

#

I am slowly... sloooowly figuring out how I want/can integrate JSBSim for missile/bomb dynamics in Arma...

#

like 5 years later...

#

😛

still forum
#

A wild Nou reappears out of the ether.

short trout
wide hamlet
#

can you use variables such as pixelW/pixelH inside of a script rather than inside of a gui config? I.e. ctrlSetPosition _x * pixelW

still forum
#

sure

#

they are not variables though

wide hamlet
#

ah i thought they may have been global variables. Not quite sure how those all work yet lol. sticking with my pretty underscores 😛

zenith edge
#

i should be able to copy paste server side sqf functions out of mission and into intercept sqf blocks in registered functions, then throw easylogging++ performance monitoring on each of those c++ functions to get full performance logging of each sqf function right?

still forum
#

into intercept sqf blocks in registered functions why though? That's kinda dumb

#

and will kill your performance

#

better would be to just sqf::call(sqf::get_variable... your function by your old name

#

which is essentially just calling the func in unscheduled. Which you can already do in just normal SQF

zenith edge
#

we have a lot of codebase run scheduled

still forum
#

You could make a registered function call wrapper.
callInstrument My_fnc_function;
Where in intercept side you do

callInstrument(game_value func)
_StartTime = stuff;
auto result = sqf::call(func);
_endTime = stuff;
<do logging stuff here>
return result

into intercept sqf blocks in registered functions

#

But intercepts sqf::call is not that good for performance.
SQF->Intercept is as fast as it can get.
Intercept->SQF is rather slow (still very fast, but not fast enough for me)

zenith edge
#

mmmm

#

becti is big sprawling codebase and trying to track down performance bottlenecks that we only really see in live games with lots of people

still forum
#

Also if that code has to be scheduled. Then moving it to unscheduled will probably not work

zenith edge
#

yea

still forum
#

Intercept is entirely unscheduled. Unless you go into the REALLY advanced territory

zenith edge
#

mmm

still forum
#

Sounds like what you are trying to do is essentially what my profiler is already doing.
Which just won't work for scheduled. You'll get nonsense readings if you try to do that.
Though.. Again. unless you move to very advanced code, which I couldn't be bothered to do yet as it's too much work for too little result

zenith edge
#

what happens if u call intercept func from scheduled code?

still forum
#

Same as any script commands

#

it executes. And when it's done the script continues (or exits if it's over the 3ms limit)

zenith edge
#

think itd be worthless to call an intercept function at beginning and end of complex scripts that log to a thread safe datatype in intercepts then have background thread log that to file?

#

i want more to monitor debug if some scheduled stuff is going haywire

still forum
#

if the scheduled scripts happens to suspend in the middle of it. You'll measure a runtime of several seconds or even minutes.
Even if the script in total just takes a couple milliseconds to run

zenith edge
#

mmm

#

k

#

thats fine

#

you mean jusy what it tells me

#

that wouldnt have much overhead would it?

#

i guess i can just try it and see if its worthless

still forum
#

yeah. Overhead wise that's neglible. Especially in scheduled scripts

zenith edge
#

codebase is goofy enough and big enough its hard to even guess logic flow and when things are going

#

withouy shittons of time

#

hoping maybe i can reggex output and notice stuff

still forum
zenith edge
#

we havr forked code

#

by over a year

still forum
#

Wow. I randomly click into the repo. And the first function I hit is already garbage

#

deleteAt doesn't care about what type the value is that you are removing

zenith edge
#

if thats even the right repo hard to see on phone

#

our repo private

still forum
#

Never heard about that problem. Never had it either

wide hamlet
#

Ight i am struggling here lol. So i am making a little custom gui that shows ammo,currently selected type etc etc. I want it ti be in a different location if _x is true, well i have been testing that _x is true, and when using ctrlSetPosition and ctrlCommit, I can see the ammo count fly off into space at the distance increments at set, and my current ammo selected rsc goes up the screen every time I press F. This leads me to believe that the code is being re ran each time it is updated.
tl;dr, How can i isolate a block of code to run once inside of a script that is constantly checked

zenith edge
#

i think we r 3 years forked from bennies code mmm

#

still gross though

still forum
#

@wide hamlet set a global variable after you ran the code. And check if it's set before you run it

wide hamlet
#
    if (ctrlShown _weaponControl) then {
            if (_weaponType isEqualTo 3) then {
            _pos1 = ctrlPosition _weaponControl;
            _weaponControl ctrlSetPosition [(_pos1 select 0),(_pos1 select 1) - 0.2];
            _weaponlControl ctrlCommit 0;
            _pos2 = ctrlPosition _muControl;
            _muControl ctrlSetPosition [(_pos2 select 0),(_pos2 select 1) - 0.2];
            _muControl ctrlCommit 0;
            };
            Yeet = 1;
    };
};```
#

ish?

zenith edge
#

wow wtf is that rspeek repo lol

#

thats some random spinoff

still forum
#

yes. Like that. Make sure that Yeet is defined beforehand somewhere. Else it will be nil and error out.
Btw.. You know that you can use && to combine if's so that you don't have to nest them?

wide hamlet
#

yea. More so getting it to work rn and ill optimize later

zenith edge
#

the orig codebase that was worked from

wide hamlet
#

hmm...weird

tough abyss
#

How does intercept sync with global scripts simulation?

still forum
#

what do you mean "sync"?

tough abyss
#

Race condition

still forum
#

it doesn't

#

intercept is unscheduled. Like any other unscheduled script

#

no race conditions

tough abyss
#

So theoretically you could crash requesting the same resource ?

still forum
#

what is "same resource" ?

#

you mean when you multithread with intercept?

tough abyss
#

Dunno something game engine is using at the time you run your script that uses it too

still forum
#

Well. As I said. Intercept is unscheduled. And runs in mainthread like any other script

wide hamlet
#

Make sure that Yeet is defined beforehand somewhere Im assuming you meant in a different file/script?

still forum
#

not necessarily. Just have it be defined. Else you wanna use isNil

#

If you mean self-registered SQF commands. They work exactly like other sqf commands.
If you mean intercept eventhandlers. They work exactly like other eventhandlers.
I don't know what else you could mean

wide hamlet
#

might use isNil then. Because it was getting reset back to what i defined it to for whatever reason

tough abyss
#

So it never crashed on you?

still forum
#

Tons of times.

#

All of them while working on a new feature and misstyping something or making a logical mistake

#

Like I said. I don't know what you mean. There are no race conditions. There are no races

#

You are all driving on a single-lane-road.

#

you can't overtake

#

exactly the same as unscheduled scripts

tough abyss
#

You are calling game functions from different thread than arma, are you not?

still forum
#

no

tough abyss
#

Oh

still forum
#

You could if you wanted to. But then you need to make sure to synchronize with main thread by yourself.
Essentially freeze main thread while you execute, and unfreeze when done, which is really inefficient and essentially makes the seperate thread kinda useless

zenith edge
#

im using a seperate thread for polling and mysql connections

still forum
#

on Linux you could potentially run some SQF commands from a seperate thread without problems.
But only commands that don't change any state. And only on Linux (because the malloc there can multithread)
But what's the point of calling stuff like splitString or arrayIntersect or selectRandom's SQF commands if you could just use the C++ equivalent

zenith edge
#

i hate sqf

waxen tide
#

why doesn't arma have something like a multithreaded scripting environment which runs asyncronous on another cpu core?

still forum
#

because you'd have to make sure that you don't touch anything that any script could be touching right now

#

which will hurt performance way more, than just running scripts in main thread

zenith edge
#

sounds dangerous and hard

waxen tide
#

yeah how about you ignore that and leave that up to the scripter to worry about?

still forum
#

Yeah. How about you just let everyone crash the game and they say it's their fault

#

fun right?

zenith edge
#

why put a handle on a pot?

still forum
#

Also the scripter cannot detect such stuff

waxen tide
#

i mean say you're reading config data, or look for objects on the map, stuff like that. you're reading data, not changing it, that could be async to anything else happening.

still forum
#

Like. What are the main things that run next to script stuff.
Simulation (scripts can change positions and animations anytime), Sound (script can start/stop sounds anytime), Graphics drawing (scripts can spawn/delete models, start/stop particle effects, change textures anytime), Networking (scripts can remoteExec stuff anytime, or change positions, or start/stop sounds, or spawn/delete models, or change textures, or start/stop particle effects, or change animations anytime)

#

yeah. You could async read config data. Or read object data (as long as simulation or networking is not currently running)

waxen tide
#

yeah but what if you're not doing anything like that?

still forum
#

You cannot check what the engine currently does.
So how would you prevent to do anything like that while the engine does it's stuff?

#

I already have a Intercept lib for async config scanning in a seperate thread. That works fine

#

And you also cannot do it because the scriptings memory allocator is not thread-able. On windows.

#

F-ton of work. For almost no useful result

waxen tide
#

well trivially simple. sort all script commands into two categories, ones that mess with stuff and ones that don't. add a command for spawning a script thread, like spawnthreaded "something.sqf"; and inside that new environment all the script commands that mess with stuff aren't allowed.

#

non-threadable memory allocator on windows?

#

that's fancy enough of an explaination

#

accepts it

still forum
#

Well you could replace that malloc. And make everything slower.. But....

waxen tide
#

s-sorry

#

goes back to work

#

okay.

still forum
#

Apparently I'm a pristine german-ist

#

Let's learn russian

#

Wow wtf.. The first lesson starts with me having to know russian words already :U
How good that I know them.

waxen tide
#

i gave up learning russian at like 100 words

#

but my finnish swearing is excellent. EI VITTU HELEVETTI, SAATANA PERKELE!

still forum
#

Yes. Yes yes. indeed.

neon snow
#

Can I check if unit is detected by other unit's sensors ?

still forum
tough abyss
#

That’s a group knowledge

still forum
#

Yes and?

tough abyss
#

Well

outer fjord
#

As far as I understand it. If both units, even if not in the same group have datasharing enabled. It would still be added to it's knowsAbout stuff

neon snow
#

Hmm, but the knowsAbout will change if unit is out of sensor range ?

tough abyss
#

Not straight away

#

You can use forgetTarget to force the knowledge

drowsy axle
#

Could someone proof read this for me? ```sqf
private _side = [
west,
east,
independent
];

private _sector = [
LZConnor
];

{
_side = _x;
{
private _varSTR = "isOwner" + (str _sector) + (str _side);
missionNamespace setVariable [_varSTR, true];
[
_x,
_side
] call BIS_fnc_moduleSector;
} forEach _sector;
} forEach _side;

if (isOwnerLZConnorwest) then {
WZeus addCuratorEditingArea [1,LZConnor,100];
EZeus removeCuratorEditingArea 1;
IZeus removeCuratorEditingArea 1;
};

if (isOwnerLZConnoreast) then {
WZeus removeCuratorEditingArea 1;
EZeus addCuratorEditingArea [1,LZConnor,100];
IZeus removeCuratorEditingArea 1;
};

if (isOwnerLZConnorindependent) then {
WZeus removeCuratorEditingArea 1;
EZeus removeCuratorEditingArea 1;
IZeus addCuratorEditingArea [1,LZConnor,100];
};```

still forum
#

missing private
missing tags for your isOwner stuff, although it's so specific that it's not really needed.
_var = missionNamespace setVariable That's nonsense.
_var = [ that's nonsense too.
] BIS_fnc_moduleSector; missing a call or spawn

tough abyss
#

You mean _side = _x?

still forum
#

Your bunch of If's contain alot of duplicate code. While only a single variable changes.
You could just set the variable in the if's and move all the duplicate code out of there

Ah no you can't. Missunderstood that code. Though you are setting all variables to true. Why do you check for them then?

drowsy axle
still forum
#

+_side won't work. STRING+SIDE is invalid.
looks like you want + (str _side)

#

your useless _var's are still in there you never use them. They are useless.

drowsy axle
#

Sorted

still forum
#

(str _sector) will only work if LZConnor's vehicleVarName is "LZConnor"

#

if it's editor placed. Then it will be

drowsy axle
#

Sorted the if statements to be true to how I want them done. The initial was testing

#

LZConnor is the Sector Module Variable.

still forum
#

still you are setting all the variables to true. Why do you need to check that they are true?

drowsy axle
#

In the screenshot. It's all done through the editor, which is fine. I'd rather have the trigger checks / anything done when a side captures the sector, in script.

still forum
#
private _varSTR = "isOwner" + (str _sector) + (str _side);
        missionNamespace setVariable [_varSTR, true];

You are STILL setting the variables to true. Setting it to true again in a trigger won't really change anything?

drowsy axle
#

I'm bypassing the trigger. If the script works, the trigger is not needed.

#

But I want the script to do the same thing as the trigger, so that it's one less thing to place down.. well 3.

#

would this work? sqf _CheckIfSideHoldsSector =[ _x, _side ] call BIS_fnc_moduleSector; private _varSTR = "isOwner" + _sector + (str _side); missionNamespace setVariable [_varSTR, _CheckIfSideHoldsSector];

still forum
#

no idea what that returns

drowsy axle
#

it;s a boolean

still forum
#

yes

#

but no idea what it is

#

according to wiki it's a setter function. I don't know what boolean a setter would return

#

it shouldn't return a bool

drowsy axle
#
Can be also used to get sector parameters.
    --- Set sector owner ---
    Parameter(s):
        0: OBJECT - sector module
        1: SIDE

    Returns:
    BOOL```
still forum
#

Can be also used to get sector parameters. where did you get that from? that's not on wiki

drowsy axle
still forum
#

No...

drowsy axle
#
/*

    Description:
    Initialize a sector module. Can be also used to get sector parameters.

    --- Get all sectors ---
    Parameter(s):
        0: BOOL

    Returns:
    ARRAY of OBJECTs

    --- Get number of sectors held by a side ---
    Parameter(s):
        0: SIDE

    Returns:
    NUMBER - number of sectors owned by the side

    --- Set sector owner ---
    Parameter(s):
        0: OBJECT - sector module
        1: SIDE

    Returns:
    BOOL

    --- Initialize ---
    Parameter(s):
        0: OBJECT - sector module

    Returns:
    NOTHING
*/```
still forum
#

Ah that far on the top.

#

Yse.

#

The first two are getters

#

the last two aren't

drowsy axle
#

Ah

#

😦

still forum
#

setting the sector to a new owner. Doesn't really check who owns the sector.

drowsy axle
#

True.

still forum
#

Though after you call that. _side will definitely own the sector. As you've just set it

drowsy axle
#

Hmm. I'll just stick with the trigger. lol

#

Would this work? ```sqf
[] spawn {
while {true} do {
#include 'sectors/LZConnor.sqf'
};
};


LZConnor.sqf:

if (isOwnerLZConnorwest) then {
WZeus addCuratorEditingArea [1,LZConnor_Sector,50];
EZeus removeCuratorEditingArea 1;
IZeus removeCuratorEditingArea 1;
};

if (isOwnerLZConnoreast) then {
WZeus removeCuratorEditingArea 1;
EZeus addCuratorEditingArea [1,LZConnor_Sector,50];
IZeus removeCuratorEditingArea 1;
};

if (isOwnerLZConnorindependent) then {
WZeus removeCuratorEditingArea 1;
EZeus removeCuratorEditingArea 1;
IZeus addCuratorEditingArea [1,LZConnor_Sector,50];
};```

still forum
#

Yes....

#

But you should add a sleep there

drowsy axle
#

Yes. Of course 😃

still forum
#

and constantly removing/adding areas even though they were already removed/added seems like a waste

drowsy axle
#

hmm

mental dawn
#

Hi guys. I don't know if this question has been asked a million times before, but I couldn't find a solution yet. I try to display a live camera feed on a texture surface (a billboard in this case). As you can see in the video, as soon as I go to distances over 50m the rendered picture is blurred by mist or fog. When I run the same camera movement as cutscene, the view is totally clear - exactly like I want it to be. My video settings are maxed out but still fog wenn rendering the feed to a texture. Here's the video: https://www.youtube.com/watch?v=kow-asNziN4

tough abyss
#

And your PiP settings?

unborn ether
#

@mental dawn This depends on PiP settings, and to be clear R2T will always have some grain effects, the bigger the surface - the lower the "quality".

mental dawn
#

@unborn ether Yeah I'm aware of that. But it is not a grain effect. Its fog or better mist that rapidly increases in density with the distance of the camera from the camera target. When I use distances up to 50m the picture is almost clear. (good enough at least)

compact maple
#

why would you watch the tv at 50 meters 🤔

mental dawn
#

No, the camera is supposed to be a uav that circles a couple of dozens of metres above the camera target. The distance between the camera and the target object is the problem. Camera >50m away from target -> fog

still forum
#

Ahh. I thought it's the distance between you and the screen. Because you didn't walk forwards/backwards in the video 😄

mental dawn
#

Sadly yes, thats exactly what I mean. That issue I also found when researching the problem ...😞

still forum
#

Well. It's a bug then that cannot be fixed ¯_(ツ)_/¯

#

Why do you come here and ask if you know that it's a bug?

mental dawn
still forum
#

That is probably a config mod

#

@umbral nimbus is here btw

mental dawn
#

Maybe he sees it? 😊

still forum
#

It's a config mod yeah. You can just unpack the pbo and look at it yourself

tough abyss
#

50m is way too low your PiP must be set at “rubbish”

mental dawn
#

its set at 12000

tough abyss
#

There is no such setting

still forum
#

if you have enhanced video settings, or that mod by Crielaard then there is such setting

tough abyss
#

If you come asking why my modded game doesn’t work then the answer is pretty obvious

#

The video doesn’t show the PiP setting

#

So 🤷‍♂️

still forum
#

it does

#

0:31 bottom left

tough abyss
#

Ah yeah, difficult to see on mobile, and yeah 12000 well, good luck with that

mental dawn
#

I maxed all video setting to checkif I can influence the rendering of the fog - but no change.

unborn ether
#

@mental dawn Are you using camCreate as your R2T source?

mental dawn
#

yes

unborn ether
#

Didn't try it before, but try using camCommitPrepared (along with any prepare) commands. Just as test.

mental dawn
#

Ok, I'll check that out. Thanks.

#

Unfortunately no change. 😟

unborn ether
#

I've tried.

long glacier
#

Hello guys _unit = _this select 0; _animation = _this select 1; while {alive _unit} do { _unit switchMove _animation; waitUntil {animationState _unit != _animation}; };

#

Where in this script is my unit variable defined?

#

any help would be appreciated

molten folio
#

_unit = _this select 0;

long glacier
#

Yeah rgr I tried that first changed _unit to _officer the variable of my AI unit being officer

#

Trying this instead while {alive officer} do { officer playMoveNow "Acts_A_M05_briefing"; sleep 1; waitUntil {animationstate officer != "Acts_A_M05_briefing"}; };

#

Na did not work this animation just doesn't wanna loop

sleek token
#

is there a version of drawPolygon that returns something like a marker object?

tough abyss
#

Returns? What do you mean by that

mental dawn
sleek token
#

@tough abyss a way to store the polygon as an object

#

i know i could simply store it as the points but i wont have access to what i just draw

tough abyss
#

You can’t, you can store points in array, that’s it

sleek token
#

too bad... :(, unfortunately arma does not offer triangle map markers...

tough abyss
#

Of course it does

sleek token
#

anything real and not the icon marker?

tough abyss
#

You can find them in 3DEN

digital hollow
#

Seeing you guys talk reminds me of M47 Dragon

tough abyss
#

You mean a triangle area?

sleek token
#

setMarkerShape only supports Polyine, Rectangle, Ellipse AFIK

#

yes

tough abyss
#

You can draw triangle with, well, drawTriangle and set texture of a marker on it

sleek token
#

would lead me to the same problem as early because i will not have anything as return

#

i think it even uses draw polygon?

tough abyss
#

It doesn’t use draw polygon

#

It draws triangles

#

And paints them

#

Not quite sure what this has to do with returning something, it is a draw command, it draws

#

I’m sure a separate data type like Polygon would have allowed for some fancy map drawings, but Arma gods decided against it

still forum
#

🍪

#

🍪 for everyone!

heavy garden
#

need help so i've converted a mp4 video to ogv. i've set it up a tv where it plays that video straight away, but i want it to play it on the tv via trigger so far in the video.sqf i have this in there
this addAction ["Allumer la télé", "video.sqf"];
Script à mettre dans le fichier video.sqf:
scopeName "main6";
while{true}do{
tv setobjecttexture [0,"video.ogv"];
["video.ogv",[10,10]] spawn bis_fnc_playvideo;
sleep duréedevotrevideo+1;
if (!alive TV) then {
breakTo "main6";
};
};

#

ignore the french, im not french i just found a french video lol...

sleek token
#

@tough abyss thanks a lot, i smell lots of workaround todo

still forum
#

@heavy garden and your problem with that stuff is?

heavy garden
#

it works i just want it to work via trigger...

#

instead of straight away after previewing the mission...

still forum
#

move the code into a trigger then

tough abyss
#

Workaround is always better than not being able to do it period

#

Can’t 🛏 💤 in trigger

still forum
#

spawn

#

hit the trigger and spawn your shizzle

tough abyss
#

No need to sleep then, call function it will stall the “thread” until video is finished

still forum
#
 if (!alive TV) then {
  breakTo "main6";
 }; 

that's kinda dumb too. That should just be the condition of the while loop

#

dumbness party! utz utz utz 🎉

heavy garden
#

i'll break it down and put that code in the condition field lol

#

im not the guy who made that script just some frenchperson lel

still forum
#

French? 🏳

heavy garden
#

yes the snail eating surrender monkeys

still forum
#

nuu don't eat our alganthu

tough abyss
#

You are using it, I find it funnier

winter rose
#

Snails = yummy

#

Deal with it

orchid saffron
#

Hi guys,i´ve made a new desing of the inventory dialog and i wanted to know how can i mantain the init of the inventory (adding items to vest, uniform... etc)

#

With this onLoad="['onLoad',_this,'RscDisplayInventory','IGUI'] call (uinamespace getvariable 'BIS_fnc_initDisplay')"; I can load the player name, rank and some other things but inventory itself

tough abyss
#

Inventory is engine driven UI, you can mod it but if you want to make scripted alternative this will be a massive project

orchid saffron
#

It´s just visual

#

Do i need to create the scripts?

tough abyss
#

What does it mean?

orchid saffron
#

I loaded into GUI Editor the RscDisplayInventory dialog

#

And modified it

#

Then exported it

tough abyss
#

So you changed pbo?

orchid saffron
#

Without adding new controls or functionality

tough abyss
#

I don’t understand what exported means

orchid saffron
#

In GUI Editor -> Ctrl + S

#

If I remember correctly

tough abyss
#

Did you modify pbo?

orchid saffron
#

Am nope

tough abyss
#

Did you make a mod?

orchid saffron
#

I know what you mean

#

No, i created a mission and imported the dialog

#

But i need to modify the pbo overwriting it, right?

tough abyss
#

That won’t work

#

It is engine driven, engine doesn’t know anything about the dialog you made

orchid saffron
#

I don´t know if it can be done but if I take the ui_f.pbo -> change it -> load it?

tough abyss
#

That is one way of doing it if you want to play solo

orchid saffron
#

Not my intention

#

It´s MP

tough abyss
still latch
#

Hello here. Is it possible to remove specific item/weapon/magazine/ammo from GroundWeaponHolder?

#

Without clear and add one by one

orchid saffron
#

Ok, thank you I´m going to ask there

tough abyss
#

No @still latch

#

That functionality was never finished

still latch
#

@tough abyss
Fffffffuuuuuuu
thank you.

sleek token
#

@tough abyss do you know if draw commands are for one frame only?

#

or prestine

quartz coyote
#

Hello

#

i'd like to give orientation (setDir) to Unit1 so he looks at Unit2 whatever the location I give to Unit1

tough abyss
#

You need to draw each frame @sleek token

#

Use Draw Event Handler

still forum
#

setDir. getDir. @quartz coyote

#

get dir from unit1 to unit2. And turn unit1 so it looks in that dir

tough abyss
#

Unit1 setDir (unit1 getDir unit2)

quartz coyote
#

as simple as that ...

#

i suck

#

thanks

tough abyss
#

No you need to setFormDir too

#

Or it will return to formation dir

quartz coyote
#

ooooh

#

nice

sleek token
#

what happens to _x if have to nested forEach loops?

still forum
#

same as any local variable if you use private

unreal cave
#

have you guys ever managed to script ai aircraft to behave in an intelligent manner when taxiing on the ground from the airport apron to runway without crashing into a tree?

#

whenever ai aircraft are spawned on the ground they are useless and do almost everything wrong in terms of aircraft ground movement

carmine abyss
#

Anyone familiar with RSC Dialogs? I have my defines.hpp, dialogs.hpp both #include "defines.hpp" and "dialogs.hpp" in my desc.ext. When I call the dialog my mouse is available but I dont see any windows or buttons.

tough abyss
#

Not tested, but maybe try setDriveOnPath @unreal cave

unreal cave
#

driveonpath eh?

#

thats a new function to me ima explore it

#

dont see any results for it on BI website

tough abyss
#

Never used it with aircraft but who knows

unreal cave
#

coolio

#

i want it do it naturally though

#

would i have to specify markers for the entire taxiway?

tough abyss
#

Kinda, but it might not even work

carmine abyss
#

Answer to my question is changed Position Type to Safezone

willow trail
#

Right now i've got

if ("SmokeShellRed" in Magazines Player) then { _detec = Detective; 
if(name player == name _detec) then { 
    _detec = ["TaskSucceeded",["TRAITOR!","TRAITOR!"]] call BIS_fnc_showNotification;  
};};

I'm trying to get only the person named "Detective" to receive the message

still forum
#

continuing from #arma3_editor
Just post your script. You are starting to violate #rules 9 already ^^ Which I tried to prevent

high marsh
#
_hasBlue = "SmokeShellBlue" in magazines player;
willow trail
#

sorry i don't post often in here i just watch pretty screenshots of people

high marsh
#

Is that what you're looking for?

willow trail
#

well i've got that part figured out, I'm trying to get the message to work. I need some sort of message to be send to only 1 person named detective in the editor ( so with the variable name detective ) IF the person inside has a specific smoke color

#

so lets say person A walks in with red smoke it will send a message to ONLY the detective saying "red smoke detected"

#

if person B does the same with green it will do it for green smoke

still forum
#

name player == name _detec && local _detec

high marsh
#

^

#

and if not local, remoteExec

still forum
#

for that thing to work. The trigger has to run everywhere. aka not a server-side only trigger

willow trail
#

right i'm very new to this i'm just trying to create my first mission, So i apologize in advance for any noobish behavior.

So i'd need to name the detective first and then execute it on him?

still forum
#

not execute it on him no

#

_detec = Detective you already have that? I assume Detective is the detective? And there's only one?

willow trail
#

yes

#

i have 1 player in the editor named Detective

still forum
#

nothing else for you to do then

#

just do what I said ^^

willow trail
#

oke last attempt at me doing something right

_detec = Detective;
if(name player == name _detec && local _detec) then {
    _detec = ["TaskSucceeded",["Innocent!","Innocent!"]] call BIS_fnc_showNotification; 
};

like that?

tough abyss
#

If player == Detective then ...

#

don’t need more than that

high marsh
#

and you don't need to check if local if all you are doing is showing notif

#

Unless showNotification has local effects

#

Which I imagine it does, filling blank UI element with text.

still forum
#

If you'd have read what we wrote about further up.

#

You'd know that he does indeed need it

tough abyss
#

He wants trigger fired for player that is detective and wants notification displayed to player, right?

high marsh
#

Reading is obviously a challenge.

still forum
#

trigger already fires fine. But message is displayed to everyone. He only wants detective to see it

#

thus local _detec so it will only show on Detective's machine

tough abyss
#

Player is already local so no need to check detective for locality is detective is player

still forum
#

🤔

#

oh

proven crystal
#

hallo. does anyone know how boundingbox works?

tough abyss
#

Some puzzles on this channel I am telling ya

proven crystal
#

are the returned coordinates relative to the boundingcenter?

high marsh
tough abyss
#

Yes

proven crystal
#

ah cool. thanks. but the boundingcenter is not equal to the object position is it?

tough abyss
#

It could be

proven crystal
#

only in a 2 dimensional object i would guess?

#

otherwise it should be above ground, no?

willow trail
#

Right so the script i just send works, However instead of announcing the person's smoke color that is in the trigger it announces the color the detective has on him

proven crystal
#

orah well some objects are somewher in the ground....

tough abyss
#

So you want message displayed for detective or any player with specific smoke grenade?

willow trail
#

only the detective should receive the message

#

but he should get hinted what color smoke the person INSIDE the trigger has not what the detective has on him

tough abyss
#

And if there are more than one person inside the trigger?

willow trail
#

doesn't matter i'm making a rule so they don't do that, And i have 3 triggers running for the 3 "roles" there are seperatly

#

so it will just resend the message

tough abyss
#

So a person with smoke grenade walks onto a trigger and you show detective message with the colour of the grenade?

willow trail
#

yes

tough abyss
#

Any smoke grenade?

willow trail
#

ony blue, green, red only

#

assigned to the 3 roles there are

tough abyss
#

So different trigger for different colour?

willow trail
#

thats what i've done so far yes

#

however if lets say person with red smoke walks into the trigger and i hold a blue smoke. the hint will only display that i have a blue smoke not that the person inside has a red smoke

tough abyss
#

Then do what I said just add check for grenade

willow trail
#
_detec = Detective;
if(name player == name _detec && local _detec) then {
    _detec = ["TaskSucceeded",["Innocent!","Innocent!"]] call BIS_fnc_showNotification; 
};

thats what i've done so far and it returns what the detective is holding not what the person inside the trigger is holding

#

oh wait thats not the complete script

#

hold up

still forum
#

ohh.. duh

#

sorry. me dumb

willow trail
#
if ("SmokeShellRed" in Magazines Player) then { _detec = Detective; 
if(name player == name _detec && local _detec) then { 
    _detec = ["TaskSucceeded",["TRAITOR!","TRAITOR!"]] call BIS_fnc_showNotification;  
};};
#

thats my script right now

still forum
#
if ("SmokeShellRed" in magazines player) then {
    ["TaskSucceeded",["TRAITOR!","TRAITOR!"]] remoteExec ["BIS_fnc_showNotification", Detective];
;};
high marsh
#

0-0.

tough abyss
#

No

#

Player might be outside the trigger unless trigger is synced to player

#

Best check if grenade is in magazines of the entity that tripped the trigger

willow trail
#

how'd i do that? doesn't my script already do that?

tough abyss
#

No

#

Units that tripped the trigger will be in array thisList

willow trail
#

i tried this before as well

if ("SmokeShellRed" in Magazines Player) then { hint format ["TRAITOR TRAITOR TRAITOR",Detective]; 
 
} foreach thisList;
#

that didn't work either

#

is that last part the part you're hinting at?

tough abyss
#

Because you are checking for smoke in player magazines

willow trail
#

oooh not the person INSIDE the trigger but ALL players

tough abyss
#

Not for smoke in unit that tripped trigger

willow trail
#

my first script worked then but it was searching in the wrong inventory?

tough abyss
#

Yeah all players, 1 player owner on each pc

willow trail
#

oke now the stupid question, How'd i fix this 😛

tough abyss
#

You could sync trigger to player so it fires only on the machine where the owner of that pc walks into trigger

#

And do what Dedmen said or if you don’t want remoteExec and sync do the way I said

still forum
#

my way would work (I hope). But I don't check if player is inside trigger area. If that matters

tough abyss
#

If you sync you don’t have to

still forum
#

Your current problem is the message showing only to the player who has the smoke. ANd not anyone else right?

willow trail
#

my current problem is that it checks the detectives smoke and shows him what smoke he has not who is in the trigger

still forum
#

ah yeah. because the == name _detec

willow trail
#

wouldn't thisTrigger do the job to check who activated it?

still forum
#

thisTrigger is the trigger.
thisList is the units inside the trigger.

tough abyss
#

thisList. Would show you list of who was inside trigger when it was activated

willow trail
#

oh

#

But with your solution M242 wouldn't i need a trigger for each player slot then?

#

or am i misunderstanding this?

tough abyss
#

Triggers placed in editor are kinda global

willow trail
#

hi

tough abyss
#

Even if the statements are local but because they are identical they will execute on every pc if trigger is activated because if you don’t sync it specifically it will trip on every pc

#

Difficult to grasp

#

But once you do it gets easier

willow trail
#

lol so i only need the 3 triggers for each role?

#

i'm so confused at the moment i'm sorry. i heard ArmA was a pain in the buttocks to script in but i didn't think it'd be this bad to start learning haha

tough abyss
#

You could have one if you want

willow trail
#

i have one trigger for each smoke grenade so 3

tough abyss
#

If you want, you can combine everything and check for different types of grenades in one trigger

willow trail
#

but then i'd need different outputs for each grenade too, wouldn't that be extremely complicated?

tough abyss
#

Those notifications are ladder up aren’t they? So you can spam them, 3 would certainly be ok

willow trail
#

my brain doesn't comprehend ArmA scripting, I just need it to start showing person A ( Detective outside trigger ) what person B ( inside trigger ) is holding ( what smoke color he has )

tough abyss
#

You were almost there

willow trail
#

and what you said makes a bit of sense to me ( not that you're doing anything wrong i'm just not as smart with this yet ) but i don't know how to apply it properly just yet

tough abyss
#

Trigger condition: this && {"smokewhatever" in magazines (thisList select 0)}

On activation: if (player == detective) then { shownotification..}

willow trail
#

trying that now

#

i understand what you guys said before now too lol

tough abyss
#

You can also do this
if (local detective) then...

willow trail
#

It works. Thanks everyone for your help i learned allot today lol. Really do appreciate it!

naive fractal
#

I'm creating a module, that's sync'd to some units and is trigger activated. Is there a way to get a reference to the trigger that activates the module?

winter rose
naive fractal
#

Cheers for a potential lead, I might just have to reproach the design pattern for my use case

winter rose
#

yes, there's no way to get -the- one trigger (also because there can be many others)

carmine abyss
#

Can someone steer me in the right direction with the GUI Dialog. I need to activate certain buttons depending on the amount of points a team has. Do I use the idd for this? findDisplay? I just need to either show/hide buttons or activate their addiction or deactivate.

unborn ether
#

@carmine abyss Use ctrlEnable or ctrlShow for your controls. To grab a control u can use displayCtrl.

carmine abyss
#

Ok Great thank you. I'm going to go read up on that now.

trail grove
#

"vehicle types" ("all","tank",..) represents class inherition?
can anywhere be found full scheme of it for arma3 ?

waxen tide
#
Kronzky
This command can be used on the whole hierarchical class tree (i.e. when checking a HMMWV, one could test for "HMMWV50", "Car", "LandVehicle", etc., all of which would return true.)
#

looks like it

mortal wigeon
#

Which is more "recent," render time scope or simulation time scope?

unborn ether
#

Might be offtopic, but can anyone tell me where to find all that vehicles, like explosion debris, fire, smoke, craters. I know some of them are #particlesources but not all of them are particles, they are just not documented much. Thanks

still forum
#

terrain objects

#

or simple objects

#

but I think terrain returns them. like #crater

unborn ether
#

Yeah I mean where to find some breakdown of # like objects

#

I know its some #crater and #craterbig blah blah.

#

But thats all I know about those.

#

Is there anything else to see?

mental dawn
#

Hi guys. Is there a way to display text (on runtime) on an objects texture like the rugged screen or tv set ? I mean directly "text to texture" instead of creating a picture with the text on it and then setObjectTexture.

ruby breach
#

Otherwise, no

mental dawn
#

Thanks

tough abyss
#

Only if the object is UI object, then you could fake it, otherwise texture only which is an image or procedural texture

still forum
#

text to texture yeah sure. setPlateNumber or what the name is

#

only works with.. well.. number plates tho

fossil light
#

Hi! Can someone pls help me?
How do i change the ownership of a respawn position?
rp_a setVariable['Side', 1] does nothing

trail grove
tough abyss
#

Is it possible to make an auto run script ?

#

Like they hav ein pbug

waxen tide
#

yeah

#

exile servers have such things

#

i bet if you google it you'll find one

tough abyss
#

I did google it they all seem to be mods sadly.

#

Yeah just loop animation

#

I bet if you put Arma AI on PUBG server it will own everyone

trail grove
#

is some way to determine when curator holds object for placing? (preferable with info on what is the object)
https://photos.app.goo.gl/E65Qmh5HsJni9i6u8
I tried looking into curator display (ui_f_curator) but it doesn't have any eventHandlers there

wide hamlet
#

So i am looking to move a gui that was created using ctrlSetPosition. Works like a dream as, is. However it seems that depending on resolution, the gui will move different amounts. Im hoping i can get it to where it moves the same relative amount no matter the resolution. Does anyone have info on this? 😛

trail grove
#

@wide hamlet look into safezones

wide hamlet
#

unable to use them in this specific scenario

#

i think at least

#

the gui HAS to use pixelW pixelH but i might be able to move them based on safezone?

trail grove
wide hamlet
#

ill just explain whats up real quick. Mod i use has a hardcoded GUI. That gui uses pixelW/pixelH along with some math. So i cant change that. I am, however tryting to move that gui using ctrlsetposition. I get the current position using ctrlPosition and move it accordingly.

trail grove
#

@wide hamlet so whats the problem?

wide hamlet
#

finding the correct units to use to move the gui a constant relative distance based on resolution/aspect ratio/gui scale

#

for example right now i am simply moving it +0.1 units. Works fine on 1080p normal scale etc. As soon as one of those variables changes it borks. Im pretty sure safezone is the way to go, Im just not sure how to implement it if that makes sense

trail grove
#

@wide hamlet ctrlPosition returns UI coordinates (in screenMeasurmentUnits) resulting after the math used to position the GUI, i described above commands which giving you values in the s.m.units for certain represents (screen border, pixel size) for resolution used when they are called

willow trail
#

Edit: I did overlook something

rare wharf
#

Not sure if this is the place to ask this, but does anybody know why wind is not affecting mortar rounds shot by AI in ACE3 and if this can be enabled somehow from scripts?
I have the advanced ballistics and mortar air resistance enabled from settings but it seems they only affect the mortar rounds player fires.

rare wharf
#

@tough abyss No, I have a script that makes the AI to aim the mortar barrel at a certain direction and elevation so it definitely fires at the values I give it

#

I also tested it so that I let the AI aim the mortar and fire one round, then I killed him and went to the mortar as a gunner and without changing the aim I fired one myself

#

the AI fired round landed way farther

#

I also disabled the Air Resistance setting for a while and fired the mortar, then my rounds landed at the same place as the AI fired rounds

noble pond
#

interesting, so AI rounds supposedly ignore wind deflection/air resistance?

rare wharf
#

Yeah

#

I was making a script where I could give AI mortar gunner charge, direction and elevation and he would aim and fire.
It just doesn't work now that the range table takes into account wind but the AI doesn't

sleek token
#

Did one of you know this strang return type ? ForType <invisible>

#

i expected int

sleek token
#

oh boi its because of the wrong use of exitWith

#

is there any other way to return a value and stop further execution of the function?

austere granite
#

breakout / breakto

sleek token
#

ah i see, very well. Thanks

austere granite
#

if you use cfgFunctions then var1 breakOut (_fnc_scriptName + "_main")

#

var1 being the value you want to return, _fnc_scriptName is set in a header

#

(Which cfgFunctions compile adds for you if you use that)

sleek token
#

thats exactly what i need

austere granite
#

👌🏻

sleek token
#

soo in action it goes like: result breakOut (_fnc_myfancyscript + "_main") ?

austere granite
#

no

#

dont change the _fnc_scriptName

#

thats an automatic variable set by BIS' cfgFunctions

sleek token
#

merci

zealous silo
#

what would i have to do to set a module to destroy itself after it runs once? i'm using a module that dynamically spawns units but i only want it to spawn a single wave. it doesn't have that feature so i need to figure out a script to stop it

tough abyss
#

@austere granite are you sure each CfgFunction has a scope named (_fnc_scriptName + "_main")?

tough abyss
#

Aaaand of course this is not true, just checked, scopeName is not used anywhere to set scope in initFunctions. I am curious where did you find this @austere granite ?

#

@sleek token don’t do it, if it works it is only because of some fluke with no existing scope name, just define your own scope with scopeName, will be cheaper anyway than adding strings together for no reason

still latch
#

Can someone guide me. I found that groundweaponholder created by script does not disapear when empty. What I missed? (Tested in editor)

tough abyss
#

Have you got another weapon holder very close to it? Then it is a bug

short trout
#

Does anyone know what is used to acquire tree data when opening Zeus UI (e.g. units classes)?

still forum
#

how do you mean "what" ?

short trout
#

is it sqf function or some engine based stuff that cannot be modified

still forum
#

engine

short trout
#

so if i don't want to load all 100500 assets each time i open zeus - i need to write my custom zeus UI with blackjack and whores?

still forum
#

Uhm. Yes.

#

😄

short trout
still forum
#

at that point it might be easier to get a BI dev to fix the Zeus search freeze crap

short trout
#

search i fixed with scripted search field

still forum
#

Where can I get that mod?

#

I need it

short trout
#

but looks like zeus re-create asset tree each time you open ui, so when playing with CUP+RHS+many_fancy_mods it become very slow when you switching between direct control and zeus

still forum
#

No. I don't know that it existed

queen cargo
#

dudum

still forum
#

cmon. it's 3 days old

queen cargo
#

nah
you failed bro

#

reminds me that i might should get back into actual arma gameplay ...

#

because i would have failed to find that too 😄

waxen tide
#

i wish there were laws enforcing minimum standards in software development.

queen cargo
#

it is not like millions upon millions of lifes would depend on software on a daily basis

#

ohh .. wait

zenith edge
#

mind as well ban 95% of software

queen cargo
#

yup 🤷

#

software has a rough lifecycle of 3 years until it is completely outdated due to technology having progressed

zenith edge
#

that xkcd about voting booths comes to mind

queen cargo
#

by the time you finish writing one software, you need to start the next

#

but you cant because the specs changed

#

so you needed to adapt

#

so your code is a mess

#

but you need to maintain because rewriting is expensive

#

but you need to rewrite to be able to maintain proper

#

so you refracture

#

so your code gets more messy

#

so you finally start rewriting parts of it

#

but your codebase is getting worse through that

#

now people want to leave the company

#

now you just got one of the elder ones who wrote the core left

#

now he gets high salary and everybody hopes he is not dying

#

now you are fucked

#

80% of the companies, this happens

#

20% the one dude died

zenith edge
earnest ore
#

Why write laws for software development when you could develop an ASI and put all the codemonkeys out of business.

short trout
#

In most of the cases if occasionally everybody stop development for a while - nothing explodes and nobody dies and actually there are a lot of stuff users want you to fix and most of it can be made without catastrophic regression, but all of them are not planned and all planned new features are actually not needed to anyoune except 2% of users (and even for them - working in old manner will be more effective than using new feature)

queen cargo
#

everybody stop development for a while - nothing explodes and nobody dies this is the false assumption that the software world is actually okay

#

it is mostly the job of admins to keep software alive, programmers created

#

the sole reason why everything is working is because we established a whole job around keeping software up

waxen tide
#

no no no no. imagine there was a reasonably short, simple test that your software needs to pass, and it is upon the company selling the software to prove that it does. like a search field that hangs and crashes? test failed! can't sell it. can't release it. what would happen? people would FIX that shit or die. simple as that. in reality it would just shift the focus a tiny bit, people would care because they have to. like cars having to actually pass fucking basic crash tests or not being allowed to be sold. it didn't kill cars, it made them safer.

queen cargo
#

@waxen tide such a test is impossible for software

#

you also could try to implement such a "test" for art ... same problems

#

the "test" you talk about are the tasks a software needs to fullfill

waxen tide
#

no it fucking isn't. all you need is 3 underpaid interns.

queen cargo
#

hah
no

#

it starts at those underpaid QA testers and ends at companies using legacy code for too long because rewriting it is too expensive

zenith edge
#

heres the prototype. wait what, we dont need to continue? wait why are you using that in production!

waxen tide
#

just set the system up in a clever way. pay a bunch of people to find bugs, and pay them a bonus for each bug found. give them a limited amount of time. every bug they find, you have to fix. simple.

queen cargo
#

no

#

was attempted, failed horribly

waxen tide
#

they did it wrong

#

same with communism

queen cargo
#

sure 🤦

waxen tide
#

MY way would have totally worked!

#

runs away

queen cargo
#

it would not 😉

#

the problem is fairly simple: lets compare it with building a house

#

at start you know what rooms are required, how their layout is

#

etc.

#

but in software? nobody knows any fucking shit

#

the customer says "i want 10 bathrooms"

#

while in reality he just wants 3 (one for each floor) and a big pool

#

but the developer understood that he wanted 10 pools

#

so he builds 10 pools

waxen tide
#

a crash is a crash. a freeze is a freeze. a non working search bar is a non working search bar. a roof that isn't watertight and lets rain in is a roof that isn't watertight and lets rain in.

queen cargo
#

then randomly, the customer finds a new room he wants to have

#

essentially, in the end you got a mess

waxen tide
#

doesn't care what the dev build as long as it works.

#

i talked about minimum standards, not perfection.

queen cargo
#

especially because your pipes and cables are required to change color all few weeks

#

so you pull all of them out

#

and replace them

#

but some, you cannot pull out

#

so you create other layers

#

that is software development

zenith edge
#

solar flares are why my code has bugs....yea

waxen tide
#

there is something called "building code" for houses. if you nail together two 2 by 4's you need to use two size 9 nails or something. can't use one. can't use a size 8, can't use a size 10.

#

cause THE CODE

#

every guy nailing wooden framing together for houses knows this

#

that's what is needed for software

#

and it will emerge eventually

queen cargo
#

will never happen

zenith edge
#

that sounds dilusional

waxen tide
#

because it will be a competitive advantage you can advertise with if you can say "our software is coded to this standard and thusly better than our competitors garbage"

#

¯_(ツ)_/¯

#

might take 200 years

#

but it will happen

#

it is inevitable

#

the forces of capitalism will drive it forward.

zenith edge
#

by then itll be ML generated scripts cobbled together

waxen tide
#

might be

zenith edge
#

and noone will know how it works

waxen tide
#

but those will pass all unit tests and adhere to a script standard 😄

still forum
#

🍿

waxen tide
#

strict*

#

oh yeah fuck no, in 50 years nobody will have a clue about how anything in IT works.

#

"how does it work?" "idc it's ML magic"

#

imagines the xkcd comic in his head already

queen cargo
#

no
it will not happen @waxen tide
it is simply impossible
unless you create only one way to archive the same problem over and over again, you are literally fucked

you forget that software is essentially just math, and math existed for so long that nobody can even date it
and here is the problem: Try to apply the one rule to math
we just got syntax rules in math. But you still can mess up a whole function by just adding random stuff to it like 1000000 * 5 / 5000000

#

if you fix math

#

come back to me

waxen tide
#

i think you didn't get what i was trying to say

#

i sometimes suck at expressing stuff.

queen cargo
#

i exactly understood what you try to express

still latch
#

Have you got another weapon holder very close to it? Then it is a bug
@M242 Yes. I've created for example 3 holders on same spot with 1 magazine in each. After I picked up all magazines there is still action icon to open inventory on ground

queen cargo
#

and i can tell you, that this is impossible

#

unless you can somehow make software so strict, that only one way is possible

#

fuck sake there are like 10 million ways to create UIs and i am not talking about frameworks here

waxen tide
#

it can't be impossible because it is already happening. i mean, people are doing unit testing. people are trying to come up with languages that reduce the possible fuckups a developer can possibly do. i'm not on about solving every single problem ever in software development, i'm on about people finding ways and processes and standards to raise the quality of their software slowly, but surely. And at one point people will want to differentiate this to differentiate their abilities and their capabilities and their software quality from competitors. and like any other (and older or simpler or both) industry, the software industry will mature and thru the pressure of capitalism, develop universally accepted standards of quality.

#

people will simply figure out that having your UI freeze just because you do some heavy lifting in the background is stupid, just like people figured out you need TWO nails in a 2 by 4 or your house might collapse.

still latch
#

I can't get. Is this channel to post a shit? 🤔

queen cargo
#

unit testing? garbage that is only to prevent regressions and ensure algorithms work, not to create quality software.
people will simply figure out that having your UI freeze just because you do some heavy lifting in the background is stupid guess what, they already did
and they still cannot always prevent that. There are standarts in place due to this. But you sometimes need to violate those because otherwise you cannot archive what you want

you want the software development to mature? have fun creating not one programmer job but rather thousands with specific field
and we talk about "if this method also requires networking, i am fucked because i can only do data structure creation" fucked

still latch
queen cargo
#

it is not politics
it is actual programming stuff
and relates to scripting in a different, but still relatable way

#

all said can be applied to SQF

#

and scripting

#

rookies creating scripts, other people use

#

creating shit missions with horrible performance

#

and more leaks then the titanic

waxen tide
#

can you show me one example of a leak?

queen cargo
#

take a random mission and check how the spawned script count is growing

waxen tide
#

that at least seems trivial to diagnose

#

do you have another example?

zenith edge
#

our mission leaks memory and we have yet to find it :(

waxen tide
#

what mission is that?

still forum
#

pushBack's into an array that's being iterated over. But which is never emptied.

zenith edge
#

those maybe

#

becti

still forum
#

Haven't seen that yet. But I mostly only look at good code.

zenith edge
#

highly customized becti

#

i dont think we havr any arrays that grow though

#

get set at beginning or go out of scope

#

and or memory issue persists mission ends

waxen tide
#

i would probably do something silly, like log the size of every single var.

zenith edge
#

i have detailed logging setup with grafana front end on sql and influx db

#

its quite pretty

waxen tide
#

maybe pretty but apparently inadequate otherwise you would find the issue, no?

zenith edge
#

codebase is pretty large and conveluted

#

its a slow growth

#

hard to narrow down

#

ive been trying to come up with logging that will show logic flow through scripts

#

so i havr an idea of what runs when and how often

#

typically

#

some rogue script somewhere

#

prob

#

also havr a maybe related io issue where i guess we dig into pagefile all game :(

#

6MiBps reads lewl

calm bloom
#

Hello guys i need advice. Ive read the crap about the numbers in actionkeys command (combo keys are stored like Left Shift + Key = 704643072 + DIK).
My problem is that game stores that "large" numbers not in decimal form (Lshift + R == 7.05888e+008)
I cant even divide that crap from itself : ((actionKeys "ReloadMagazine" select 1) - 704643072) == 19 returns false

still forum
#

yes. Correct.

calm bloom
#

so, anyone have a workaround to get it like [key,[shift,control,alt]] form?

still forum
#

No.

#

The data that you need is just not there

calm bloom
#

i am trying to block task force radio keys while the one reloads and block reload while transmitting (there is a bug in a nice mod that adds animation to that)

still forum
#

Asked @ornate quail yet if he knows a fix?

calm bloom
#

No i did not, i assume if he knows he would fix it himself)

still forum
#

maybe you can do some kind of dumb workaround.
If there is no magazine in weapon. Then don't try to play the animation

calm bloom
#

reloading is one of that strange engine handled things

#

old magazine is removed from weapon and added to inventory

#

and if reloading gesture is replaced by radio gesture it is lost

#

so main problem that reload is a gesture and gestures are not scripted well

digital jacinth
#

maybe it is better to use the Reloaded EH for the unit? you get the old magazine info. All you need to do is to detect if the person i talking over radio.

calm bloom
#

Well it is just a half of the problem

#

it covers only situation when reload started after transmission start

digital jacinth
#

reloaded eh fires as soons as the new mag is in

calm bloom
#

yep, but there is no reload if you start reloading and activate radio gesture

#

and old magazine is already nowhere

cedar kindle
#

is the mod author not aware? you should tell him

calm bloom
#

Sure he is

cedar kindle
#

so why doesn't he skip the animation if reloading?

calm bloom
#

it is a gesture you cant detect it

still forum
#

because he doesn't know how to detect reloading

calm bloom
#

Well its easy to detect it by simple key handler

#

only problem is that combo keyis like shift come in strange encrypted form

#

i guess that 95% of players use simple key so there is viable workaround

#

but one always want to make 100% reliable workaround))

cedar kindle
#

by gesture you mean animation?

calm bloom
#

im not into animations very much but as far as i know it its different terms in the game

#

gesture is addition to animation

#

damn i am always missing the articles)

cedar kindle
#

so he can't use animChanged EH to detect start/stop reloading?

digital jacinth
#

the gesture only applies on top of regular animations, these are not played with switchmove, playmove or playmovenow

#

oh no "playActionNow " is used

calm bloom
#

i guess that if we can transfer 7.04643e+008 back into 704643072 we can do the math

#

may be its like the comparison of float numbers

still forum
#

You can do a rough estimate of what key might've been pressed

#

But the data is just not there

#

if you detect something. It might've been that someone pressed CTRL+ALT+SHIFT+R. But he might've also pressed CTRL+ALT+SHIFT+E or CTRL+ALT+SHIFT+Q and you couldn't tell the difference.

digital jacinth
#

add a new keybind with CBA, bind it at the same key as reload, make it execute custom code to detect it :^)

still forum
#

That would work. But people would have to bind it by themselves

digital jacinth
#

yeah i was only being half serious

calm bloom
#

Well that is what i do actually

still forum
#

If you cannot detect a reload. I don't see a better way

calm bloom
#

reload key is not a problem, but task force keys are likely to use combo keys for the most players (and by default)

digital jacinth
#

i have not looked into tfar code, but doesn't it have a cba event when using the radio?

calm bloom
#

Uh.

still forum
#

And it has a CBA keybind

calm bloom
#

ok only problem is in custom ctrlalt del reload key

#

well looks like its users will face a bug

still forum
#

you say reload key is not a problem. But you say reload key is the problem.
What now

calm bloom
#

hehe)

#

thats because you proved i cant handle combo keys, so i can leave them peacefuly

still forum
#

diwako's solution would be a solution though.
Just tell users "use this one small trick to keep your magazines from disappearing"

digital jacinth
#

or you could do use the reloaded eh, have an cba eh listener to the "use radio" event and just add the old mag to the inventory if you detect a reload and the person is talking over the radio

#

however this might add additional mags, who knows

#

but still, no key detection necessary

calm bloom
#

BTW, do you guys know some more optimized "blocking" method than the one on cba_fnc_addkeybind side?

digital jacinth
#

tbh i would not try to block it, but react to it. it has to be fixed on mod level. Either you add it into the mod yourself or wait for a fix. I doubt kola likes people uploading his work on sw

calm bloom
#

i am not uploading anything

ornate quail
#

@calm bloom @still forum Im working on one, almost done

dusky pier
#

is possible to change playerSide?

ornate quail
#

I'll share it once it's done, but it may take a few days

cedar kindle
#

@dusky pier i think it's static even if you join another side's group. in most cases you'd want to use side group player instead of playerSide

dusky pier
#

i use side player, just asked 😃 i have a list player on map. And there - used playerSide

cedar kindle
#

you should check the side for the player's group unless you want it to be civilian when player is dead among other quirks

calm bloom
#

@ornate quail Very nice thank you for your great work

shadow sapphire
#

When activated with a radio trigger; Null = [thistrigger] spawn {gip1}; returns

Error in expression <Null = [thistrigger] spawn {gip1};>
Error position: <gip1};>
Error Undefined variable in expression: gip1```

and

`Null = [thistrigger] spawn {asg_fn_gip1};` returns 

```sqf
Error in expression <Null = [thistrigger] spawn {asg_fn_gip1};>
Error position: <asg_fn_gip1};>
Error Undefined variable in expression: asg_fn_gip1```

This is happening despite the fact that the function gip1 is plainly visible in my function viewer. Could anyone explain what I'm doing wrong and how to correct it?
still forum
#

so what now. gip1 or asg_fn_gip1?

#

Your spawn does literally nothing

#

Something is wrong here

shadow sapphire
#

Either way I do it, it returns nothing.

still forum
#

you are not spawning any function

#

you are spawing a piece of code.That retrieves the value of a variable, and then ignores the result it got, and exits

shadow sapphire
#

Okay. Right. So how do I do it correctly?

still forum
#

Also if that asg_fn_gip1 is supposed to tell me that you are using CfgFunctions. CfgFunctions is _fnc_ not _fn_

#

0 = [thisTrigger] spawn asg_fnc_gip1

shadow sapphire
#

Interesting. So the brackets are not for this at all?

still forum
#

curly braces mark a section of code

#

You can do that of course. But if you do that you should put actual code inside it.

shadow sapphire
#

Got it. Thanks a ton!!

#

Okay, so your solution fixed my dumb problem. Now I have a better problem. It doesn't appear to be taking [thisTrigger] the way I expected. Previously,

If (!isServer) exitwith {};
params ["_trigger"];
_Base = (getpos _this);
_HQ = [_Base, INDEPENDENT, ["I_officer_F","I_medic_F","I_officer_F","I_soldier_UAV_F"],
[],["LIEUTENANT","PRIVATE","SERGEANT","PRIVATE"],[],[],[],180] call BIS_fnc_spawnGroup;```

That would work, but now it isn't taking it. Must I reformat it, or is it impractical to continue trying to plug the trigger in as a location?
still forum
#

it takes thisTrigger just perfect

#

It's put into the _trigger variable. Perfectly fine

#

The issue is that you don' t use the variable

#

You grab _trigger and then never use it

shadow sapphire
#

Got it. I need to change _this to _trigger? Makes sense.

#

I used to have a wrapper that did that, but it seemed redundant, I guess I forgot to adjust accordingly.

still forum
#

if you want to get the position of the trigger. getPos _trigger makes more sense than getPos _this

#

But here are actually two issues.
0 = [thisTrigger] spawn asg_fnc_gip1
You move thisTrigger into an array. Which is fine, but you don't need it in an array. So why do you?
0 = thisTrigger spawn asg_fnc_gip1

#

Some people may do that for code style reasons I guess

shadow sapphire
#

I only do it that way because that's the way I've always seen it done. I guess it helps people visualize it as an "input" slot.

austere granite
#

@tough abyss seems you are right, i haven't used in cfgFunctions in a while and the one i use does have that, turns out it's just scriptName (parent) in BIS one, srry :3

shadow sapphire
#

All is well. It's working as intended now. Thank you very much, @still forum.

unborn ether
#

Can we call Arma a MMOFPS?

shadow sapphire
#

I would say it would depend on the sandbox.

#

Also, I think you would start to run into serious issues with the appropriate numbers for that classification, but that's just a guess.

#

I don't know what I'm doing wrong here, either.

[thisTrigger] remoteExec ["asg_fnc_gip1", HC1];

Where HC1 is a headless client on the server.

dusky pier
#

is possible to remove players list from map dialig?

queen cargo
#

was units also returning driver etc.?

still forum
#

driver?

oak pebble
#

Is it at all possible to make it so i restrict everyone on my server to only use global voice chat? I want it set up this way because we want to use task force radio and we want to be able to communicate across teams and with zeus

#

Is this possible using server scripts?

still forum
#

if you want to communicate across teams with TFAR. Just give both teams a radio

#

and give Zeus a radio too

queen cargo
#

wait ... ohh ...

oak pebble
#

I tried that in the zeus gamemode but last i tried it didnt work

#

Did they ever fix that?

#

It only worked when i got my friends to switch to global chat in the base game

still forum
#

no one told me yet that Zeus radios don't work

oak pebble
#

Huh..

#

Okay nevermind!

still forum
#

I mean.. Might be that noone noticed..
Besides that we talked to Zeus over radio in a op 2 weeks ago. And it worked then..

#

Zeus logic or zeus unit?

oak pebble
#

Not sure what the difference is. I have 1000 hours in arma but thats just all boots on the ground. Im VERY new and noobish to scripting and mission making. But i wanna do some cool custom stuff with my friends so i wanna get into it

still forum
#

zeus unit can around as a unit without having to remote control anything.
Zeus logic is a invisible thingy floating in the sky. And you can only enter units via remote control

oak pebble
#

Logic

#

I only just got mcc and tried zeus unit stuff the other day, making zeus mission setups with the eden editor. So i havent tried TFAR with the zeus unit yet

#

Does it work normally with the unit?

still forum
#

should work with both

#

probably better with logic ¯_(ツ)_/¯

oak pebble
#

Never works with the logic for me

#

Idk why

#

Ill try it with the unit later when i get on

queen cargo
tough abyss
#

No

queen cargo
#

what is returned in that case, the backpack itself?

tough abyss
#

Obj null probably

#

Test it

queen cargo
#

cant

#

needed to delete arma again as steam thought to remove it

#

and SSD is not having the capacity to reinstall it

tough abyss
#

Me too, driving

shadow sapphire
#

Where HC1 is a named headless client on the server;

[thisTrigger] remoteExec ["asg_fnc_gip1", HC1];

Does nothing and gives no errors, even in the .rpt.

I know I'm doing something wrong, but can't identify it.

queen cargo
queen cargo
tough abyss
#

Nothing

still forum
#

dindo nufihn

tough abyss
#

What are you trying to do, your questions seem quite strange without context

queen cargo
#

@tough abyss implementing SQF-VM

#

i literally mean exactly what i ask

#

because those are the questions that arise while implementing those commands

tough abyss
#

So you want to fake vehicle/unit related commands?

queen cargo
#

wut? who said i want to fake stuff?

#

i want to implement them in SQF-VM

still forum
#

real fake stuff.
or fake real stuff?

tough abyss
#

Are you adding pseudo vehicles?

queen cargo
#

nope
they actually do read the configValues

#

crew etc. already implemented

#

just that the actual moveInXXX commands are missing

pure blade
#

@dusky pier yeah i think you can, you must grab the idc from the playerlist button and then you can disable the button with ctrlEnable or you grab the listbox where the players are and clear the list (lbClear idc)

dusky pier
#

i try'ed ctrlAddEventHandler on main listbox. But still don't working 😦

#

i tryed hide subtopic listbox

#

but is not working

pure blade
#

do you have the idd and the idc for me?

dusky pier
#

yes

#

idd - 12

tough abyss
#

@queen cargo vehicle _backpack returns _backpack

#

objectParent returns the weaponholder

#

vehicle returns the vehicle AI/person entity is in or the argument you passed to it in all other cases @queen cargo

dusky pier
#

@pure blade ,```sqf
idc's:
1001 - main list
1002 - subcat list

mental dawn
#

My problem is, this code once worked in a former mission. But when I copied it (including the sound file and folder structure) It does noct work in the new mission. What am I doing wrong?
_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
_soundToPlay = _soundPath + "sound\sound.ogg";
playSound3D [_soundToPlay, itm_speakers, false, getPos itm_speakers, 10, 1, 100];

still forum
#

did you check that the path is correct?

#

did you pack as pbo? Did the sound file get packed too?

mental dawn
#

yes, did put it on a hint and pathing is correct

#

not yet packed. still testing in editor

still forum
#

position is ASL

#

not AGL/ATL/AGLS/whatever getPos is

#

You can hear it 100m far. Maybe it's 100m under you?

mental dawn
#

hmmm gonna check that ...

ruby breach
#

And before you get it working, please use the select method above instead of BIS_fnc_trimString

still forum
#

That trimString crap is on biki too 🤦

mental dawn
#

KillzoneKid described above method as "his favorite". Thats why I used it

ruby breach
#

With a note that says select is 18x faster

still forum
#

KK doesn't even list that method in his blog post

#

So where is that "his favorite" ?
In fact. He writes So far, this is my favourite. about the one I posted

mental dawn
#

Seems that I mixed up something with his blog post. You're right

still forum
#

if position doesn't work. Make sure the ogg file is not broke or smth

mental dawn
#

Unfortunately no success so far. Changed getPos to getPosATL, checked that Soundfile by playing it in Browser (works) . Btw it is a copy of the sound file that already worked well. And pathing with your suggested method of creating the path is working too (path is correctly leading to the file)

#

Sometimes I forget a ";" at a lines end, but I double checked the code many times and can't find a syntax error.

digital jacinth
#

by any chance do you plan on running that on a dedicated server? I played around with that as well a bit and found some solution which also works on one

if(isNil "MISSION_ROOT") then {
  if(isDedicated) then {
    MISSION_ROOT = "mpmissions\__CUR_MP." + worldName + "\";
  }
  else
  {
    MISSION_ROOT = str missionConfigFile select [0, count str missionConfigFile - 15];
  };
};
mental dawn
#

ARRRGGHL. found it. You were right with the getPos . I really mistyped ATL instead of ASL. Now it works. Many thanks guys!😇

tough abyss
#

Does it play ogg files? I don’t think it does

mental dawn
#

it plays it well 😄

tough abyss
#

Something somewhere doesn’t like ogg, can’t remember what though

agile pumice
#

ALIVE mod features dynamic simulaiton correct?

calm bloom
#

Guys, are there any EG spectator code?

#

I want to use spectator menu as the target for selectplayer

carmine abyss
#

why wont this work. it seems so simple. ```sqf
private _timer = diag_tickTime;

waitUntil {
hint "Choose a Loadout";
sleep 1;
diag_tickTime == _timer + 10;
};
_rLoadouts = createDialog "r_Loadouts_Dialog";

ruby breach
#

@carmine abyss Don't use == when comparing things like time

#

Use diag_tickTime > (_timer + 10);

tough abyss
#

@carmine abyss @ruby breach
Since you put

private _timer = diag_ticktime

and waitUntil will wait until it returns true, it will never execute because...

diag_tickTime == _timer + 10

will never be true, it will always be false.

ruby breach
#

It can return true. The odds are just infinitesimally small

#

If you're thinking that _timer is always equal to the current diag_tickTime, it's not

west venture
#

Anyone got any experience with building an Animated Briefing using the setup added in Tacops? I've got no idea where to even start with it.

still forum
#

@carmine abyss you are expecting the script to land at that exact spot 10 seconds after the start. To the micro or even nanosecond exact. That's not gonna work.
Scheduled scripts are unreliable. Your sleep 1 can sleep anywhere from between 1 second to a couple hours.
So even if you rounded the times down to the whole second so that you have a 1 second window where that condition would be true. It's still very likely to not actually happen in that timeframe

snow cipher
#

Can someone send me a distant sound script

#

My plan's to put an alarm in a base

winter rose
#

A trigger could do

snow cipher
#

How do i spawn units with a script?

snow cipher
#

Lovely

calm bloom
#

[[[arguments],serverfunc1,sf2,sf3],{(_this select 0) call (_this select 1)}] remoteexec ['bis_fnc_spawn',specificclientid,false]

sf1 mentions sf2 and sf3.
sf1 launches on client fine but gets sf2 and sf3 undefined.

Any ideas what i am doing wrong?

still forum
#

what are you doing even?
[arg1, arg2] spawn {arg1 call arg2} Wat? Why not just
arg1 spawn arg2 and be done with it?

#

Same end result

#

And where are they "undefined" ?

#

you are doing [arguments] call serverfunc1 in the end. sf2 and sf3 are never used

short trout
#

Bet it related to some rp server, always made in a way noone knows why :)

unborn ether
#

Its obvious that its related to some RP rookies server, since allowing bis_fnc_spawn and similar to any destination is insane bs.

calm bloom
#

sf2 and sf3 are called inside the serverfunc1

#

you guys are free to have fun on your server fantasies

#

Serverfuntion1 is transfered by the remoteexec arguments and is successfully fired from the code block, but the sf2 and sf3 functions are not defined

#

yes question is related to transfering serverside private functions

queen cargo
#

serious question: are you actually calling them Serverfunction1 and Serverfunction2? or is that for abstraction purpose?
if it is the latter, use real names. Abstraction on this level is only confusing
if it is the former, go name them proper

calm bloom
#

Okay guys i can pass the code

#

i have made a system that generates mission sqm with the current game state

#

a do not want to settle it into public addons bacause it is a lot of effort

#
{ 
  [[[~~~ there goes long list of arguments for  "pzn_saving_server_fnc_savetsgremote"~~~],pzn_saving_server_fnc_savetsgremote,'pzn_saving_server_fnc_writefromarray3','pzn_saving_server_fnc_writemodulesfromarray3',_x],{~~here i try to publish undefined functions again{(_this select 4) publicvariableclient _x} foreach [_this select 2,_this select 3]~~~;(_this select 0) call (_this select 1)}] remoteexec ['bis_fnc_spawn',_x,false]; 
  
  } foreach pzn_server_backup;```
#

all pzn_saving_server_fnc's are defined from the config on server

#

pzn_saving_server_fnc_savetsgremote is calling other two functions: 'pzn_saving_server_fnc_writefromarray3','pzn_saving_server_fnc_writemodulesfromarray3'

#
{ 
  [[[~~~arguments for the 1st func~~~],pzn_saving_server_fnc_savetsgremote,pzn_saving_server_fnc_writefromarray3,pzn_saving_server_fnc_writemodulesfromarray3],{(_this select 0) call (_this select 1)}] remoteexec ['bis_fnc_spawn',_x,false]; 
  
  } foreach pzn_server_backup;```
this one does not work too
#

@unborn ether okay thank you for the security review, but we do not run public server, every user is authorized by vpn connection, so we can afford that stuff

short trout
#

i don't get it. Why are you trying to publish functions via remoteExec?

#

You need to

private _client = <cliend id>;

_client publicVariableClient "pzn_saving_server_fnc_savetsgremote";
_client publicVariableClient "pzn_saving_server_fnc_writefromarray3";
_client publicVariableClient "pzn_saving_server_fnc_writemodulesfromarray3";

[~~~arguments for the 1st func~~~] remoteexec ["pzn_saving_server_fnc_savetsgremote", _client, false];
calm bloom
#

yes thanks

#

the first one with the publicvariableclient is the wrong one

#

originaly i was trying to pass functions via argumets of remoteexec

#

and succeded for the one function i called

#

but failed for others

short trout
#

the first one with the publicvariableclient is the wrong one
What is wrong?

calm bloom
#

i mean my code

short trout
#

originaly i was trying to pass functions via argumets of remoteexec
Are you familiar with sqf data types?

#

There are 2 groups of data -- that passed by value and one that passed by reference.

#

But both of them should be initialized by some reference.

#

I mean your code was doing this:

#

Remote client called bis_fnc_spawn in form of

#

[[params], {code}] call bis_fnc_spawn

#

so given params passed to {code} scope as _this

#

You picked 2 params and called you inner code

#

param1 call param2

#

Inside called scope there is only 1 reference -- param1 as _this

#

and param3 and param4 left in same scope as 'call param2' was triggered

#

And as they local variable of this scope -- they are not available anymore

#

SO as fix in you style it should be like this:

calm bloom
#
[[[~~~args~~~], FN1 ,FN2 ,FN3],{_this call (_this select 1)}] remoteexec ['bis_fnc_spawn',_x,false]; 

so i should do siomething like this?

#

modify fn1 to get new arguments

short trout
#
{ 
    [
        [
            [~~~arguments for the 1st func~~~]
            ,pzn_saving_server_fnc_savetsgremote
            ,pzn_saving_server_fnc_writefromarray3
            ,pzn_saving_server_fnc_writemodulesfromarray3
        ]
        ,{
            pzn_saving_server_fnc_writefromarray3 = _this # 2;
            pzn_saving_server_fnc_writemodulesfromarray3 = _this # 3;                
            (_this select 0) call (_this select 1)
        }
    ] remoteexec [
        'bis_fnc_spawn'
        ,_x
        ,false
    ]; 
  
} foreach pzn_server_backup;

#

So insde called scope there will be references to pzn_saving_server_fnc_writefromarray3 and pzn_saving_server_fnc_writemodulesfromarray3 functions

calm bloom
#

Holy cow # is an alias for select?

still forum
#

no

#

only an alias for ARRAY select INDEX

short trout
#

yup

#

conditional select is only via select command

calm bloom
#

thank you for help, man, you really altered my view on that variable to value thing

pure blade
#

@dusky pier hm the problem is arma write the lists permanently new, here is one way you can do it but i don't know if this the best way:

addMissionEventHandler ["Map", {
    params ["_mapIsOpened", "_mapIsForced"];
    if(_mapIsOpened) then {
        [] spawn {
            while {visibleMap} do {
                ((findDisplay 12) displayCtrl 1002) ctrlEnable false;
                lbClear ((findDisplay 12) displayCtrl 1002);
            };
        };
    };
}];

you need to make a condition to check if 1002 is the playerlist and you must find out the idc's for the right box next to the playerlist and set the text to an empty string

#

how can i highlight my code, i am new to discord 😄

hollow thistle
#

```sqf

pure blade
#

ah ok thx

dusky pier
#

@pure blade thank you a lot!!! 😃

pure blade
#

no problem 😃

#

@midnight mauve you must spawn the function