#arma3_scripting

1 messages ยท Page 287 of 1

meager granite
#

You can do the same for bluforRemain

#

_aliveCount = {alive _x} count _this;

plucky beacon
#

alright, I'm following

meager granite
#

Also why do you publicVariable these lists?

#

publicVariable "BluforPlayers";
publicVariable "OpforPlayers";

#

Do clients need to have them?

plucky beacon
#

no

meager granite
#
BluforPlayers = [];

{
    if(side _x == west) then 
    {
        if(alive _x) then 
        {
            BluforPlayers pushBack _x;
        };
    };
}forEach allUnits;

can be just

BluforPlayers = allUnits select {side group _x == blufor};
plucky beacon
#

I thought I would at least need OpforPlayers to use it in fn_spawnEnemies

meager granite
#

Where do you call spawnEnemies from?

plucky beacon
#

choosEnemies

#

and this was originally because, I didn't know switch case could return

little eagle
#

should use side group _x, so his system doesn't get shafted by friendly fire units dying.

plucky beacon
#

it is already?

meager granite
#

No you don't need OpforPlayers in spawnEnemies

little eagle
#

side OBJECT is weird. side GROUP does what you'd expect

plucky beacon
#

@little eagle

BluforPlayers = allUnits select {side group _x == east};

all set fam

meager granite
#

That Killed event handler will not call when you execute spawnEnemies, only when they will actually die

#

Which will happen after you'll have OpforPlayers setup later in getUnits

#

And since its all going on in server you don't need to public variable anything, its just global array

plucky beacon
#

I can combine the chooseEnemy and spawnEnemy now that switch returns the classname right?

meager granite
#

I'd even go as far as putting it all right into getUnits

#

since you're not calling these functions from anywhere else anyway

plucky beacon
#

gonna need some spacers

#

okay so got this in

private ["_bluforUnit","_classname","_LowerClassname","_caseResult","_markerPos","_newUnit"];
_bluforUnit = _this;    
_LowerClassname = (toLower (typeOf (_this)));
private _caseResult = switch (_LowerClassname) do {
    case "b_officer_f": {"O_Soldier_SL_F"};
    case "b_soldier_sl_f": {"O_Soldier_SL_F"};
    case "b_soldier_tl_f": {"O_Soldier_TL_F"};
    case "b_soldier_uav_f": {"O_Soldier_UAV_F"};
    case "b_medic_f": {"O_Medic_F"};
    case "b_soldier_ar_f": {"O_Soldier_AR_F"};
    case "b_soldier_aar_f": {"O_Soldier_AAR_F"};
    case "b_soldier_gl_f": {"O_Soldier_GL_F"};
    case "b_soldier_m_f": {"O_Soldier_M_F"};
    case "b_soldier_lite_f": {"O_Soldier_lite_F"};
    default { hint "Classname not valid"; "" };
};

if (_caseResult isEqualTo "") exitWith {};

_markerPos = getMarkerPos "Opfor_Start";

_newUnit = group OpGrpLead createUnit [_caseResult, getMarkerPos "opfor_start", [], 0, "NONE"];
_newUnit disableAI "MOVE";

[_newUnit] call missionStarter_fnc_loadoutApply;
if (MissionActive) then
{
    _newUnit addMPEventHandler ["MPKilled", {if(isServer) then {OpforPlayers call missionStarter_fnc_remainOpfor}}];
};

zMod1 addCuratorEditableObjects [[_newUnit],true ];
zMod2 addCuratorEditableObjects [[_newUnit],true ];
zMod3 addCuratorEditableObjects [[_newUnit],true ];
meager granite
#

Any code block can return btw

plucky beacon
#

chooseEnemies

meager granite
#

Its fine

#

Messy but should work

plucky beacon
#

so now I put this in the forEach loop in getUnits

meager granite
#

yes

plucky beacon
#

and I gotta declare the private variables outside

meager granite
#

which ones?

plucky beacon
#
private ["_bluforUnit","_classname","_LowerClassname","_caseResult","_markerPos","_newUnit"];
meager granite
#

Its alright, yes

#

Since recent Arma 3 versions you can private variables right in assignment
private _bluforUnit = _this;

plucky beacon
#

oof

#

that's red

meager granite
#

oh you already had it for case result

#

Well either way works

#

