#arma3_scripting

1 messages ยท Page 494 of 1

tough abyss
#

Is display created?

#

And even if you manage to create player model it will be headless

#

Arms extended

still forum
#

@compact maple whats the difference between [] spawn {}; and 0 spawn {};
One passes an empty array as _this. The other passes a 0 as _this.
The 0 is technically more performant. But doesn't really matter

queen cargo
#

any documentation about all the quirks of the arma file system?

dusky pier
#

@tough abyss display created. I try'ed RscStructuredText - is works. Player model i used for example. I will use this for vehicles models.

#

i think better use pictures

queen cargo
#

@ TFAR, ACE and CBA ppl here (or other large mods)
is the .. a big concern? or barely if ever used?

still forum
#

never had problems with it if that's what you mean?

#

If you mean if that's even used. Every CBA based mods script files use it

tough abyss
#

hi guys, I'm looking for someone who could make me strong battleye filters on my life server, I can pay for that

still forum
#

#creators_recruiting <--
#rules post in the right forum. This is neither about recruiting people for work. Nor battleye. Nor server stuff.
And if you repost to the right channel. Make sure not to violate #rules number 9

compact maple
#

good ty

tough abyss
#

@queen cargo you mean relative paths? It wasnโ€™t a thing until a couple of years back afaik

queen cargo
#

relative paths

#

pretty much all that involves the . or ..

tough abyss
#

Yeah, until maybe 2 years ago you couldnโ€™t go up a dir with ..

arctic owl
#

Anyone know of a script that checks to see what tasks are available and adds respawn tickets if they are completed. I know this happens in BI MP missions, but didnt know if someone had encountered this. I've poured through BI forums and have had no luck.

tough abyss
#

probably gonna have to write it yourself

real tartan
#

how to filter vehicles variable to get vehicles without ammoboxes, objects

#

_onlyActualVehicles = vehicles select { _x isKindOf "LandVehicle" || _x isKindOf "Air" || _x isKindOf "Tank" || _x isKindOf "Sea" } ...don't know if I catch all base classes or there is more elegant solution

#

vehicles select { _x isKindOf "Car" || _x isKindOf "Motorcycle" || _x isKindOf "Tank" || _x isKindOf "Air" || _x isKindOf "Ship" };

#

included parachute, ... don't know why is it under "Helicopter" class :/

tender fossil
#

Is it possible to have a compiled function with sleep in it and call it (instead of spawning) if the call origins from scheduled environment?

#

(In Arma 2 OA)

tough abyss
#

Why wouldnโ€™t this be possible? It is going to be in scheduled if you call it from scheduled

#

It is just that anything after the call statement will have to wait until the function returns

still forum
#

@tender fossil yes.. you can sleep in scheduled. I don't really understand your question

tender fossil
#

My point is that is calling a precompiled function from scheduled environment still scheduled environment

still forum
#

call doesn't change scheduled-ness

tender fossil
#

Ok

still forum
#

it keeps whatever you had before

tender fossil
#

So you can call a function and sleep in it, if the call origins from scheduled environment

still forum
#

yes

ebon sparrow
#

I have some functionality not working on my server. This message is overwritten by the server.

#

What should I do

#

It is a submarine mod that I down.

hollow thistle
#

Is there any way to discard mouse scroll events like it is possible with keys in "keyDown" EH?

I'm using CamCurator camera type as it has nice in built keys handling, I wanted to block camera movement caused by scrolling listbox elements but the only way that I could achieve this so far was doing "manual off camCommand MyCam; when cursor is over listbox.

This however blocks whole camera movement when cursor is over said listbox and the UX is not so nice.

#

BI somehow blocks scrolling camera movement in zeus when cursor is over side panels but I fear it might be baked into engine ๐Ÿ˜

#

I would rather not implement whole camera movement handling by myself.

tough abyss
#

Is there an event for save game?

hollow thistle
#

I think there is no event for that.

#

But when you're saving there is this "saving game please wait" screen. There might be a way to detect saving via hooking into this display with CBA or smth.

tough abyss
#

There is load from save event but not save? Why BI, why???

frigid raven
#
private _tempPlayer = player

ref or copy ?

still forum
#

ref

#

everything in SQF is by ref

#

Or better... Can you specify your question? as to which level you mean?

#

player returns a object ref encapsuled inside a game value. _tempPlayer copies the game_value but still has the same ref to the object

#

Example

private _num = 5;
private _num2 = _num;
_num2 = 6;

5 -> GameValue (unique ID 55) that contains ref to GameData(type: number, uniqueID: 1)
_num -> GameValue (unique ID 12) that contains ref to GameData(type: number, uniqueID: 1)
_num2 -> GameValue (unique ID 77) that contains ref to GameData(type: number, uniqueID: 1)
6 -> GameValue (unique ID 15) that contains ref to GameData(type: number, uniqueID: 2)
_num2 -> GameValue (unique ID 77) that contains ref to GameData(type: number, uniqueID: 2)
They all refer to the same entity. The GameValue is always created a-new and initialized with the reference. The reference is reused.
(Unique ID's are made up. They don't really exist. Just serve for illustration)
Same happens for every variable type.

frigid raven
#

Well my player dies - As he dies I want to save his loadout on the server profile. When my remote func logic is running the player is already the respawn placeholder (2035 char) and there his loadout is persisted. I can workaround that by having a respawn countdown so my old player state is still fetchable

#

But ye...

#

need to turn things around tho

still forum
#

soo.. nullObj problem?

frigid raven
#

nah there is a obj but it is the respawned character already which was the vanilla loadout

#

because my remote func is too slow

still forum
#

Ah. Okey.

frigid raven
#

But nvm that problem I gonna refactor that bullshit

still forum
#

private _tempPlayer = player is ref yes. Ref to the object that player returned at that point in time.
when player changes to return a different value. _tempPlayer doesn't

frigid raven
#

Just wanted to be sure I cannot have a copy of the player state somehow

#

wait

#

_tempPlayer wont change if player is changing? how is this a ref then?

still forum
#

it's a ref to the object that player returns

frigid raven
#

๐Ÿค” wtf

still forum
#

not to the script command player

hollow thistle
#

player is just a command that returns ref to current player object.

frigid raven
#

ok i think I get ur point

still forum
#

If it would dynamically change when player changes. That would mean it would have to call the player command internally. everytime you retrieve the variable

frigid raven
#

jeez that means my friggin logic cant catch up the respawn at all

still forum
#

It's exactly the same as this

_number = 5;
_temp = _number;
_number = 6;

_temp doesn't change. It still references the 5
= copies a reference.
_temp is still a reference, to the value that _number stored at that time. But not a reference to _number itself.
Not a reference to a variable. Just a reference to a value.
Variable points to a Value. And internally inside the engine value points to the actual data.

frigid raven
#

god damn that i9 7900K Processor ๐Ÿ˜Ž

#

ok got you

#

you guys read about the ACRE events?

#

any ideas how to make a cool feature outta it ๐Ÿค”

still forum
#

what events? where?

frigid raven
#

ACRE new Update

#

has CBA events for radio activated/deactivated

still forum
#

Sooo.. ACRE finally got things that TFAR had for like 5 years now? ๐Ÿ˜„

frigid raven
#

I am an ACRE fan tho

hollow thistle
#

@frigid raven Dedmen is TFAR developer if you did not know already ๐Ÿ˜›

still forum
#

I was once a ACRE fan too ๐Ÿ˜„

frigid raven
#

uh shit

hollow thistle
#

rip.

frigid raven
#

Does TFAR has those radio simulations?

#

like

still forum
#

no.

frigid raven
#

having an SEM52

#

and turning buttons

still forum
#

Oh you mean the UI interaction? yeah

frigid raven
#

Ok see? bullshit - I want to use that fucking stupid button setup as I did in my service time

#

๐Ÿ˜ฎ

#

ok I am listening

#

fuck

#

now I want to see TFAR

#

Does... it have this teamspeak plugin stuff?

#

annnnd this babbel stuff?

still forum
#

babbel no. Also not that indepth radio simulation. TFAR is more arcadey

frigid raven
#

bye

still forum
#

Discord no wanna embed ;U

frigid raven
#

arcade == bye

still forum
#

Well TFAR has more users than ACRE ยฏ_(ใƒ„)_/ยฏ

#

They must like something about it

frigid raven
#

I dont care about mainstream

#

Yea the mass is casual and arcarde

#

pls dont talk to me

#

pls

#

I am something special - i only do fancy underground stuff

still forum
#

You can configure ACRE to have about the same radio simulation as TFAR. Like.. Ignore antenna orientation and these weird settings thingies

frigid raven
#

I hope nobody will play my mod - therefore it will be the most undergroundiest mod ever

#

Yea ok I still will checkout TFAR

#

just for a fair comparison

still forum
#

TFAR had vehicle radios also for 5 years. Which ACRE only got recently.
Does ACRE have "proper" underwater radio support?

frigid raven
#

the hell u talking about

#

who has the mindset to radio commu underwater

still forum
#

Like.. Your radio signal doesn't travel the same through water as through air

#

if you are deep underwater you cannot just radio your base like you could if you were over water

frigid raven
#

I will like

#

if there are uboats

still forum
#

there are uboats :U In vanilla. I think we even had them in alpha

frigid raven
#

gosh can I win an argument against you somehow?

still forum
#

Actually very easily yeah. But I don't wanna say that now

hollow thistle
#

Stop bothering him :DD Dedmen can you consider taking a look at my question? ๐Ÿช

still forum
#

you have questions?

#

Ah that. Yeah I did. Dunno

hollow thistle
#

I wonder if there might be some undocumented camcommand that disables that or smth.

still forum
#

The Zeus zooming might very well be hardcoded into engine

hollow thistle
#

They provide this awesome camera with inbuilt controls but you cant slap any usefull interface on top of this becouse of this issue.

#

Tried already with returning false or true, did not help.

agile anchor
#

Hi guys

#

I have an issue that's bugging the hell out of me I'm trying to create a mission with side chat story dialog and it works fine when in the heli but as soon as i get out it doesnt

#

ive tried 'Pilot sideChat "On my way";'

still forum
#

you mean when you execute that. While not inside the helicopter. It just doesn't show a message?

#

@hollow thistle nope. Not hidden cam commands

agile anchor
#

i have trigger to give message when in heli that works and when out another trigger that works (ive tested triger) but no side chat

hollow thistle
#

ok, many thanks Dedmen. I will script the camera controls by myself then.

agile anchor
#

sorry guys can't remember how to show code in the balck box again?

hollow thistle
#

