#arma3_scripting
1 messages ยท Page 88 of 1
My bad. Your right.. the support requester then.
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
(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)
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
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;
_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
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.
thanks for the help i will do that and get back to you in a bit
what kind of object is safest for attachTo ? in that it doesnt mess with unit's movement
could you please elaborate?
least amount of simulation, ignored by ai, but still rendered
i usually use Land_Can_V2_F its small havent seen it effect ai and i doubt it would be that laggy
Yeah, I do rememeber, is there a way to contact you on dms?
_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
you are spawning independent troops lol
AAF I think they are
I mean I've added CSAT to my NATO group so anything is possible in script world
basically have CSAT troops with AAF gear
Oh I don't mind that they have AAF clothes and stuff, I'm just messing around
I can spawn CSAT if I wanted
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;
works on my machine
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 
i've never underrstood that much is that just so people dont use the same var name on the server or optimization?
basically, that's just instruction for interpreter that says "don't try to find this variable anywhere else, make a new one right here"
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
damn, i made flying bots like in fallout, by attaching some objects to a unit's head and then hiding the unit
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;
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
Why do you want to define it in cfgVehicles?
that just sounds right to my noobish ears
i was thinking about just making an array of strings
cfgVehicles is for actual vehicles that are in the game, not for putting random stuff into
Why do you even want to use the config for that?
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)
It doesn't record turrets or in general non-drivers
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
true
Still struggling to get a correct select condition for this, only progress I've had is < instead of == 
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
Don't use select. And if find doesn't work it's probably a bug
It would mean hashmap equals doesn't work
it works but it doesn't generate all combinations
what should i use instead of select then? ๐
forEach
what now?
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
Well I think I didn't understand the problem
If find works then no need to use forEach
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 ๐
bruh intensifies
it is driving me insane ๐
is using SQF for that config generation a hard requirement? Because most general-purpose languages would do it better
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
Well first off your number of combinations in the code is wrong
First you have to get the required ones, then count the non-req ones
The number of combinations is:
cr + cn * (cn +1)/2
cr is count required (should be either 1 or 0 if none is required)
cn is count not required
And then you can just use your current code with <= i as condition
(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 {}
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``` 
if each can be on or off then the combination number is just 2 ^ _count
thx, will try what leopard said first though as i am very confused right now with a tiny brain
Wut
No
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?
Well required ones are always there no?
So all of them make 1 thing, and they're always prepended like your example
ahhh, the joys of poorly worded combinatorics ๐
(or non if they don't exist)
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
cn * (cn +1)/2 is "how many pairs of non-required stuff can be chosen" (n choose 2, if i remember the lingo correctly).
and for N non-required if each of them can be present or not we get count [present, not-present] (2) power N 
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 
my phone battery died 
Anyway, I was gonna say the select part is not correct
atm i have this but yeah the select part is still the issue ๐
Yeah what I said wasn't correct
Let me rethink it...
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 
this would select sub-array of length _i from the _selections
Totally would not work if you want to have skipped before (or inbetween) included
this is a lot of confusion
I think this works after a small amount of modification ๐
I'll try the formatting part now
though that is probably the most difficult element of it 
Yeah this was correct
Got it working now, thanks so much artemoz
https://sqfbin.com/itucapixojicufukakec
Finished version if anyone so desires it
finally can relax
oh wait, still need empty quotes for skipped selections 
is there anyway to delete map objects?
you can hide them
thanks
does sqf use .NET regex
it uses boost
ah thx
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
How are you supposed to use brackets within regexreplace? Just not supposed to? 
oh wait ofc literal characters duh
you mean []?
dw I meant () but forgot \ exists
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 
yeah I just noticed it got moved there
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
getOrDefault or something?
I forgot that exists
you can use a keyDown EH to prevent it
you can handle the esc and make it so nothing happens
like Leo said ๐
oh, youve misunderstood artemoz -- i cant just have them with "" because then they end up as "" in the final string ๐
i don't understand what that trim/regex/whatever monstrocity is, yes
If I just use {_x getOrDefault ["classname", "", true]} for example I end up with stuff like this
joinString instead of whatever str _whatthehell trim [whatever]?
or just do _array = _array - [""]; before applying memes to it 
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 ๐
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;
i don't see anything clipboard-related in the code, though?
meant to say systemchat
most map objects don't have types
including trees and rocks
any idea how i can detect if they are trees and bush's? ,they are spawnable in the editor and have types in config
one way would be checking their map type
or was it called class?
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
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
Is _weapon an object or a string? If its a string, have you tested to see exactly what that string is?
its a string and i know it is the weapons i am after because any code there fires
So it is deleting the tree, but not hinting?
no
refer to this bit of text
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
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.
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
Then something is wrong here with this condition: (getModelInfo _hitEntity # 1) in Ncl_VegitationModels
ah
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"
Describe what you're trying to do in english.
toString {
configName _x isKindOf "car" && getNumber (_x>>"scope") >= 1
} configClasses (configfile >> "CfgVehicles") apply {configName _x}
ty sir
not if you want to go further then a simple "click this button" ui
arma UI dosnet go any further then click this button, this looks like this, and hide and do this
so yeaaa
Depends on what you wanna do. When it comes to animate stuff in the UI, then... meh
you can ;)
Question about ACE 3 Markers.
https://github.com/acemod/ACE3/blob/master/addons/markers/functions/fnc_initInsertMarker.sqf
How do I edit the dialogue for the channel the markers are placed in i.e. Side, Global, Group.
I got no clue what _channel = _display displayctrl 103; refers to or what it does exactly. My attempts of educating myself using the wiki have failed.
Some UIEH wizardry :P
I know, but the Ingame UI Editor is suckysucky for that :D
True
https://community.bistudio.com/wiki/Arma_3:_CfgDisabledCommands#Structure
args[] - (Optional) the format is {{leftArgumentType},{rightArgumentType}}. The information about argument types could be retrieved with
supportInfocommand.
But thats more with arma limitation then Editor, doing live things on UI would be a pain
ain't nobody got time for that
I need to edit it so that you can only use the channels which are not defined in disableChannels in the briefing
Doing live would be sometimes just better, when you re-arrange stuff for example
<--- has time :D
Do it then :P
is it possible to render man model in 3D at GUI? or just the head, is this possible?
http://killzonekid.com/arma-scripting-tutorials-gui-part-6/ may help (or not), i suppose
thx will take a look
i guess arma dont have 2D heads so Id need to render only the head in 3D
vanilla arsenal seems to very specifically only check configfile >> "cfgunitinsignia" 
what type of "live" activity are you referring to? watching a video in UI?
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
i just refered to simple animations in the UI :D
no
you can use r2t tho
maybe the format is not right
meh thats blah
nonononoooo
i did this for buttons :P
http://puu.sh/lcFLz/667aecccde.png
but doing that for each ctrl type + all EHs
how about no
I was more think bout that https://www.youtube.com/watch?v=L2voQjmYI5o
Blabla ich bin eine Beschreibung blabla mich liest eh keiner blabla
oh that is cool
Yep, not that hard. Just time consuming
EHs? Why? ^^
becouse thats how you execute code on dialogs
simple onButtonClick :D
that covers buttons :P
so uh.. is that something thats willing to be shared?
https://www.youtube.com/watch?v=ikOiXdWLPjI
this was a fing pain to do!
Not yet @hallow spear Its party of my new project.
casual 1.2k lines of config only
Dat ARROW!
Yeah, Fiddle with UI is just... text text text text ; Text text text ; , : comit text text text
1.2k lines for the PDA only?
dang, i thought i was cool putting a progress bar over a pic.. this is inspiring stuff.
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
yeah
It looks really professional, really well done !
Sometimes feels like AAA devs don't even put this much effort into their games.
Given how incredibly bad the UI system is in Arma, I'm surprised that pda is even possible. Consider my mind blown.
Its not that bad tbh, its just not documented well enough
hm, almost everything is documented, you just have to fiddle a bit around :P
no no no no no :P not relly
Rly?
there is so much in arma thats not documented at all including scriptcomands :P
Ah, yeah. Thats true
not documented in a way it dosent even exist in wiki :P
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 They're now on the biki, they're just fairly new commands.
erm, they are all in oO @fallen locust And that for a pretty long time^^
I remembered, using them about 2-3 Month ago
Ah
Just to disable stupid SideChatTalking
I still need help on how to disable the channel selection for ace markers ;(
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
?! nope
Ah
I think one of my major gripes with the UI system is that createDialog doesn't respect config inheritance :( http://feedback.arma3.com/view.php?id=21842
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
What, seriously? That's the most 'magic' of all the 'magic' I've seen in Arma in a long time.
There is so many little things like that its stupid
can someone ELI5 serialization for me?
Convert stuff that only makes sense on your PC/your thread into a form that makes sense everywhere and can be easily transferred around.
why can't you use it when you're referring to displays/controls as a variable?
Serialization in a programming context is basically creating a string that represents a data object
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.
you can't do it regardless of locality afaik alexander
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.
@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
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.
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?
juse use variables? and disableSerialization; if you know your code won't have to travel across the network.
it's that simple yeah? thanks
@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"
@candid sun It's Arma so expect a million caveats ;)
but if you do DisableSir; a = 3; pv "a"; wierd crap will happen :P
Oh, disableSerialization kills ALL publicVariable calls for the script? that's...an interesting design choice
it dosent but i expirienced wierd stuff like
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
Yeah, that looks like serialization was in fact disabled ;)
Open Doors with Ctrl+Space?! oO Why not Circumflex?
yup looks like a pointer :P
I cant repro it 100% tough
sometimes it happens sometimes it dosent
Circumflex? Sounds like a porn term
The button left of "1" <- Better? :D
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)
yes 100%
That took me a good minute to figure out why it works.
SQF has some seriously funky semantics
and incosistencys :P
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.
Anybody would find a command like setDamageOnly useful? To change overall damage without touching the hitpoints?
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).
If for some reason you wanted to take this code
with uiNamespace {
(mydisplay displayCtrl 98) ctrlSetText _text;
(mydisplay displayCtrl 99) ctrlSetText _text;
};```
Ah wait, there's a disassembled EH for the weapon now...
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"
if they ditch SQF i will be pissed
will have wasted so many hours on this wonky language
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
^ a local variable is destroyed if the scope is destroyed unless you private it
^^ prob better way of saying it :P
@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
Been asking exactly for that few months ago but got NOPE'd: https://feedback.bistudio.com/T171260
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)
In my case I only need to know that the weapon has been dismantled, so the other EH is probably fine.
iirc it fails if you call it on assembly and that vehicle is remote, something like that
IIRC statics don't change locality when players mount them.
Yeah, which also ends up with them doing weird physics right after you assemble them
like sinking into the ground for 5 seconds
oh, if you assemble a weapon with remote locality?
Yes
Nice to know you can find this stuff with allObjects though, thx
And since SQF is dynamically scoped you can't know at compile time what scope a local variable is from
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
nvm cant check it im on Dev branch
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
lel, good luck rewriting everything.
well i didnt say its easy :P
you would have to rewrite half of the engine....
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)
yeaa that would be interesting
The "state of the art" solution would be to use a sandboxed scripting language (e.g. LUA) and provide an API into that
actually extensions are checked by BE, so it's kind of fine
@lone glade Unless BE has made some magic discoveries on algorithm theory it will never be able to really guarantee anything
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
yep, overall BE still needs a lot of work.
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
@fallen locust , are you exile mod? is the base building from the same person as iBuild?
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 -.-'
@hallow spear yes and no
html/css integration would be the way forward for UI imo
ah like 100% external would be nice @queen cargo
stick webkit on top of arma and have done with it
Wait, SQF is JVM? That's kind of crazy
you mean like render to texture once then display that texture?
you rage more about webkit than arma x39?
i used to test embedded software, fuck that job
i just want to design dialogs in css and save myself 500 hours
You got replaced by automated systems :P
Is that even how the damage works? afaik damage just returns the avg of hitpoint damages or something like that
And setDamage sets the damage of all hitpoints to the same value
Once? I don't think that's how it works. You have to constantly render it afaik (well Arma does it automatically but still...)
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
well grim ... still ... no time to start even to think about programming something like that
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 ๐ซค
Yes as I said you can't do that
oh I thought you meant rendering only the head was impossible
GUI models are just the models (like super simple objects) so there's no head or animation
ok
you could put a uniform on the unit then setobjecttexture it to be invisible
He wants the head...
don't we all
yeah, invisible uniform leaves just the head
Simple objects of units don't have heads to begin with
oh rigjt i missed the simple object part
And you can't add uniform to simple objects either
isnt there a scope=1 head prop thingy? cant remember the classname for it
try use those 3den mods to look for it and check if it has hiddenselection possibly?
look for head model?
Yeah, iirc when I saw it it was in the helpers category but I could be wrong
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.... ๐
r2t is the best way to go 
aah that can render whole model?
"a3\characters_f\heads\m_white_01.p3d" if you just want a floating head
https://community.bistudio.com/wiki/Arma_3:_createSimpleObject/objects
I want torso + head + hat, and those sunglasses ๐
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
well, one can disable PiP
whats that XD
picture in picture
ok
aka R2T
yep
ok
hmm what I need is the model to show when map is open and then u can click that
ah, on map, then no - it's fullscreen.
ok too bad
hi my friends, me again
is there a limit how large a variable can be ? if i set variable ="longstring";
yes
I invoke the power of the wikiโฆ
https://community.bistudio.com/wiki/String
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
What is _list ?
_list = [];
{
_list pushBack [typeOf _x,getPosWorld _x,getDir _x,damage _x]
} forEach _myVehicles;
An array
if an array, it's written on that page as well as
https://community.bistudio.com/wiki/Array
We shall consult the wiki again https://community.bistudio.com/wiki/Array
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)
Yes
The larger your profile file becomes though, the higher risk that it corrupts and you loose all data
so whats a "smart" limit ?
for now: 0.6.0 release of OOS and then we gonna see ... might do something in the spare spare time
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
ty sir
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?
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.
I know I'm going to get raked over the coals on this one for my lack of knowledge.
nah
you have the right to not know
you just don't have the right to persist in ignorance if you are told something ^^ hehehe
welcome aboard the SQF train, ask kweshtiuns anytime
just
please
never use ChatGPT or whatnot ๐
one problem, besides not written correctly ofc, is that your script keeps adding actions, but never removes them
as for why it doesn't work, this is what you're doing: (service_laptop addAction ["Repair", {}]) call PHX_fnc_Repair;
meaning you're passing the result of addAction, which is a number, to the function
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)
You say this, and I've used it to rubber duck code before
if I ever see any addHandGrenade command or whatnot in your code, hell will rain!!!1!!11!!
Why does it exist if not to be used?
because it doesn't exist and chatGPT tends to invent such nightmares
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
Why is it so insistent that it exists ๐
Ok
for info, all the Arma 3 commands are listed (and documented!) on the wiki ๐
https://community.bistudio.com/wiki/Category:Arma_3:_Scripting_Commands
I thought RemoteExec was needed for Multiplayer usage?
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.
omg, a politician
I mean, it came up with some good ideas for functions
Almost certainly because it scraped someone doing the same thing off the internet
Oh for sure
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"
Is there a good recommended way to do that?