(Though you don't really need to private anything in your case but lets not get into that for now)

plucky beacon
#

I'll declare outside to be consistent

#

so now I can pull in the loadout one too

meager granite
#

?

plucky beacon
#

oh nevermind

#

we want that executed to client

meager granite
#

BLUFOR loadouts need to be declared as functions to be remoteExec'ed to remote players

plucky beacon
#

right right, so now that we've cut down on two files completely

meager granite
#

BluforPlayers = allUnits select {side group _x == east};

#

Just noticed that in your comment to commy

#

east, not west\blufor

plucky beacon
#

oops

#

Also if you read into vehicle creator I'm going to rewrite that with case statements anyway so no need ot look at it now

tough abyss
#

The only way to switch to a camCreate'd camera is using cameraEffect?

#

@meager granite ? You know?

plucky beacon
#

Poor Sa-Matra needs a break

meager granite
#

@tough abyss yes

tough abyss
#

Thanks!

plucky beacon
#

the.... fuck?

#
the script remainingOpfor.sqf not found
#

this on the server log

#

dedicated server btw

dusk sage
#

I'm going to have a wild guess

plucky beacon
#

and I searched my files there is nothing that calls this

dusk sage
#

CfgFunctions?

plucky beacon
#

just remainOpfor

#

unless it's in the cache?

#

could that be?

#

nope, it still is coming up

#

whaaaat the fuck

meager granite
#

are you sure you're not calling it as something like execVM "remainingOpfor.sqf" somewhere?

plucky beacon
#

I just searched the mission directory, nowhere does it reference remain..... . sqf anywhere

#

whether it was remaining, remain, remainder, no such call for a file like that is found

#

oh fml

#

wrong version

#

how the heck did that happen

plucky beacon
#

getUnits

BluforPlayers = allUnits select {side group _x == blufor};
{
    _x remoteExecCall  ["missionStarter_fnc_loadoutApply",_x];
    if (MissionActive) then
    {
        _x addMPEventHandler ["MPKilled", {if(isServer) then {BluforPlayers call missionStarter_fnc_remainBlufor}}];
    };
} forEach BluforPlayers;

goes to loadoutApply

    _classname = toLower (typeOf _this);
    //Blufor functions
    hint "finding loadout";
    systemChat "finding loadout";
    switch (_classname) do {
        case "b_officer_f": {[_x] call blu_fnc_squadLead;};
        case "b_soldier_sl_f": {[_x] call blu_fnc_squadLead;};
        case "b_soldier_tl_f": {[_x] call  blu_fnc_teamLead;};
        case "b_soldier_uav_f": {[_x] call  blu_fnc_uavOp;};
        case "b_medic_f": {[_x] call  blu_fnc_medic;};
        case "b_soldier_ar_f": {[_x] call  blu_fnc_autoRifleman;};
        case "b_soldier_aar_f": {[_x] call  blu_fnc_asstAutoRifleman;};
        case "b_soldier_gl_f": {[_x] call  blu_fnc_grenadier;};
        case "b_soldier_m_f": {[_x] call  blu_fnc_marksman;};
        case "b_soldier_lite_f": {[_x] call  blu_fnc_scout;};
        default { hint "Classname not valid" };
    };

    hint "loadout found";
    systemChat "loadout found";

It keeps going to the default for some reason and all three messages are output so it's definately going through the scripts and no errors.

dusk sage
#

what is _x in loadoutApply?

plucky beacon
#

_this ?

#

it's a unit

dusk sage
#

you've put _x

plucky beacon
#

obviously I need to not look at this code for a while

#

thanks buddy

#

it doesn't quite answer why it didn't find teh classname though

dusk sage
#

well

#

what is toLower (typeOf _this);

plucky beacon
#

the classname of _x

#

in lowercase because switch case

dusk sage
#

As in, it's defaulting

#

so what exactly is the value

#

because it's none of the cases

plucky beacon
#

b_officer_f

dusk sage
#

Are you sure?

#

Double check

plucky beacon
#

when I manually did

Leader_1 remoteExecCall  ["missionStarter_fnc_loadoutApply",Leader_1];

it worked

#

so it must not be getting called correctly if the function itself works now

#
BluforPlayers = allUnits select {side group _x == blufor};

this is the array that gets the units, maybe something is wrong here

dusk sage
#

independent

thin pine
#

@GermanMason Mind you since a3 theres blufor opfor and independent too

#

As to why? Well in the past the independent faction was mostly a guerilla resistance faction.

turbid thunder
#

Well nvm then I didnt know that

#

Also not why its called like that but why its not always referenced as guer or always referenced as resistance

thin pine
#

Bohemia has had its inconsistencies in the past hehe

#

Maybe the string version as guer to match the other 4 letter words west and east...maybe they wanted it short like that

#

"RESIS" doesn't sound that nice

#

Idk man. BIS :p

plucky beacon
#

Lol what? independant?

#

Independant is convenient when you're using side based scripts

#

good morning, and back to code

#

and nevermind that stuff up there, I got it working this morning

meager granite
#

independent and resistance are scripting commands returning side data type

#

doesn't matter how you call them, nothing changed since OFPR

cerulean whale
#

Anyone know why I can't load into lobby and RPT is saying: ExtDB3: Locked?

cerulean whale
#

anyone?

plucky beacon
#

never seen it before

#

I checked some of my own RPTs and it wasn't there

#

the only kind of lock that I could relate to getting into a lobby would be locking the server

cerulean whale
#

Ye, I don't think ti's that

#

but I just can't get in

#

I see the 'group chat' thing show up

#

but I can't hjoin

plucky beacon
#

can you login admin?

cerulean whale
#

I can't get past there....

#

I can't get into the lobby

#

so of course I can't...

plucky beacon
#

if you can see the chat you can login

cerulean whale
#

I only see the popup

#

not that actual chat

ionic orchid
#

so yeah I'm getting that too right now on my local dedicated server

plucky beacon
ionic orchid
#

all I want to do is troubleshoot and connect to my server, so I can troubleshoot a completely different problem -_-

plucky beacon
#

ditto

#

LOL

modern sand
#

Hey guys, this is probably a super stupid question but any reason why this doesn't work? ```SQF
_veh = vehicle player;
if (_veh getVariable ["Variable",false]) then {};

turbid thunder
#

Mayby you shouldnt call the variable "variable", also there is nothing that happens if that is true

plucky beacon
#

never a stupid question

thick ridge
#

What's not working? Throwing scripting errors?

plucky beacon
#

only stupid answers

turbid thunder
#

Im kinda confused as to what that is supposed to do because "then {};"

modern sand
#

Sorry I wasn't clear, there aren't any script errors just it's not doing the stuff that is in the if statement if the variable is false

ionic orchid
#

thats...

little eagle
#

... the point of if

#

?

turbid thunder
#

Because there is no code to execute after "then"

modern sand
#

No, there is code, just that's not what im trying to figure out

little eagle
#

Also, the if condition has to be true not false. Just in case that wasn't clear.

modern sand
#

So how would i try and find if the variable was false?

turbid thunder
#

Go into the debug console and check what getvariable returns

#

WITHOUT the "default" value

ionic orchid
#
if !(_veh getVariable "VARNAME") then {};
little eagle
ionic orchid
#

that ! at the start will invert the logic so you can test if something in false (turning it into a TRUE and passing the if check)

modern sand
#

omg i'm a bloody idiot, hahaah I'm sorry for wasteing all of you guy's time, 1am coding is the best haha

#

not used to staying up this late

#

Thanks guys

#

I'm an idiot xD

little eagle
#

yw lol

turbid thunder
#

What was it?

modern sand
#

simply adding ! before the if statement

#

xD

turbid thunder
#

Lol

ionic orchid
#

programming is worth staying up very late for

#

:S

modern sand
#

:S

#

I used to always stay up late before is started with school

#

cause my sleeping schedule was bad, but now it's not and it's a pain for me to stay up even to midnight

#

xD

#

Yep, just tested it was as simple as ! xD

thick ridge
#

if( !ONE_AM ) then { "It Works" }

modern sand
#

Thanks guys ๐Ÿ˜ƒ

#

Yer

turbid thunder
#

If (daytime > 0.5 && daytime < 1.5) then {hint "Warning: Critical time has been reached"};

thick ridge
#

hehe

modern sand
#

I think it is way past the critical stage for me xD

thick ridge
#

Worst part of staying up late is trying to go to sleep at 2am with code still stuck in your head

#

Better off not going to sleep... just keep coding.. ๐Ÿ˜‰

#

What are you making Nicholas?

plucky beacon
#

sorry that one has the full getUnits function

#

but it's clearly spawning all the enemies so I don't think that's an issue

thick ridge
little eagle
#

The longer you spend talking to the CBA/ACE guys, the more they will tell you to evaluate things every frame, which I believe is good for mod performance but bad for system performance and CPU/FPS.
lol you are an idiot.

tough abyss
#

His post is basically correct
Some things in arma you can run in scheduled enviroment & you might want it to run slower if arma perfomance degrades. Not everything needs to be run each frame :P
The only issue is if you run multiple addons and aren't aware of how many spawned scheduled code running

still forum
#

If you wanna profile script performance diag_codePerformance is the better route IMO

little eagle
#

The thread is literally about how you offload scripts into multiple frames and this dumb one liner reply claims how we would say to evaluate everything in a single frame.
Please don't bother replying if you haven't read everything.

#

Also there is no difference between "mod performance" and "system performance". That doesn't even make sense. It's just repeated talking points that have nothing to do with the topic.

plucky beacon
#

Technically they could be defined as seperate but when one suffers both suffer

#

so the affect on both of them is the same exact amount

little eagle
#

Which makes the sentence nonsensical. Thank you.

plucky beacon
#

I mean, he's not talking about rendering a video file while running arma

#

unoptimized because I decided to calculate pi a milion times in my web browser

#

system performance succ

tough abyss
#

I did read the post. And i said his post is basically correct. Which it is
If the reply fit the original author post, i really dont care

But there is no need to call him stupid in a discord channel over it.
Just send him a PM or reply in the forum thread

Also he meant about doing something fast code wise at expense of other code running in arma engine.
i.e scheduled versus unscheduled enviroment (age old debate)
edit: No need to nickpick over engine terms, for someone that prob isnt a programmer etc

ionic orchid
#

terms are important

#

otherwise you run the risk of misleading others and yourself

#

its not a bad thing to get better at

little eagle
#

The longer you talk to fn_quiksilver, the more he will tell you to evaluate things in as many as possible spawn threads, which I believe is good for mod performance but bad for system performance and CPU/FPS.

#

Doesn't matter if the quote is accurately representing him, he is "basically correct", so shut up.

tough abyss
#

You got some issues... Anyway back to coding

little eagle
#

That is basically what you told me.

#

Because you didn't even take the time to read the whole thread . Quote: I did read the post.

#

ยฏ_(ใƒ„)_/ยฏ

tough abyss
#

No i basically defended him because you called him stupid (were he might not see it), over getting some engine terms mixed up.
When it was age old debate over scheduled vs unscheduled

Anyway if you wanna argue more over it. We take to PM, i prob should done that in the first place

little eagle
#

Sorry, but I will continue to call out people that misrepresent me.

over getting some engine terms mixed up
When it was age old debate over scheduled vs unscheduled

Please don't bother replying if you haven't read everything.

plucky beacon
#

I'm gunna shift this topic so hard you'll get whiplash

brazen sparrow
#

why cant you just "spawn" the code?

plucky beacon
#
    
_newUnit = group OpGrpLead createUnit [_this, getMarkerPos "opfor_start", [], 0, "NONE"];
_newUnit call missionStarter_fnc_loadoutApply;
{
    _x remoteExecCall  ["missionStarter_fnc_loadoutApply",_x];
} forEach BluforPlayers;

excluding the locality of remoteExecCall these two should both work right?

little eagle
#

Why would you want to create the enemy on the local machines of the player?

#

That seems counter intuitive.

plucky beacon
#

huh?

#

nahnahnah it's creating the unit on server

little eagle
#

remoteExec with _x as target

plucky beacon
#

ya that applies the loadout to the unit

#

shouldn't _newUnit call missionStarter_fnc_loadoutApply; apply it to _newUnit

#

or are my arguments wrong

#

these are two seperate instances of calling the same function

little eagle
#

I think it would be smarter to have the missionStarter_fnc_loadoutApply function forward to the local machine instead at the start of the function

plucky beacon
#

isn't that what remoting to _x does?

little eagle
#
if (!local _unit) exitWith {
    _this remoteExec ["missionStarter_fnc_loadoutApply", _unit];
};
#

basically at the top of missionStarter_fnc_loadoutApply

#

That way the function works on every machine.

plucky beacon
#

I was under the impression

{
    _x remoteExecCall  ["missionStarter_fnc_loadoutApply",_x];
} forEach BluforPlayers;

already send the function local to each player via targeting _x

little eagle
#

Yes, but then you need to handle that every time you use that function

#

for blue and for opfor

#

with just three lines you make you function work no matter where it was executed

#

And then you dont have to worry about your other scripts.

plucky beacon
#

it's okay if I leave it redundant though right?

little eagle
#

It will leave your remoteExec redundant

plucky beacon
#

because I don't wanna send the loadoutapplication for _x to more than _x

little eagle
#

You changed your function from requiring local arguments to accepting remote arguments.

plucky beacon
#

remote and call have diffrent arguments

#

?

little eagle
#

omg

#

Ok

#

Why do you remoteExec(Call) missionStarter_fnc_loadoutApply in the first place?

#

Do you even know why?

plucky beacon
#

because the loadout has some local commands to the unit

little eagle
#

Exactly

#

addWeapon requires a local unit (argument)

#

And since missionStarter_fnc_loadoutApply relies on addWeapon

#

missionStarter_fnc_loadoutApply requires a local unit too

#

It would be preferable if missionStarter_fnc_loadoutApply accepted non local (remote) units, right?

#

That way you wouldn't need to remoteExec(Call) it every time you try to use it in code.

#

Right?

plucky beacon
#

do remote units include the server?

little eagle
#

The player objects are remote objects for the server machine

plucky beacon
#

I got that much, I was talking about AI

little eagle
#

The AI's that belong to the server are remote units on the player machines

plucky beacon
#

sorry

little eagle
#

But you shouldn't even worry about AI vs player

#

missionStarter_fnc_loadoutApply should work for both

#

and no matter if it was called on the player machine or the server right?

plucky beacon
#

ya

little eagle
#

Now imagine this:

plucky beacon
#

ready to use imagination

little eagle
#
// missionStarter_fnc_loadoutApply
private _unit = _this select 0;

if (!local _unit) exitWith {
    _this remoteExec ["missionStarter_fnc_loadoutApply", _unit];
};

//... proceed to do loadout stuff
#

Can you imagine what this would do if _unit was a player and if the function was called on the server?

plucky beacon
#

This is why you remoteExecCall isn't it?

#

the server calls for the client

#

to run that function

little eagle
#

Doesn't matter you can use remoteExecCall too

plucky beacon
#

ya kay

#

I'm following

little eagle
#

the server calls for the client
to run that function
Exactly. And that means that your missionStarter_fnc_loadoutApply function now accepts remote units and works just as well as with local units

#

So you don't need to worry about remoteExec(Call) ever again when using the function.

#

You made your function accept remote arguments or local arguments when it previously required local arguments.

#

The argument being the unit to dress up

plucky beacon
#

okay one thing I still get mixed up, the diffrence between _this and _this select 0. if you pass the arguments like [thingy] you use _this select 0 but if you pass it like "thingy" or _thingy, basically just not an array, then it's _this. correct?

little eagle
#
[1, "banana"] call {
    _this select 0; // 1
    _this select 1; // "banana"
    _this; // [1, "banana"]
};
plucky beacon
#

so if I did

object remoteExec ["missionStarter_fnc_loadoutApply", _unit];

then I would just use _this to reference "object"?

little eagle
#

Yeah.

player call {
    _this // player
    _this select 0 // error: select needs an array and not an object
};
plucky beacon
#

gotcha

little eagle
#

On the other hand...

#
player call {
    _this // player
    _this param [0] // player
};

[player] call {
    _this // [player]
    _this param [0] // player
};
#

(Instead of _this param [0] one can also write param [0], because while the command works with any array, it will default to _this.)

plucky beacon
#

right, just an array with the one item

little eagle
#

Fixed: Negative ping value was displayed for some players in the MP lobby

plucky beacon
#

the future

#

networks so good it predicts the packets

little eagle
#

Faster than light. The message arrives before it was sent. Why even bother sending it?

plucky beacon
#

technically was it ever sent

#

these are important questions

little eagle
#

It will have been sent, but it's here already.

plucky beacon
#

recieving n*2 packets, because it's already been sent

#

paste dump incoming

#

wat

#

discord fucking what are you doing

#

It keeps making new lings instead of sending

#
    private ["_newUnit","_markerPos"];
    _markerPos = getMarkerPos "Opfor_Start";
    _newUnit = group OpGrpLead createUnit [_this, getMarkerPos "opfor_start", [], 0, "NONE"];
    _newUnit disableAI "MOVE";
    _newUnit setskill ["aimingSpeed",1];
    _newUnit setskill ["aimingAccuracy",0.1];
    _newUnit setskill ["aimingShake",0.1];
    _newUnit setskill ["spotDistance",0.3];
    _newUnit setskill ["spotTime",1];
    _newUnit setskill ["courage",1];
    _newUnit setskill ["commanding",1];
    _newUnit call missionStarter_fnc_loadoutApply;
    zMod1 addCuratorEditableObjects [[_newUnit],true ];
    zMod2 addCuratorEditableObjects [[_newUnit],true ];
    zMod3 addCuratorEditableObjects [[_newUnit],true ];

unit is spawned, with the correct classname too, but loadout function not applied.

#

there

little eagle
#

[_newUnit] call missionStarter_fnc_loadoutApply;
instead?

plucky beacon
#

I'll give it a whirl

#

don't know why because the unit is called from _this

#

it's what I thought

#

I dunno man maybe createUnit isn't assigning the variable right?

little eagle
#

It should as long as you use that GROUP crateUnit syntax

#

Add some systemChat / diag_log to debug the variables

#

_newUnit = group OpGrpLead createUnit [_this, getMarkerPos "opfor_start", [], 0, "NONE"];
^ make sure _this is defined and it's what you want

#

also check the RPT file. maybe it's a follow up error and only the latest error is shown on screen, while fixing would require you to solve the first problem

plucky beacon
#

I didn't think of checking rpt

#

but ya I usually have a bunch of system chats for debugging

#

I'm trying the alternate createUnit syntax now

little eagle
#

that should tell you if a variable is defined

ionic orchid
#

that reminds me, is there a client equivalent of an RPT?

little eagle
#

the clients RPT

ionic orchid
#

the script errors go so fast ๐Ÿ˜ฆ

little eagle
#

every machine has a RPT

rotund cypress
#

Hey guys, in Blufor, is it possible to change for who group icons (the hexagons) are set?

ionic orchid
#

I had a look for one, but couldn't see one - is it in a particular place for a client?

rotund cypress
#

So they are only visible on other people with a certain variable on them

plucky beacon
#

ya it's in your appdata

ionic orchid
#

nice!

little eagle
#

%LOCALAPPDATA%\Arma 3

ionic orchid
#

life is worth living once again

#

cheers guys

rotund cypress
#

Hey guys, in Blufor, is it possible to change for who group icons (the hexagons) are set?

plucky beacon
#

it's a difficulty option

#

it's either all or none from what I've seen

#

11:55:19 A nil object passed as a target to RemoteExec(Call) 'bis_fnc_shownotification'
11:55:19 A nil object passed as a target to RemoteExec(Call) 'bis_fnc_shownotification'
11:55:19 A nil object passed as a target to RemoteExec(Call) 'bis_fnc_shownotification'
11:55:19 A nil object passed as a target to RemoteExec(Call) 'bis_fnc_shownotification'
11:55:19 A nil object passed as a target to RemoteExec(Call) 'bis_fnc_shownotification'
....

I think I found the problem

#

Commy! I found it!

#

shit doesn't exist

little eagle
#

cool. gl with that. Ill be gone for at least 2 hrs

plucky beacon
#

later

rotund cypress
#

@plucky beacon No its not just a difficulty, there is some command for it just cant find what it is

plucky beacon
#

isn't there a mod that hides the hexes behind walls?

#

it might be ace, I don't remember

thick ridge
#

@still forum - diag_codePerformance is definitely useful, but serves a different purpose than that script. If you're trying to find the runtime of a single function in isolation, diag_codePerformance does the trick. However, if you're trying to profile the execution of your application and find which functions are performance bottle necks, that's what the script is for (https://forums.bistudio.com/topic/201730-squeezing-the-absolute-most-performance-out-of-a-script-fsms-cba-state-machines-vs-loops-and-functions/#comment-3150131).

plucky beacon
#

okay so the only thing I could think of is that the script works for blufor because they're all placed on the map by Eden and names. opfor units have names assigned to them like this

12:36:21 "This is the unit: O Alpha 1-1:3"
12:36:21 "This is the classname: O_Medic_F"
12:36:22 "This is the unit: O Alpha 1-1:4"
12:36:22 "This is the classname: O_Soldier_SL_F"
12:36:22 "This is the unit: O Alpha 1-1:5"
12:36:22 "This is the classname: O_Soldier_GL_F"

so do these names work as variables that can be passed? they contain a space which I know variables assigned in Eden can't do.

#

man I got it fixed but this is fuckin' weird why it works now

plucky beacon
#

I can't apply the loadouts while spawning the enemy I need to apply loadouts after they all have been spawned

#

close enough I guess

meager granite
#

No they don't, its just entity to string conversion

#

if vehicle has vehicle var name, entity to string conversion returns it instead of O Alpha 123 stuff or model name with memory address

plucky beacon
#

So I should make something that names all of the units that are generated?

meager granite
#

No

#

Fuck vehicle var names

plucky beacon
#

Ok

#

TFW everything works in singleplayer but not multipalyer

meager granite
#

add logging everywhere

#

diag_log

#

and figure out what doesn't get executed while it should and vice versa

plucky beacon
#

ya that's what I been up to

#

almost every command by now honestly

#

maybe not every but any of the ones that do something that could break

#

does diag_log even lower performance at all?

little eagle
#

yes, it writes to hdd

jade abyss
#

If you add it in a onEachFrame EH, of course^^

little eagle
#

You're supposed to take it out when you're done with debugging.

jade abyss
#

thats why -> "DIAG" for "Diagnostic"

plucky beacon
#

or comment it

#

find diag_log replace with //diag_log

tough abyss
#

diag_fps is usefull to make some code runs equal regarding fps.

little eagle
#

?

#

Please don't tag me if you have nothing to say. Thanks.

plucky beacon
#

rip

#

heck I don't even tag you and I have a million questions, lol

#

patience is a virtue

tough abyss
#

Well I'll just post it here, guys, I saw some mods can edit the main-screen wallpaper, like when you start the ArmA, that background, do you know how to replace it with a image by yourself?

little eagle
#

edit the config for it

tough abyss
#

@little eagle where i can find the config

little eagle
#

ingame config viewer

#

also

plucky beacon
#

kinda inconvenient the log on the server doesn't have time codes

halcyon crypt
little eagle
#

I wish you could turn them off in SP.

plucky beacon
#

whats the diffrence between long and short?

little eagle
#

the length?

halcyon crypt
#

๐Ÿ˜„

plucky beacon
#

ya but how muuuuch

little eagle
#

idk, try it

plucky beacon
#

server explodes

halcyon crypt
#

short probably equals the client rpt

#

just the time

#

and full probably includes date

ionic orchid
#

anyone fancy helping me confirm a graphics issue I'm having on my two nvidia cards? I ask in here because there's local exec sqf involved

jade abyss
#

DriftingNitro - Today at 11:31 PM
whats the diffrence between long and short?```
incl. Date or Time only.
plucky beacon
#

thx

tough abyss
#

Hay Guys, how do i say that i want to open the menu name.hpp if(profileName != _this select 1) exitWith {
hint format["Your old nickname %1",_this select 1];
[format["For your key is fixed another nickname, enter your old nickname in the profile of the game!<br/><br/>Your old nickname <t color='#b20303'>%1</t><br/><br/>If you have any problems with the change nickname - refer to the forum <t color='#665bff'>vk.com/russlandlife</t>",
_this select 1],
"Registered nickname change",
"adopt"
] call BIS_fnc_guiMessage;
["NameExists",false,false] call BIS_fnc_endMission;
};

civic maple
#

please put that in a code block

tough abyss
#

how? o.o

civic maple
#

do triple backtick + sqf, then new line, then code, then new line, then triple backtick

#
like this
#
if(profileName != _this select 1) exitWith {
    hint format["Your old nickname %1",_this select 1];
    [format["For your key is fixed another nickname, enter your old nickname in the profile of the game!<br/><br/>Your old nickname <t color='#b20303'>%1</t><br/><br/>If you have any problems with the change nickname - refer to the forum <t color='#665bff'>vk.com/russlandlife</t>",
        _this select 1],
        "Registered nickname change",
        "adopt"
    ] call BIS_fnc_guiMessage;
    ["NameExists",false,false] call BIS_fnc_endMission;
};
tough abyss
#

("")testtest("")

jade abyss
#

```sqf
if(true)then{};
```

==

if(true)then{};
tough abyss
#

idk sry. Can you just answer my question ๐Ÿ˜›

jade abyss
#

wow...

dusk sage
#

wew

tough abyss
#

so, how do i say pls open that and that dialog

dusk sage
#

?

still forum
#

You posted SQF code.. with a hpp filename in front of it. and called it a dialog and a menu. I'm confused

jade abyss
#

Life'r ยฏ_(ใƒ„)_/ยฏ

still forum
#

I'd suggest hint "please open that dialog menu sqf thingy in that hpp file";

tough abyss
#

@meager granite the problem i was having with the camera on player head was related to Position AGL + relPos error on slopes! Fixed! Works perfectlly now!!!

#

Spectator mode with zoom!

#

Ok guys, i have a question. When i have a sqf. How do open as an example the dialog 88 that is in my dialog. Im scripting Tanoa Life

dusk sage
#

the dialog 88?

tough abyss
#

i want to create an dialog when they changed their names. I got everything working without an dialog. But i want it with an dialog

sick dune
#

Anyone in here familiar with the gac_train script?

dusk sage
#
Our Father which art in heaven, 
Hallowed be thy name.
Thy kingdom come.
Thy will be done in earth,
as it is in heaven.
Give us this day a way to open dialog 88
Amen
tough abyss
#

Cant you just answer my question ? ๐Ÿ™„

#

I know its _create Dialog but i need the script for mp

dusk sage
#

I think there is a barrier for us trying to help you here, we really have no clue what you're talking about

jade abyss
#

another wow

#

I guess, his dialog has the idd 88, but... meh, its life...

tough abyss
#

omg, that was an example.

jade abyss
#

meh, nah. Good night. guys.

tough abyss
#

and the name is "88" it also could be "changenamedialog"

dusk sage
#

createDialog "88"?

ionic orchid
#

makes an alien 3 joke

tough abyss
#

Father of the God of Zeus of Arma 3 of Arma 2... make me rich! ๐Ÿ˜„

#

ok, you know what. I done it ๐Ÿ˜ƒ go get on someone others nerfes

rancid ruin
#

see you in a few hours/days when you will be back asking for people to get on your "nerfs"

tough abyss
#

haha. Sorry but i asked a normal question and i get something like pls god give us 88

#

" Discussion about anything related to Script creation and usage within game ... IF (script == true) THEN {chat here}; "

dusk sage
#

When i have a sqf. How do open as an example the dialog 88 that is in my dialog. Im scripting Tanoa Life

#

normal question

rancid ruin
#

mazy you would have got way more help if you'd not mentioned the Life thing

#

a whole lot of people hate the Life crowd because they are lazy and steal stuff from people who aren't lazy

#

in future just say you're doing everything for a mil sim mission and then everyone will help you ๐Ÿ˜‰

weak obsidian
#

Meh I have no idea how I coudl help calling the name.hpp

rancid ruin
#

what is the name.hpp?

weak obsidian
#

I guess it's some kind of form / interface to change the name in the ext db for life - but that's all like a black box to me

rancid ruin
#

aren't you the guy from 3 minutes ago who i told to pretend his questions aren't for Life?

#

are you gonna have to make a 3rd account now?

weak obsidian
#

Nope that was @tough abyss

rancid ruin
#

you're right, he disappeared just before you turned up

#

anyway go to pastebin.com and put your name.hpp contents in a new paste and share it here

#

giving people a filename isn't enough information for them to help you

plucky beacon
#

lol just read up there

#
 idk sry. Can you just answer my question
#

that's some sass

rancid ruin
#

nice. was it you who wrote that surface type debugging snippet as well?

#

actually i think that was pennyworth

#

this channel should really start some kind of github gist account or something for collating/competing on different scripts

#

it was indeed pennyworth, and he's posted a few more cool ones recently

weak obsidian
#

Honestly - who does not have some kind of file or file repository with small script snippets?

rancid ruin
#

i was talking about one specific to this discord channel where people can collab/compete on the same idea/s

#

i somehow lost my old sqf snippets file, it was massive. got a new one up to 1.4k lines of random shit

#

do you comment each snippet with a proper title or are you ctrl-Fing for a function name which you think is in the snippet, like i normally do?

#

i'm like "i'm pretty sure it had an event handler in there somewhere" - ctrl-F eventHandler = 5000 results ๐Ÿ˜ฆ

weak obsidian
#

@rancid ruin sounds like a cool idea, what I meant was that everyone probably already has tons of stuff stored away in some file, so it might be worthwhile to swarm intelligence gather it in one location

rancid ruin
#

that 0 = ... bit seems so wrong lol

#

cos i presume that doesn't actually redefine the number 0 to something

#

why does sqf allow/encourage that kind of behaviour lol

#

ah, i switched over to pushback about a year late, must've missed that

#

a year or so ago when they started adding shitloads of new functions i just stopped scripting for ages til they figured it out

dusk sage
#

@tough abyss It errors by design

#

count is expecting nothing or a boolean to return

#

So, not a bug

turbid thunder
#

Is it somehow possible to use setObjectTextureGlobal on a unit in a way that their head / helmet get the texture applied to aswell?

plucky beacon
#

TFW after a few hours you realize an _x should have been a _this

plucky beacon
#

out of curiosity what do you tag your log outputs with to find them more easily. I personally do

|filename|--!--Message
meager granite
#

format ["some var = %1", var] call client_log;

#

where client_log does diag_log with some prefix tag added

#

Or even more advanced way would to be have some logging extension to write logs into separate file or terminal window

plucky beacon
#

interesting

kindred lichen
#

hey, is there a way to swap a player's seat?

plucky beacon
#

Like, trade seats?

kindred lichen
#

Like If you're in a car, using MoveInCargo/MoveInDriver etc doesn't work

plucky beacon
#

Oooh

kindred lichen
#

you have to exit then enter, won't let you use those commands to move from say passenger to driver.

plucky beacon
#

have you tried using the alternate syntax?

#

Marker positions always are places to terrain height right? Even if i created it relative to another marker

open star
#

Are there no commands to process or update visible text in a listNbox? Is there some trick to it? The only commands I can find are for invisible data.

meager granite
#

lnbSetText

#

?

thick ridge
plucky beacon
#

but can we attatche turrets to it and make a battle train

thick ridge
#

hehe

rancid ruin
#

that is very cool

#

and not many things to do with trains are cool, so congratulations

#

you have set a new level for train related cool things

#

is it a script or a mod? how does it work, roughly?

finite mica
#

I have a problem with revive

finite silo
#

Does/will ArmA 3 support Lua?

finite mica
#

How to setup the following mission:

  1. each regular player spawns in and has one life then becomes spectator
  2. Zeus players work normally
#

how do I set that up

finite silo
#

Well I'm a noob, but isn't that an option in the editor? Can't you just turn off respawn?

#

@finite mica

finite mica
#

Yes but that does not work as intended

#

zeus players on dedicated servers would end up with broken interface

finite silo
#

oh I see

#

what about just making respawn time ridiculously long?

finite mica
#

I have to get zeus to work normally, other players spectator mode works normally

still forum
#

What zeus are you using?

finite mica
#

the virtual entitiy one

still forum
#

That gets bugged with spectator enabled?

finite mica
#

I have not tried it in the last 3 months

#

But what bohemia writes on the tin very often does not work as intdended

rancid ruin
#

no Lua, @finite silo , arma has it's own scripting language called SQF

finite mica
#

Can someone point me to a good object ingame that can be used to show a custom image?

little eagle
#

UserTexture10m_F

#

UserTexture1m_F

finite mica
#

thanks

finite mica
#

How to add a hyperlink to a briefing?

#

I recall this being possible in arma2?

#

I dont remember the syntax

thick ridge
#

@rancid ruin thanks, it's a script

#

At a high level, the script generates a node graph of the tracks (each intersection and end point is node) and then figures out the path in-between the nodes. This info is then used to position and move the train based on player input.

#

When train reaches a node, based on the direction of the train and the keys being held down by the player, the next node is selected based on the andke of the new path

#

Angle*

#

The camera is just a custom camera that orbits and follows the train

rancid ruin
#

do you build the node graph at mission start or as it's needed?

#

can't wait to see the finished product

#

by the way you can use hideObjectGlobal to remove those objects on the track which you clip through

plucky beacon
#

Good morning programmers

open star
#

@meager granite Thanks, I saw lnbSetText, but it says it only sets invisible text in the BIKI description. I tried it and it didn't seem to work for the visible text. I've just resorted to removing the row and re-adding it for now. I'm still getting the hang of dialogs..

rancid ruin
#

lnb text can be a bit wonky i've found

meager granite
#

Dialogs are great in Arma actually, far more stable and predictable than anything else

little eagle
#

It's frustrating that there still is no way to read the color of a control.

#

Or use multi-line tooltips.

rancid ruin
#

what are you comparing them to exactly sa-matra?

little eagle
#

Or rotate a control (I think)

rancid ruin
#

cos they are basically unreadable compared to html/css

#

you can rotate picture controls now

#

but i think that's it

little eagle
#

Compared to the rest of Arma.

rancid ruin
#

oh right, yeah that's setting the benchmark pretty low tbh

#

"this is the least confusing part of arma"

jade abyss
#

Depends on, what you do ๐Ÿ˜„

plucky beacon
#

I made my mission output ascii art in the log so I could find where the mission starts when scrolling through it

tough abyss
#

Hi friendas! Why the heli isPlayer vehicle player returns true? ๐Ÿ˜ฆ

#

When the player is inside a vehicle.

indigo snow
#

If object is a vehicle, the test is done for the vehicle commander.

#

Check the notes on the wiki

tough abyss
#

@indigo snow opss.. so it's my fault. Thanks.

plucky beacon
#

Always check wiki

tough abyss
#

Yes, i will.

indigo snow
#

just check for isKindOf "CAManBase" too and youll be good

plucky beacon
tough abyss
#

@indigo snow yes, i changed if (isPlayer _guguUnit) then... to if (isPlayer _guguUnit && _guguUnit isKindOf "CAManBase") then...

#

@plucky beacon thanks!

plucky beacon
#

put the code in a block

rancid ruin
#

nah it's to the left of 1 on first world keyboards

plucky beacon
#

same thing though

#

under the squggly, above tab, left of 1 and below escape

jade abyss
#

```
sqf
```
Like that Nitro? ๐Ÿ˜„

plucky beacon
#

ya how do you post without the formatting

jade abyss
#

Magic!

plucky beacon
#

fuck

jade abyss
#

( \ )

plucky beacon
#

```
sqf

#

cool

#

I asked this yesterday but it was late at night, is the position of markers always forced to 0 terrain hieght?

jade abyss
#

Yep

plucky beacon
#

k

rancid ruin
#

you coulda tested that in 15 seconds using getmarkerpos rather than waiting a day bruh

plucky beacon
#

I went to sleep

#

then woke up

indigo snow
#

well it actually returns a 2D position type, so it doesnt return any height at all. im assuming the setPos family of commands defaults to a zero for height index so youll get different results between the different Pos types (posATL, posAGL, etc)

jade abyss
#

Try to move a marker with setPos ๐Ÿ˜›

tough abyss
#

Im working on an mission, i want that when the mission end an outro starts. I got that working but now i have in my outro this code:

#
     format[
     "<t size='1.3' color='#00C10D'>Thanks For Playing!</t><br/>Good Bye %1 ! <br/><t size='1.1'>Data Synced And Gear Saved.</t>",_name],
     0,
     0.2,
     10,
     0,
     0,
     8
 ] spawn BIS_fnc_dynamicText;