```sqf
code

still forum
#

Also yeah. The cam control buttons are hardcoded in engine behind the manual check. So.. No way that I see.

agile anchor
#

ah thanks

#

'''Pilot sideChat "On my way";'''

#

ffs

still forum
#

just copy the thing veteran posted

#

you are using the wrong thingies

hollow thistle
#

its grave char not backtick.

agile anchor
#

Pilot sideChat "On my way";

#

i use this and it works fine

#

when out of heli ive tried the same and _null = [] spawn {Pilot sideChat "I've arrived"};

#

also tried .sqf and that didn't work either

#

I've also tried the chat in and out of vehicle in another/test mission and that works fine so i'm at a loss as to why it's happeneing

still forum
#

SP or MP?
Can you write in sideChat by yourself when outside of helicopter?

agile anchor
#

mp and i'll just check 1 sec

#

yes i can use side chat by my self

#

ive just tested it with global chat and it works

#

so no idea why side suddenly stops

still forum
#

Maybe for some reason the "Pilot" variable is no longer valid when you leave the helicopter?

agile anchor
#

ive tried using others on the ground and also the modules (all of which worked when i done a quick test/dummy mission

past idol
#

is there a way to put a script in to keep morter vics from shooting past 2k im tryingt o help my server out with a way to keep players from shooting over 2k

still forum
#

@past idol please be aware of #rules especially number 9

past idol
#

@still forum is there a way to keep vics from shooting over the 2k marker in the script or is there a way to be able to get me a script of it

tough abyss
#

@past idol yes

#

Fired EH

#

Or another EH

#

Just check start pos and current position distance

past idol
#

what im trying to do is keep all vics for everyone not to be able to shoot past the 2k range and keep all max range at 2k max

tough abyss
#

I dunno wtf is vics

past idol
#

the morter trucks

ruby breach
#

You have one solution. Fired EH with a distance check

past idol
#

is that in scripts area

tough abyss
earnest ore
#

Having a headache with this task system, can't get the tasks to switch state when I activate an action on a unit that calls a scripted function.

I create the tasks on the server without drama:

    ["beginTask", BLUFOR, ["...", ""], getMarkerPos "respawn_west", "ASSIGNED", 0, true, true, "whiteboard", false] call BIS_fnc_setTask;
    [["indepTask", "beginTask"], BLUFOR, ["...", "1. Independently Screwed", "1. Independently Screwed"], position VIPIndep, "CREATED", 1, true, true, "meet", false] call BIS_fnc_setTask;
    [["ruskieTask", "beginTask"], BLUFOR, ["Todo", "2. Russian Recollection", "2. Russian Recollection"], position VIPRuskie, "CREATED", 1, true, true, "meet", false] call BIS_fnc_setTask;
    [["mericaTask", "beginTask"], BLUFOR, ["Todo", "3. American Freedom", "3. American Freedom"], position VIPMerica, "CREATED", 1, true, true, "meet", false] call BIS_fnc_setTask;```

The action is assigned to a unit in the editor as follows:
```sqf
this addAction ["Join Russia", { [EAST, _this#0, _this#2] remoteExec ["ZE_fnc_setSide", 2] }, nil, 1.5, true, true, "", "player distance VIPRuskie < 5", 5, false, ""];
#

... And the script itself performs:

publicVariable "zSideJIP";
switch(zSideJIP) do {
    case independent: {
        ["indepTask", "SUCCEEDED", true] call BIS_fnc_taskSetState;
        ["ruskieTask", "CANCELED", false] call BIS_fnc_taskSetState;
        ["mericaTask", "CANCELED", false] call BIS_fnc_taskSetState;
    };
    case east: {
        ["indepTask", "CANCELED", false] call BIS_fnc_taskSetState;
        ["ruskieTask", "SUCCEEDED", true] call BIS_fnc_taskSetState;
        ["mericaTask", "CANCELED", false] call BIS_fnc_taskSetState;
    };
    case west: {
        ["indepTask", "CANCELED", false] call BIS_fnc_taskSetState;
        ["ruskieTask", "CANCELED", false] call BIS_fnc_taskSetState;
        ["mericaTask", "SUCCEEDED", true] call BIS_fnc_taskSetState;
    };
};
["beginTask", "SUCCEEDED", true] call BIS_fnc_taskSetState;
#

Which does everything else that script is supposed to do, except change the states of the tasks.

waxen tide
#

I think there was a command to calculate a position based on a starting position, a distance and a direction. but i can't for the life of me remember.

#

or was it using sinus functions ?

still forum
waxen tide
#

too simple ๐Ÿ˜ณ

bronze pewter
tough abyss
#

BIS_fnc_findSafePos is not a command and it is not returning position based on distance and azimuth from original

mortal wigeon
#

Is there a faster method of updating a camera's orientation based on animated memory points of the gunner's turret view for purposes of streaming a real-time texture to the cockpit MFD screen than the following?

    {
        if (isNil "ST_cam") exitWith
        {
            removeMissionEventHandler ["Draw3D", _thisEventHandler];
        };

        _dir =
            (ST_v selectionPosition "TGPPos")
                vectorFromTo
            (ST_v selectionPosition "TGPDir");

        ST_cam setVectorDirAndUp [
            _dir,
            _dir vectorCrossProduct [-(_dir select 1), _dir select 0, 0]
        ];
    }];```
#

This method works just fine, but there's a very slight delay which results in the cockpit screen's video not being as steady as the actual turret view.

coral monolith
#

wondered if anyone could help me out,im having trouble with people selling houses and cars but using autoclickers if someone could help me out and figure how to stop this happening would be much appreicated

young current
#

you can also put stuff into the {} exitWith if you want to throw the people using autoclickers into the air or something

tough abyss
#

@mortal wigeon you mean camera shakes? If so this is a bug with the engine

coral monolith
#

@tough abyss could you check your pms bro

#

ive noticed with alot of servers now they are using a menu that kicks in when selling items/houses comes up in the right hand side saying please wait selling

#

a autoclicker cant be used with thesee

#

@tough abyss like i said im helping a freind untill he can find a paid scripter/coder for his server

#

where would i add that code say for houses

#

@tough abyss no worrys thanks for the help though im 50% there just need to know where to add now lol

manic bane
#
    if (typeof _vehicle == "I_APC_Wheeled_03_cannon_F") then {
    _vehicle setObjectTextureGlobal [0, "A3\Armor_F_Gamma\APC_Wheeled_03\Data\apc_wheeled_03_ext_co.paa"]; 
    _vehicle setObjectTextureGlobal [1, "A3\Armor_F_Gamma\APC_Wheeled_03\Data\apc_wheeled_03_ext2_co.paa"]; 
    _vehicle setObjectTextureGlobal [2, "A3\Armor_F_Gamma\APC_Wheeled_03\Data\rcws30_co.paa"]; 
    _vehicle setObjectTextureGlobal [3, "A3\Armor_F_Gamma\APC_Wheeled_03\Data\apc_wheeled_03_ext_alpha_co.paa"];
    };
    if (typeof _vehicle == "I_MRAP_03_F") then {
    _vehicle setObjectTextureGlobal [0,'\A3\soft_f_beta\mrap_03\data\mrap_03_ext_co.paa']; 
    _vehicle setObjectTextureGlobal [1,'\A3\data_f\vehicles\turret_co.paa'];
    };
    if (typeof _vehicle == "I_MRAP_03_hmg_F") then {
    _vehicle setObjectTextureGlobal [0,'\A3\soft_f_beta\mrap_03\data\mrap_03_ext_co.paa']; 
    _vehicle setObjectTextureGlobal [1,'\A3\data_f\vehicles\turret_co.paa'];
    };
    if (typeof _vehicle == "I_MRAP_03_gmg_F") then {
    _vehicle setObjectTextureGlobal [0,'\A3\soft_f_beta\mrap_03\data\mrap_03_ext_co.paa']; 
    _vehicle setObjectTextureGlobal [1,'\A3\data_f\vehicles\turret_co.paa'];
    };
};
player addEventHandler ["GetInMan", {_this call fnc_natoskin;}];```
I just made script that automatically change texture when player ride AFV-4 or Strider.
#

Do you have some optimization suggestion?

#

I couldn't think better option.

still forum
#

using a forEach here would be negative optimization. as you are running more code.
And it also wouldn't help readability much IMO

#

the last 3 can be optimized tho as they are all the same

#
    if (typeof _vehicle in ["I_MRAP_03_F", "I_MRAP_03_hmg_F", "I_MRAP_03_gmg_F"]) then {
        _vehicle setObjectTextureGlobal [0,'\A3\soft_f_beta\mrap_03\data\mrap_03_ext_co.paa']; 
        _vehicle setObjectTextureGlobal [1,'\A3\data_f\vehicles\turret_co.paa'];
    };

And also fix the indentation for better readability

manic bane
#

wow much better!

still forum
#

Also you are mixing " and ' which seems weird. Better stay with one style throughout the file

manic bane
#

thanks for suggestions!

minor lance
#

Anyone knows why the killed eventhandler return the same player that is being killed in unit and in killer paramยฟ?

#

MP

still forum
#

if you kill yourself. That's what happens

minor lance
#

Nope

#

Im being killed by a friend

still forum
#

or killed via script ala setDamage maybe

#

ACE medical system?

minor lance
#

No vanilla mission just with that eventhandler

#

The instigartor param is null also

compact maple
#

can you send the part of the code ?

minor lance
#

mm yes

compact maple
#

& how do you know it return the same player ?

minor lance
#

player addEventHandler["Killed", {hint str _this}];

compact maple
#

weird

minor lance
#

just for testing purposes

compact maple
#

whats hinting exactly

minor lance
#

I have my killed function but as its not getting correct parameters its not working correctly

#

pistol bullet

#

it returns [player1, player1, <null-object>, true]

#

Im player1 and my friend is player2

compact maple
#
     unit: Object - Object the event handler is assigned to
    killer: Object - Object that killed the unit. Contains the unit itself in case of collisions
    instigator: Object - Person who pulled the trigger
    useEffects: Boolean - same as useEffects in setDamage alt syntax
#

its not returning twice the same

minor lance
#

I know that

compact maple
#

its returning null-object

minor lance
#

killer == unit

#

instigator = null ๐Ÿ˜ฆ

compact maple
#

thats weird

#

this is pure vanilla ?

minor lance
#

Yes, no other killed eventhandlers

#

just debug ones with no functions

compact maple
#

hm

minor lance
#

Its dedicated server btw

#

any idea?

tough abyss
#

killer: Object - Object that killed the unit. Contains the unit itself in case of collisions

#

Also instigator is null pointing to that you offed yourself

minor lance
#

Collisons with bullets ยฟ?

tough abyss
#

With whatever, you didnโ€™t provide enough information to answer that

minor lance
#

I said: player addEventHandler["Killed", {hint str _this}]; On a vanilla mission does say thet the killer is the same as the person being killed. O a vanilla mission, and my friend is killing me with a piston. Server is dedicated

#

What els you need?

queen cargo
#

this is bloody good stuff:

#define TEST2( A , B , C ) A-B-C
TEST(1, "a,b)", 3)
TEST2(1, ([123,456]), 4)
TEST(([123,456]), "abc", F)
TEST([123,456], "abc", F)
TEST2(1, 2, 3, 4)```
gets to ```

1- "ab)"- 3
1- ([123456])- 4
([123456])- "abc"- F

)```
#

shit gets just more funny if one goes further

#

@scarlet spoke you got this covered in your tool?

#

lol

#

i broke the preprocessor

scarlet spoke
#

The error-handling of the preprocessor is pretty stupid to not existant. And no I haven't implemented error-handling in my preprocessor just yet (because of exactly this BS that I'd have to reproduce) ๐Ÿ™ˆ

queen cargo
#

PreProcessor is even more broken then i was ever expecting

#

how the fuck am i supposed to implement that ammount of bugs into sqf-vm !?

#

especially if THIS: TEST("a,b,c","a,b,c","a,b,c","a,b,c") breaks the whole macro

#

forever

tough abyss
#

Have you compared it with c preprocessor?

queen cargo
#

it is not like i would consider that as a perfect result ... but literally everything is better then what arma is doing ๐Ÿคฆ

#

for some reason, they do count braces btw. and handle strings
but neither is done correctly

tough abyss
#

Xmacro works though, which is really surprising

queen cargo
#