If you're setting the script up anyway, why not tie it to the helipad / box they look at and call it on init?
read this
https://community.bistudio.com/wiki/Multiplayer_Scripting
you do need it if the command should run on another machine (e.g. due to local arg, local effect, server exec, etc.)
im sorry to ask again but if _x us my config, how can i figure out the class ?
str _x doesnz work
you can find all config-related commands here
https://community.bistudio.com/wiki/Category:Command_Group:_Config
put the addAction code in the init of the laptop:
this addAction
[
"Repair",
{
call PHX_fnc_Repair
},
nil,
1.5,
true,
true,
"",
"triggerActivated Service_Pad"
];
Oh I see. Take it out of the script and just init it in the laptop
instead of triggerActivated, you can also check player inArea Service_Pad
I was going to do inarea but since the laptop will be outside of the helicopter pad area, I didn't go with it.
what's your trigger activation type?
None.
none?
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
well right now it won't work because you need some sort of activation, e.g. ANY PRESENT
Even if condition is set to true?
dunno
but even if it works it'll always be activated 
so there's no point in using the addAction condition
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;
if the trigger area is circular, you can simply use nearEntities (no need for a trigger anymore)
if not you can use nearEntities + inAreaArray
Its squared. Formed to the shape of the helipad.
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];
Defining it like:
class CfgFunctions
{
#include "scripts\ServicePad\functions\PHX_fnc_addServiceAction.hpp"
};
```?
or am I heavily overthinking it?
no. see the wiki
Ah so like:
class CfgFunctions
{
class PHX
{
class Actions
{
class PHX_fnc_addServiceAction {};
};
};
};
no
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
you can do very simple at the cost of performance, security and stability ๐ฅฐ
Pastebin?
nah please use https://sqfbin.com/ and paste the link thanks ๐
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?
indeed not
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
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;
};
};
where? how? what?
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
diag_log getArray (configFile >> "CfgCameraEffects"); why does this log an empty array?
because it's in the missionConfigFile, not in the root config
at least according to the BIKI
still empty
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)
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
you can use in the in-game config viewer to check configs
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
I still do that as well, because it's easier to read; not to mention scripts and other files don't show up
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
Nah, config methods are applied on load and can't be adjusted afterwards. However there is setCustomAimCoef that can do something similar in script.
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)
If you really want to go down the rabbit hole, there's this: https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#AnimStateChanged
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
You can use that event handler on yourself to find that out.
{
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
You can also terminate the EH from inside the EH.
_thisEventHandler will give you the same index from inside the EH.
How can I get a map building's bounding box size/center of it (that is shown in grey in 2D map)?
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.
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.
What would be best way to do it? I'm still learning scripting.
Could use cba inventory handler
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.
Probably the easiest approach is to spawn a two-state function from initPlayerLocal that checks stuff in a loop.
Could you please explain how to do so?
Have you written any SQF before at all?
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 ?
Not a scripting topic, and you're wrong
atm i set variables at spawn , works, since i set the variable trunkSize to 1000
ok
so how is the proper way ?
You're making a Mod right?
no
Whut
Now I'm not sure what you're doing
now
_trunkSize = _obj getVariable ["JV_vTruckSize",0];
i would love to have it : _trunkSize = getNumber (_config >> "trunkSize");
Have zero idea what trunkSize is
my variable
Okay, now what exactly is the issue/situation/concern?
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 ?
Clarify: Are you asking is it possible to add/edit a config via script?
Please don't ? it makes still confuses me. Please answer in yes or no
I don't even know what that is.
yes
Then answer is impossible
SQF = Arma's programming language.
I.e. the language you write scripts for Arma in.
so what is the best solution? globalArray=[array0,.... ?
Are you asking is it possible to add/edit a config via script?
Then answer is impossible
and i create arrays of default values and setVariable at spawn ?
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
I did read the page and understood portions of it, though I'm not sure how to use it to do what I want.
You probably knew this already, but the "Old Man" scenario was infamously complex and buggy. Really pushing the scripting to the limit. Perhaps, instead of building a cathedral, you could aim for something straightforward but also fun. Just put down some units, change some things with a few scripting commands, and play it with friends ๐
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.
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.
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?
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.
Depends if you want players to be individually "undercover" or the whole side.
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.
It's not the hard part anyway. Hard part is the detection logic.
I see. I guess something like that is beyond what I can do.
Right, I wasn't thinking MP. Oops.
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
anyone know where/how SOG PF mike force arsenals are created?
figured it out, its done via a module
https://community.bistudio.com/wiki/animateSource
UGV example code doesn't work with B_UGV_01_rcws_F despite it being same model, how so?
Config issue? Command issue?
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 

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
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?
generally along these line?
_y = player;
_bin = binocular _y;
_compat_mags = compatibleMagazines _bin;
_compat_items = compatibleItems _bin;
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.
We got you fam: https://forums.bohemia.net/forums/topic/202256-release-incon-undercover-a-comprehensive-undercover-incognito-simulation/
INCONTINENTIAS UNDERCOVER / CIVILIAN RECRUITMENT This is a complex and performance friendly undercover simulation for players and their AI subordinates. Work as a guerrilla cell, go undercover, recruit comrades, and cause mayhem. SP / Coop and Dedi compatible. (For those of you whove used my prev...
Try search engines and the BI forums before waiting for responses here ๐
This could be influenced by https://community.bistudio.com/wiki/Location . Check your airport script and see if you can set it blank.
at least in my current mod set, there do not appear to be any binos that take any accessories, ammo, etc.
but is this the general idea? i.e. compatible items? magazines?
at least in terms of inventory display, I would not necessarily want to show a slot, muzzle, ammo, etc, if a thing could not take that accessory, magazine, or what not.
just overall finding binos bit of a wingnut snowflake square peg through the weapons platform round hole, if you will. just want to have my bases covered there. thanks...
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).
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.
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
It is important, and order of adding is considered. The handleDamage documentation has the details https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleDamage
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?
Particles usually blocks their view
Particles that have blockAiVisibility (or sth like that) in their config block AI visibility
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 ?
Correct
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 ๐
_car setVariable ["testvar", "test",true]
r u kidding me ?! am i so dumb ?
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)
No what I meant is, is the car available on all clients/server?
How did you bring the car into the mission
a dialog has a button with onButtonClick= [] call JF_Dialog_CreateVehicle;
And what code does JF_Dialog_CreateVehicle have?
!code
```sqf
// your code here
hint "good!";
```
โ
// your code here
hint "good!";
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
Yeah you are using createVehicle so that car is available on all clients
... how do i know if a function is global ?
it doesn't start with _ (It isn't local == its global)
How are you defining the function
... i feel kinda stupid ๐
I think it's important at this point to clarify whether we're talking about local/global (network) or private/global (script scope)
I think they are referring to the former, they are using GUI
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
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
ok but where do i use that for createDialog, like i do ["test"] createDialog "myDialog";
crow share maybe the code ? or a snipet
You can use a function that creates the dialog and pass the variables to that function
What variable?
the variable, which waS passed to the function, that uses createDialog "myDialog";
I don't understand the question. But that EH is pretty useless since remoteExec was added
Use setVariable to store it in the dialog
i did, ty sir, so my method is correct
btw @little raptor are you the same writing the examples in arma wiki ?
_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
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"
I do help with wiki, but not sure which example you mean
idk
I think yes
ty for your work ! ๐
Thnx but most examples are written by Lou Montana and R3vo ๐
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 ?
this is true ?!
usually yes (depends on the namespace in which you are, but you are usually inmissionNamespace)
@tough abyss Where is the ace markers channel selection dialogue ?
https://github.com/acemod/ACE3/blob/master/addons/markers/functions/fnc_initInsertMarker.sqf
Been cracking at it for a few hours... Can't figure it out
// 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
@zinc loom
If you want them type _x in array.
You can apply, pushback, or select from an array.
You can take a look
https://community.bistudio.com/wiki/Array
https://community.bistudio.com/wiki/apply
https://community.bistudio.com/wiki/pushBack
https://community.bistudio.com/wiki/select
Or do you want it "break" when the 1 st object is equal?
You can use the exitWith command, then it leaves from the forEach loop.
well i want it to stop searching , what it does with break; i tested it with some systemmsgs
inb4 findIf
n1 ty sir
Thanks, it works for the most part. And the parts that don't work properly are probably because I don't know how to use it properly.
I'd like to make intel pick up on a AI character so that players can pick it after he is dead using the hold action created by this sub menu.
What I need is some way for code completion to create something that allows me to tell the trigger the intel has been picked up to make it visible.
How would I do that?
https://cdn.discordapp.com/attachments/1104832044363685889/1125921393117245540/image.png
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.
You can set a global variable to something like
missionNamespace setVariable ["FATE_IntelPickup", true, true]
And you would check with
!isNil "FATE_IntelPickup"
Since the variable doesn't exist until you set it to true.
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?
Aye, it would activate whatever you have sync'd to the trigger.
what's the practical difference between
#define VAR 123
and
VAR = 123
?
you can't re-define a #define unlike a normal var right?
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.
Standby let me get off my phone and onto a keyboard
Okay, thank you.
obviously there are multiple ways to do this, this is just the path of least work for what you have
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)
Feel free to look up these commands on the wiki and look at their examples
So there are multiple commands that do essentially the same thing?
more like multiple ways to get the same result
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?
depends on if the intel module is global or local or not. haven't used it
I think it's global.
it's a macro then?
make the trigger server only and if that module is global, then everyone should see it
Is there a way to test it on my own whatever it shows up for everyone or not?
you can redefine #define's and even #undef (ine) them, but only during preprocessing
- 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
Yes, it's a macro
i'm not sure i need #define in my life yet
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
Well according to some it's evil and shall not be used.
Okay, thank you.
Any idea on how to limit the interaction range for the hold action?
Condition:
//Special arguments passed to the code: _target (action-attached object), _this (caller/executing unit)
_target distance _this < 5;
So it doesn't show up until the caller is closer than 5 (change the value what you want to be distance to interact)
It makes things more beautiful, if used correctly
doesn't addAction have a straight up distance parameter?
it has a radius limit
Yes.
But can you use it in this
#arma3_scripting message
Thanks, that worked like a charm.
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
If I change a scrip in a external file, not the editor itself, do I have to restart the game for it take effect?
nope
well, depends what you mean by that
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.
what script? a CfgFunctions? a code called with execVM? other?
QUOTE(blah)
-> "blah"
I literally spent days trying to figure it out and ended up using an array [var,"var"] instead
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.
Yeah, I think it's just "#"
Changes to script files are usually detected when the mission is saved or launched
that is not exactly accurate.CfgFunctionsloads files once, whereasexecVMetc read the files from the disk when called.
description.ext however is reloaded every start/stop/save of the editor mission.
So it depends? Some require nothing while others require a restart?
Ohh that's freaking awesome. Thanks
sp i dont have to load the mission again ? just save loads the descriptin ?
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.
why'd you want to make a var name a string? for debug logging or something?
@tough abyss never said macros are "evil" just that garbage you guys use is
macros are a legit way to make constants
statement = (this animate [#SEL, 0]); \
the benefit of em is simple in case of the simple vs of #define VAR 123 and VAR = 123
execution speed
it depends on how said script is used yes
just know that an executing script runs in memory, so never re-read the file to see if it still matches
so, depends
if you have more details, we can bring more explanations
"the garbage you guys use"
Way to shit on other peoples work
#define being faster yea?
the way i always talked about such stuff
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.
I'm messing around with this script and trying to understand how it works and how to use it.
INCONTINENTIAS UNDERCOVER / CIVILIAN RECRUITMENT This is a complex and performance friendly undercover simulation for players and their AI subordinates. Work as a guerrilla cell, go undercover, recruit comrades, and cause mayhem. SP / Coop and Dedi compatible. (For those of you whove used my prev...
So far I've gotten it to work partially.
@candid sun it is less "overhead" for the engine as you provide the constant value directly
It may be that there is no way to prevent it from doing that. It might be a hardcoded part of how the engine handles runways and map generation.
Note that the DrawTaxiway property is about the taxiway (a secondary path along the side of the runway that allows aircraft to taxi to and from the staging areas) and not the runway itself, so I'm not surprised it doesn't control the runway marker.
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.
however, it wont be changeable during runtime
@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.
@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
is there a way to just send a message to a customchat without declaring a player? IE Using the server as the object?
no
use systemChat if you need this
There must be a sending unit, but the unit doesn't have to be a player
but you always take shit too personal @daring zinc
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
hmm, [side, identity] customChat "message" syntax doesn't exist apparently
maybe just use said player
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
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.
wanna try to flame me again?
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
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?
Fuck me.
put a marker down with a name <Something>INC_tre
I've put down map markers, tried different shapes, but they don't seem to work.
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.
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.
I wanted to go on a explsovie rampage unto your ass X39, but im way too old for that shit.
If you're very very concerned and you're sending a very large message, you can make a function for the sole purpose of locally displaying this one message, and then you're only remoteExecing the function name and not the entire message. But if you're only doing it once, it's not really worth it.
Come back in like 3 years when you are not fucking 12.
I'm aiming for every 10 minutes something will happen that certain groups will want to know about. IE, CAS detected, in a Dedicated AIR Channel it will display a warning message
Or IDF inbound, on <GRID>
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.
Once every 10 minutes is a completely fine frequency to broadcast a simple chat message.
if (#define vs var == beef) then {apologies}
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.
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
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.
God... I feel so dumb... It meant the area markers, not the icons...
@nocturne bluff 21
here ya go
21 in body
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;
};
}];
12 mentally
} else {
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
(no semicolon before else)
oh I see, really my bad
until then, sit the fuck down and work on XMS2
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?
!code
```sqf
// your code here
hint "good!";
```
โ
// your code here
hint "good!";
// 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
why should i create my own fork of ACE3?
thats ridiculous
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.
@daring zinc gotta love open-source.
so _obj is 0the target, and player is 1 the caller , since he called the action right ?
yep
Yeah, should be fine.
this addaction ["test",{ (_this select 1) setVariable ["JV_vTrunk",[["testitem1",2]],true]; }];
this is on an object in the editon, init, is this fine ?
i doth protest thy use of the word literal
line 128 switches it
i did not started it @sullen marsh
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.
seems i started it just by trying to get my head around #define
your fault
found the error, somehow i tried to getvariable JV_vTruck ...
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
@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
idk. maybe the EH didn't get added
first of all you shouldn't use animChanged. you should use animStateChanged
he asked a quite serious question
Nah m8 come here and we can eat popcorn together
hey guys it's ok to use goto right?
no
gtfo
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 
(not tested tho)
Goto is a more sophisicated branch than if
Is disableChannels[]={} not supposed to work in the Editor / ListenServer mode?
It gives a lower level of control
you dum?
I'd say it is
i heard assembly is really similar to sqf guise
I wish there were bit shifts in SQF
Thanks, it works perfectly. I am just trying to analyse it why it works, I am so confused. But I will get there maybe
np. if you don't understand any part feel free to ask
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.
Okay for example, you do getVariable ["punishdelayhandle
But arent you suppose to setvariable "punishdelayhandle first, or it will just be nil
just a thought but try it with false instead
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]
triple negatives? Yeah i'll try
implement em @tough abyss
in SQF
Okay this will take me time, I will get back to you later maybe
What would be the point?
Description.ext doesn't work with this either
disableChannels[]={
{0, FALSE, FALSE},
{1, FALSE, FALSE},
{2, FALSE, FALSE},
{6, FALSE, FALSE}
};
6 is not settable
Fair, but it doesn't explain the behaviour not working with 0,1,2
does it work if you host the mission properly?
FUN
You mean Player hosted or Dedicated, because either way is "properly"
The poinmt wouold be shifting bits left or right
oh, I thought you started from Eden
@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.
you kinda ruined the flow @tough abyss
It could still be there by inheritance
Ok it works on a Dedi server
so maybe Eden does not take it into consideration yep
can i do an addaction on a player, so that the player can use wheen to acces the action at any time ?
on init (or initplayerlocal for mp) addaction in there
Is it false to disable or true to disable? The wiki page is not as clear as it could be, useful to know for sure so someone
can clarify it
so that i can triger it, not other players on me
So my Description.ext has
#include "includes\channel_settings.hpp" // Channel Settings.
includes\channel_settings.hpp
/*
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}
};
So true to disable, then
Yup
yep, it's been some time I told myself that ๐
will edit the example
yup
ty
one can ask @still forum to make it work, or the reason(s) why it doesn't :p
Probably sensible to also mention that description.ext overrides the server.cfg disableChannel settings
Don't like tagging people like that
(this is mentioned on the server.cfg page but not description.ext)
dw, I just did ๐ธ
Aye
on it too
ty sir, i missunderstood player addcaction
s-s-so... it means that the channel chooser is already in arma, not added by ace?
done, thanks for the checks & ideas Cc @slow brook / @hallow mortar
Yeah I even turn off pings on replies like this cause it feels like the other person can't ignore it if they wanted to
probably going to add more to this, I think it's disabling the customChats too
oh noes
Yeah, I think they implemented it after we did it