#

How do i open a dialog now? with createDialog "outro";?

rancid ruin
#

if your dialog is defined as "outro" yeah

tough abyss
#

ahh ok cool. How do i script it that the dialog "crashes" or like deletes itself within 20 seconds?

rancid ruin
#

sleep 20; closeDialog 1;

#

something like that maybe

tough abyss
#

and closeDialog 1; <-- the 1 for outro ?

#

or the idd of the dialog

rancid ruin
#

it's an exit code

tough abyss
#

oh ty, ill safe the wiki

rancid ruin
#

i dunno how you've made anything resembling a mission without bookmarking the wiki tbh m8

tough abyss
#

oneoh, you know what i mean with mission haha โค

#

love you too men

plucky beacon
#

I bookmark commands I never heard of

jade abyss
#

@rancid ruin He took the ordinary Life-mission ๐Ÿ˜„

west lantern
#

does anybody know if action name for weapon resing exist and if so whats its name

#

from input actions... I need to block it

indigo snow
#

@west lantern

keyDeployWeaponAuto[]={46};
keyDeployWeaponManual[]={};
rancid ruin
#

ok but does it wurk 4 my lakeside terraen

west lantern
#
        _return = (_key == (actionKeys _x) select 0);
    };
} forEach ['ReloadMagazine','Gear','SwitchWeapon','Diary','ingamePause','keyDeployWeaponAuto'];``` << lemme try that one
#

nope that didnt work

jade abyss
#

wait, what?

#

@west lantern
remove "Key" and also: sometimes they are not the same names.

west lantern
#

guess Ill just block 46 then

jade abyss
#

And if they re-assign the btn?

#

(e.g. i used Shift+V )

west lantern
#

:/ yeah

#

thats whay I asked for action name

jade abyss
#

Try "DeployWeaponAuto"

dusk sage
#

_return = (_key == (actionKeys _x) select 0);

jade abyss
#

Instead of "KeyDeployWeaponAuto"

dusk sage
#

What if it isn't the first element?

jade abyss
#

that was the next thing, i planed to mention ๐Ÿ˜„

dusk sage
#

you've already clarified they are pushing the button

west lantern
#

hey not my script its tcb ais wounding

jade abyss
#

Never heard.

#

Anyway: You tried "DeployWeaponAuto"?

west lantern
jade abyss
#
  • btw... ... ... wasn't there a EH bound to actions, so you can systemchat' em? hmm
west lantern
#

HA

#

it worked

#

โค

jade abyss
#

Something like "Thx Almighty Dscha" <-- Would be enough

#

๐Ÿ˜„

west lantern
#

I gave you my heart you bastard

#

๐Ÿ˜—

jade abyss
#

screw your heart! You hear can't pay bills!

#

Oh wait.. slavery...

#

Okay, back2topic.

west lantern
#

๐Ÿ’ธ

jade abyss
#

If you check the keybinds: "key" -> remove it

#

Then it is (most of the time) the action name

#

The other thing is: Why taking the first entry of the Array? +what will be done with it?

west lantern
#

schweet gracias, will keep that in mind until I invevitably forget and ask again, at which point you can surely tell me to go to hell

#

but Ive been there ๐Ÿ˜„

#

btt, thanks

jade abyss
#

Added a note to your username, qouting that sentence.

west lantern
#

so Im famous now ๐Ÿ˜„ ยฏ_(ใƒ„)_/ยฏ

jade abyss
#

I just clicked on your username and added something to "note", if you think thats famous. ... ... .. erm... ... ... "okay?" ๐Ÿ˜„

west lantern
#

I dont do it for fame and glory anyway Ill just take the booze and the tits

#

nuff offtopic?

jade abyss
#

I like tits.

#

Yeah, enough.

rancid ruin
#

there's almost certainly a life server called booze & tits

jade abyss
#

posmgntngr789uetndraegdnfg

rancid ruin
#

sorry, life "community"

west lantern
#

eh no thanks will pass that Im sure theres better bar around, and if all fails I can go to mexico

quasi thicket
#

ok hi

jade abyss
#

@quasi thicket
Try:
( false OR true ) in the Trigger

#

aka ( Check1 OR Check2 )

quasi thicket
#

ah with ( )

#

i did without ๐Ÿ˜›

#

laptop01 getVariable [ "T8L_pvar_dataDownloaded", false ] OR DebugTest

plucky beacon
#

This is a really weird glitch, it doesn't run the mission failure (sometimes) but when I reassign and restart the mission it immediately fails at the start. It's really weird. It happens even before the init according to logs

quasi thicket
#

Anyway, 2nd question then.... i made a respawn script for specific squads (a few days back in #arma3_questions ). And i thought it would work, but the script only worked for me as host in multiplayer

jade abyss
#

You better try it, i haven't done much with Triggers, but that should do it.

quasi thicket
#
    params ["_unit"];
    if (group _unit == sqd1) then {
        _unit setPos (getPos AlphaSpawn);
    }
    else {
        if (group _unit == sqd2) then {
            _unit setPos (getPos BravoSpawn);
        }
    }
}];```
#