aaaanyways ... all cases need to be catched with sqfvm so user will be warned ...

tough abyss
#

What cases

queen cargo
#

all cases that may come up in the preprocessor @tough abyss so that sqf-vm can emulate armas SQF proper

#

down to the very last bit

#

though ... i just throw errors when the user attempts such things ๐Ÿ˜„

tough abyss
#

Make sure you crash sqfvm on missing include as well, for authenticity

queen cargo
#

hah

#

what jokes you make

#

i will set your computer on fire instead

#

though ... i think about enhancing the output further by adding to each macro output a fancy line, file and col info ๐Ÿค”
nah ... not now

compact maple
#

hello, could someone help me with a createCtrl of a controlGroup ?
I dont get how this work.
Are the position of the controls within controlGroup relative to the controlGroup's position?

tough abyss
#

Yes

compact maple
#

I did

private _posX                     = 0.01 * safezoneW + safezoneX;
private _posY                     = 0.925 * safezoneH + safezoneY;
private _bgLength                 = 0.259;

_ctrlGroup = _display ctrlCreate ["RscControlsGroup_MarkersOnOff", 785000];
_ctrlGroup ctrlSetPosition [
    _posX,
    _posY,
    _bgLength * safezoneW,
    0.06 * safezoneH
];
_ctrlGroup ctrlCommit 0;

then

    _img = _display ctrlCreate ["RscPictureKeepAspect", MarkersOnOff_idc, (findDisplay 12 displayCtrl 785000)];
    _img ctrlSetText _icon;
    _img ctrlSetPosition [
        _posX,
        0.92 * safezoneH + safezoneY,
        _w,
        _h
    ];
    _img ctrlCommit 0;

but I dont see anything's coming. It only work if I put a lot of _btn, then I can see the 11 last created approx

#

god this is tilting me lmao

#

If I create the button without controlGroup, everything is at his place

mortal wigeon
#

@Jester you mean camera shakes? If so this is a bug with the engine

Not the turret view camera shake, but the R2T stream from a camera that is slaved to the turret's memory points. That shakes a lot more than the actual turret view does when the aircraft moves.

#

@tough abyss

tough abyss
#

Yes the r2t shake, it is a ๐Ÿ›

compact maple
#

my pc's going outta the window

tough abyss
#

Create control at 0,0 Inside ctrlGroup @compact maple

#

Yes the r2t shake, it is a ๐Ÿ›
yeah, are there any plans to fix that

#

do we know?

compact maple
#

@tough abyss uuuh ! Im going to try this, thank you so much

tough abyss
#

Afaik it was already attempted to no avail, so unless by some luck someone stumbles upon a solution I highly doubt it

compact maple
#

@tough abyss thank you ! its perfect ๐Ÿ˜ƒ

unborn ether
#

@still forum How is that possible that // character set (link for example) might fuck-up the whole environment without any exception if processed from a file? Just encountered that with that line in code:

private _link = _ctrl getVariable ['NFLink','https://yourweb.com'];

Since when / are escapes? Not \? Arma please?

#

Just to add, when I've manually preprocessed it to get the file text, I got some newline around that line.

#

Or did it try to count it as a fucking commented line? Why some strange newline then?

meager heart
#
0 spawn {
    disableSerialization;
    private _link = findDisplay 46 createDisplay "RscDisplayEmpty" ctrlCreate ["RscHTML", -1];
    _link ctrlSetBackgroundColor [0, 0, 0, 0.75];
    _link ctrlSetPosition [safeZoneX, safeZoneY, safeZoneW, safeZoneH];
    _link ctrlCommit 0;
    _link htmlLoad "http://www.bistudio.com/newsfeed/arma3_news.php?build=main&language=English";
};
```get text from that control ^ and `hint` it ๐Ÿ˜ƒ
#

afaik you can use anything there, even emojis (in strings)

unborn ether
#

@meager heart You can't ctrlText from HTML controls. It returns ""

fallow radish
#

Hi Lads, I am looking for a safe zone script which prevents enemy ai from entering?can you share a link plz ๐Ÿ˜„

fossil yew
#

You can place a trigger at that zone and whatever enters just teleport it to some other place. Or kill it.

#

Otherwise you'll need to update your waypoint planning procedure to take care about it

fallow radish
#

do u have any links for this trigger ?

#

like the idea on maybe destroying them

#

I also using this

#

0 = [] spawn {
while{true} do {
_justPlayers = (allPlayers - entities "HeadlessClient_F") select {alive _x};
{
if(_x distance (getMarkerPos "zone") < 350) then {_x allowDamage false} else {_x allowDamage true};
true
} forEach allUnits + vehicles;
sleep 1;
};
};

fossil yew
#

It's pretty easy, do you know how to use triggers in general? Setup the condition for side you want out of zone and I will give you a activation code when I get on PC

#

Hint, use thisList, iterate over and setDamage to 1

fallow radish
#

ta I will give it a go ๐Ÿ˜„

tough abyss
#

Have you tried using double quotes" @unborn ether

unborn ether
#

@tough abyss Nope, will try later.

earnest ore
#

Could really use some help with:
https://discordapp.com/channels/105462288051380224/105462984087728128/504459578130300939
Still utterly stumped as to why BIS_fnc_taskSetState isn't changing the state of my tasks with the way i've executed it.
I have the mission on github with relevant files at:
https://github.com/MIKUiqnw0/Quarantine-Yellow-Jack/blob/master/init/fn_initServer.sqf
https://github.com/MIKUiqnw0/Quarantine-Yellow-Jack/blob/master/server/fn_setSide.sqf
... In case I missed something stupid.

quasi rover
#

Is there a way to detect if an object is on the ground or under the sea?

violet gull
#

@quasi rover if (isTouchingGround _unit || underwater _unit) then { doTheStuffs };

quasi rover
#

Oh.. Thanks @violet gull, if an object is located on the roof or 3rd floor of house, is it also True value of isTouchingGround ?

violet gull
#

Yes

quasi rover
#

Thanks phronk, ๐Ÿ˜…

quasi rover
#

isTouchingGround is not reliable. For test, I put an ammo box on the ground but isTouchingGround player is true value , but the value of ammo box is false.

manic bane
#
fnc_vehiclecheck = {
    _currentskin = getObjectTextures vehicle player;
    if (player isEqualTo driver vehicle player) then {
        if (toggleskin isEqualTo 0) then {_this call fnc_skinchange;}; //fnc_skinchange makes 'toggleskin' to 1 when it finished.
        if (toggleskin isEqualTo 1) then {_this call fnc_skinchangeback;}; //fnc_skinchange makes 'toggleskin' to 0 when it finished.
    };
    if !(player isEqualTo driver vehicle player) then {
        hint "Only supports \nAFV-4 Gorgon \nAll variants of Strider \nTo change skin, you must be on driver seat.";
        sleep 3;
        hint "";
    };
};```
#

I thought It is fine but when I run it, it excute both fnc_skinchange and fnc_skinchangeback at same time.

tough abyss
#

Why wouldnโ€™t it? You check if skin was changed right after you changed it, obviously it will be true and it will change back

onyx sand
#

Logically that's what your code is doing isn't it? It evaluates the first if as true because you've defaulted toggleskin to 0, but once that's completed it sets it to 1. Then the next step is to check for toggleskin =1, which it is as a result of the previous step.

#

I think an else would resolve that rather than an additional if but I'm a nub so I'm probably wrong.

manic bane
#

thank for explaining! ๐Ÿคฆ

#
fnc_vehiclecheck = {
    _currentskin = getObjectTextures vehicle player;
    if (player isEqualTo driver vehicle player) then {
        if (toggleskin isEqualTo 0) exitwith {_this call fnc_skinchange;};
        if (toggleskin isEqualTo 1) exitwith {_this call fnc_skinchangeback;};
    };
    if !(player isEqualTo driver vehicle player) then {
        hint "Only supports \nAFV-4 Gorgon \nAll variants of Strider \nTo change skin, you must be on driver seat.";
        sleep 3;
        hint "";
    };
};```
I used exitwith and it actually works!
onyx sand
#

Nice!

manic bane
#

I was fool.. didn't think about flow...

still forum
#

@unborn ether what do you mean by "whole environment". I never heard of that issue
@quasi rover you could use getPos and check it's height value. Is it enough for you to check that an object is less than a meter above ground? then that would work

tropic orbit
#

can someone please trell me where i can get / download a invade and annex script please

covert willow
#

Guys is it possible to simulate an unconsious player in a heli?

Because when a player is unconsious the heli will still hover/not instantly crash into the ground

finite jackal
austere granite
#

that's probably a bad idea

#

And wouldn't change it. there's this magical thing in arma where if someone dies then throttle goes to -9001, whereas if you're not doing anything it'll just keep throttle on normal

unborn ether
#

@covert willow setUnconscious and disable heli engine with engineOn?

austere granite
#

Probably your best bet would be replacing the player by something like a dead AI unit and using switchCamera or whatever the commands are called

covert willow
#

Nah what i mean is that when a player dies, the player will die but the heli will act as if the player is only unconsious allowing a copilot, passengers to either take control or bail out without being in a 90 degree incline

tough abyss
#

setUnconscious, the heli carries on flying but you cannot control it

covert willow
#

but the player died, so you're suggesting to revive him? If i do that the copilot won't be able to switch places with him (IIRC)

tough abyss
#

No, delay killing him

#

SetUnconcious for 10 seconds if no one takes over kill him anyway

austere granite
#

Anyone happen to have a premade allMissionObjects filter that would give me all objects that arent engine bullshit? It's for object placement mod and pretty much wanna get rid of the ambient stuff, modules, players, etc etc etc

torn juniper
#

in a MP environment which would be less taxing, a trigger in an area to detect a player or a loop with a delay of like 10~15 seconds each time to detect a player entering. I don't need anything instant but in a more reasonable time

#

I was just unsure if a trigger was basically like a continuous instant loop checking for the conditions, if so then I would rather do a scripted loop

ruby breach
#

Triggers check every 0.5 seconds. If you want less often than that, use a scripted loop with inAreaArray

high marsh
#

Well, triggers are engine based. I don't think it's any more performant in the longrun

torn juniper
#

so I don't want it to check that often, I could make something that just checks an area once every 15-20 seconds at the fastest and be good enough for me

high marsh
#

inAreaArray loop then

#

suspend 15, 20 seconds. Done.

torn juniper
#

thanks

hollow thistle
#

To anyone interested about my last question, I was able to partially resolve my problem with "camcurator" camera type by disabling camera movement at the moment that user is scrolling.
https://github.com/KillahPotatoes/KP-Liberation/commit/22007221a0c05f202f1ddc0982bacd99c4898a07

Only issue is the small jitter that happens when user moves camera with keys and scrolls over listbox at the same time. It is still a lot better than disabling whole camera movement when cursor is just hovering over listbox.
https://www.youtube.com/watch?v=pe0NriWDTBE

ember verge
#

Hello so i heared something about the Heartbeat function from the anti cheat infiSTAR i would like to ask for some help

still forum
ember verge
#

I allready asked them they didnt help me that much out

#

they told me to ask here

hollow thistle
#

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

still forum
#

Well if they don't know their own stuff. Why should we? ๐Ÿ˜„

ember verge
#

i mean they know it but they dont tell it ๐Ÿ˜„

tender viper
#

Similar to the forums, is there a channel here to seek full scripting help, like paid? I'm much more of an artist, and not even my config use is very good.

still forum
tender viper
#

thanks! I just have everything so compacted... I'll keep look for specifically that

tough abyss
#

Go with trigger @torn juniper you can make it local and attachvehicle player so it only monitors local player, if you donโ€™t want 0.5 sec you can add timeout and make it check every 5 min if you want. Triggers are versatile

ruby breach
#

That isn't how the timeout attribute for triggers works. At all Timeout - The trigger's conditions must be satisfied for the specified duration for the trigger to be activated.

austere granite
#

My brain doessn't fucking work today. How do I into making a script that allows me to select the next/previous element in a treeview ctrl, fully recursive

tough abyss
#

That isn't how the timeout attribute for triggers works Eh? I never said anything about how it works ๐Ÿค” All I said you could use it to make check less often. It is not straight forward but there are a few ways how to implement it. But Checking for attached player is cheap, no reason to slow it down

chrome mason
#

So just a quick one... I need to give some text some colour and an image in a scroll wheel action, but, it is part of a setTriggerStatements script >.< So too many quote marks to work i'm sure...

#
_trigger setTriggerStatements
[
    "this",
    "thisTrigger setVariable ['_actionVar', (objectParent player) addAction ['Name of action', 'file.sqf',objectParent player,1.5,false,true,'','Arguments']];",
    "(objectParent player) removeAction (thisTrigger getVariable ['_actionVar', -1]);"
];
#

Basically structured text in the scroll wheel for the above action ๐Ÿ˜›

spark dew
#

Based on the second arma example here: https://community.bistudio.com/wiki/String#Description , You can have doublequoted strings inside doublequoted strings by, confusingly enough, doubling the doublequotes. So from my understanding, this should work:

"<blah> setVariable [<blah>, <blah> addAction ["" Words <img image='image.paa'> More words <t color='#ff0000'>Red words</t> "", <other args...> ]];"

If not that, then you can try using format to build the string piece by piece:

    "$1 $2 $3",
    [ 
      "thisTrigger setVariable ['_actionVar', (objectParent player) addAction [",  
      'Words <img image='image.paa'> More words <t color='#ff0000'>Red words</t>',
      '"file.sqf',objectParent player,1.5,false,true,'','Arguments']];"
   ]
];```
chrome mason
#

