#arma3_scripting

1 messages ยท Page 88 of 1

hallow mortar
#

If the player can call it in from the support menu, that sounds like a Support Requester/Provider, not CAS

ashen dock
#

My bad. Your right.. the support requester then.

hallow mortar
#

The page I linked has a large list of module functions and it is in there

#

However, it requires a Requester/Provider pair, and how to do that using purely scripts and not the modules is not really documented

#

You can try looking at the functions in the Functions Viewer and figuring out how they work; good luck

south swan
#

(and the function viewer is available in 3DEN from Tools in top menu. Or press the big buttons with the same name in 3DEN mission preview)

hallow mortar
#

I'd recommend picking up Leopard20's Advanced Developer Tools mod if you haven't already, it makes the Function and Config Viewers much nicer to use

tough abyss
#

so i'm trying to make a script that detects what object people hit with their gun and then "kill" it with setdamage but i'm having an issue that i have isolated to the if then loop that checks what weapon is being used by the player i'm trying to detect wether the players weapon that is fired from the eh (_weapon per the biki page for the eh) and if it is one of the elements in the array _treeguns and if it is then damage the tree with the rest of the script (executed on local mp)

{
hint "1";
_x addEventHandler ["Fired", {
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
    _projectile addEventHandler ["HitPart", {
        params ["_projectile", "_hitEntity", "_projectileOwner", "_pos", "_velocity", "_normal", "_component", "_radius" ,"_surfaceType"];
        hint "2";
        _treeguns = [vn_m_axe_01,vn_m_axe_fire,vn_m_fishing_rod_01,vn_m_machete_02,vn_m_machete_01,vn_mg42];
        hint "_weapon";
        if (_weapon in _treeguns) then {
                _hitEntity setdamage 1;
                hint "_hitEntity";
            };
        }];
    }];
}foreach allplayers;
south swan
#

_weapon isn't available inside projectile's EH. Because said EH is run at different time and has nothing to do with the player's EH blobdoggoshruggoogly Try _projectile setVariable ["NUC_weapon, _weapon]; inside the "Fired" EH. and private _weapon = _projectile getVariable ["NUC_weapon", ""]; in "HitPart" EH. Also, stuff inside _treeguns should be strings by the looks of it. As in ["vn_m_axe",... and so on.

tough abyss
kindred tide
#

what kind of object is safest for attachTo ? in that it doesnt mess with unit's movement

kindred tide
tough abyss
#

i usually use Land_Can_V2_F its small havent seen it effect ai and i doubt it would be that laggy

drifting portal
#

Yeah, I do rememeber, is there a way to contact you on dms?

tough abyss
#
_enemyType = "I_Soldier_GL_F";
_spawnPosition = getMarkerPos "enemy_spawn_marker";

_group = createGroup [east, false];

for "_i" from 0 to 10 do {
    _enemy = _group createUnit [_enemyType, _spawnPosition, [], 0, "FORM"];
}

Just makes me laugh when I have troops that are all meant to be on the same side instantly turn on each other and rip to shreds

#

I know it's a bug but still, funny

drifting portal
tough abyss
#

AAF I think they are

drifting portal
#

yes

#

a way to circumvent this is to use setUnitLoadout

tough abyss
#

I mean I've added CSAT to my NATO group so anything is possible in script world

drifting portal
#

basically have CSAT troops with AAF gear

tough abyss
#

Oh I don't mind that they have AAF clothes and stuff, I'm just messing around

#

I can spawn CSAT if I wanted

tough abyss
# south swan `_weapon` isn't available inside projectile's EH. Because said EH is run at diff...

didnt seem to make it progress any further i've got this now, i'm guessing that the weapon in treeguns isnt returning a condition of true or i've messed up the syntax but im not getting any script errors from this with the launcher option showed

{
hint "1";
_x addEventHandler ["Fired", {
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
    _projectile setVariable ["ncl_weapon", _weapon];
    _projectile addEventHandler ["HitPart", {
        params ["_projectile", "_hitEntity", "_projectileOwner", "_pos", "_velocity", "_normal", "_component", "_radius" ,"_surfaceType"];
        hint "2";
        _treeguns = ["vn_m_axe_01","vn_m_axe_fire","vn_m_fishing_rod_01","vn_m_machete_02","vn_m_machete_01","vn_mg42"];
        private _weapon = _projectile getVariable ["ncl_weapon",""];
        if (_weapon in _treeguns) then {
                _hitEntity setdamage 1;
                hint "4";
            };
        }];
    }];
}foreach allplayers;
south swan
#