It only works for me (the host), but all other players will respawn on their corpse

jade abyss
#

Where is it beeing executed?

quasi thicket
#

init.sqf

jade abyss
#

In the mission file?

quasi thicket
#

yes

jade abyss
#

Then its bad.

#

๐Ÿ˜„

quasi thicket
#

localization i guess ?

jade abyss
#

wait a sec, need to doublecheck my old files

quasi thicket
#

Someone told me i should put it in a onPlayerRespawn.sqf file instead

jade abyss
#

initPlayerLocal.sqf <-- use that

#

player addEventHandler ["Respawn", {call cD41D_fnc_c_Handle_Respawn; true} ]; Thats what i executed from there (worked).

#

So something is odd with some other settings. Whats not working there?

indigo snow
#

you could also use the MPRespawn MP EH

jade abyss
#

wasn't there a downside to the MPRespawn?

quasi thicket
#

Here's what i want to achieve:

I got 2 squads/groups in the mission. Sqd1 and Sqd2.
Both squads have a vehicle on which they respawn (AlphaSpawn & BravoSpawn).

The script works, but only me the host will spawn on the correct one.

#

so initPLayerLocal.sqf will work ?

jade abyss
#

I used it there, so i can say: It worked there.

quasi thicket
#

ok i'll try it out ๐Ÿ˜ƒ