I will have to test this, thank you.

spark dew
#

No problem! Let me know how testing goes, I'm still fairly new to this stuff too and only hoping I have the right understanding here.

cedar heart
#

how to make AI get exact position ignoring all collision? like i did
doMove (getMarkerPos "pos");
but around this mark locate a truck, and AI keeping it distance. i need what it get to very close to truck
sorry if it wrong channel

halcyon crypt
#

Will arrays passed through call/spawn params always be a copy or will they be references? Can't remember... ๐Ÿค”

hollow thistle
#

references.

halcyon crypt
#

thanks

tough abyss
#

arrays are always references in that context

still forum
#

Everything is passed by reference. Always

#

Just some commands create a copy and return that to you

#

Don't think there is a good list of commands that copy arrays?

tough abyss
#

Thanks god for that

dim terrace
halcyon crypt
#

I just couldn't remember whether references survived between function calls but thanks anyway ๐Ÿ˜ƒ

queen cargo
#

why should they not @halcyon crypt ?

halcyon crypt
#

I don't know ^^

#

C style languages would make a copy

queen cargo
#

nope

#

only C/C++ would do so

#

and even them, only when you do not use arrays ๐Ÿคท

#

java and co. all arrays are implemented via reference

halcyon crypt
#

well I guess that makes sense since an array is basically a pointer on the lowest level

minor lance
#

Hello!

#

is there a way to replace inventory opened actionยฟ?

#

I have an override in the eventhandler and I would like to replace default one when not able to open the inventory as the animation is playing until playyer moves

manic bane
#

With Arma 3 Communication Menu, can I put submenu inside of submenu?

radiant egret
#

Heyo, is the "netId" from a object which placed in the editor the same on the server and is it the same after a server restart ?
Maybe someone knows it, ty.

tough abyss
#

No array is not a pointer

#

A pointer to array element is a pointer

#

netID is not guaranteed to be the same after server restart, it is created from id of the PC on which it is created and global object id. It doesnโ€™t change after creation even if locality of the object changes

radiant egret
#

ty for the info