works on my machine blobdoggoshruggoogly make sure stuff in _treeguns is using correct case (arifle_MX_F isn't equal to arifle_mx_f).
Or maybe use toLower _weapon and all-lowercase array.

#

"works" as in "gets to hint "4""

#

also, making _treeguns private for better styling would make sense blobdoggoshruggoogly

tough abyss
south swan
#

basically, that's just instruction for interpreter that says "don't try to find this variable anywhere else, make a new one right here"

tough abyss
#

ah ok that makes sense ill use it for now on i've just thought it messes with locality and i only think about however much i need to make things work and not be massively laggy but that sounds like a smaller thing that will help

kindred tide
#

damn, i made flying bots like in fallout, by attaching some objects to a unit's head and then hiding the unit

tough abyss
#

hi , i try unitcapture on jet but why flares not recorded on it ? _h1hornetmove = ;

_h1fire = ;

_h1replay = [h1, _h1hornetmove] spawn BIS_fnc_UnitPlay;
[h1, _h1fire] spawn BIS_fnc_UnitPlayFiring;

zinc loom
#

hi, im pretty new, im working on a garage, all is working fine, now i was thinking about defining all the vehicles in 1 file, cfgvehicles sounds right, ... so i could use a tutorial or good explanation how to use cfgvehicles

#

all i want is an array of cars , which can be later reduced with conditions

little raptor
zinc loom
#

that just sounds right to my noobish ears

#

i was thinking about just making an array of strings

little raptor
#

cfgVehicles is for actual vehicles that are in the game, not for putting random stuff into

little raptor
zinc loom
#

well point is i want to add variables like truckSpace

#

i want to start experimenting

#

but first i need some avalible cars in an array, so i can feed my garage

#

i want to feed the this dialog with some strings (car names)

little raptor
little raptor
# zinc loom

Again not sure why you want to define it in a config. You should define it in a script
But anyway you can just define it in your dialog config then

zinc loom
#

true

sullen sigil
#

Still struggling to get a correct select condition for this, only progress I've had is < instead of == meowsweats

#

In essence the select statement just needs to be giving me every combination throughout the duration of the for loop whilst always having the required ones

#
private _selections = [_camo1, _camo2, _camo3, _camo4];

for "_i" from 0 to ((count _selections)^2) do {
    private _currentSelections = _selections select {_x get "required" || {_selections find _x < _i}}; //second part needs to give me all possible combinations of _selections
little raptor
#

Don't use select. And if find doesn't work it's probably a bug

#

It would mean hashmap equals doesn't work

sullen sigil
#

it works but it doesn't generate all combinations
what should i use instead of select then? ๐Ÿ˜…

little raptor
#

forEach

sullen sigil
#

it finds it fine but the condition itself is not correct; I need all possible combinations -- so _camo1 & _camo2, _camo2 & _camo4 and so on

#

I'll try with forEach though, probably needs a pretty big refactor though

little raptor
#

If find works then no need to use forEach

sullen sigil
#

One sec I'll show you what's generated

#

Only these 3 combinations are generated with < _i, where classname_shag_nuts_butsss is missing and should be generated

#

as shag and nuts are required so should always be there, but not every combination of selections is processed ๐Ÿ˜…

south swan
#

bruh intensifies

sullen sigil
#

it is driving me insane ๐Ÿ˜„

south swan
#

is using SQF for that config generation a hard requirement? Because most general-purpose languages would do it better

sullen sigil
#

not really but the idea is i can just send it to someone and they can shove it into debug console
besides its literally this one bit left and ive already rewritten this twice, had originally done it in python

little raptor
#

(Well except you always keep the req array constant, and use select [0, _i] on the non-req one, i is in range 0 to cn

#

Instead of the select {}

south swan
#
private _camos = ["camo1", "camo2", "camo3", "camo4"]; 
private _meme = [[]]; 
{ 
  private _meme2 = []; 
  { 
    _meme2 pushBack (_x + [false]); 
    _meme2 pushBack (_x + [true]); 
  } forEach _meme; 
  _meme = _meme2; 
} forEach _camos; 
// should result in [[false,false,false,false], [false,false,false,true], ... 
private _res = []; 
{ 
  private _memeString = ""; 
  { 
    if (_x) then {_memeString = _memeString + _camos#_forEachIndex}; 
  } forEach _x;   
  _res pushBack _memeString; 
} forEach _meme;
_res``` ![blobcloseenjoy](https://cdn.discordapp.com/emojis/700312018430722060.webp?size=128 "blobcloseenjoy")
#

if each can be on or off then the combination number is just 2 ^ _count

sullen sigil
#

thx, will try what leopard said first though as i am very confused right now with a tiny brain

sullen sigil
#

cr is count required (should be either 1 or 0 if none is required)
wdym by this? can i not end up with 2 required? meowsweats

little raptor
#

Well required ones are always there no?

#

So all of them make 1 thing, and they're always prepended like your example

south swan
#

ahhh, the joys of poorly worded combinatorics ๐Ÿ™ƒ

little raptor
#

(or non if they don't exist)

sullen sigil
#

oh so the count of iterations, i get u

#
for "_i" from 0 to (_countRequired + _countNotRequired * ((_countNotRequired+1)/2)) do {
    private _currentSelections = _selections select [0,_i];```
so I should be ending up with something like that, right..?
because if so, it still has the same issue; i do not have every combination
south swan
#

first one is either present or not = 2 possibilities
second one is either present or not = previous count (2) * 2 = 4
third one is either present or not = previous (4) * 2 = 8
and so on blobdoggoshruggoogly

little raptor
sullen sigil
#

atm i have this but yeah the select part is still the issue ๐Ÿ˜…

little raptor
#

Let me rethink it...

south swan
# south swan ```sqf private _camos = ["camo1", "camo2", "camo3", "camo4"]; private _meme = [...
private _camos = [_camo1, _camo2, _camo3, _camo4]; 
private _meme = [[]]; 
{ 
  private _required = _x get "required";
  private _meme2 = []; 
  { 
    _meme2 pushBack (_x + [true]);
    if !_required then {_meme2 pushBack (_x + [false])}; // <-- ONLY add combinations without it if it's not required
     
  } forEach _meme; 
  _meme = _meme2; 
} forEach _camos; 
// should result in [[false,false,false,false], [false,false,false,true], ... 
private _res = []; 
{ 
  private _memeString = ""; 
  { 
    if (_x) then {_memeString = _memeString + _camos#_forEachIndex get "name"}; 
  } forEach _x;   
  _res pushBack _memeString; 
} forEach _meme;
_res```
still dumb and greedy algo ![blobdoggoshruggoogly](https://cdn.discordapp.com/emojis/748124048025714758.webp?size=128 "blobdoggoshruggoogly")
south swan
sullen sigil
#

this is a lot of confusion

sullen sigil
#

though that is probably the most difficult element of it notlikemeowcry

sullen sigil
#

Got it working now, thanks so much artemoz

#

finally can relax

#

oh wait, still need empty quotes for skipped selections meowsweats

tough abyss
#

is there anyway to delete map objects?

still forum
#

you can hide them

tough abyss
sullen sigil
#

does sqf use .NET regex

little raptor
sullen sigil
#

ah thx

little raptor
#

the page used to have a link to the boost docs but looks like Lou or someone else changed it

#

or I guess it was cppreference

sullen sigil
#

How are you supposed to use brackets within regexreplace? Just not supposed to? meowsweats

#

oh wait ofc literal characters duh

little raptor
#

you mean []?

sullen sigil
#

dw I meant () but forgot \ exists

sullen sigil
#

stacking regex calls doesnt seem to be a good idea either
current idea for the texture paths needing "" is just adding an else to the if (_x) then with a template hashmap but not having elements means the NULL parts get stringified and mess up all sorts of stuff notlikemeowcry

little raptor
tepid vigil
#

How can I detect if a dialog is exited by pressing esc? I have a dialog where players need to enter text, but right now it's possible to exit by pressing esc which makes it bug out

sullen sigil
#

I forgot that exists

little raptor
proven charm
#

like Leo said ๐Ÿ™‚

sullen sigil
#

oh, youve misunderstood artemoz -- i cant just have them with "" because then they end up as "" in the final string ๐Ÿ˜…

south swan
#

i don't understand what that trim/regex/whatever monstrocity is, yes

sullen sigil
#

If I just use {_x getOrDefault ["classname", "", true]} for example I end up with stuff like this

south swan
#

joinString instead of whatever str _whatthehell trim [whatever]?

sullen sigil
#

that is probably a better idea

#

i had been trying to find that command a while ago

south swan
#

or just do _array = _array - [""]; before applying memes to it blobdoggoshruggoogly

sullen sigil
#

however i have just been informed this is completely useless for what ive made it for as the files arent organised how i thought it was ๐Ÿ˜ƒ

tough abyss
#

hello can you please help me with this error im running into an error with this code where wherever i shoot certain map objects it hints them and systemchat returns [] (mainly buildings) but does not copy other elements rocks and trees to the clipboard ( tried with both sog cdlc and vanilla maps) any ideas?

{
_x addEventHandler ["Fired", {
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
    _projectile setVariable ["ncl_weapon", _weapon];
    _projectile addEventHandler ["HitPart", {
        params ["_projectile", "_hitEntity", "_projectileOwner", "_pos", "_velocity", "_normal", "_component", "_radius" ,"_surfaceType"];
        private _treeguns = ["vn_m_axe_01","vn_m_axe_fire","vn_m_fishing_rod_01","vn_m_machete_02","vn_m_machete_01","vn_mg42"];
        private _weapon = _projectile getVariable ["ncl_weapon",""];
        if (_weapon in _treeguns) then {
            hint str (_hitEntity isKindof "Land_vn_vegetation_base");
            systemChat (typeof _hitEntity );
            if(_hitEntity isKindof "Land_vn_vegetation_base") then {deletevehicle _hitEntity; hint "H";};
            };
        }];
    }];
}foreach allplayers;
south swan
#

i don't see anything clipboard-related in the code, though?

fallen locust
#

inbuild one is just fine

#

few issues with it but goode enoug

tough abyss
#

meant to say systemchat

little raptor
#

including trees and rocks

tough abyss
#

any idea how i can detect if they are trees and bush's? ,they are spawnable in the editor and have types in config

little raptor
#

anyway check namedProperties

#

I think it's currently broken on map objects tho. will be fixed in v2.14

#

to work around it, you can cache a pair of [objectModel, isBush] in a hashmap

#

and use createSimpleObject to create a temporary object, get the namedProperties, then delete it

#

you can get the model using getModelInfo _obj # 1

tough abyss
#

thanks leopard will try

#

so i've made this but it doesn't seem to work any ideas? in theory it should show a h hint when shooting a tree here is a video of testing it thanks for the help
https://streamable.com/aeloiz ```sqf
Ncl_VegitationModels = "
(configName _x isKindOf 'Land_vn_vegetation_base')
"
configClasses (configFile >> "CfgVehicles") apply {
getText (_x >> 'model');
};

{
_x addEventHandler ["Fired", {
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
_projectile setVariable ["ncl_weapon", _weapon];
_projectile addEventHandler ["HitPart", {
params ["_projectile", "_hitEntity", "_projectileOwner", "_pos", "_velocity", "_normal", "_component", "_radius" ,"_surfaceType"];
private _treeguns = ["vn_m_axe_01","vn_m_axe_fire","vn_m_fishing_rod_01","vn_m_machete_02","vn_m_machete_01","vn_mg42"];
private _weapon = _projectile getVariable ["ncl_weapon",""];
if (_weapon in _treeguns) then {
hint "E";
if((getModelInfo _hitEntity # 1) in Ncl_VegitationModels) then {deletevehicle _hitEntity; hint "H";};
};
}];
}];
}foreach allplayers;

#

a bit of a shortened approach though

vapid scarab
#

Is _weapon an object or a string? If its a string, have you tested to see exactly what that string is?

tough abyss
vapid scarab
#

So it is deleting the tree, but not hinting?

tough abyss
#

no

tough abyss
little raptor
# tough abyss so i've made this but it doesn't seem to work any ideas? in theory it should sho...

that's not really what I said
I mean something like this:

objsHashmap = createHashmap;
...
// in EH
_model = getModelInfo _hitEntity #1;
if !(_model in objsHashmap) then {
  _temp = createSimpleObject [_model, [0,0,0], true];
  deleteVehicle _temp;
  _props = createHashmapFromArray namedProperties _temp;
  objsHashmap set [_model, _props getOrDefault ["class", ""] in ["tree"]];
};
_isTree = objsHashmap get _model;
if (_isTree) then {
  //...
};
#

I don't remember what named property it was tho

#

check the wiki

vapid scarab
# tough abyss refer to this bit of text

tbh, I dont know what you mean as I dont see a reference to the question i asked.
Test this and share what that hint says.

Ncl_VegitationModels = "(configName _x isKindOf 'Land_vn_vegetation_base')"
configClasses(configFile >> "CfgVehicles") apply {
    getText(_x >> 'model');
};

{
    _x addEventHandler["Fired", {
        params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
        _projectile setVariable ["ncl_weapon", _weapon];
        _projectile addEventHandler ["HitPart", {
            params ["_projectile", "_hitEntity", "_projectileOwner", "_pos", "_velocity", "_normal", "_component", "_radius", "_surfaceType"];
            private _treeguns =["vn_m_axe_01", "vn_m_axe_fire", "vn_m_fishing_rod_01", "vn_m_machete_02", "vn_m_machete_01", "vn_mg42"];
            private _weapon = _projectile getVariable ["ncl_weapon", ""];
            message1 = (format ["Gun in treeguns: %1. ", _weapon in _treeguns]);
            message2 = (format ["HitEntity in Vegitation: %1.", (getModelInfo _hitEntity # 1) in Ncl_VegitationModels]);
            hint (message1 + message2);

            // if(_weapon in _treeguns) then {
            //     hint "E";
            //     if((getModelInfo _hitEntity # 1) in Ncl_VegitationModels) then {deletevehicle _hitEntity; hint "H"; };
            // };

        }];
    }];
} foreach allplayers;
#

Thats why it isnt deleting the tree.

#

hideObject might be what you want.

tough abyss
#

even when using hideobjectglobal the hint in the next if then statement isnt firing meaning that the code is not being executed in that condition

vapid scarab
#

Then something is wrong here with this condition: (getModelInfo _hitEntity # 1) in Ncl_VegitationModels

tough abyss
#

yes

#

which is what im troubleshooting and following leopards guidance with

vapid scarab
#

ah

zinc loom
#

i need help with a foreach

#

i need configfile >> "CfgVehicles" >> _x >> vehicleClass

#

and i want to push the result to an array

#

if vehicleclass == "Cars"

#

i think i want that....

#

or _x isKindof "Cars"

granite sky
#

Describe what you're trying to do in english.

little raptor
zinc loom
#

ty sir

queen cargo
#

not if you want to go further then a simple "click this button" ui

fallen locust
#

arma UI dosnet go any further then click this button, this looks like this, and hide and do this

#

so yeaaa

jade abyss
#

Depends on what you wanna do. When it comes to animate stuff in the UI, then... meh

fallen locust
#

you can ;)

tough abyss
fallen locust
#

Some UIEH wizardry :P

jade abyss
#

I know, but the Ingame UI Editor is suckysucky for that :D

fallen locust
#

True

south swan
fallen locust
#

But thats more with arma limitation then Editor, doing live things on UI would be a pain

#

ain't nobody got time for that

tough abyss
#

I need to edit it so that you can only use the channels which are not defined in disableChannels in the briefing

jade abyss
#

Doing live would be sometimes just better, when you re-arrange stuff for example

fallen locust
#

True, but : "ain't nobody got time for that"

#

;)

jade abyss
#

<--- has time :D

fallen locust
#

Do it then :P

proven charm
#

is it possible to render man model in 3D at GUI? or just the head, is this possible?

fallen locust
#

keep in mind you only need to activly update measly 40 EH ;)

#

have fun ;)

south swan
jade abyss
#

pfah, eassyyyy

#

:D

proven charm
#

i guess arma dont have 2D heads so Id need to render only the head in 3D

south swan
#

vanilla arsenal seems to very specifically only check configfile >> "cfgunitinsignia" blobdoggoshruggoogly

hallow spear
#

what type of "live" activity are you referring to? watching a video in UI?

zinc loom
#

im trying to loadFile "test.txt" and it cant find it, it allways pops up, cant find stript test.txt

#

the file is in the mission folder

fallen locust
#

you can live add EHs to it

#

and execute it upon the UI element

#

1 thing

jade abyss
#

i just refered to simple animations in the UI :D

little raptor
fallen locust
#

meh thats blah

jade abyss
#

nonononoooo

fallen locust
#

but doing that for each ctrl type + all EHs

#

how about no

jade abyss
fallen locust
#

that can be done not that hard

#

with CtrlCommit

hallow spear
#

oh that is cool

jade abyss
#

Yep, not that hard. Just time consuming

fallen locust
#

yup

#

now automate it ! and do all EHs and all CtrlTypes!

#

chop chop

#

:)

jade abyss
#

EHs? Why? ^^

fallen locust
#

becouse thats how you execute code on dialogs

jade abyss
#

simple onButtonClick :D

fallen locust
#

that covers buttons :P

hallow spear
#

so uh.. is that something thats willing to be shared?

jade abyss
#

Not yet @hallow spear Its party of my new project.

fallen locust
#

casual 1.2k lines of config only

jade abyss
#

Dat ARROW!

#

Yeah, Fiddle with UI is just... text text text text ; Text text text ; , : comit text text text

tough abyss
#

1.2k lines for the PDA only?

fallen locust
#

yes :P

#

1.2k lines of config!

hallow spear
#

dang, i thought i was cool putting a progress bar over a pic.. this is inspiring stuff.

jade abyss
#

Most of the "clients" just don't know, how much time and effort must be put in Scripts/Models/UI etc to make it work -.- Sometimes depressing

fallen locust
#

UI especialy!

#

its just so slow in aram

#

to make it properlly

jade abyss
#

yeah

tough abyss
#

It looks really professional, really well done !

#

Sometimes feels like AAA devs don't even put this much effort into their games.

rich bramble
#

Given how incredibly bad the UI system is in Arma, I'm surprised that pda is even possible. Consider my mind blown.

fallen locust
#

Its not that bad tbh, its just not documented well enough

jade abyss
#

hm, almost everything is documented, you just have to fiddle a bit around :P

fallen locust
#

no no no no no :P not relly

jade abyss
#

Rly?

fallen locust
#

there is so much in arma thats not documented at all including scriptcomands :P

jade abyss
#

Ah, yeah. Thats true

fallen locust
#

not documented in a way it dosent even exist in wiki :P

jade abyss
#

wut?

#

Got an example for me?

rich bramble
#

I had a fun experience with UI last year. Took working UI cfg's from an addon...added them to description.ext No worky-worky, no error message, just a very confused me

fallen locust
#

there is 3 of them there :P

rich bramble
#

@fallen locust They're now on the biki, they're just fairly new commands.

jade abyss
#

erm, they are all in oO @fallen locust And that for a pretty long time^^

fallen locust
#

Oh yea thoes are now :P

#

when i found then they werent

#

:/

jade abyss
#

I remembered, using them about 2-3 Month ago

#

Ah

#

Just to disable stupid SideChatTalking

tough abyss
#

I still need help on how to disable the channel selection for ace markers ;(

rich bramble
#

I read the dev changelog where they were introduced, it's not like they were ever really "undocumented". Most dev branch stuff only gets biki entries just before/just after it hits stable

fallen locust
#

why is my text red?

#

Yea, i just remember i didnt saw it in wiki when i added it

jade abyss
#

?! nope

fallen locust
#

nvm

#

it means it didnt send it

#

:P

jade abyss
#

Ah

rich bramble
fallen locust
#

Thats so old....

#

its anoying as hell

#

if you define controlsBacground before Controls it works

#

dont ask me how or why it just does :P

jade abyss
#

Yeah, confusing

#

Answer is: "Because he can" @fallen locust

rich bramble
#

What, seriously? That's the most 'magic' of all the 'magic' I've seen in Arma in a long time.

fallen locust
#

There is so many little things like that its stupid

candid sun
#

can someone ELI5 serialization for me?

rich bramble
#

Convert stuff that only makes sense on your PC/your thread into a form that makes sense everywhere and can be easily transferred around.

candid sun
#

why can't you use it when you're referring to displays/controls as a variable?

kindred lichen
#

Serialization in a programming context is basically creating a string that represents a data object

rich bramble
#

Well, UI only exists on each machine locally. So if you have a variable that refrences a dialog box

#

How are you going to transfer that? On the other PC there will be no dialog box to referr to.

candid sun
#

you can't do it regardless of locality afaik alexander

rich bramble
#

UI doesn't have locality iirc. So "local" here means the broader concept, not the A3 specific keyword

#

In A3, by default, all code can be sent across the network and executed on another machine. This is a core feature of the scripting engine. This requires that the code can be "serialized" (made into a form that still makes sense on another machine).

#

So if you've got a bit of code that has a variable pointing at e.g. a dialog box that's currently on the screen....the engine can't convert that variable into something that "makes sense" on the other machine.

austere hawk
#

@tough abyss "Sometimes feels like AAA devs don't even put this much effort into their games" >> well, they have to build the game so that it runs in the first place. Modders only built on top of that. And until you tried to create a game from scratch you just don't appreciate all the things you actually need to make to get a half decent game, that you as modder can play with/improve/change right away

rich bramble
#

Obviously this is just a design choice. BI could have also allowed you to reference UI across the network. But it's probably a good decision not to allow that, simply because UI doesn't like latency and networks bring a lot of latency.

candid sun
#

network's not really come in to it for me, i'm just wondering what the best way to refer to displays/controls is without having to use idd/idc all the time - how do most people do it?

rich bramble
#

juse use variables? and disableSerialization; if you know your code won't have to travel across the network.

candid sun
#

it's that simple yeah? thanks

tough abyss
#

@austere hawk I understand that, but my assumption is based on "more than one guy working on it". I assume making the core game is something that is done by a different team than of those who make quests/scenarios or "enemy spawn scripts".
Then again everyone has their own vision and choice of things... mods let us put our vision into the game and have it in our own way.

Good ex. Being the SkyUI mod for skyrim. A lot more functionality, and obviously better. But it's just my preference...

In terms of ArmA 3, the action menu is terrible, maybe it's just my preference and personal opinion, but I enjoy opening doors with the ACE 3 (ctrl+space) shortcut, rather than using the "scroll menu"

rich bramble
#

@candid sun It's Arma so expect a million caveats ;)

fallen locust
#

but if you do DisableSir; a = 3; pv "a"; wierd crap will happen :P

rich bramble
#

Oh, disableSerialization kills ALL publicVariable calls for the script? that's...an interesting design choice

fallen locust
#

it dosent but i expirienced wierd stuff like

austere hawk
#

i dont think BI likes the action menu either... its more of a legacy issue and lack of ressources or too much investment to correct this for a years old game engine (by now) i would think

fallen locust
#

a = "Kappa";
pv a

but on other side
a = 0x56252

#

sooo yea

rich bramble
#

Yeah, that looks like serialization was in fact disabled ;)

jade abyss
#

Open Doors with Ctrl+Space?! oO Why not Circumflex?

fallen locust
#

yup looks like a pointer :P

#

I cant repro it 100% tough

#

sometimes it happens sometimes it dosent

tough abyss
#

Circumflex? Sounds like a porn term

jade abyss
#

The button left of "1" <- Better? :D

rich bramble
#

Oh, you can also do with uiNamespace { code }; in order to avoid killing serialization for all your code. However you're still going to have a "barrier" that you need to jump (in this case namespaces)

fallen locust
#

yes 100%

rich bramble
#

That took me a good minute to figure out why it works.

#

SQF has some seriously funky semantics

fallen locust
#

and incosistencys :P

rich bramble
#

Yeah, but in that case it actually makes sense. Namespaces only apply to global variables, locals are resolved only by scope, not by namespace. The only variables that can be publicVaraibled are globals. This works only for globals from some namespaces.

meager granite
#

Anybody would find a command like setDamageOnly useful? To change overall damage without touching the hitpoints?

granite sky
#

Is there any way at all to get the original static weapon object from the data in the WeaponDisassembled EH? As far as I can tell, it still exists but there's no bag->weapon link, it's not in vehicles and it can't be detected with entities or nearObjects (I guess because it's hidden).

rich bramble
#

If for some reason you wanted to take this code

with uiNamespace {
   (mydisplay displayCtrl 98) ctrlSetText _text;
   (mydisplay displayCtrl 99) ctrlSetText _text;
};```
granite sky
#

Ah wait, there's a disassembled EH for the weapon now...

rich bramble
#

and use a variable to avoid looking up mydispaly displayCtrl 98 twice, then the variable cannot be a local variable, since otherwise you could pass the non-serilizable type out of the uiNamespace and into the others.

#

At least that's my current understanding of the system.

#

This is why a nice "proper" language would be nice with a real type system, interfaces and stuff like "String implements Serializable"

candid sun
#

if they ditch SQF i will be pissed

#

will have wasted so many hours on this wonky language

fallen locust
#

in this case why it wont work due to a fact local variables are in that scope, when you do with UI blah thats another scope

#

thats why it wont work

#

and locals are LOCAL to a current scope

#

if you private it its local to that scope and any scope that "inherits" from it

lone glade
#

^ a local variable is destroyed if the scope is destroyed unless you private it

fallen locust
#

^^ prob better way of saying it :P

rich bramble
#

@fallen locust That's not what I meant. I meant that _text = "frogger"; // Locals cross the namespaces, but cannot contain UI handles. _x = []; with uiNamespace { _x = (mydisplay displayCtrl 98) ; _x ctrlSetText _text; _x ctrlSetText _text; }; would allow unsafe programs

meager granite
#
both_func_assemble_getBackpackDrone = {
    private _drone = {
        if(objectParent _x == _this) exitWith {_x}
    } forEach (8 allObjects 1);

    if(isNil"_drone") then {
        _drone = {
            if(objectParent _x == _this) exitWith {_x}
        } forEach (8 allObjects 4);
    };

    if(isNil"_drone") then {objNull} else {_drone};
};
#

Here is my workaround hacky function

#

It is not 100% reliable, it fails if you call it on same frame of disassembly\assembly (can't remember which)

granite sky
#

In my case I only need to know that the weapon has been dismantled, so the other EH is probably fine.

meager granite
#

iirc it fails if you call it on assembly and that vehicle is remote, something like that

granite sky
#

IIRC statics don't change locality when players mount them.

meager granite
#

Yeah, which also ends up with them doing weird physics right after you assemble them

#

like sinking into the ground for 5 seconds

granite sky
#

oh, if you assemble a weapon with remote locality?

meager granite
#

Yes

granite sky
#

Nice to know you can find this stuff with allObjects though, thx

rich bramble
#

And since SQF is dynamically scoped you can't know at compile time what scope a local variable is from

fallen locust
#

interesting

#

let me check something

rich bramble
#

So you'd either have to have a runtime check in the engine that tests for every local assignment "Hey, is this a dialog element? If yes, are we in uiNamespace and in the innermost scope?" which would probably be fairly slow

#

Or you could just conservatively disallow any assignment of dialog elements into local variables

fallen locust
#

nvm cant check it im on Dev branch

rich bramble
#

Since SQF has dynamic types you still can't catch that at compile time (in a statically typed language you should be able to), but it's still a waaaay faster check

fallen locust
#

i vote for c++ entry point

#

and ditch sqf

#

done

lone glade
#

lel, good luck rewriting everything.

fallen locust
#

well i didnt say its easy :P

lone glade
#

you would have to rewrite half of the engine....

rich bramble
#

Yeah, that'd be nice but then we'd have to trust mod/mission developers to execute arbitrary code on our machines (To be fair, we already do that for mods that use extensions)

fallen locust
#

yeaa that would be interesting

rich bramble
#

The "state of the art" solution would be to use a sandboxed scripting language (e.g. LUA) and provide an API into that

lone glade
#

actually extensions are checked by BE, so it's kind of fine

fallen locust
#

JVM hype

#

@lone glade well kinda

#

not really

#

sometimes

rich bramble
#

@lone glade Unless BE has made some magic discoveries on algorithm theory it will never be able to really guarantee anything

fallen locust
#

BE whitelists extensions, but

#

i personaly witnest it randomly allowing my 10 sec before compiled extensions to load

#

and if BE master is down it blocks whitelisted randomly

#

so im not 100% on that system

lone glade
#

yep, overall BE still needs a lot of work.

rich bramble
#

A good API for RV would be one that exposes the underlying model view of the engine. We already know the game has a "class hierachy" on gameObjects (well, stuff that Unity would call gameObjects) and I'm going to assume that most SQF commands of the type "setSomething object" are just setter functions on the underlying gameobject (with some boilerpalate and checking code)

#

It would require quite a lot of new code but probably less rewriting than the A2->A3 change of uniforms/vest/gear/modularweapons must have required

hallow spear
#

@fallen locust , are you exile mod? is the base building from the same person as iBuild?

queen cargo
#

hell there was loats of typing ...
@fallen locust i am talking about a dynamic scripted UI editor outside of the game
maybe even with the ability to programm UI Flow dynamically
but i got way too many projects right now to even think about starting a new one -.-'

fallen locust
#

@hallow spear yes and no

candid sun
#

html/css integration would be the way forward for UI imo

fallen locust
#

ah like 100% external would be nice @queen cargo

candid sun
#

stick webkit on top of arma and have done with it

queen cargo
#

NO!

#

do not make me rage about webkit @candid sun

rich bramble
#

Wait, SQF is JVM? That's kind of crazy

fallen locust
#

its not

#

i wish it was

#

so i could youst replace it with anything :P

proven charm
candid sun
#

you rage more about webkit than arma x39?

queen cargo
#

side job is softwaretester

#

think about what i test ...

#

a browser based around it

candid sun
#

i used to test embedded software, fuck that job

#

i just want to design dialogs in css and save myself 500 hours

fallen locust
#

You got replaced by automated systems :P

little raptor
#

And setDamage sets the damage of all hitpoints to the same value

little raptor
#

anyway, what I mean is that GUI model controls are very basic. So you can't show characters in them correctly. Instead, you should put the character in the world scene and use a camera to render it and put it on a texture

queen cargo
#

well grim ... still ... no time to start even to think about programming something like that

proven charm
#

so how do you render the model in 3D gui? I have "\A3\characters_F\BLUFOR\b_soldier_01.p3d" and rendering that but it has no head ๐Ÿซค

little raptor
proven charm
#

oh I thought you meant rendering only the head was impossible

little raptor
#

GUI models are just the models (like super simple objects) so there's no head or animation

proven charm
#

ok

sullen sigil
#

you could put a uniform on the unit then setobjecttexture it to be invisible

little raptor
#

He wants the head...

winter rose
#

don't we all

sullen sigil
#

yeah, invisible uniform leaves just the head

little raptor
#

Simple objects of units don't have heads to begin with

sullen sigil
#

oh rigjt i missed the simple object part

little raptor
#

And you can't add uniform to simple objects either

sullen sigil
#

isnt there a scope=1 head prop thingy? cant remember the classname for it

little raptor
#

Maybe ๐Ÿคท

#

If so he could use that I guess

sullen sigil
#

try use those 3den mods to look for it and check if it has hiddenselection possibly?

proven charm
#

look for head model?

sullen sigil
#

Yeah, iirc when I saw it it was in the helpers category but I could be wrong

proven charm
#

attaching the head... ๐Ÿ˜‘

#

head is rendering but would need to glue the parts together, head,body,hat,sunglasses (must)

#

maybe ill just take the screenshot.... ๐Ÿ˜

little raptor
#

r2t is the best way to go blobdoggoshruggoogly

proven charm
#

aah that can render whole model?

winter rose
proven charm
#

I want torso + head + hat, and those sunglasses ๐Ÿ˜„

winter rose
#

if you are certain to have R2T activated, maybe use that,
otherwise create a partial GUI in the sky and have a spawned model "behind" the GUI, that would make it appear part of it

proven charm
#

R2T needs to be activated?

#

never used it before

winter rose
#

well, one can disable PiP

proven charm
#

whats that XD

winter rose
#

picture in picture

proven charm
#

ok

winter rose
#

aka R2T

proven charm
#

ic

#

so this would work only with users who has that enabled?

winter rose
#

yep

proven charm
#

ok

winter rose
#

hence my GUI + camera recommendation

#

this works with everybody

proven charm
#

hmm what I need is the model to show when map is open and then u can click that

winter rose
#

ah, on map, then no - it's fullscreen.

proven charm
#

ok too bad

zinc loom
#

hi my friends, me again

#

is there a limit how large a variable can be ? if i set variable ="longstring";

zinc loom
#

ok ? so that is the string limit, since i save strings

#

profileNamespace setVariable ["myVehicles",_list]; how about this ? any limit to my _list ?

#

ty for your time sir

still forum
#

What is _list ?

zinc loom
#

_list = [];
{
_list pushBack [typeOf _x,getPosWorld _x,getDir _x,damage _x]
} forEach _myVehicles;

still forum
#

An array

winter rose
still forum
zinc loom
#

my bad, so the limit of the variable is the only limit, like i can make an array or arrays and its ok if i save it .... (thats my saving system for my player)

still forum
#

Yes

#

The larger your profile file becomes though, the higher risk that it corrupts and you loose all data

zinc loom
#

so whats a "smart" limit ?

queen cargo
#

for now: 0.6.0 release of OOS and then we gonna see ... might do something in the spare spare time

little raptor
# zinc loom so whats a "smart" limit ?

there's practically none. also keep in mind that other mods/missions store their stuff in the profileNamespace too
if you're working on a mission, consider adding those to missionProfileNamespace instead

zinc loom
#

ty sir

finite bone
#

Is there a way to pause and unpause videos played using BIS_fnc_playVideo? And would the video be skipped if the BIS_fnc_playVideo_skipVideo became true mid video?

brazen smelt
#

I know I'm going to get raked over the coals on this one for my lack of knowledge.

I'm trying to take my very lightweight, barebones helicopter service script and convert it to use addActions to choose which service the pilot wants, from a laptop/object.

My trigger has the following:
Variable Name: Service_Pad
Condition: True
Activation:

[thislist] remoteexec ["PHX_fnc_ServicePad",[0,-2] select isDedicated]
service_laptop addAction ["Repair", {}] call PHX_fnc_Repair;
service_laptop addAction ["Refuel", {}];
service_laptop addAction ["Rearm", {}];

PHX_fnc_ServicePad = {
    params ["_thislist"];
};

PHX_fnc_Repair = {
    params ["_veh"];
    _veh = _this select 0;
    _veh setDamage 0;
};

But I'm a complete novice to functions, addactions, arrays, etc. And this is a step up from my usual basic script stuff. Currently I'm just trying to get repairing to work but nothing happens when I select it from the laptop.

#

But I'm at a lost of how to fix it and where I'm going wrong.

#

The intended effect is when they use one of the addactions, it performs it on the aircraft within the trigger area.

winter rose
#

just
please

never use ChatGPT or whatnot ๐Ÿ˜‰

little raptor
#

I'd personally recommend adding the actions once, then use the action condition to detect if trigger is activated to show the action

#

instead of constantly addding and removing the actions
and there won't be any need for that remoteExec either (which is just wasting network performance for something that can be done purely locally)

slow brook
winter rose
#

if I ever see any addHandGrenade command or whatnot in your code, hell will rain!!!1!!11!!

slow brook
#

Why does it exist if not to be used?

winter rose
zinc loom
#

one question, how do i get the classname of a config ? _generalmacro

#

or can i but str _x and it will be the result ? if arrayfoconfigs

slow brook
#

Ok

winter rose
brazen smelt
hallow mortar
# slow brook Why is it so insistent that it exists ๐Ÿ˜„

Because ChatGPT's language model is designed to create conversational text that sounds like a person might have written it. Whether the result is true is essentially irrelevant; the model has no concept of "truth" or "facts" and simply tries to produce something that seems linguistically plausible.

slow brook
#

I mean, it came up with some good ideas for functions

hallow mortar
#

Almost certainly because it scraped someone doing the same thing off the internet

slow brook
#

Oh for sure

hallow mortar
#

Having scraped it, there's no guarantee it will remain in a usable state after going through the conversation generation, because the LM doesn't actually understand it and will happily arbitrarily alter it to seem "more natural"

brazen smelt
slow brook
#

If you're setting the script up anyway, why not tie it to the helipad / box they look at and call it on init?

little raptor
zinc loom
#

im sorry to ask again but if _x us my config, how can i figure out the class ?

#

str _x doesnz work

winter rose
little raptor
brazen smelt
#

Oh I see. Take it out of the script and just init it in the laptop

little raptor
brazen smelt
little raptor
#

what's your trigger activation type?

brazen smelt
little raptor
#

none?

brazen smelt
#

I would assume it wouldn't need to have an activation type since the script should just be referring to the trigger area and selecting an aircraft inside of it

little raptor
#

well right now it won't work because you need some sort of activation, e.g. ANY PRESENT

brazen smelt
#

Even if condition is set to true?

little raptor
#

dunno

#

but even if it works it'll always be activated blobdoggoshruggoogly

#

so there's no point in using the addAction condition

brazen smelt
#

Yeah.

#

So it really becomes a question of what would be the best way for an addaction to call on a function that checks a trigger area, selects the vehicle in it, and sets its damage to 0;

little raptor
#

if the trigger area is circular, you can simply use nearEntities (no need for a trigger anymore)

#

if not you can use nearEntities + inAreaArray

brazen smelt
little raptor
#

ok. btw if you have multiple service areas, you can define a single function in cfgFunctions for adding the actions, and use the action args to link the laptop and the trigger

e.g:

[this, trigger1] call PHX_fnc_addServiceAction

PHX_fnc_addServiceAction:

params ["_obj", "_trigger"];
_obj addAction ["Repair", {
  params ["_laptop", "_player", "_id", "_trigger"];
  [_trigger] call PHX_fnc_repair;
}, _trigger];

PHX_fnc_repair:

params ["_trigger"];
private _area = triggerArea _trigger;
private _radius = _area#1 max _area#0;
private _vehicles = _trigger nearEntities ["air", _radius / sqrt 2];
{
  ...
} forEach _vehicles
#

tho I guess in the first part the trigger might not exist when the laptop is initialized (i.e. created after laptop), in which case you can use a string instead:

[this, "trigger1"] call PHX_fnc_addServiceAction
params ["_obj", "_triggerName"];
_obj addAction ["Repair", {
  params ["_laptop", "_player", "_id", "_triggerName"];
  private _trigger = missionNamespace getVariable [_triggerName, objNull];
  [_trigger] call PHX_fnc_repair;
}, _triggerName];
brazen smelt
#

or am I heavily overthinking it?

brazen smelt
#

Ah so like:

class CfgFunctions
{
    class PHX
    {
        class Actions
        {
            class PHX_fnc_addServiceAction {};
        };
    };
};
winter rose
#

no

brazen smelt
#

I'm terrible at this.

winter rose
#
class CfgFunctions
{
    class PHX
    {
        class Actions
        {
            class addServiceAction {};
        };
    };
};
```and your mission script file would be in `Functions\Actions\fn_addServiceAction.sqf`
#

yes, as the doc states

brazen smelt
#

So much extra stuff to do just to do one little thing.

#

๐Ÿซ 

winter rose
#

you can do very simple at the cost of performance, security and stability ๐Ÿฅฐ

brazen smelt
#

Pastebin?

winter rose
brazen smelt
#

Yeah..

#

I think I got it setup but I'm getting an invalid number in expression on line 15 of the fn_addServiceAction.sqf

#

But it shouldn't because we're using the trigger area, right?

winter rose
#

indeed not

zinc loom
#

tnx to you guys i managed to finish my small garage dialog in 2 days ๐Ÿ™‚ i feel so proud


JF_openGarageWestDialog=
{
params ["_marker","_orientation"];

createDialog "GarageDialog";
_display = findDisplay 100;
_display setVariable ["JV_marker",_marker];
_display setVariable ["JV_orientation",_orientation];

_cfgArray = "(
    (getNumber (_x >> 'scope') >= 2) &&
    {
        getNumber (_x >> 'side') == 1 &&
        { getText (_x >> 'vehicleClass') in 'Car' }
    }
)" configClasses (configFile >> "CfgVehicles");


_i=0;
{
_classname = configName _x;
lbAdd[500, getText (_x >> 'displayName')];
lbSetData[500,_i, _classname];
_i=_i+1;
} forEach _cfgArray;
ctrlEnable [1, false];

};

JF_Dialog_CreateVehicle=
{
_display = findDisplay 100;
_marker = _display getVariable ["JV_marker",false];
_pos=getMarkerPos[_marker,true];
_orientation = _display getVariable ["JV_orientation",false];

_index = lbCurSel 500;
_type = lbData [500,_index];
_spawned= _type createVehicle _pos;
_spawned setDir _dir;

};

and a small dialog, any suggestions how to improve this or is it ok to be used on a server ?

#

ups orientation and dis is wrong

cobalt path
#

question is it possible to use a function or smth to make these settings apply?

class CfgImprecision
{
    class Primary
    {
        verticalRadius = 0;
        horizontalRadius = 0;
    };
    class Secondary
    {
        verticalRadius = 0;
        horizontalRadius = 0;
    };
};
winter rose
#

where? how? what?

cobalt path
#

Sorry, these suppose to set weapon sway to 0 if used in a config. However in a config, they will automatically apply to everyone. Is there a way to make settings that are foir a config to apply to a single unit for example, when scenario is right

kindred tide
#

diag_log getArray (configFile >> "CfgCameraEffects"); why does this log an empty array?

exotic flax
#

because it's in the missionConfigFile, not in the root config

#

at least according to the BIKI

kindred tide
#

still empty

exotic flax
#

No idea what the default value(s) should be, so it could be empty by default (unless you've set it yourself, in that case it sounds like a typo somewhere)

kindred tide
#

oh it's probably because it's classes nested in a class, not an array

#

which pbo the camera effects are in?

#

i just wanted to look at the config without unpacking it

exotic flax
#

you can use in the in-game config viewer to check configs

kindred tide
#

damn i've been doing things the hard way again

#

yeah i've been unpacking a lot of pbo's to get to the configs lol

exotic flax
#

I still do that as well, because it's easier to read; not to mention scripts and other files don't show up

kindred tide
#

how can i make it so the camera is not inside the seagull but like in normal 3rd person view?

#

(changing "front" to anything else doesnt help)

#

oh, i had to use switchCamera for this

granite sky
cobalt path
#

Thanks

#

Now another question, I want to be able to limit amount of sprint player can do (situation requires). I was thinking running a sort of timer, with an event handler which would force player to walk if he sprints for longer than X amount of seconds. However I cant seem to find any event handlers in regards of shift-sprinting

#

actualy alternative approach, is there an event handler where it would check how long the player is holding a keyboard key (shift for example)

granite sky
cobalt path
#

Oh yes I already figured it out a few min ago, from a thread about attaching items to player when they are parachuting

#

Now I am trying to figure out what animation name soldier are using when they are sprinting

granite sky
#

You can use that event handler on yourself to find that out.

cobalt path
#
    {
        sleep 10;
        player forceWalk true;
        sleep 5;
        player forceWalk false;
    };
#

Now the issue is, if I than run event handler for isNotEqualTo for when player stops early, it wont prevent isEqualTo from playing out

#

is there a way to give a name to event handler so I can run terminate on it?

#

I assume I cant do smth like _weirdcode = player addEventHandler ["AnimChanged",

#

nvm I can

granite sky
#

You can also terminate the EH from inside the EH.

#

_thisEventHandler will give you the same index from inside the EH.

warm hedge
#

How can I get a map building's bounding box size/center of it (that is shown in grey in 2D map)?

zenith stump
#

Hi.

I'm trying to figure out how to make hostiles ignore my players until they are seen with either weapons or vests equipped, or in an area they are not allowed in.

How could I do this?

#

I'd also like for the faction to become neutral again after some time.

granite sky
#

setCaptive true on the players.

#

I don't think there's any EH that triggers when a player pulls a weapon from a backpack, so you need a monitor loop for at least part of it.

zenith stump
#

What would be best way to do it? I'm still learning scripting.

sullen sigil
zenith stump
#

I'd like something similar to Old man scenario if possible.

#

Though the more simple the better as I'm still learning arma 3 editor and scripting.

granite sky
#

Probably the easiest approach is to spawn a two-state function from initPlayerLocal that checks stuff in a loop.

zenith stump
#

Could you please explain how to do so?

granite sky
#

Have you written any SQF before at all?

zinc loom
#

im at the stage where i should star modify the existing config i think,i want to add variables to allready existing classes

#

am i right ?

warm hedge
#

Not a scripting topic, and you're wrong

zinc loom
#

atm i set variables at spawn , works, since i set the variable trunkSize to 1000

#

ok

#

so how is the proper way ?

warm hedge
#

You're making a Mod right?

zinc loom
#

no

warm hedge
#

Whut

zinc loom
#

is that even possible ?

#

what im trying to do

warm hedge
#

Now I'm not sure what you're doing

zinc loom
#

now

#

_trunkSize = _obj getVariable ["JV_vTruckSize",0];

#

i would love to have it : _trunkSize = getNumber (_config >> "trunkSize");

warm hedge
#

Have zero idea what trunkSize is

zinc loom
#

my variable

warm hedge
#

Okay, now what exactly is the issue/situation/concern?

zinc loom
#

i do
_config configOf _obj;
_name = getText (_config >> "displayName");
that works fine, since displayName is defined

#

can i somehow add a new variable in this config ?

warm hedge
#

Clarify: Are you asking is it possible to add/edit a config via script?

zinc loom
#

yes ? i dont know im a total noob

#

im learning the proper way to do things

warm hedge
#

Please don't ? it makes still confuses me. Please answer in yes or no

zenith stump
zinc loom
#

yes

warm hedge
#

Then answer is impossible

zinc loom
#

ah

#

mb

pulsar pewter
#

I.e. the language you write scripts for Arma in.

zinc loom
#

so what is the best solution? globalArray=[array0,.... ?

warm hedge
#

Are you asking is it possible to add/edit a config via script?

Then answer is impossible

zinc loom
#

and i create arrays of default values and setVariable at spawn ?

warm hedge
#

I don't know which was your previous programming language, but SQF doesn't do it

#

It is a config, aka a Mod's scope

zinc loom
#

sure i get that now

#

ok i get it now i think

#

can i do a serversideolny mod ?

zenith stump
#

I did read the page and understood portions of it, though I'm not sure how to use it to do what I want.

acoustic abyss
zenith stump
#

Yea, I'd rather make something simple. I didn't mean I want to replicate old man scenario, just do something that would help me simulate players being insurgents hiding among populace.

I was hoping to have a simple way to have AI turn hostile if they see players wearing something they are not supposed to be wearing, and turning back to friendly after a while, rather than constantly having to change AI states manually depending on player actions.

pulsar pewter
#

That's quite a bit simpler.
Not the best way probably, but off the top of my head: set up a trigger area in the town you want the action to be in.
In the "Activation Conditions", you'll have to set up some conditions, so that if a player is wearing the forbidden clothes or equipping the forbidden weapons, the trigger is activated.

In the "On Activation" field, you can have the AI switch sides to OpFor (if you originally set them up as independent), or have the side relations between OpFor and BluFor switch to hostile.

zenith stump
#

Would it be possible to make it so that the players are tagged as captives as long as the AI doesn't see them wearing anything prohibited, and as soon as they do see them wearing something they are not supposed to, the captive status get's toggled off?

And after AI has not seen them for a while, toggle the captive status back on automatically?

Or something like that? My understanding is still quite limited.

#

And whatever is the best way to do what I want, could you please point me towards how to do it?

pulsar pewter
#

Why do you want the players to have captive status?

#

If your point is: to make sure the AI don't shoot them, my suggestion works:
Set up the SideRelations from beginning so Opfor is friends with BluFor (https://community.bistudio.com/wiki/setFriend).
Then, when trigger gets activated, change relations back to enemies.

granite sky
#

Depends if you want players to be individually "undercover" or the whole side.

zenith stump
#

I'd rather each player has their own separate status, unless that makes it considerably more difficult.

Turning them hostile towards all players is fine too.

granite sky
#

It's not the hard part anyway. Hard part is the detection logic.

zenith stump
#

I see. I guess something like that is beyond what I can do.

pulsar pewter
fallen crow
#

Hello, a query someone by chance has the synchronization script? It turns out that: My mission begins in a plane entering an airspace so that the troop is deployed in parachute but if they do not enter everything at the same time it turns out to be that they leave on the ground and not in the plane (the plane in motion) I would like to know if someone has the script that when entering the mission a counter of 5s is activated to wait for all customers to synchronize with the server and no problems

boreal parcel
#

anyone know where/how SOG PF mike force arsenals are created?

boreal parcel
#

figured it out, its done via a module

meager granite
#

Config issue? Command issue?

warm hedge
#

Config feature. I've figured out that it is because work only for unarmed one, becasue the turret anims are not handled by the engine

#

AKA, you can't alter engine's animation

#

Unless Ded

meager granite
warm hedge
#

One thing I can imagine is Windmills (the big ones), they have on and off variants with a way to force override engine driven anim. But ain't the thing for the real vehicles, IDK

dreamy kestrel
#

Q: for inventory manager purposes, re: binoculars ... as a 'weapon platform' appearing in terms of weaponsItemsCargo, what can these take in terms of accessories? literally 'anything'? I think of batteries being the primary ammo slot, but I am not familiar with other slots.

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

Also, I guess in some scenarios the getText (_config >> "simulation") can be either "binocular", sometimes "weapon" with a getNumber (_config >> "type") being defined as 4096. Not sure why the distinction, per se, other than, "it is what it is", "I do not know what I do not know", at the moment. Should I be more concerned about the classification?

Is there a way I can ask for what other accessories might be supported by a given binoculars object?

dreamy kestrel
pulsar pewter
#

Hey folks,
Quick question. Is there any way to prevent a Dynamic Airport from showing up on map?
I've got a script that forces a UAV plane to land on its location, by creating a Dynamic Airport at that Pos.
For reasons, I'd prefer that dynamic airport's location NOT to show on Map.

acoustic abyss
# zenith stump I see. I guess something like that is beyond what I can do.
#

Try search engines and the BI forums before waiting for responses here ๐Ÿ™‚

acoustic abyss
dreamy kestrel
dreamy kestrel
pulsar pewter
# acoustic abyss This could be influenced by https://community.bistudio.com/wiki/Location . Check...

Hmmm. I might be out of luck then. Here's my script to force a UAV to land:

if (_UAV isKindOf "Plane") then 
    {
    private _dynamicAirport = "DynamicAirport_01_F" createVehicle getPosATL _UAV;
    _UAV landAt _dynamicAirport;
    waitUntil {sleep 1; speed _UAV == 0};
    deleteVehicleCrew _UAV;
    deleteVehicle _dynamicAirport;
    };

This is part of a script for a C-UAS gun. When gun is fired at the UAV, under certain conditions, it forces the UAV to land at its location. If UAV is a plane-type, only way to force it to land there (AFAIK) is through creating the Dynamic Airport. But, that sets the marker on the map automatically, and I haven't found a way to prevent that/hide marker.

It's not a huge deal, but, until I delete the Dynamic Airport at the end of that If-Then, it'll show on map.

#

(A separate part of the script forces the UAV, under different conditions, to return to whoever is controlling the UAV, if there's someone, and either land there through the same method, or find a nearby airport to land at -- there, issue is more problematic, as it'll immediately draw a marker on Pos of person controlling the UAV).

pulsar pewter
#

The DynamicAirport is an object, so I can't do setType "Invisible" for it, as if it were a location.

#

Looking into it, I think that the DynamicAiport object is configured with "drawTaxiway = true", which draws the Taxiway on the map. I don't think there's anyway to change it, script-wise.

I guess I'd have to make a new object, with same exact config as the already-existing DynamicAiport_01_F, and just change the true -> false. I have no idea how to do that haha

#

--- Just kidding, drawTaxiway is 0 for it, so Idk how to ensure its not drawn on map.

jade acorn
#

if I have multiple "handleDamage" EHs for one entity, are they checked simultaneously or in order?

#

and does it matter whether I have two damage EHs or one with two instructions

hallow mortar
kindred tide
#

does the AI not see through smoke granade because it generally doesnt see through particles or because some specific behavior programmed for smoke grenades only?

warm hedge
#

Particles usually blocks their view

little raptor
tough abyss
#

Doesn't this solve this?

zinc loom
#

again me, im playing with my garage script, if i have _car setVariable ["testvar","test"]; this happens local right ?

#

my client has the var, the server not, and of course no other client ?

warm hedge
#

Correct

zinc loom
#

so, since the entire spawn peocces is a function, can i just remoteExec the function, instead of local ? and that would make my setVariable command happen in the server , so the server knows that?

#

or do i use publicservervariable ?

#

so my question: what is the bets way to replicate the result of _car setVariable ["testvar","test"]; on all clients and the server

#

ty sir for your patients, i know its hard ๐Ÿ™‚

drifting portal
#
_car setVariable ["testvar", "test",true]
zinc loom
#

r u kidding me ?! am i so dumb ?

drifting portal
#

This has the same effect as publicVariable, although the _car object must have a reference on all clients (its created through a process that has a global effect basically)

zinc loom
#

so i have to createVehicle on the server ?

#

or is createVehicle global ?

drifting portal
#

No what I meant is, is the car available on all clients/server?

zinc loom
#

๐Ÿ˜ฆ im a very lonely developer, could test that

#

its avalible on my pc ๐Ÿ™‚

drifting portal
#

How did you bring the car into the mission

zinc loom
#

a dialog has a button with onButtonClick= [] call JF_Dialog_CreateVehicle;

drifting portal
#

And what code does JF_Dialog_CreateVehicle have?

zinc loom
#

i cant make this code signs

#

blah

drifting portal
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```
โ†“

// your code here
hint "good!";
zinc loom
#
JF_Dialog_CreateVehicle=
{
_display = findDisplay 100;
_marker = _display getVariable ["JV_marker",false];
_pos=getMarkerPos[_marker,true];
_orientation = _display getVariable ["JV_orientation",false];
_index = lbCurSel 500;
_type = lbData [500,_index];
_spawned= _type createVehicle _pos;
_spawned setDir _orientation;
_spawned setVariable["JV_vTruck",true];
_spawned setVariable["JV_vTruckSize",1000];
_spawned addAction["Open trunk", {_this call JF_openTruck;}];
};
#

ty again again and again

drifting portal
#

Yeah you are using createVehicle so that car is available on all clients

zinc loom
#

... how do i know if a function is global ?

still forum
#

it doesn't start with _ (It isn't local == its global)

drifting portal
zinc loom
#

... i feel kinda stupid ๐Ÿ™‚

hallow mortar
drifting portal
zinc loom
#

i guess i have to read the wiki more

#

ty guys

#

btw is this a lefit way to pass params to a dialog ? i use createDialog, setvariables, which are defined in the editor ?

#

i had no other idea how to pass the required informations

drifting portal
sullen trellis
#

not sure if anyone could help, im trying to create a script on trigger that spawns vehicle reinforcements dropped by a heli. while it sounds simple i tried many different ways couldnt get it

zinc loom
#

ok but where do i use that for createDialog, like i do ["test"] createDialog "myDialog";

#

crow share maybe the code ? or a snipet

little raptor
zinc loom
#

ok and i use a onClickButton=

#

in the myDialog.h

#

how do i pass the var to that ?

little raptor
zinc loom
#

the variable, which waS passed to the function, that uses createDialog "myDialog";

little raptor
#

I don't understand the question. But that EH is pretty useless since remoteExec was added

little raptor
zinc loom
#

i did, ty sir, so my method is correct

#

btw @little raptor are you the same writing the examples in arma wiki ?

sullen trellis
#

_crew1 = [];
_airframe1 = [];
_mygroup = [];

if (isServer) then {

_crew1 = creategroup WEST;
_airframe1 = [getMarkerPos "marker1", 140, "CUP_MH60S_Unarmed_USN", _crew1] call BIS_fnc_spawnVehicle;

_wp1 = _crew1 addWaypoint [(getmarkerpos "marker2"), 0];
_wp1 setWaypointType "TR UNLOAD";
_wp1 setWaypointSpeed "LIMITED";
_wp1 setwaypointstatements ["this land 'land'"];

_wp2 = _crew1 addWaypoint [(getmarkerpos "marker3"), 0];
_wp2 setWaypointType "MOVE";
_wp2 setWaypointSpeed "LIMITED";

_wp3 = _crew1 addWaypoint [(getmarkerpos "marker3"), 0];
_wp3 setWaypointType "MOVE";
_wp3 setWaypointSpeed "LIMITED";

_mygroup = [getmarkerpos "marker1", WEST, ["B_Patrol_Soldier_MG_F",
"B_Patrol_Soldier_M_F",
"B_Patrol_Soldier_M_F",
"B_Patrol_Soldier_AT_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;
_wp1a = _mygroup addWaypoint [getmarkerpos "marker2", 0];

sleep .5;
_mygroup = _mygroup;
{ _x assignAsCargo (_airframe1 select 0); _x moveIncargo (_airframe1 select 0);} foreach units _mygroup;
};
.........*this script works perfect for infantry reinforcements using a trigger, im trying to find a way to get vehicle reineforcemnts instead dropped by a heli

little raptor
#

Like I said you don't need that EH. You can use a function that changes the variable and does everything the EH is supposed to do

#

But if you really want to use that EH it's like:

"Client_var" addEH {};

It gets triggered if you do

publicVariable "Client_var"
little raptor
#

idk

#

I think yes

zinc loom
#

ty for your work ! ๐Ÿ™‚

little raptor
#

Thnx but most examples are written by Lou Montana and R3vo ๐Ÿ˜…

zinc loom
#

sure

#

next question

#

is it smart to store files with only _array = [["name",12],....];
so whenever i need this array i cust do #include "helperarray.h" ?

#

or having a function that returns _array

#

can i create a class with methods and variables in a script ?

#

i bet i cant

#

sorry found a better solution ty

#

and did u set it ?

#

publicVariable "testVar";

#

i think that the event triggers after u use this line (that changes the var on all clients to your clients value)

#

missionNamespace setVariable ["StringVariable", "myString"]; // same as: StringVariable = "myString"; this is true ?!

#

can i access to the variable with StringVariable , od do i have to getVariable ?

winter rose
#

this is true ?!
usually yes (depends on the namespace in which you are, but you are usually in missionNamespace)

tough abyss
#

Been cracking at it for a few hours... Can't figure it out

zinc loom
#
// your code here
JF_returnCarInfos=
{
params["_request"];
_array=missionNamespace getVariable "JV_carsDB"
_return=[];

{
    _type=_x select 0;
    if (_type isEqualTo _request) then 
    {
    _return=_x;
    break;
    };

} foreach _array;
_return
};

is this ok ? first time using break in a function...

#

the string can only appear once, so the foreach can stop

#

the script works, i just dont know if the foreach stops

stable dune
zinc loom
#

well i want it to stop searching , what it does with break; i tested it with some systemmsgs

south swan
#

inb4 findIf

zinc loom
#

n1 ty sir

zenith stump
#

Also, does anyone know how to edit range of stuff created by that menu? Right now it can be interact from 15 meters away, which obviously is a bit too much for picking it up from his body.

fair drum
zenith stump
#

So the first part would go to code complete to create a variable, and second part goes to trigger to recognise that variable and activate the intel?

fair drum
#

Aye, it would activate whatever you have sync'd to the trigger.

candid sun
#

what's the practical difference between
#define VAR 123
and
VAR = 123
?
you can't re-define a #define unlike a normal var right?

zenith stump
#

Okay. Could you explain what each part of those do, so I know in the future how it works?

#

So that rather than just pasting code, I actually know what it means.

fair drum
#

Standby let me get off my phone and onto a keyboard

zenith stump
#

Okay, thank you.

fair drum
fair drum
# zenith stump So that rather than just pasting code, I actually know what it means.

so

missionNamespace setVariable ["FATE_IntelPickup", true, true];

is the same as

FATE_IntelPickup = true;
publicVariable "FATE_IntelPickup";

Global variables exist in all scopes, but they only exist for that machine. The public variable makes it update on all machines. Since your add hold action is a local command, anything that happens with it will only happen on the client that did the action. Therefore, if we want the server to know about that variable, we have to make it public

!isNil FATE_IntelPickup
// or rather you could use:
missionNamespace getVariable ["FATE_IntelPickup", false];

is checking either that the variable exists (because it doesn't until that hold action is completed) or in the bottom example, its checking to see if it exists, and if it doesn't, it defaults to false which is essentially doing the same thing (as its waiting for a true statement)

fair drum
#

Feel free to look up these commands on the wiki and look at their examples

zenith stump
#

So there are multiple commands that do essentially the same thing?

fair drum
#

more like multiple ways to get the same result

zenith stump
#

I see. So using missionNamespace would add the intel only for the player who picked it up, while public variable would add it to everyone?

fair drum
#

depends on if the intel module is global or local or not. haven't used it

zenith stump
#

I think it's global.

candid sun
#

it's a macro then?

fair drum
#

make the trigger server only and if that module is global, then everyone should see it

zenith stump
#

Is there a way to test it on my own whatever it shows up for everyone or not?

tough abyss
#

you can redefine #define's and even #undef (ine) them, but only during preprocessing

fair drum
#
  • turn off battleye
  • start 2nd instance of the game
  • start multiplayer from editor on host client for LAN
  • join with 2nd instance

should do that for any multiplayer locality testing

tough abyss
#

Yes, it's a macro

candid sun
#

i'm not sure i need #define in my life yet

zenith stump
#

Does it work even with steam?

#

Also, how do I turn battleye off?

fair drum
#

launcher

#

battleeye is what kills all but one instance. turn it off and you can have multiple instances. just hit the play button on the launcher x amount of times

tough abyss
#

Well according to some it's evil and shall not be used.

zenith stump
#

Okay, thank you.

Any idea on how to limit the interaction range for the hold action?

stable dune
tough abyss
#

It makes things more beautiful, if used correctly

south swan
#

doesn't addAction have a straight up distance parameter?

zinc loom
#

it has a radius limit

stable dune
zenith stump
tough abyss
#

BTW. Can you make the variable name to a string using macros?

#

I don't really into C++, but from what I've seen so far is, that there are WAY more #define's than public variables in some projects

zenith stump
#

If I change a scrip in a external file, not the editor itself, do I have to restart the game for it take effect?

winter rose
#

well, depends what you mean by that

tough abyss
#

There is a macro in CBA that does that.

#

#define QUOTE(var) #(var)
I think

zenith stump
#

For example, I changed one line from false to true and saved it.

I'm wondering if the change takes effect immedaitely, or if I have to restart arma for it to take effect.

winter rose
#

what script? a CfgFunctions? a code called with execVM? other?

tough abyss
#

QUOTE(blah)
-> "blah"

#

I literally spent days trying to figure it out and ended up using an array [var,"var"] instead

hallow mortar
#

Changes to script files are usually detected when the mission is saved or launched. Sometimes you may need to close and reopen the mission (not the whole game) to pick up new config that appears in Editor menus (e.g. CfgMusic entries appearing in trigger music selection).
Changes to data files such as images may require a game restart due to caching.

tough abyss
#

Yeah, I think it's just "#"

winter rose
#

Changes to script files are usually detected when the mission is saved or launched
that is not exactly accurate. CfgFunctions loads files once, whereas execVM etc read the files from the disk when called.

description.ext however is reloaded every start/stop/save of the editor mission.

zenith stump
#

So it depends? Some require nothing while others require a restart?

tough abyss
#

Ohh that's freaking awesome. Thanks

zinc loom
#

sp i dont have to load the mission again ? just save loads the descriptin ?

hallow mortar
#

Changes to mission script files never require a complete restart of Arma.
The worst requirement is to close and reopen the Editor, and this only applies to a few cases. Most scripts are recompiled at the very least on mission start, and often more frequently.

candid sun
#

why'd you want to make a var name a string? for debug logging or something?

queen cargo
#

@tough abyss never said macros are "evil" just that garbage you guys use is

#

macros are a legit way to make constants

tough abyss
#

statement = (this animate [#SEL, 0]); \

queen cargo
#

the benefit of em is simple in case of the simple vs of #define VAR 123 and VAR = 123

#

execution speed

winter rose
#

so, depends
if you have more details, we can bring more explanations

tough abyss
#

"the garbage you guys use"
Way to shit on other peoples work

candid sun
#

#define being faster yea?

queen cargo
#

the way i always talked about such stuff

pulsar pewter
#

Hmmm, I'll ask one more time, since this is a more decent hour of the day for all you Europeans. ๐Ÿ™‚
But, anyone know how to get a "Dynamic Airport" object from NOT marking the runway on the map?
I've got a script that forces a UAV plane to land wherever it happens to be when hit, or when hit it's forced to return to whoever is connected to it and land there. However, the Dynamic Airport object creates a marker on the map that would reveal the operator's POS.

Here's the relevant script:

if (_UAV isKindOf "Plane") then 
    {
    private _dynamicAirport = "DynamicAirport_01_F" createVehicle getPosATL _UAV;
    _UAV landAt _dynamicAirport;
    waitUntil {sleep 1; speed _UAV == 0};
    deleteVehicleCrew _UAV;
    deleteVehicle _dynamicAirport;
    };

The dynamic Airport is an object, not a location marker per se, so I can't setType "Invisible".
In its config, it's supposed to have DrawTaxiway = 0, so I'm not quite sure what's drawing the runway on the map.

zenith stump
#

I'm messing around with this script and trying to understand how it works and how to use it.

https://forums.bohemia.net/forums/topic/202256-release-incon-undercover-a-comprehensive-undercover-incognito-simulation/

#

So far I've gotten it to work partially.

queen cargo
#

@candid sun it is less "overhead" for the engine as you provide the constant value directly

hallow mortar
pulsar pewter
#

Oh, of course. I can't believe I was thinking runway when the word was taxiway hahaha.
Yeah, that's my fear, that it's hardcoded. I'll work around it if needed but I figured I'd ask if anyone knows or can think of anything else. I've looked online for a while but no dice.

queen cargo
#

however, it wont be changeable during runtime

daring zinc
#

let's be honest here

#

you're just trying to find ways to shit on ace

tough abyss
#

@candid sun For a AI script that would have an amount of the ai and an amount of active ai as a variable. For different purpose units I had different variables that I set up myself. Like : patrol_inf, backup_inf, town_inf, patrol_veh. So it would only uncache troops if the set variable for that purpose unit was less than a number. e.x. There would only be max 30 active patrol_inf at max, but I could have at the same time another 30 backup_inf active.

queen cargo
#

@daring zinc ha XD never laughed that good
i dont need to find "way to shit on ace"
just would have to use the ones i already have or i would ask one of those communities out there crying in my ears because of any shit not working

slow brook
#

is there a way to just send a message to a customchat without declaring a player? IE Using the server as the object?

winter rose
hallow mortar
#

There must be a sending unit, but the unit doesn't have to be a player

queen cargo
#

but you always take shit too personal @daring zinc

slow brook
#

Well thats just it, I want to throw a "Warning: Something is about to happen" to a customchat

#

But it's technically coming from a server script

winter rose
#

hmm, [side, identity] customChat "message" syntax doesn't exist apparently

slow brook
#

But it needs to go to all players in that channel

#

And there's no easy way to identify that]

#

it also increases network traffic

hallow mortar
#

A single text chat message is not much network traffic. And if you want the server to cause something to happen on other clients....well that's network traffic no matter what.

queen cargo
#

wanna try to flame me again?

slow brook
#

Right but I just want to send a message to that channel right, which is much less theoretically than having to send it to all clients and only displaying if they're in that channel

zenith stump
#

I'm looking at the scripts instructions and I'm not sure what this part means.

For each out of bounds area, place a marker over the area with "INC_tre" somewhere in the marker name (e.g. "MyMarkerINC_tre" or "INC_tre_sillyMarkerName_15"). The script will handle the rest. But if you want, you can also include other markers by listing them in the relevant array in UCR_setup.sqf.

Any idea what I should do here?

nocturne bluff
#

Fuck me.

slow brook
zenith stump
#

I've put down map markers, tried different shapes, but they don't seem to work.

slow brook
#

I didn't say shape, I said name

#

Variable name

hallow mortar
# slow brook Right but I just want to send a message to that channel right, which is much les...

This is a very unimportant level of optimisation.
You can identify what units are in a channel using radioChannelInfo and only remoteExec to them, but I promise you that sending one message globally is basically nothing in terms of overhead. It only happens once, it's a simple one-way package, no different than if a player had typed a text message themselves.
If you are doing this a lot and/or stacking large messages in the JIP queue, then it's a problem. One message every now and then is not a problem.

zenith stump
#

I've put that as the name and it doesn't seem to work. I've tried multiple different markers with that name either alone or included. I must be doing something wrong.

nocturne bluff
#

I wanted to go on a explsovie rampage unto your ass X39, but im way too old for that shit.

hallow mortar
nocturne bluff
#

Come back in like 3 years when you are not fucking 12.

slow brook
#

Or IDF inbound, on <GRID>

hallow mortar
#

Note that players won't see messages in channels they're not in, even if their client receives an instruction to display a message. That's how the channel system works, you don't need to do anything to filter this.

slow brook
#

I know

#

But you still send that data in the first place

hallow mortar
#

Once every 10 minutes is a completely fine frequency to broadcast a simple chat message.

candid sun
#

if (#define vs var == beef) then {apologies}

hallow mortar
#

You can also have it operate completely locally, instead of a server authority sending messages to clients, but I don't know how your system works and if clients will have the information needed to do that.

slow brook
#

Ideally the client will only have the display functions, ie the formatting ect that is needed to display whatever is sent appropriately.

The Server will decide what needs to be sent in the context of the message

#

And as I've said, that content can change based on player positions, reinforcments ect

#

This stuff is already stored as Functions, so it's ready to go. I just didn't want to be broadcasting things to everyone

#

or RemoteExeccing a function on particular clients that are in that channel

hallow mortar
#

Well, you can filter your remoteExec targets using radioChannelInfo. Or you can not, and experience no difference of any consequence whatsoever. That's the options it comes down to.

zenith stump
#

God... I feel so dumb... It meant the area markers, not the icons...

queen cargo
#

@nocturne bluff 21
here ya go

nocturne bluff
#

21 in body

cobalt path
#

Any idea why I am getting an error for ";"

_mfstaminashit3 = player addEventHandler ["InventoryClosed", {
    params ["_unit", "_container"];
    _weight = loadAbs player;
    if (_weight > 880) then
    {
        player forceWalk true;
    };
    else
    {
        player forceWalk false;
    };
}];
nocturne bluff
#

12 mentally

hallow mortar
#

} else {

daring zinc
#

how about this, @queen cargo: go put your code where your mouth is and fork ace. call it x_ace or whatever you want. write whatever you want to do and we'll see how many people will make the switch

granite sky
#

(no semicolon before else)

cobalt path
#

oh I see, really my bad

daring zinc
#

until then, sit the fuck down and work on XMS2

tough abyss
#

Everyone has an opinion based on the knowlage they have. ACE 3 obviously took a lot of effort and in my opinion is great, But can anyone explain how do I find the dialogue or script for the ACE 3 markers channel switching?

zinc loom
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```
โ†“

// your code here
hint "good!";
zinc loom
#
// your code here_spawned
 addAction["Open trunk of " + _name, {[_this select 0, _this select 1] call JF_openvTruck;}];
#

in this a legit way to call the function ?

#

_obj

queen cargo
#

why should i create my own fork of ACE3?
thats ridiculous

pulsar pewter
#

Sure. Though, you might need pass the params to the script within the addAction if they're defined outside that scope. But I dont see any issues.

tough abyss
#

@daring zinc gotta love open-source.

zinc loom
#

so _obj is 0the target, and player is 1 the caller , since he called the action right ?

winter rose
#

yep

pulsar pewter
#

Yeah, should be fine.

zinc loom
#

this addaction ["test",{ (_this select 1) setVariable ["JV_vTrunk",[["testitem1",2]],true]; }];

this is on an object in the editon, init, is this fine ?

sullen marsh
#

Literal drama going on right now?

#

grabs popcorn

daring zinc
#

i doth protest thy use of the word literal

tough abyss
#

line 128 switches it

queen cargo
#

i did not started it @sullen marsh

nocturne bluff
#

Honestly, i dislike the #define stuff going down in ACE but i don't hammer down on a cool mod/team for if they use fucking define or whatever. there are pros to both sides and being a child about and pissong on ace everytime you get is annoying and boring.

candid sun
#

seems i started it just by trying to get my head around #define

nocturne bluff
#

Don't fret about 25* , it's not your beef.

#

:D

tough abyss
#

your fault

zinc loom
#

found the error, somehow i tried to getvariable JV_vTruck ...

daring zinc
#

holy shit @nocturne bluff that sounds reasonable

#

get out

nocturne bluff
#

OKAY

#

./leave

cobalt path
#

Okay, I am trying to run an eventhandler that would punish a player if he sprinted for longer than 10 seconds (mission setting requires it)

_mfstaminashit1 = player addEventHandler ["AnimChanged",
{   
    params ["","_anim"];
    if (_anim isEqualTo "amovpercmevasraswrfldf") then
    {
        []spawn
        {
            sleep 10;
            player forceWalk true;
            sleep 10;
            player forceWalk false;
        };
    };
}];

But obviously I dont want player to forceWalk if he did not sprint for 10s.
At first I thought maybe run a seperate event handler that would terminate this one if animation isnt active anymore, but that just kills it immediatly. Than I thought to run a timer of some sort, but I got no idea if those exist in arma

_mfstaminashit1 = player addEventHandler ["AnimChanged",
{   
    params ["","_anim"];
    while {_anim isEqualTo "amovpercmevasraswrfldf"} do
    {
        []spawn
        {
            sleep 10;
            if (_anim isEqualTo "amovpercmevasraswrfldf") then
            {
                []spawn
                {
                    player forceWalk true;
                    sleep 10;
                    player forceWalk false;
                };
            }
            else
            {
                hint "place holder for doing nothing";
            };
        };
    };
}];

This doesnt seem to work either, altho I am pretty sure this doesnt work cuz I suck at this

queen cargo
#

@nocturne bluff i also did not started a shitstorm about it
i tried to argue whilst the ENTIRE ACE3 team started flaming and tried to do shittalking
but hell who cares right?
go for it
im the evil
can take it if you need it

sullen marsh
#

FUCKING PITCHFORKS KILL @candid sun

#

HE STARTED IT

little raptor
#

idk. maybe the EH didn't get added

little raptor
queen cargo
#

he asked a quite serious question

sullen marsh
#

Nah m8 come here and we can eat popcorn together

candid sun
#

hey guys it's ok to use goto right?

queen cargo
#

no

tough abyss
#

gtfo

daring zinc
#

SHOT'S FIRED

#

SHOT'S FIRED

little raptor
#

second of all, you can do something like this:

_mfstaminashit1 = player addEventHandler ["AnimStateChanged",
{   
    params ["_player", "_anim"];
    if (_anim == "amovpercmevasraswrfldf") then
    {
        if (!scriptDone (_player getVariable ["punishDelayHandle", scriptNull])) exitWith {};
        _handle = [_player] spawn
        {
            params ["_player"];
            sleep 10;
            _player setVariable ["isBeingPunished", true];
            _player forceWalk true;
            sleep 10;
            _player setVariable ["isBeingPunished", false];
            _player setVariable ["punishDelayHandle", scriptNull];
            _player forceWalk false;
        };
        _player setVariable ["punishDelayHandle", _handle];
    } else {
      if (_player getVariable ["isBeingPunished", false]) exitWith {};
      terminate (_player getVariable ["punishDelayHandle", scriptNull]);
    };
}];
#

it's not the best solution but I just used your own code and fixed it blobdoggoshruggoogly

daring zinc
little raptor
#

(not tested tho)

sullen marsh
#

Goto is a more sophisicated branch than if

slow brook
#

Is disableChannels[]={} not supposed to work in the Editor / ListenServer mode?

sullen marsh
#

It gives a lower level of control

tough abyss
#

you dum?

sullen marsh
#

ASSEBLEY USES IT

#

It must be good

winter rose
#

I'd say it is

daring zinc
#

i heard assembly is really similar to sqf guise

tough abyss
#

I wish there were bit shifts in SQF

cobalt path
little raptor
slow brook
# winter rose I'd say it is

ok so with this set in Description.ext

/*
    0 = Global
    1 = Side
    2 = Command
    3 = Group
    4 = Vehicle
    5 = Direct
    6 = System
*/
disableChannels[]={
    {0, true, true},
    {1, true, true},
    {2, true, true},
    {6, true, true}
};

I'm still able to access all chats. Side as the example here.

cobalt path
hallow mortar
little raptor
#

getVariable has two syntaxes
the one that has array on right can also take a default value, in case the var doesn't exist:
_varspace getVariable [_varName, _defaultvalue]

slow brook
queen cargo
#

implement em @tough abyss

slow brook
queen cargo
#

in SQF

cobalt path
#

Okay this will take me time, I will get back to you later maybe

queen cargo
#

will be funny

#

i promise

tough abyss
#

What would be the point?

slow brook
#

Description.ext doesn't work with this either

disableChannels[]={
    {0, FALSE, FALSE},
    {1, FALSE, FALSE},
    {2, FALSE, FALSE},
    {6, FALSE, FALSE}
};
winter rose
#

6 is not settable

slow brook
winter rose
#

does it work if you host the mission properly?

queen cargo
#

FUN

slow brook
#

You mean Player hosted or Dedicated, because either way is "properly"

sullen marsh
#

The poinmt wouold be shifting bits left or right

winter rose
#

oh, I thought you started from Eden

slow brook
#

I was doing it through both after packing

#

Going to try on a dedi now

tough abyss
#

@tough abyss line 28

    // class MarkerChannel: RscCombo {idc = 103;};

commented. So it does not have an effect... I cannot understand.

What is going on? I don't see where it chooses between the channels.
Sorry for being really slow on this.

#

commented out means commented out.

queen cargo
#

you kinda ruined the flow @tough abyss

tough abyss
#

It could still be there by inheritance

slow brook
#

Ok it works on a Dedi server

winter rose
#

so maybe Eden does not take it into consideration yep

zinc loom
#

can i do an addaction on a player, so that the player can use wheen to acces the action at any time ?

slow brook
zinc loom
#

on what ?

#

player addaction ?

hallow mortar
zinc loom
#

so that i can triger it, not other players on me

slow brook
hallow mortar
#

So true to disable, then

slow brook
#

Yup

winter rose
#

will edit the example

slow brook
#

Can you mention that EDEN ignores it please?

#

Would've saved me time testing ๐Ÿ˜„

winter rose
#

yup

slow brook
#

ty

winter rose
#

one can ask @still forum to make it work, or the reason(s) why it doesn't :p

hallow mortar
#

Probably sensible to also mention that description.ext overrides the server.cfg disableChannel settings

slow brook
#

Don't like tagging people like that

hallow mortar
#

(this is mentioned on the server.cfg page but not description.ext)

winter rose
slow brook
#

Aye

zinc loom
#

ty sir, i missunderstood player addcaction

tough abyss
#

s-s-so... it means that the channel chooser is already in arma, not added by ace?

winter rose
#

done, thanks for the checks & ideas Cc @slow brook / @hallow mortar

tough abyss
slow brook
winter rose
#

oh noes

tough abyss
#

Yeah, I think they implemented it after we did it

queen cargo
#

beautiful

tough abyss
#

I never play vanilla anymore so not sure.

#

I feel like stone-walling because lack of knowledge about the dialogue system

queen cargo
#

ignore the cpp files

#

use createCtrl

#

and create em dynamic

#

<3

winter rose
#

normal

#

missionnamespace setVariable ["adminChannel", _channelID]; โ† not broadcast to other machines, so private _adminchannel = missionnamespace getVariable "adminChannel"; is nil