#

no reference needed?

jade abyss
#

nope

quasi thicket
#

crap

jade abyss
#

What might fk you up is: Do you use RespawnTemplates by BI? (Description.ext stuff)

quasi thicket
#

if i do "Open Mission Folder" from the editor, my windows explorer crashes and doesn't return ๐Ÿ˜ฆ

jade abyss
#

That overwrites some stuff

#

Sucks to be you ๐Ÿ˜„

#

sry ๐Ÿ˜„

quasi thicket
#

just

respawndelay = 15;```
jade abyss
#

rgr

#
respawn = BASE;
//respawnDelay = 4;
respawnDelay = 1;
respawnDialog = 0;
respawnButton = 1;
respawnOnStart = -1;```
plucky beacon
#

oops

thick ridge
#

@rancid ruin The track graph is built if you get in a train that's on a track that hasn't been mapped yet

#

Train won't move until the graph is built

celest crown
#

HI, anyone help me make the script file banplayer (Side server), the player shall receive a ban for one hour when triggered script [1,(getPlayerUID player),"60","Ban / 1h",_name] remoteExec ["fnc_banPlayer",2];

plucky beacon
#
openMap [true, true];

//titleText["Select Blufor spawn point", "PLAIN"];

["Blufor Spawn",-1,0.35,5,3,0,787] spawn BIS_fnc_dynamicText;
["<t size = '2'>Select the <t color='#4286f4'>Blufor</t> spawn position</t>",-1,-1,2,3,0,791] spawn BIS_fnc_dynamicText;
clicked = false;
onMapSingleClick "'west_start' setMarkerPos _pos; clicked=true;"; 
waituntil {clicked};