manic bane
#
{
    class myArtillery
    {
        text = "Artillery Strike"; // Text displayed in the menu and in a notification
        submenu = ""; // Submenu opened upon activation (expression is ignored when submenu is not empty.)
        expression = "player setVariable ['BIS_SUPP_request', ['Artillery', _pos]];"; // Code executed upon activation
        icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\artillery_ca.paa"; // Icon displayed permanently next to the command menu
        cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa"; // Custom cursor displayed when the item is selected
        enable = "1"; // Simple expression condition for enabling the item
        removeAfterExpressionCall = 1; // 1 to remove the item after calling
    };
};```
#

How can I use 'enable' option? I just treated it like condition in trigger but it didn't work.

meager heart
#

you mean how add it ? ๐Ÿค”

#

afaik that enable expression could be: bool 1 or 0 for yes or no, or argument string like "CursorOnGround/CursorOnEmptyVehicle"...

coral monolith
#

Anycoders/scripters looking to help out a community give e a pm please...

runic seal
#

How would one stream audio from a website in sqf? for example, an external mp3 on youtube or live radio?

still forum
#

you don't

#

Simple.

#

you can write yourself a extension and make that do it

tough abyss
unborn ether
#

Quick question, will getting an HWID with extension break EULA or something and will battleye ever accept such extension? Just willing to make a tool to ban people from server by HWID, which is pretty common action to other games. Thanks.

still forum
#

no it won't break eula. Dunno if they would accept it but I don't see why not

tough abyss
#

So you will tell people you have to run my client extension so I can perm ban you by HWID?

#

And the only time you will know they are banned if they run your extension again?

#

If other games are using HWID check then it is probably built in the game and not a mod, no?

unborn ether
#

I can force them to use such extension with just calling it. If nothing is there, sorry. Also you can provide it with your mod by default. Was just curious about that.

#

Its not like much of script kiddos around, but would be a nice addition to SteamID bans.

queen cargo
#

Uhm... That will not hinder anybody dude

#

Just replacing your DLL with some other will be enough to get that "fixed"

still forum
#

you'd need to get that other one BE whitelisted tho

knotty arrow
#

Anyone know if Ia without simulation and with a BIS_fnc_ambientAnim consume resources like a normal ia?

unborn ether
#

@queen cargo Yep, whitelisting some DLL to replace the previous one.

still forum
#

Or use a already whitelisted DLL like the TFAR one that just pipes messages outside of Arma into completely battleye unprotected area and pipe the answer back

#

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

#

Never actually thought of that. But you can indeed use the TFAR dll to proxy any other extension. And it's battleye whitelisted

unborn ether
#

script kiddos ๐Ÿ‘€

queen cargo
#

pff ...

earnest ore
#

In b4 TFAR blacklisted due to nasty mods.

waxen tide
#

I feel like people actually cheating in ArmA are quite rare these days. Maybe i'm just not hanging out with enough kiddos on life servers tho.

queen cargo
#

it is more the bugged life missions rather then actual cheaters

waxen tide
#

missions? there is multiple now? ARE THEY GROWING IN NUMBERS? ๐Ÿ˜ฑ

still forum
#

I'm cheating in practically every mission.. But being a dev and serveradmin.. people consider it normal.

queen cargo
#

@waxen tide tbh ... i would hope so

#

maybe at some point somebody could then create one that actually works without restarts ๐Ÿคฆ

waxen tide
#

hopefully at some point humanity reaches a more enlightend state of existance and we'll have the life people savely tugged away in re-education camps.

earnest ore
#

Or be permanently plugged into VR.

waxen tide
#

@queen cargo how much of the restarts is the mission scripts faults and how much is the arma engine's fault?

queen cargo
#

pretty much all of em

still forum
#

Run a Arma vanilla mission. And see how long it can run

#

It's gonna be days

queen cargo
#

longest mission i had be running was 40 days

still forum
#

Now look at life servers restarting every 4 hours

waxen tide
#

i never quite got the restart part. i mean the mission is persistent. what does the restart actually do, if everything is saved anyways

queen cargo
#

the problem is not the actual restart
the problem is that it is needed at all for performance reasons

still forum
#

memory leaks and stuff. If you always pushBack and never deleteAt

queen cargo
#

thought about writing a life mission for once just to get that problem out of the way forever

still forum
#

and constantly spawn while true loops

waxen tide
#

@queen cargo well ofc

queen cargo
#

and releasing it with GPL license

#

would have been funny to sue those big life servers for their money :3

waxen tide
#

๐Ÿค”

#

shouldn't it be quite easy to find these memory leaks

still forum
#

nah. Memory leaks are never easy

#

You can write tons of tooling to make it easier tho.

#

But you have to go to Intercept levels to really make something useful

#

A level most life servers can't mentally cope with

earnest ore
#

@queen cargo Just make a Life based game and cash in on that instead.

queen cargo
#

pff ... fairly impossible
would require literally arma just different

earnest ore
#

Didn't stop DayZ.

queen cargo
#

they use arma though

#

more or less ...

#

the same engine etc.

earnest ore
#

๐Ÿค”

waxen tide
#

wonders how to avoid memory leaks

unborn ether
#

Most of servers fall to 4 hours restarts not because lots of spawns with whiles (mainly) but JIP-related trash.

queen cargo
#

same game @unborn ether

unborn ether
#

You can kill vanilla mission server with just going around and destroying building one-by-one it will probably will go sloppy soon enough.

queen cargo
#

i call bullshit on that one

unborn ether
#

Well go try setting damage to every building in some Altis city for example.

queen cargo
#

should i do it on my personal server? running low-end hw where i had my insurgency mission running for 40 days with no performance loss in that time?

unborn ether
#

๐Ÿ˜„ wasn't talking about "good hardware" but how bad this gonna be for server uptime along with some other actions obviously happening in-game.

#

Lets count every random bush being run over.

queen cargo
#

the engine is fine
so perfectly fine actually as it never has been before
if your mission is shit, fix it

still forum
#

Well.. Just a couple months ago the engine was broke AF

#

Just killing AI's made the client go to shit

unborn ether
#

Oh yeah, fix me some JIP data from aircraft explosive that was set off in the middle of city, +-50 meters range damage values changes to everything on the way.

earnest ore
#

-nologs ๐Ÿ‘€

#

There are no bugs in this domain.

unborn ether
#

see no evil phrase is just another definition of -nologs

tough abyss
#

Hah! Larrow is backwards for Worral, and his name is Bruce ๐Ÿ˜‰

glass zinc
#

So does adding datalink to every player, vech and AI on a map decrease performance? or is the jury still out on that? we run one of the most AI heavy servers in A3 and its important to know if this is dragging down performance in long games.

random estuary
#

@tough abyss createVehicle and deleteVehicle cause a lot of issues, with my KoTH server, despite getting to 80/80 most of the time, it only requires a restart every 24 hours. Other mods which use those cmds for loot etc need rebooting after 4 hours. When using deleteVehicle, a shadow copy of the vehicle is found at 0,0,0
@earnest ore By using -noLogs it actually saves some server cpu cycles from not having to log all that ๐Ÿ˜„

inner swallow
#

@glass zinc haven't heard of anything like that so far. But it should be easy enough to test, I would suppose.

random estuary
#

create some vehicles, then delete them, then run deleteVehicle at 0,0,0 using nearObjects with a counter

#

I run some code that does this every 5 minutes and on a full server it averages around 150 items deleted from there each time it's ran, which would tie in with the amount of LootWeaponHolder and groundWeaponHolder's that are deleted in that period

#

Even with a cleanup like that, servers that use cv/dv for high amounts of spawning such as loot, will need restarting regularly because the JIPqueue still gets flooded with the messages from creation/deletion, but removing the ghosts at 0,0,0 certainly improves performance during a session

#

Correct, it only seems to effect game modes that use loot systems such as Wasteland etc due to the high usage, but it's still worthwhile running some cleanup code at 0,0,0, as it won't be using heavy lifting to delete a few items

inner swallow
#

isn't it HQ that spawns at 0,0,0?

#

no, basically each side gets an HQ object

#

that's used for the datalink stuff

#

don't know/remember that much. But iirc it's automatically created when units are spawned (maybe just from editor?)

#

and if you place some units down, start the mission as zeus and add all units to the curator object list, you'll see some HQ entities at 0,0,0

#

one per side

leaden venture
#

Does anyone have a method spawn virtual garage on a particular vehicle?

#

For example, I would like to create a function which would allow for customization of an already existing vehicle

still forum
#

@random estuary Sounds like that's the same "object not found" bug as with deleting backpacks. Might be worth getting BI to push that, that might be one of the major last "egredation over time" things we have.

random estuary
#

Yes ^^ backpacks are often found at 0,0,0

still forum
#

BI said they fixed the "lags caused by that" I guess they just commented out the logging code ๐Ÿ˜„

vague hull
#

@still forum does pushBack itself really create mem leaks (even if the array goes out of scope/ clean up)?
Or is that more a about arrays getting bigger and bigger over time?

still forum
#

no

#

but it makes an array bigger

#

and people do that for hours. Creating hundreds of variables and arrays with thousands of elements, and then wonder about memory usage and call memory leaks on the Arma engine. Even though it's their fault

vague hull
#

alright, thought you are referring to bugs or something

what you say is true ofc.. just bad script design so to speak

still forum
#

Tons of things in the engine are refcounted. If you have a reference somewhere, it won't be deleted

vague hull
#

in that case its the users/script creators fault

creating ghosts at [0,0,0] however isn't

manic bane
#

Now I'm using exitWith to reduce if condition check. Is it fine?

vague hull
#

use findIf

still forum
#

I don't know what you are referring to. But I'd say yes. Exiting early is always better than not exiting early

manic bane
#

Then I'm doing fine now.

still forum
#

We can't tell without seeing your script. You might be doing total crap now ๐Ÿ˜„

manic bane
#

๐Ÿ˜ƒ

glass zinc
#

deleteVehicle at 0,0,0 using nearObjects with a counter what would that script look like... im not a scripter

#

want to run that on my live server thru dev console right now

#

if i can

still forum
#

[0,0,0] nearObjects 50

glass zinc
#

[B Base:1 REMOTE,O Base:1 REMOTE,R Base:1 REMOTE,L Alpha 1-1:1 REMOTE,296c44cb580# 1377056: helper.p3d]

#

is what i get back local

#

[B Base:1,L Modules:1,O Base:1,R Base:1] is what i get back server

#

i may have to learn how to get the HC info though... as most of my AI are on the HC

#

anyone know what that means?

ember verge
#

Hi im searching for a good anti cheat not infiSTAR cause that doesnt stop some of the cheats

still forum
#

I heard Battleye is quite good

#

@glass zinc I can tell you that you can ignore these

ember verge
#

dude my server is getting blowed up bypassing Battleye isnt that big a deal

#

my server gets blowed up all 2 3 weeks

cold pebble
#

Using filters? ๐Ÿค”

ember verge
#

we have filters

#

we have pretty good filters somebody with an pbo cant join the server or with an hider

chrome mason
#

@ember verge infiSTAR will stop most, but not all. It is the best aftermarket anithack there is. Use it.

#

All antihacks will let through cheaters, you can't expect it to be 100% effective. That statistic would be silly. Considering the best Antivirus in the world doesn't stop all virus attacks.

ember verge
#

We have infiSTAR too :/ i heard it has a heartbeat function is there a way to configure it ?

chrome mason
#

Which version are you running?

#

infistar A3?

#

Or Exile?

ember verge
#

inistar A3 for

#

altis life

chrome mason
#

I can tell you that i know infiSTAR is updating his anit hack for the A3 version. Are you running the latest version of it?

ember verge
#

yes we do

chrome mason
#

Well then I would suggest a trip into his discord and ask the staff about the problems you are having... they are very friendly and will be able to help.

ember verge
#

allright thank you

chrome mason
#

No problem, you can say i advised you to visit, they may help you out more ๐Ÿ˜„

ember verge
#

oki doki

cold pebble
#

Can also try altis life discord ๐Ÿค”

chrome mason
#

^ That won't help. Those people are mean to people asking questions and they can't help with anti-hack issues.

cold pebble
#

Where have you got that info from? ๐Ÿค”

narrow musk
#

A3 heartbeat function is currently in the works, just respond to ur ticket with the details an i'll look into it.

#

Oh and if you are running altis life, rest in peace terrible framework it's built for script kiddies.

still forum
#

@cold pebble there is a Life discord? Can you send that to dwarden to get it into #channel_invites_list ?
Will be easier to redirect people there rather than forum

#

from script kiddies for script kiddies ๐Ÿ˜„

narrow musk
#

if u wanna save n del

#

o

#

wait

#

lol

#

Thats it

still forum
#

Thanks. Forwarded it to master Dwarden

narrow musk
glass zinc
tough abyss
#

I can never understand what this UNIT person says

naive fractal
#

Is there a command to end a mission without going via end screen? Like a hard end? I'm working on a custom outro, and I would prefer if it didn't do the mission end screen after the credits.

still forum
#

Why? @glass zinc I dunno what that is

manic bane
#

Are local variables removed or set to nil if script finished?

still forum
#

When they go out of scope. They go out of scope and are gone

manic bane
#

So, they don't stay on memory when they go out of scope, right?

still forum
#

not necessarily

#

they get deleted when no one has a reference to them anymore

#

So if someone is still using that variable. It won't delete it

#

Don't worry about it

glass zinc
#

@still forum its the CTI community discord

manic bane
#

but global variables stay forever, don't they?

still forum
#

no

#

exact same thing. They stay as long as someone has a reference to it

manic bane
#

Then I shouldn't worry too much! Thanks! ๐Ÿ˜ƒ

astral tendon
#
test = 0;
{_x = nil} forEach [test];
test; //still retuns 0

What is wrong?

still forum
#

your forEach doesn't make sense

#

you are setting the _x variable

#

Not anything in the array

high marsh
#

apply?

still forum
#

show us the real code that you are trying to ask a question about and not this pile of useless nonsense

astral tendon
#

I just want to nil multiple variables

still forum
#

You are overcomplicating it too much

#

Just set your variables to nil and forget about the forEach

astral tendon
#

what if I had about 50 variables?

still forum
#

you can use setVariable in a loop

#

but if you have 50 variables that you need to nil, you might wanna think about your logic again

#

maybe you should just have one variable as an array

astral tendon
#

one variable as an array?

cold pebble
#
blah setVariable ["var",[0,1,2,3],true];
high marsh
#

Ok, so I am a little curious as to why something is happening here:

#

i have two scripts in init that have suspension, and only the first one in init gets going. The other one decides it just isn't going to run the loop at all

#

why is this happening?

still forum
#

how do you call the two scripts

high marsh
#
call mdm_fnc_zoneRestriction;
call mdm_fnc_revealPlayers;
still forum
#

Well the second won't start till the first is done

#

what is in init exactly?

high marsh
#

initServer.sqf

#

I tried waiting until the first script was running and then call t he other one. No dice.

still forum
#

what?

#

You are already doing that

high marsh
#
while{true} do
{
  {
    if !(_x inArea "zone") then
    {
      [
         format["%1 You have left the play area!",name _x]
      ] remoteExec["hint",_x];
      sleep 5;
      if !(_x inArea "zone") then
      {
        1 remoteExec["setDamage",_x];
      };
    };
  } forEach allPlayers;
  sleep 3;
};

It's nasty, but that's whats in zoneRestriction.

private _interval = "mdm_revealInterval" call BIS_fnc_getParamValue;
while{true} do
{
  ["Revealing Random player!"] remoteExec["systemChat",0];
  [selectRandom allPlayers] call mdm_fnc_reveal;
  sleep _interval;
};

revealPlayers

still forum
#

Well...

#

Read what I said.

#

Don't really like repeating myself if I already gave you the answer 5 minutes ago

high marsh
#

No need, I just don't understand. As the second script never runs, even after completing first.

still forum
#

"Well the second won't start till the first is done"

#

What is so hard to understand on that statement

#

the first is never done because it's a while true

#

it will never end

high marsh
#

Alright.

still forum
#

you know how call works right?
In relation to how spawn works?

high marsh
#

Yep.

still forum
#

So your problem is solved now?

high marsh
#

Yep.

#

it would seem I didn't make the changes t hat I did locally,
and I did change it to

0 spawn mdm_fnc_zoneRestriction;
0 spawn mdm_fnc_revealPlayers;

Yesterday, woops.

earnest ore
#

Man, I wish we had the bells and whistles of step through debugging.

high marsh
#

?

knotty arrow
#

Anyone know if Ia without simulation and with a BIS_fnc_ambientAnim consume resources like a normal ia?

still forum
#

@earnest ore we do

earnest ore
#

๐Ÿ‘€

#

Are you telling me that i've been scripting like a caveman all this time?

still forum
#

no

#

Well. Yes.

#

The backend works fine. There is no frontend currently. I asked Skace Kamen (the guy that made the VSCode Linter) to help with making a VSCode debugger. But he doesn't have enough time. And I don't know how to JS VSCode extensions stuff

earnest ore
#

Hell, that'd be sweet - but this works just as well.

#

Anything to get me to stop asking stupid questions on this channel and spend less on coffee.

#

... Who am I kidding.

queen cargo
#

uhm ... the "frontend" of arma.studio still works theoretically @still forum
just that it is not compatible with the current debugger ๐Ÿคท

#

and soonโ„ข i will add sqf-vm to it

manic bane
#

Does BIS_fnc_initVehicle has problem?
I tested it with AFV-4 Gorgon and it worked perfectly. So I just tested it with IFV-6c Panther, IFV-6a Cheetah, CRV-6e Bobcat, etc. But it doesn't work well.

#

Ex) With AFV-4 Gorgon, executing
[vehicle player,nil,["showCamonetHull",1],nil] call BIS_fnc_initVehicle;
and
[vehicle player,nil,["showSLATHull",1],nil] call BIS_fnc_initVehicle;
makes AFV-4 with camouflage net and slat armor at same time.
But with IFV-6a Cheetah, executing
[vehicle player,nil,["showCamonetHull",1],nil] call BIS_fnc_initVehicle;
makes IFV-6a with hull camouflage net. But if I excute
[vehicle player,nil,["showCamonetTurret",1],nil] call BIS_fnc_initVehicle;
then hull camoflage net is disabled and only turret camouflage net applied for IFV-6a.
IFV-6c, CRV-6e Bobcat, M2 Slammer (UP) are also have same problem.
I cannot apply two option separately.

earnest ore
#

It accepts an array of animations in the pattern of ["animation", int, ...], try stringing them together.

manic bane
#

@earnest ore Thanks for advice. But I'm still confusing because it works with AFV-4!

quasi rover
#
//Tanoa Map
_locations = nearestLocations [(getmarkerpos "center"),["NameCityCapital","NameCity","NameVillage","NameLocal"], _mapsize*1.4]; 
...
profileNamespace setVariable ["SAVE_TOTAL_LOCATION", _locations];
saveProfileNamespace;

The return value of locations does not have setVariable and getVariable?
The getValue get like this after restart arma3: [No location,No location,No location,....,No location] .

tough abyss
#

You cannot save control or object in profileNamespace and expect it exist after mission restart. Same goes for location it seems

quasi rover
#

how to?

waxen tide
#

is there an easy way to shorten an array to a fixed number of elements?

tough abyss
#

resize @waxen tide

waxen tide
#

thx

sweet ridge
#

trying to use the unitCapture and unitPlay scripts on a turret object. It doesn't seem to pick rotational movement (up down left right) and only picks up _movementdata and _firingdata any way to get it to pick up rotational movement?

#

i currently have it set to vehicle class casue i couldnt find any turret reference

waxen tide
still forum
#

trying to find points to place roadblocks at in a radius

#

without seeing the code we can't really help

waxen tide
#

it's not like i haven't asked here like 3 times showing all the code ๐Ÿ˜›

#

nah way better

#

any point of the map, if you drive to the objective, you will encounter a roadblock.

#

i do pathfinding from a circle around the AO to the center

#

then de-duplicate

#

there is occasionally 2 roadblocks on an intersection still

#

i would know how to get rid of those, but the scripts are way too intense already

unborn ether
#

3:52:26 Overflow what the heck is that, first time I see that on .rpt

waxen tide
#

is there a simple way to add all objects in a mission to the list of editable objects for zeus ?

#

i've looked for "allobjects" ... my biwiki fu is weak today

#

thx

#

either allmissionobjects doesn't include waypoints, or it's a timing issue? editor-placed waypoint doesn't show up.

tame lion
#

so is there a way to get the entire contents of a container including the contents of containers within it? ex: a supply box that has a backpack that is full of items?

meager heart
fringe yoke
#

Anyone know why allUnits is giving me bis_o4_11 and similiar

#

same with units

manic bane
#

Executing [vehicle player] call BIS_fnc_getVehicleCustomization; on Pactific and CTRG Prowler gives me error. What should I do? Even executing on debug console gives me error. Message says 'Error Zero Divisor' on line 32 of fn_getVehicleCustomization.sqf in A3\function_f_mark\Vehicles.

meager heart
#

what you're trying to get there ? @manic bane

cyan pewter
#

Can i use knowsAbout as a variable? I want to decrease it, so reveal won't do

meager heart
#

you can try forgetTarget and after that reveal with "desired value" ๐Ÿค”

crystal meadow
#

Hey guys is it possible to find a Lingor (Exile) map with all the basic stuff installed trader, spwan zones just a question?

manic bane
#

@meager heart It gives me array that contains vehicle customization data. And I use it for change vehicle customization with BIS_fnc_initVehicle.

meager heart
#

so you need textures ?

manic bane
#

nope I need it for component like slat armor

#

[["Indep_01",1],["showBags",0,"showBags2",0,"showCamonetHull",0,"showCamonetTurret",0,"showTools",0,"showSLATHull",0,"showSLATTurret",0]] This is result from Mora.

meager heart
#

animation sources...

manic bane
#

And some how it gives error with Pactific NATO and CTRG Prowler.

meager heart
#
//--- Animation sources
copyToClipboard str ("true" configClasses (configFile >> "CfgVehicles" >> typeOf cursorObject >> "AnimationSources") apply {configName _x});
//--- Animation names
copyToClipboard str (animationNames cursorObject); 
//--- Materials
copyToClipboard str (getObjectMaterials cursorObject); 
//--- Textures
copyToClipboard str (getObjectTextures cursorObject); 
```place your vehicle in editor and paste one of this into debug console ^ 
and for the animations you can just use `animateSource` or `animate` without BIS_fnc_initVehicle @manic bane
manic bane
#

wow I didn't know about any alternative ways. Thank you very much!

tough abyss
#

@fringe yoke you are probably using some BIS module or something, this is just vehicleVarName you see set by some BIS functionality

cyan pewter
#

So I'm thinking something like
soldier1knowledge = soldier1 knowsAbout player; soldier1 forgetTarget player; soldier1 reveal [player, soldier1knowledge - 1.5]

#

Not sure how to format equations

tough abyss
#

You never check what was the previous knowledge but subtract a very specific amount. While syntactically it could be correct, logically it is elusive

winter rose
#

0 max (knowledge - 1.5)
PS: private _soldierKnowledge = (โ€ฆ)

still forum
#

@fringe yoke because that's the name of these units.

ember verge
#

So i gotta problem there is a bug in my altis life 5.0 server they open shop with the escape button at the same time then they set the clothes on them and after that they disconnect from the server after doing that they join back in and they have the clothes and armor for free

#

how can i fix this ?

still forum
tough abyss
#

Life is pain (tm)

proven crystal
#

can i use addVehicle with multiple vehicles for one group?

#

nevermind says that on the wiki

waxen tide
#

why doesn't biki show the code of BIS_fnc's right away ?

cold pebble
#

Because its easy enough to see them in-game?

high marsh
#

Plus they've got their own section on the wiki?

waxen tide
#

i can search biki with search function. ingame viewer is way too clunky.

#

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

#

in my experience i first look for a BIS_fnc, then read wiki article, then look at the code. half of the time end up not using it after looking at the code.

#

don't they like automatically fetch the commentary header of each fnc and copy them into wiki?

#

i would just extend it to the code aswell. maybe in an auto-hidden spoiler you can click on to see it. that would be nice.

still forum
#

it's a wiki.

#

That's the reason

waxen tide
#

Am i being weird?

still forum
#

Go to wikipedia and look at the page for Microsoft Office. Do you get source code?

#

Also it violates the EULA to share game-files publicly

waxen tide
#

well i think that comparison is a bit of a stretch

still forum
#

Quite often asked for BI to push all the BIS functions to their github. Would make it easy to look at them. And easy to fix the stupid bullsh*t in their crap piles of garbage that they tend to call functions

waxen tide
#

is it against EULA to unpack bohemia PBOs and then to look at their BIS fnc's ?

still forum
#

no

#

Well.. That might be considered reverse engineering

#

but why would you unpack their pbo's anyway? Just use the in-game function viewer that they gave to us to do exactly that

waxen tide
#

convenience

#

read: search function

austere granite
#

Search fuck that (that being using ingame viewer)

#

I unpacked functions and put them in a separate folder so i can easiliy search through them ezpz

#

wanna do ezpz fuzzy finder for function name, so thats the waay to do it imo

still forum
#

I just launch my DokanPbo P-drive and then use windows search

waxen tide
#

neat tool

shadow sapphire
#

If I'm using multiple headless clients, how do I specify a single one on which to run a script?

Like how prefacing a script with if (!hasInterface && !isDedicated) exitWith {}; will ensure it's only executed on headless clients, is there a version that picks a specific one, like: If (!HC1) exitwith {}; where HC1 is a named headless client.

unborn ether
#

@shadow sapphire You need to have a scripted gateway for that (basically a function). Grab all headless clients you have with entities and sort them there. If they are at the same script basis you can just simply sort them by order of how they are appearing in array. If not, well you might want to serialize them inside their own inits.

#

Then you can direct your remoteExec* to a specific HC, which is busy with that you defined them to be busy with.

#

How to do that if you ask, just return the HC object from a function:

_data remoteExec ['DT_fnc_saveMeToDB',0 call DT_fnc_HC]; // HC by order 0 is writing to my DB (DT_fnc_HC returns object)
#

Etc.

shadow sapphire
#

Very, very cool. Could an example like that one be found like it somewhere online where I could attempt to understand it further?

waxen tide
#
class rhs_saf
{
    class building_extensions
    {
        class Land_i_Barracks_V1_F
        {
            #include "rhs_saf\building_extensions\Land_i_Barracks_V1_F.sqe"
        };
    };
};

rhs_saf and building_extensions are redundant, is there a way to de-duplicate them? (have the classname of the parent class automatically be the file path?)

shadow sapphire
#

Thanks a ton, @unborn ether, will try to report back when I've got it working.

unborn ether
#

@still forum Intersting if is there any way to set traps on executed commands besides what battleye is capable to fixate?

gilded garden
#

Is there a way to detect if the AFM is active?

earnest ore
#

Can't seem to find a way to get a list of weapon classnames where the weapon has no preset attachments.
Closest thing I found was the baseWeapon variable in their configs, but it looked unreliable when others didn't have it despite being a valid clean weapon (eg. srifle_DMR_04_F / srifle_DMR_04_MRCO_F).

tough abyss
grizzled rain
#

Hey guys, I have a question whenever I go into the arsenal via scroll wheel using the arsenal script "["AmmoboxInit",[this,true]] spawn BIS_fnc_arsenal;" whenever I try to load into it. it does a forever screen trying to load arsenal.

#

I dunno where to ask for this.

gilded garden
#

@tough abyss Thanks!

fringe yoke
#

Is it possible to add an image to a mission in progress? If I have an extension that generates or downloads an image, can I get it into the image on a billboard for example?

tough abyss
#

Billboard maybe not but into html control maybe yes

gilded garden
#

Can someone give me a hand please. I am trying to get the state of an RTD feature so i can use it as a condition in a script. I want to check the state of the AFM wheel brakes. https://community.bistudio.com/wiki/setBrakesRTD this lets me turn the brakes on and off. But i'm struggling with the syntax to interrogate the status properly. I need something to return a "true" or "false" value. Can anyone help me out?

waxen tide
#

What would be the smartest way to pick the shortest subarray from an array?

#

the subarray with the least amount of elements

#
_all_arrays = [[1,2,3],[1,2,3,4,5],[1,2,3,4,5,6,7]];
_wanted_array = [1,2,3];
#

๐Ÿค”

#

oh. yes. thankyou

#

i-i'm not that dim witted it's just 4am.

waxen tide
#

significantly shortened the execution time of the roadblock stuff. I simply do multiple searches for startroads, and pick the least amount of startroads found. simply cuts down a lot on the path search which is by far the most intense task.

#

(also has the neat side effect on cutting down on redundant roadblocks at intersections)

#

well to do pathfinding between two roads, you need to start somewhere

#

so i just search roads in a circle around the center of the area i want to fill with roadblocks

#

green objective markers are "startroads"

tough abyss
waxen tide
gilded garden
#

@tough abyss Thanks but the rotorbrake doesn't help. Its specifically the wheel brake i was after. I've been talking to Uro about it. He couldnt see a way either. I'm just going to have to hit the problem from another direction. Thanks the the assist though.

waxen tide
#

yeah i know why it's just .. why?

tough abyss
#

Why what? Why you need scheduled env to use sleep?

rough heart
#

Unscheduled runs everything without checking order and shit or something, runs things as fast it can run and doesnt check for sleeps ? @tough abyss

tough abyss
coral monolith
#

random question is there a possibility to make someone dab on altis life

#

lol

#

it was a request i had from a player i know you can get one for exile but not sure if that would move the server into a mod

earnest ore
#

๐Ÿ‘€

#

Only the dead live here.

neon snow
#

How could I return position of mempoint in the same space as OBject builder?

frigid raven
#

Slightly offtopic:
Using CUP Factions - do I still need CUP ACE Compability Addons? Didn't they implemented the compability already into the whole mod iteself already?