["Opfor Spawn",-1,0.35,5,3,0,788] spawn BIS_fnc_dynamicText;
["<t size = '2'>Select the <t color='#a81212'>Opfor</t> spawn position</t>",-1,-1,5,3,0,792] spawn BIS_fnc_dynamicText;
clicked = false;
onMapSingleClick "'east_start' setMarkerPos _pos; clicked=true;"; 
waituntil {clicked};

openMap [false, false];

How do I cancel or hide the visibility of the dynamic text here? My best guess was using cutRsc on the resource layer but that didn't work.

rancid ruin
#

maybe just call a BIS_fnc_dynamicText with " " or something

jade abyss
#

""

rancid ruin
#

''''

jade abyss
#

str("")

#

hm... str(str())? (might kickout an error)

rancid ruin
#

knowing sqf it probably wouldn't kick out an error, it'd just guess what you wanted to do

jade abyss
#

No clue, test it out ๐Ÿ˜„

celest crown
#

HI, anyone help me make the script file banplayer (Side server), the player shall receive a ban for one hour when triggered script [1,(getPlayerUID player),"60","Ban / 1h",_name] remoteExec ["fnc_banPlayer",2]; If somebody already has realized the help me pls

#

please help me make autobans via infistar or battleye command,
For example, when the player join the Triger that would be called the ban

rancid ruin
celest crown
#

make server side
"myservercommandpassword" serverCommand "#beserver ban %1 %2 %3",_this select 0,_this select 1, _this select 2];

#

"myservercommandpassword" serverCommand "#beserver ban %1 %2 %3",[_this select 0,_this select 1, _this select 2];

#

and create ban.txt

#

operate on the idea?

plucky beacon
#

@rancid ruin the problem in the first place is that they are overlaying each other even when I put them on the same resources layer so I don't think that would fix the problem

celest crown
#

I did this in many ways, not what did not work

rancid ruin
#

why not just create your own text control nitro

#

if you rock vanilla bohemia ui functions like that then your mission just ends up looking like every other mission anyway

#

it's like when everyone just uses hint...it looks shit and conflicts with everything else which uses hint at the same time

plucky beacon
#

hmmkay

celest crown
#

// serverCommand doesn't work for ARMA 3 as of 2013-05-16
// serverCommand format ["#exec ban %1", _playerID];
// serverCommand format ["#kick %1", _playerID];

#

and that I need to write? it works now?

ionic orchid
#

well, figured out my drawLine3D problem (lines (and buildings and trees) had a one-pixel green/white halo artifact on them) ...the PP sharpen filter is trash

weak obsidian
#

TIL _x playAction "AgonyStart" / "AgonyStop" is far better than using _x setUnconscious "true" / "false" (fooling around with BIS_fnc_holdActionAdd)

plucky beacon
#

ragdolls are fun

weak obsidian
#

Yeah true - but with ai caching and other stuff in MP it gets messed up, the agony animation stops playing

#

so I'm going with the "faking it" route - which sometimes works better

plucky beacon
#

I still think ace should have ragdoll when you're unconcious, and I thought it did as a glitch right when Apex came out

finite silo
#

I want to make a video game, but I'm thinking about making a large ArmA mod first, and then transitioning that (so then I'd have my assets and everything) into a standalone game. Is that a smart idea? Or should I just start directly with UE4?

plucky beacon
#

just learn UE4 since the language and implementation is diffrent as well

finite silo
#

hmm ok

#

thanks

plucky beacon
#

gotta figure out how people make diolags that stick on the screen

#

maybe if I find a server that has a watermark or something

#

also a way to prevent exiting an interface with escape

ionic orchid
#

if you just want to make 'a game' and only care about the game design part, then use anything - arma is good to mod a game into because it gives you the terrain and player controls, etc straight away

#

but if you care about HOW to make games, I'd suggest using UE4 or Unity because those take more work to get started but you'll learn things that you can take into future games

#

arma mods only help you with the arma engine

plucky beacon
#

I went to see how KOTH did the watermark but it's all binarized, rip

#

oooh

#

I see, so then titlersc the class

#

gotcha

#

thanks silver

#

not really the purpose yet so nothin' to worry about

#

so rscTitles just looks like a lite dialogs.hpp

#

man dialogs are such an undocumented venture compared to everything else in arma

plucky beacon
#

I actually was going to look at your KOTH Samatra but it's binarized :p

#

it's alright thjoguh

#

thanks

little eagle
#

cutRsc does not use idd's. It uses layers, but w/e

plucky beacon
#

w/e?

#

so do I change the text on the layer?

meager granite
#

I'm always open to explain how my stuff works if people ask

meager granite
#

KotH player menu was a last minute thing, originally it went straight to settings with view distance

#

Only from alive vehicle

#

you need to move invisible unit into their seat

#

Pushing out from dead vehicles is very buggy

#

yes

#

hideObject, allowDamage false, enableSimulation false

#

I enable it before moving in

#

Actually, I don't even disable simulation

#
server_moveOutDeadUnit = (createGroup sideLogic) createUnit ["C_Man_1", [0,0,0], [], 0, ""];
server_moveOutDeadUnit allowDamage false;
server_moveOutDeadUnit hideObjectGlobal true;
server_moveOutDeadUnit addVest "V_RebreatherB";
{
    if(vehicle server_moveOutDeadUnit != server_moveOutDeadUnit) then {
        moveOut server_moveOutDeadUnit;        
    };
} call server_func_addOnEachFrame;
#
"publicVar_unloadDeadFrom" addPublicVariableEventHandler {
    _veh = _this select 1;
    _unit = server_moveOutDeadUnit;

    {
        if(!alive(_x select 0)) then {
            switch(toLower(_x select 1)) do {
                case "driver": {
                    _unit moveInDriver _veh;
                };
                case "commander";
                case "gunner";
                case "turret": {
                    _unit moveInTurret [_veh, _x select 3];
                };
                case "cargo": {
                    _unit moveInCargo [_veh, _x select 2];
                };
            };
            moveOut _unit;
        };
    } forEach fullCrew _veh;
};
#

This is for alive vehicles only

#

Yeah I recall there was some issue with units dying out of air despite allowDamage false

#

so I give him a rebreather as a failsafe

#

Turret I assume?

little eagle
#

Yeah I recall there was some issue with units dying out of air despite allowDamage false
This is still a thing. If a unit reaches 0 oxygen, they die no matter what.

#

0 oxygen and are underwater*

meager granite
#

You can return true in HandleDisconnect to keep the unit, moveOut it and then finally delete it after it fully moved out

#

Probably deleting during ownership transfer messes things up in MP

#

The idea with moving out dead units from dead vehicles was to first move dead unit from dead vehicle into alive vehicle and then push it out from alive vehicle with alive unit. It leaves proxy of the dead unit in dead vehicle though

#

Or instead of all this mess we should have command to move out dead or update moveOut to work with dead

#

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

When targetting ArmA 2 1.06 or newer, use hideObject instead. This function is a relic from dynamic building destruction development. It is left only for compatibility with scripts created before ArmA 2 1.06, and its functionality may be changed or removed in the future.

#

It is alias to hideObject now

#

I guess this is reference to OFP2 dynamic building destruction

#

That eventually made it to VBS2

#

i didn't, good idea to try it out

#

Also this dead unit from dead vehicle removal is not tested in MP, probably will be a big mess and might result in Object xx:xx not found spam everywhere

#

Apparently vehicles could be broken into parts too in OFP2

little eagle
#

hideBody was an action some special ops soldier models had in A2. It no longer works in A3, probably due to ragdolls.

meager granite
#

Considering how hard it was to run Arma 1 and 2 back when they released I can only imagine how terrible it would run in 2005

jade abyss
#

Because the dead Player/Corpse inside the Vehicle is an ProxyObject in the Vehicle itself. Means -> It would "hide" a part of the Vehicle.

weak obsidian
#

Is there any way how I can find out which weapon is employed by AI against which type of vehicle? F.e. the will fire at a low flying or landed heli with regular rifles, but not at MRAPs like the Strider or Hunter

half inlet
#

anybody know of a "get" equivalent to setWeaponReloadingTime?

young current
#

There probably is not one. Seems the command does not change the general reload time, just adjusts a single reload so if you want to read the reload time of a weapon you probably need to read it from the weapons cfgweapons config.

half inlet
#

bummer, I was hoping there would be a way to get the percentage of reload time of a firing cycle (not a proper reload)

#

trying to make my bolt action rifle eject a bullet casing at the right time in the animation, but I guess I'm going to have to hardcode it into the weapon config

#

thanks anyway

young current
#

well you can always read the reload animation source I guess

#

it goes from 0 to 1

half inlet
#

yeah, but animating a bullet ejection via the model.cfg would be a nightmare ๐Ÿ˜›

#

I'd much rather spawn a bullet cartridge particle via script, that way gravity will do the work for me

young current
#

ah

#

so you just need the time when youd spawn it right?

half inlet
#

pretty much

#

though I'm sure I can just define it myself, since I don't expect anyone or anything to affect it

young current
#

isnt there a effect for that even?

#

could that be timed

half inlet
#

for bullet ejections? probably, but how would the game know at which point in the animation it should start playing?

young current
#

I dont know but you could take a peek at the effects configs

#

though it might not be configurable like that now that I think of it

#

but you can tie your effect on the fired event as long as you can figure out at what time it should spawn

#

could just use a stopwatch to time it?

half inlet
#

that's the idea ๐Ÿ˜‰

#

I'll have to see how I can set it up individually for the reload and cycle animations, but I'm sure it's possible

young current
#

whats the difference?

half inlet
#

the animations are different, so one might have a slightly longer delay until the cartridge ejects than the other

young current
#

can you use ammo count as if condition?

half inlet
#

yeah, or I'll have to detect the reload action

#

I'll figure something, thanks for the help

atomic citrus
young current
#

I would bet thats AL thing.

atomic citrus
#

ah really?

#

cheers bud

young current
#

well the DLC could point to Tanoa, but then again such error does not appear without AL

west lantern
#

does anyone have an example how to enable respawn on group and have respawn at base at the same time?

fleet dagger
#

@west lantern as in a wave type respawn or only a single group respawns?

west lantern
#

@fleet dagger single

#

in fact I want to have base respawn available at all times

#

but players are across the map and main base if far away, so I want players to be able to respawn on their own group members

#

with some limitations... like if enemy is 50m away from group member spawn is disabled

fleet dagger
#

oh so like you want to replicate the battlefield type squad respawn?

west lantern
#

sorta

#

if you played Insurgency in Arma2 that is what I want to replicate

fleet dagger
#

cant say i have, nor am i too sure how to do it

#

sorry

plucky beacon
#
class RscTitles {

    titles[] = {notification,info};

    class notification {
        idd = 600100;
        movingenable=false;
        duration = 15000;
        name = "Timer Bar";
        fadein=0.5;
        fadeout=0.5;
        class controls {
            class instructionsTitle: RscText
            {
                idc = 1010;
                text = "This is a notification"; //--- ToDo: Localize;
                x = 0.304062 * safezoneW + safezoneX;
                y = 0.236 * safezoneH + safezoneY;
                w = 0.391875 * safezoneW;
                h = 0.066 * safezoneH;
                sizeEx = 3 * GUI_GRID_H;
            };
        };
    };
};

how do I call this using titleRsc or cutRsc,

600100 cutRsc ['notification','PLAIN'];

didn't work, unless I'm defining things wrong. this is all after I include defines.hpp.

jade abyss
#

try

1 cutRsc ["notification","PLAIN"];```
plucky beacon
#

no dice

jade abyss
#

also:
name = "notification";

plucky beacon
#

should the name be the same as the class?

#

it just says timer bar because it was copied

jade abyss
#
    movingEnable = 0;
    fadein = 0;
    fadeout = 0;
    name = "MyNotificationName";
    onLoad = "uiNamespace setVariable ['MyNotificationName', _this select 0]";
    onUnload = "uiNamespace setVariable ['MyNotificationName', displayNull]";
plucky beacon
#

ya still no

#

hmm

#

I remember sa-matra saying something about the layer

#

but I can't find any mention of it on the wiki

jade abyss
#

onLoad = "uiNamespace setVariable ['MyNotificationName', _this select 0]; systemchat 'Its loaded';";

plucky beacon
#

debugging time

jade abyss
#

As usual: Add systemchat everywhere and test, if its even loaded.

plucky beacon
#

so it's loading, but missing

jade abyss
#

Check your .rpt

#

As i mentioned a few days ago: Some stuff is not shown inside Arma, when it comes to UI/Interfaces stuff.

plucky beacon
#
10:54:28 Error loading control C:\Users\[user]\Documents\Arma 3 - Other Profiles\D%2eNitro\missions\Permadeath_Template-90.VR\description.ext/RscTitles/notification/controls/instructionsTitle/
jade abyss
#

๐Ÿ˜‰

plucky beacon
#

hmmmkay

#

but why...

jade abyss
#
notification/controls/instructionsTitle/```
In **notification** the  **control(s)** "**instructionsTitle**" has an error.
plucky beacon
#
            class instructionsTitle: RscText
            {
                idc = 1011;
                text = "Select the Opfor spawn position"; //--- ToDo: Localize;
                x = 0.304062 * safezoneW + safezoneX;
                y = 0.236 * safezoneH + safezoneY;
                w = 0.391875 * safezoneW;
                h = 0.066 * safezoneH;
                sizeEx = 3 * GUI_GRID_H;
            };
#

uhmm... the idc? maybe?

jade abyss
#
    class D41D_Teampoints_West: D41D_RscText
    {
        idc = 123456;
        x = "0.85 * safezoneW + safezoneX";
        y = "0.81 * safezoneH + safezoneY";
        w = "0.0317 * safezoneW";
        h = "0.033 * safezoneH";
        sizeEx = Txt_Big; //calculated in seperate File
        colorText[] = {0.5,0.5,0.8,1};
        text = "100";
        colorBackground[] = {0,0,0,0};
        type=0;
        style=2;
        font="RobotoCondensed";
    };```
plucky beacon
#

thanks

jade abyss
#

Type & Style is missing, for example
Could be loaded by RscText (I repeat: COULD), but i wouldn't be so sure about it.

plucky beacon
#

worth a shot, also easier to just have the style there directly

jade abyss
#
class D41D_RscText
{
    type = 0;
    x=0;
    y=0;
    h=0.037;
    w=0.30000001;
    style=0;
    shadow=1;
    colorShadow[] = {0,0,0,0.5};
    font= "RobotoCondensed";
    sizeEx = Txt_Norm;
    colorText[] = {1,1,1,1};
    colorBackground[] = {0,0,0,0};
    linespacing=1;
    tooltipColorText[] = {1,1,1,1};
    tooltipColorBox[] = {1,1,1,1};
    tooltipColorShade[] = {0,0,0,0.64999998};
};```
The RscText i used
plucky beacon
#

It's saying I already defined it?

#

hang on I didn't grab the error

#
236    sizeEx = 3 * GUI_GRID_H;
237    colorText[] = {0.5,0.5,0.8,1};
238    text = "100";
```so it says 236 is already defined but that error wasn't there before so would it be talking about the color text?
jade abyss
#

Ctrl+F -> SizeEx
F3 a few times
After that:
Ctrl+F -> colorText[]
-continue blablabla

plucky beacon
#

ctrl f?

jade abyss
#

Open your Notepad -> Press Ctrl+F ?

#

(aka: "Search")

plucky beacon
#

oh on notepad

plucky beacon
#

so basically from what I can gather the example you shared is under the impression the person doesn't already have a defines.hpp

half moth
#

Wondering if someone can point me in the right direction. I've searched google quite a bit but coming up with a lot of out dated results. Trying to find a simple way/script to create custom starting loadouts. A few I found work well after respawns but not the initial spawn.

plucky beacon
#

Eden you can change the loadout though

#

there are respawnWithLoadout scripts

#

google for scripts that maintain the same inventory

plucky beacon
#

all this talk about layers on the wiki and not one exaple about how or where to define them

#

@jade abyss This is weird, I tested it with frame and it make a frame normally, but the text doesn't appear and adding any of the parameters you have in your example make an error about being already defined. troubling this one.

jade abyss
#

No idea what you did, tbh. The example i gave you was a "standalone" version of it (it should show a Textbox in the bottom Right Corner)

#

The only thing that needed to be changed was "Txt_Big" in sizeEx

plucky beacon
#

txt_big is still relative to thr ui size isn't it?

jade abyss
#

Its how i called my Textsize.

#

I defined them in another file.

#
#define Txt_Small "0.01 * safezoneH"
#define Txt_Norm "0.02 * safezoneH"
#define Txt_Big "0.03 * safezoneH"
#define Txt_VBig "0.04 * safezoneH"```
plucky beacon
#

sizeEx should be fine then if it's not predefined

jade abyss
#

Read what i wrote above again ๐Ÿ˜‰

#

7min ago

plucky beacon
#

rrrright but what's the diffrence between

#define Txt_VBig "0.04 * safezoneH"
sizeEx = Txt_VBig ;

and

sizeEx = 0.04 * safezoneH ;
jade abyss
#

nothing

#

I just changed some Textsizes in several parts, so i didn't want to open all files again and again and again

#

just to change one number

plucky beacon
#

are you talking about it being standalone?

#

nevermind

#

gotta refocus

jade abyss
plucky beacon
#

I mean, that's great but I'd like to get the text working before I wrory about the size

jade abyss
#

And i gave you an example above, wich worked for me.

plucky beacon
#

Okay I have the text appearing now, but the next issue is ctrlSetText

CtrlSetText [1033,"Select the Blufor spawn position"];

or

text CtrlSetText [1033,"Select the Blufor spawn position"];

unless RscTitles changes text diffrently

plucky beacon
#

jackpot

thin pine
#

wiki is life

tough abyss
#

Hello Guys, i have a question. I want to make a script that the screen is black and a text apears. than the black fades out

#

How should i do that?

#

Like that? titleCut ["", "BLACK FADED", 60]; titleCut ["", "BLACK IN", 10]; ["core\ls\videos\vid.ogv"] spawn BIS_fnc_playVideo; titleCut ["", "BLACK FADED", 10]; titleCut ["", "BLACK IN", 10];

#

Okay so just edit titleCut to cutText?

#

okay ill give it a try

#

that doesnt work

#

It doenst fade

#

but isnt it seconds?

#

i want the black screen stay 1 minute

#

or should i go with sleep in between?

#

hmm, doesnt work

#

my code:cutText ["", "BLACK FADED", 5]; sleep 60; cutText ["", "BLACK IN", 5]; ["core\ls\videos\vid.ogv"] spawn BIS_fnc_playVideo; cutText ["", "BLACK FADED", 5]; sleep 20; cutText ["", "BLACK IN", 5];

plucky beacon
#

@thin pine
From the Dialog Control wiki page

...do exactly same as different names in other controls. color[]=, colorText[]= ActiveColor[]=ShadowColo[]=

by recognizing a pattern controls are the parameters of the resource therefore wouldn't a conclusion be that text is a valid parameter.
Also

_control ctrlSetText "Hello world.";

isn't exactly what I call a thoroughly explained example

thin pine
#

well imagine a control, lets say a RscText inherited control that displayed the text "foobar" - you could change that displayed text by doing sumn like; disableSerialization; _control = _myDisplay displayCtrl 1337; _control ctrlSetText "Hello world!";

#

Not sure what else you're trying to achieve with ctrlSetText ๐Ÿ˜›

plucky beacon
#

well that's what I'm doing NOW thanks to the video I linked that showed me how to do it. And I can't contribute to the wiki because my account won't verify :P

#

my point being it's a poor example to have "_control" and not know how to initalize a control

thin pine
#

You got me wondering if there are any pages on the wiki about scripting with dialogs. (Dialogs themselves can obviously work without any scripting)

#

I'll have a look

plucky beacon
thin pine
#

That page is obviously just an info page for one of the -large- Control family set of commands

#

There's plenty of commands associated with Controls, so posting a "tutorial" on just one of them wouldn't be clever

plucky beacon
#

are there reserved IDCs or IDDs I should avoid?

#

is there a range of safe numbers?

#

ok

#
class InstructionHud
    {
        idd=1235;
174        movingenable=false;
175        enablesimulation=1;
176        enableDisplay = 1;
178        duration = 999999;
179        fadein = 1;
180        fadeout = 1;
181        name "InstructionHud";
182        onLoad = "with uiNameSpace do { InstructionHud = _this select 0 }";
183        class controls 
        {
            class structuredText
            {

https://i.gyazo.com/ce0379020cd446fadef4b14a58f9c28e.png
wat

#

oh fml

#

=

#

================

#

===============

#

the fucking code block in discord highlighted it for me IN RED

half moth
#

@plucky beacon Isn't there JIP problems with using the Eden arsenal to change loadouts?

plucky beacon
#

I think respawnOnStart command in the description has an option to help with that

half moth
#

I remember months ago trying loadouts in Eden. When I player JIP it caused everyone else's loadouts to do some crazy things. Reset to original loadout, double the amount of items within inventory, ect.

plucky beacon
#

well Eden came out months ago didn't it? how long has it been out?

#

it did weird stuff when it first launched

plucky beacon
#

can I put multiple structured text's in the same controls class?

jade abyss
#

What do you mean with "Same controls class"?

plucky beacon
#

hang on let me whip up an example

little eagle
#

You can only have one text for each control, but you can use </br> for newlines

plucky beacon
#

Can I have multiple font sizes in the same string?

little eagle
#

Sure

plucky beacon
#

แดฎแถซแต˜แถ แต’สณ โถ 12:34:56 แดผแต–แถ แต’สณ โต
basically like that

#

hmmmkay

#

Lol you can parse an image in the text?

#

weird

little eagle
#

It's pretty cool.

plucky beacon
#

I could put like a little icon on the ends too then

#

so what's the best way to calculate the center of the screen on the horizontal axis

#

I mean, a better question would be can I just take the window resolution and divide by 2

deft zealot
#
_x = call {_a = 1};
 0:29:19 Error in expression <_x = call {_a = 1};>
 0:29:19   Error position: <= call {_a = 1};>
 0:29:19   Error Generic error in expression

this didnt throw an error some month ago, did it?

plucky beacon
#

quotations?

#
call {"x = 3"}
still forum
#

no

plucky beacon
#

:/

still forum
#

interesting ^^

plucky beacon
#

first example does that, shows what I know

deft zealot
#

call {_a = 1}; works like a charm... just using the return value isnt possible

still forum
#

simply wrong
body: Code - A function body provided directly 'inline' or the String returned from the commands loadFile or preprocessFile.
meaning call "x = 3";

#

oh yeah

#

now i know

ionic orchid
#

try sqf call {_a = 1; _a;} ?

still forum
#

= returns a void/nothing

#

will crash everything

ionic orchid
#

-sqf

still forum
#

@ionic orchid yes

deft zealot
#

yep but i remember a time where this worked with _x being nil in my example

little eagle
#

@deft zealot @still forum This has always thrown an error.

#

The assignment operator returns void and not GameValueNil. You looked at this before, dedmen.

still forum
#

I know. Didn't see it first.
Fixed the wiki example for call

deft zealot
#

vote 4 change ๐Ÿ˜„

little eagle
#

I'd suggest to never end a function with an assignment operator. Basically the opposite of what you have to do in the editor, lol

deft zealot
#

thats it... but i doubt there are many ppl who know that ^

still forum
#

I like it. This makes sure there is always a need for SQF guru's ๐Ÿ˜„

little eagle
#

Don't care if no one listens to me. I just say it to point fingers and say "told you so!" when shit collapses.

plucky beacon
#

lol

plush cargo
#

@plucky beacon did you figure out your UI question?

plucky beacon
#

ya, but I'm sure I'll have more later

#

oh wait, I didn't find out how to center an element

still forum
#
_configs = "true" configClasses (configFile >> "CfgVehicles");
_models = _configs apply {getText (_x >> "model")};
_models = _models arrayIntersect _models;
diag_log count _models;
spawnedScript = _models spawn {
    _pos = (getPosWorld player) vectorAdd [0,60,20];
    {
        _obj = if ((_x select [0,1]) == "\") then {_x select [1]} else {_x};
        dedmen_object = createSimpleObject [_obj,_pos];
        systemChat _x;
        sleep 0.1;
        deleteVehicle dedmen_object;
    } forEach _this;
};

Hah yeah... Arma can be fun.

plush cargo
#

Centering in an ui depends on the size of what you want to center

#

class vehFrame: IGUIBack
{
idc = 1;
x = 0.25 * safezoneW + safezoneX;
y = 0.25 * safezoneH + safezoneY;
w = 0.5 * safezoneW;
h = 0.5 * safezoneH;
colorBackground[] = {0.529,0.565,0.49,1};
};

#

this background size is half the size of the screen (w= 0.5 h=0.5)

#

so in order to center it, the x pos and y pos are .25 away from their respective screen edges

#

leaving 0.25 on the other side

#

you can follow the link to the forum post has a dl

plucky beacon
#

how do I get multiple RSC ont he same screen? they keep replacing each other even though I'm picking other layers

plush cargo
#

You're using createdialog/display or title/cutRsc?

plucky beacon
#

I had identical IDs is why :P

plush cargo
#

ahh lol

plucky beacon
#

what does the style parameter do for text? mine is set to 13 and I don't know what it means

plush cargo
#

pretty sure 13 is structured text

#

wait no type=13 is structured text

#

should read through the rest of his gui tuts, some really good info in there

plucky beacon
#

yeeee boy

#

we're in bussiness

plush cargo
#

nice!

plucky beacon
#

slightly off center though :I I'll worry about it later

plush cargo
#

Positioning text correctly can be a real pain. I usually use a colored background on text ctrls until i get the pos right, also use the align commands text = " <t align='center'>Text Example</t> ";

still forum
#

Ouh BI :/ What shall we do with ya?

TestingFunction = {
    if (true) exitWith {};
    {call { call {call{}}}} forEach variableStuff; //repeat these 2 lines 12x didn't include all to keep message small
    missionNamespace getVariable ["",{call{call { call {call{}}}} forEach variableStuff;}];  //repeat these 2 lines 12x didn't include all to keep message small
};
for [{_i=0}, {_i<1000}, {_i=_i+1}] do {addMissionEventHandler ["EachFrame", TestingFunction];}; //~760ms per frame
for [{_i=0}, {_i<1000}, {_i=_i+1}] do {addMissionEventHandler ["EachFrame", {call TestingFunction}];}; // ~47ms per frame

Why BI? why? I don't see any reason why you would compile an Eventhandler each frame instead of just storing the compiled code

#

I wrote it. After finding a performance bug in CBA which was not caused by CBA

#

Arma stores eventHandlers as strings at compiles them before executing.

#

yeah

#

not the stackedEH but the call calling the stackedEH script is

#

addMissionEventhandler all of them. also onEachFrame {} and other of these "one time" eventhandler script thingys

#

didn't check UI eventhandlers but I guess they are also affected

#

BIS_fnc_stacked eventhandlers are not affected because they are handled in script

rancid ruin
#

that's some ugly code right there

#

to exitWith