dusk sage
#

random question is there a possibility to make someone dab on altis life

#

Oh my

runic seal
#

anyone got a script that exports styrings to a TXT file and fansy sharing?

queen cargo
#

wut?

inner swallow
#

twitter mod for arma 3 when

queen cargo
#

go ahead @inner swallow
twitter has some open API and all you need to do is to write some extension that polls it
you even could use sqf-vm to test that extension in a semi-realistic arma environment

inner swallow
#

if only i used twitter ๐Ÿ˜›

compact maple
#

why would you want to export string out of arma 3 lol

still forum
#

@unborn ether https://discordapp.com/channels/105462288051380224/105462984087728128/506231809181351936 We have CfgRemoteExec and CfgDisabledCommands.
@waxen tide https://discordapp.com/channels/105462288051380224/105462984087728128/506220708691574787 No.
@grizzled rain https://discordapp.com/channels/105462288051380224/105462984087728128/506254164649836546 no idea what you are talking about. That script doesn't open arsenal. Do you mean you do that first and use the action that then appears to open it? Or like I understand it that you have a addAction with that script?
@fringe yoke Yes. If you enable filePatching and download the image on every client into the Arma directory then you can do that. You might need a pbo with same path as you'll download the file to with a dummy file though. Else Arma might think the file doesn't exist because it doesn't exist in a pbo.
@neon snow https://community.bistudio.com/wiki/selectionPosition

waxen tide
#

THANKS!

grizzled rain
#

@still forum when i try to open the arsenal it loads up but doesn't go thru.

still forum
#

Did you check your RPT for errors?

#

error inside loading screen code can cause script to exit and never call the endLoadingScreen code

#

I don't know of any errors in Arsenal.. But I also don't know of any things they did correctly.

tough abyss
#

There are code examples for Twitter auth, or at least there were years ago, the hardest would be copy and paste all that

still forum
#

@runic seal scripts can't export to text files. But extensions can. What do you mean with "fansy sharing"? you mean fancy? The english word? or something else?

grizzled rain
#

I did but nothing out of the ordinary about the arsenal.

runic seal
#

i was wondering if somesone had something like it

#

that i could use as a template

#

but thx for the help x

still forum
#

doesn't answer any of my questions. But okey. Happy to have helped somehow ๐Ÿ‘‹

waxen tide
#

fetches his crystal ball and stares into it deeply for half an hour

halcyon crypt
#

lol

waxen tide
still forum
#

I guess you mean the header variable. Not the header of the file?

#

Well it add's format["private _thisFile = '%1';",_fileName] to the start of the script

#

so that inside the script you can use the _thisFile variable to check what script you are currently inside of

waxen tide
#

well i in general wonder what the fn_compile does and why he bothered to write it.

still forum
#

don't really see a use for that.. You usually know which script file you are in when you are writing a script

waxen tide
#

I'm easily confused. I wondered if i simply didn't understand something clever and fancy.

still forum
#

You can see the only place that's used is the log function. I'd assume that the log function doesn't have that header

#

thus if anything calls the log function. The _thisFile variable will still be set to the file that called the log function

#

so the log func can write to the logfile which script wanted to print the log

waxen tide
#

but gps_fnc_log = ["gps","fn_log",true] call gps_fnc_compile; ?

still forum
#

What is the question?

#

it adds the header, compiles the file and returns it

waxen tide
#

you said you assume log doesn't have a header

still forum
#

oh

#

Well then

waxen tide
#

but this would add one, no ?

still forum
#

yes

#

wait no

#

true means no header

waxen tide
#

yeah i just saw it in fn_compile

still forum
#

I'd consider that bad code. As you'd assume it's the opposite

waxen tide
#

these aren't actually functions, are they?

#

i mean they aren't functions registered inside arma

#

if ... that makes any sense.

still forum
#

nope. doesn't

#

what is your definition of a function?

#

to me it's anything that can be called

waxen tide
#

they aren't a subclass of cfgFunctions

still forum
#

So all ACE and some of CBA functions aren't functions?

#

Just because they use a different scripted system of initialization

waxen tide
#

well they aren't initialized via cfgFunctions

#

i would guess stuff like BIS_fnc_recompile will fail on them etc.

still forum
#

neither are ACE/TFAR

#

Correct

#

they use a different system.

waxen tide
#

i'm just trying to understand

#

not judge

still forum
#

But that doesn't make them be less functions

waxen tide
#

i struggled to explain properly. SORRY.

#

so, why do people do that?

#

use or not use cfgfunctions ?

#

to add headers?

still forum
#

organization

#

CfgFunctions screws up line numbers beyond repair and might add other headers that you don't want. And is also not "safe" aka doesn't always use compileFinal.
CBA has line numbers fixed, can disable compileFinal completely with a optional pbo, can easily be modified to add any headers you need to debug/test things. And it's system also only compiles functions once at game start. I don't know how cfgFunctions handles that. I think it recompiles at mission start? Or just recompiles some functions? not sure

#

Another difference. CBA system is documented and the code is easily readable. Which both aren't a thing with cfgFunctions. The code is just terrible

#

Also as CBA is script based instead of config based. You can do fancy things when compiling functions. For example compile different script files into a function depending on loaded mods or the version of the game

#

which you just simply cannot do with cfgFunctions

#

TLDR; People make their own systems because they have special requirements that existing systems can't fulfill

manic bane
#
_subname = localize "STR_1";
_subtest = localize "STR_2";
_menu =
[
    [_subname,false],
    [_subback, [2], "#USER:VAMsub", -5, [], "1", "1"],
    [_subtest, [3], "", -5, [["expression", "selectcomp = 1;"]], "1", "1"]
];
showCommandingMenu "#USER:_menu";
waitUntil {select != 0};```
If I close commanding menu by pushing backspace, does this script keep running or cancel itself?
still forum
#

Your script will kill itself anyway because of that syntax error in the last line

#

and in the first line too

#

also you never change the value of select.. which you can't. Because that would be a syntax error too

waxen tide
#

@manic bane get an editor with syntax highlight. then you would see that select is a command? in sqf and thusly can't be a variable name.

manic bane
#
_subname = localize "STR_VAM_SUB_COMPONENT";
_subback = localize "STR_VAM_SUB_BACK";
_subnone = localize "STR_VAM_NONE_COMP";
_subsel1 = localize "STR_VAM_CAMONET_HULL_COMP";
_subsel2 = localize "STR_VAM_EXTERNAL_BAG_1_COMP";
_subsel3 = localize "STR_VAM_AMMO_BOXES_COMP";
_subsel4 = localize "STR_VAM_EXTRA_WHEELS_COMP";
_subevery = localize "STR_VAM_EVERYTHING_COMP";
_VAM_Bobcat_comp =
[
    [_subname,false],
    [_subback, [2], "#USER:VAMsub", -5, [], "1", "1"],
    [_subnone, [3], "", -5, [["expression", "selectcomp = 1;"]], "1", "1"],
    [_subsel1, [4], "", -5, [["expression", "selectcomp = 2;"]], "1", "1"],
    [_subsel2, [5], "", -5, [["expression", "selectcomp = 3;"]], "1", "1"],
    [_subsel3, [6], "", -5, [["expression", "selectcomp = 4;"]], "1", "1"],
    [_subsel4, [7], "", -5, [["expression", "selectcomp = 5;"]], "1", "1"],
    [_subevery, [8], "", -5, [["expression", "selectcomp = 6;"]], "1", "1"]
];
showCommandingMenu "#USER:_VAM_Bobcat_Comp";

waitUntil {selectcomp != 0};```
#

this is actual application

still forum
#

Discord also has syntax highlight btw
```sqf
<code>
```

#

I have never seen anyone script the command menu

waxen tide
#

wonders how Dedmen does this

still forum
#

And I also don't know of anyone who has seen someone do it. So I'd say.. Try it out and report back to us

#

Discord is really slow with embeds lately

manic bane
#

I really didn't expect that... No one use command menu?

waxen tide
#

HAX

still forum
#

atleast noone in here

waxen tide
#

@still forum thanks for the elaboration on functions. I'll look at the CBA system.

still forum
#

Last mention of showCommandingMenu was in august 2017. And before that april 2017. And there are no other mentions before that since this discord was created

manic bane
#

wow thanks anyway

waxen tide
still forum
#

Yes

waxen tide
#

that's ... simple.

still forum
#

But ACE/TFAR/ACRE and many other mods usually have all that wrapped behind several layers of macros that can easily be swapped out for debug versions

#

Actually no. compileFinal is not the full thing.

#

Gimme a minute I'll find it

#

"CBA_fnc_compileFunction"

waxen tide
#

i wonder why it is under event handlers ?

still forum
#

Because functions get compiles at preStart/preInit eventhandlers

#

and because in Arma2/Arma1 CBA it was in SLX. Which is now XEH.

waxen tide
#

i see

#

thanks again!

manic bane
#

I tested and I think it keeps running..

#

I thinks use EH and make variable to -1 might solve this.

waxen tide
#

Let's assume a mission is tailored towards being used with a lot of mods, and vanilla is totally out of the scope of the whole endeavour. Then CBA is always available anyways. Given that simplification, what would be CBA features a mission should definately make strong use off?

still forum
#

Uhhh.. never really used CBA as mission specific. Depends on what you need. If you don't need something, there is no reason to use it

#

CBA has lots of misc stuff. For many generic BIS functions there are more optimized and better documented CBA variants

#

You can use CBA's eventhandler system (XEH and init/initPost handler) to easily add eventhandlers to literally everything. Instead of adding it to each object seperately.
You can automatically let it run a script when a certain vehicle spawns. Instead of for example having a scheduled while/true loop checking vehicles for any new things.

#

There is no single thing that you should always use. Use CBA features when you need them and would otherwise have to write your own implementation.
CBA's unscheduled code utilities like waitUntil/waitAndExecute are useful if you need something to happen exactly after a time interval or exactly when something happens. Instead of dealing with the uncertainty of unscheduled scripts that might only execute minutes or even hours after something happened. But you are also paying for that. By having your condition checked every frame, instead of every few frames, or once every minute, or every hour, or every day.. however the scheduler feels like at that moment

waxen tide
#

i mean if i want to set an AI patrol and CBA has a CBA_fnc_taskPatrol, that's obviously something i'll look at. i was wondering more about things that are unobvious to me at the moment, like for example CBAs fnc to register and compile a function.

hollow thistle
#

Event system can be really usefull for bigger missions.

waxen tide
#

i guess cba event handlers are very performant?

still forum
#

CBA hashes/Namespaces can be useful if you have lots of variables to store in a organized manner

#

no

#

They are as performant as the scripts you write as handlers

#

Well they don't suffer the recompilation bug that normal engine eventhandlers have. But that's about it

#

The big thing about CBA XEH (Extended Eventhandlers) is that you can do things that you just simply cannot do with missions otherwise.
For example config.cpp only eventhandlers. Can be added with description.ext or even script if you use CBA's XEH.
Or you can very simply add eventhandlers to every vehicle. Whereas with a script you'd have to call addEventHandler on every vehicle manually

waxen tide
#

i'll keep that in mind.

manic bane
#
(findDisplay 46) displayAddEventHandler ["KeyDown", {
    params ["_control", "_dikCode", "_shift", "_ctrl", "_alt"];
    switch (_dikCode) do {
        // Key Backspace
        case 14: {selectcamo = -1; selectcomp = -1; systemChat "beep";};
    };
}];```
Run this makes me uncotrollable except Backspace. What should I do?
still forum
#

keyDown needs to return true/false

#

don't know which. But one of them blocks the keys. I guess it's false, which is also what it defaults to when you return nil

manic bane
#

I will check. Thanks again!

wide hamlet
#

so im looking to add a visual label to an object ingame that is only visible to the player that created it via client sided code

#

ive checked the wiki and cant find the required function

still forum
#

drawText

#

That's not the right name.. uhh

wide hamlet
#

dope ty

still forum
#

Check out the examples and notes at the bottom of the page

tough abyss
#

If you donโ€™t use default case switch returns true so you are overriding keydown EH @manic bane

manic bane
#
(findDisplay 46) displayAddEventHandler ["KeyDown", {
    params ["_control", "_dikCode", "_shift", "_ctrl", "_alt"];
    switch (_dikCode) do {
        // Key Backspace
        case 14: {selectcamo = -1; selectcomp = -1; systemChat "beep";};
    };
    false;
}];```
Problem solved!
#

I have another question. When player respawn, should I add this again?

tough abyss
#

No

#

Will be the same display innit?

manic bane
#

Actually I don't understand display things yet...

#

So I have no idea..

tough abyss
#

Mission display 46 is there for the whole mission

#

If you leave server and join you will be joining new mission

#

Then you need to run it again

manic bane
#

Thanks for explaining ๐Ÿ˜ƒ

wide hamlet
#

Ight so i was able to get it to where i want it, but it only shows the text when looking right at it, i need it to show no matter where the current cursor is.

tough abyss
#

DrawIcon3D? Should show as long as it is on screen

wide hamlet
#

๐Ÿค” sec

manic bane
#

I asked about command menu and I found solution.

#
_Menu =
[
    ["Name",false],
    ["Back", [2], "#USER:sub", -5, [["expression", "select = -1;"]], "1", "1"],
    ["Selection 1", [3], "", -5, [["expression", "select = 1;"]], "1", "1"],
    ["Selection 2", [4], "", -5, [["expression", "select = 2;"]], "1", "1"]
];
showCommandingMenu "#USER:_Menu";

_test = 1;
while {select == 0} do {systemChat format ["LOOP %1", _test]; _test = _test + 1; sleep 1;};
waitUntil {sleep 0.1; select != 0};

if (select == -1) exitWith {};
if (select == 1) exitWith {Hint "1"};
if (select == 2) exitWith {Hint "2"};```
#

waitUntil will keep check condition even if I cancel menu by backspace or etc.

#
    if (select == 0) then {
        if (commandingMenu != "#USER:_ABC") then    {
            select = -1;
        };
    };
sleep 0.1;
};```
#

But with this, this script check command menu and cancel first script if #USER:_Menu is closed.

frigid raven
#
_intelAssistNpc setBehaviour "CARELESS";
[_intelAssistNpc,"LEAN_ON_TABLE","ASIS", dpl_snap_arrow_1] call BIS_fnc_ambientAnim;

Results in this on dedicated only: https://youtu.be/wOxYZW_1Erg
Any ideas? INFO: I have placed a invisible marker so the unit is snapped with the animation. Marker is called dpl_snap_arrow_1

winter rose
#

Marker name should be between quotes

carmine abyss
#

Hello guys question. in waitUntil {sleep 1; do this; do this;}; why does the sleep have to be at the top? For my code it will not work with sleep at the bottom.

waxen tide
#

the last bit of code in your waituntil must eventually equal true

#
waitUntil {code;code;code;code;code;condition};
#

this should work

#
waitUntil {code;condition;code};
#

this shouldn't

#

the thing you want to evaluate as your condition for the waituntil must be last, basically

#

(maybe i shouldn't be explaining things)

#

in other words, sleep must not be at the top, i can be anywhere, just not last ๐Ÿ˜›

#

because sleep 1; doesn't equal true, like ever?

#

goes hiding

carmine abyss
#

omg @waxen tide thank you man. I have searched all over for that answer

#

I cannot thank you enough

waxen tide
#

np

edgy dune
#

Is there anyway I can detach when someone switches between their primary to secondary weapon and vice versa?

edgy dune
#

Well I was thinking more on the lines of like a EH, which afik there isn't one.

#

Like what im tryna do is when someone switches to their secondary it forces said player to be in walking only.

ebon sparrow
#

I tried to solve it.

meager heart
delicate totem
ebon sparrow
#
class cfgWeapons {
    class U_I_CombatUniform;    // External class reference
    class U_I_OfficerUniform;    // External class reference
    class UniformItem;    // External class reference
    class ItemInfo;    // External class reference
    class ItemCore;    // External class reference
    class H_HelmetIA;    // External class reference
    class HeadgearItem;    // External class reference
    class Vest_Camo_Base;    // External class reference
    class VestItem;    // External class reference
    class arifle_TRG21_F;    // External class reference
    class arifle_TRG21_GL_F;    // External class reference
    
    class RTAF_Rifle : arifle_TRG21_F {
        class ItemInfo;    // External class reference
    };
    
    class RTAF_Rifle_gl : arifle_TRG21_GL_F {
        class ItemInfo;    // External class reference
    };
    
    class B_RTA_Rifleman : U_I_CombatUniform {
        scope = public;
        displayName = "RTA Uniform 1";
        picture = "\Cattac_RTA\data\UI\rta_uniform_1_ca.paa";
        
        class ItemInfo : UniformItem {
            uniformModel = "-";
            uniformClass = "RTA_Soldier_F";
            containerClass = "Supply50";
            mass = 80;
        };
    };```
#

Need to enter Class Scope; ?

#

A file that has been spotted. cfgWeapons.hpp

edgy dune
#

@delicate totem ah thx yo, I didnt know CBA had their own EH's.

dusky pier
#

can i use addEventHandler for object on server?

#
_obj1 addEventHandler ["AnimDone", {
    params ["_unit", "_anim"];
    ...
};
still forum
#

@edgy dune CBA has a weapon switched eventhandler.

#

@ebon sparrow explain? what are you trying to ask? Also that would be #arma3_config

frigid raven
#

@winter rose having the marker in quotes makes the marker inactive or not usable - it seems without quotes the marker is actually recognized. Info: The marker is placed in 3DEN and the name defined in the "variable input"

#

Well forget about that marker - the animation bug exists in both ways

winter rose
#

@frigid raven I'll take another look, meanwhile disregard my advice. Also, you could maybe disableAI the unit socit doesn't change animation at all

frigid raven
#

looks like _intelAssistNpc setBehaviour "CARELESS"; fails kinda

#

Ah ok disableAI sounds good

#

Is there a best practise to have animations and positions set - while the NPC still can react to enemy fire? And afterwards return to his former position and animation?

#

I kinda feel Arma will screw this up big time

#

@winter rose One info again. The NPCs are placed in the 3DEN Editor - therefore they are local to the server right? But I run the animations scripts on the client side... might this be the mistake here?

#

crap they should really add exception handling for that file not found bullshit when I have a wrong path to a *.hpp file. Crashing whole Arma is a bit dramatic

frigid raven
#

@winter rose that solved it - I needed to have the animations run on the server side not client

unborn ether
#

That's how C++ preprocessor works, try telling Stroustrup that he is wrong ๐Ÿ˜„

compact maple
#

I heard weeks ago that someone made a lua interpretor for arma, do you guys have the link ?

still forum
#

I didn't make the lua interpreter. I just integrated a LUA Library with Intercept

still forum
#

Someone in here wanted a way to check how hard the engine of a car is revving.

Added: Sound controller 'acceleration'
Latest dev-branch. That could probably do it

winter rose
#

@frigid raven good thing! And yes, server-side anim indeed ๐Ÿ™‚

compact maple
#

oh okay

still forum
young current
#

only if the helo is RTD helo

tough abyss
#

crap they should really add exception handling for that file not found bullshit when I have a wrong path to a *.hpp file. Crashing whole Arma is a bit dramatic You cannot just ignore missing include and you will need to restart anyway since there is no dynamic config loading in retail, so curious what do you suggest?

edgy dune
#

@still forum thx yo , I saw that CBA weapon switch EH when Tommo pointed it, I shall have fun now.

#

I shall script total war Rome 2 into arm.

frigid raven
#

gosh this is embarrassing...

I have a Basic Ammo [NATO] ammobox and within init

[this, true] call ace_arsenal_fnc_initBox;

but it wont render the arsenal action for me - only normal inventory - what am I getting wrong here again

#

@tough abyss I do not suggest anything because I am a noob

signal pulsar
#

Hey is there anyone active i this chat rn?

still forum
#

@signal pulsar someone wrote a message here 3 minutes ago.. What do you think?

digital jacinth
#

@frigid raven you tying to open it with the vanilla action menu or the ace interaction menu?

signal pulsar
#

The app on my phones not showing me the time stamps for some reason

#

So I didnโ€™t know till I saw someone typing

still forum
#

@frigid raven "action" ? It's in ACE Interaction. Not mouse wheel menu

signal pulsar
#

Can someone help me understand how I could attach an incoming missile event handler to a players vehicle so I can add like a text pop up saying incoming missile

#

vehicle player addEventHandler ["IncomingMissile", {hint "SHOT";}]

frigid raven
#

@still forum the fuck I missed I was opening "Arsenal" through the mousewheel and always thought that the ACE stuff too

#

wtf helluva new options with ACE

signal pulsar
#

anyone have any ideas?

compact maple
signal pulsar
#

@compact maple is @ people allowed? okay so what im trying to achieve is like " missile incoming" in big text when someone shoots rockets at u but i dont want to tell who shot you. will the "%1" tell who shot you?

#

and where / what file would i want to call this on?

compact maple
#

Yes, why would it be forbidden ?

signal pulsar
#

thank you for taking the time to answer

#

some discord servers dont like it

compact maple
#

yes the %1 will tell who pulled the trigger

#

if you want a big text just use : (give me a sec)

#

so :

(vehicle player) addEventHandler ["IncomingMissile", {
    titleText ["SHOT", "PLAIN"];
}];
signal pulsar
#

this isnt my code but was sent to me as a reference by someone who been tryying to point me in the right direction private ["_vehicleObject"]; _vehicleObject = _this select 0; playSound "warning"; [parseText format["<img size='0.52' image='exile_assets\texture\mod\icon.paa'/><t color='#e5e7ea' size='0.6' font ='PressStart2P' shadow = '1'> MISSILE INCOMING</t><br/>"],-1,-0.2,1,1] spawn bis_fnc_dynamictext;

#

something like that

#

but even with this i dont know how to call it or what file id want to put it in

#

idk

compact maple
#
private _vehicleObject = _this select 0;
playSound "warning";
(vehicle player) addEventHandler ["IncomingMissile", {
    [parseText format["<img size='0.52' image='exile_assets\texture\mod\icon.paa'/><t color='#e5e7ea' size='0.6' font ='PressStart2P' shadow = '1'> MISSILE INCOMING</t><br/>"],-1,-0.2,1,1] spawn bis_fnc_dynamictext; 
}];
signal pulsar
#

how are u doing syntax like that

#

w the code color

compact maple
#

add the word "sqf" after the three first `

#

are you running an exile mission ?

signal pulsar
#

yessir

compact maple
#

So it should work

signal pulsar
#

do ijust put that in a file and call it?

#

in my mission files?

compact maple
#

Well, the code I gave you will work only when you execute it while you're in a vehicle

#

Its for debug purpose