#arma3_scripting
1 messages ยท Page 69 of 1
I will use that!
well just keep in mind it will break stuff with vanilla AI
they must pass thru walls because their pathfinding is wrong sometimes ๐
some AI mod I'm working on
That sounds cool what would that mod do ? And how different would it be from Lambs and vcom ?
it's a complete AI rewrite
Lambs and VCom are vanilla AI (with added enhancements)
Super AI is something different
You'd still have to use raycasts to determine if the unit is shooting through a wall or only touching a wall while shooting at a legitimate target (e.g. the unit's back is touching a wall while it is shooting a target that is on the same side of that wall as the unit).
In addition to that, even if there was a fitting EH, chances are that it would only fire when the unit first makes contact with the building (i.e. when the unit enters or touches the building for the first time). So after the EH fires you'd still have to continuously check if the unit is touching a wall and if it is trying to shoot through that wall.
Is it gonna be controlled by ChatGPT so we can train it for future. You know SkyNet ๐
no 
already tried that, chatgpt is crap for that type of usage
it just does things differently. like a new path finding algorithm and stuff
especially in a military simulation game
because believe it or not, chatgpt cannot condone violence
Yeah, I just needed something fast and that could reduce the "ai cheating" feeling so super a accurate fix I will leave to the devs. So my intended workaround is that any unit "too close" to walls to be confortable firing just have their weapon aim disabled until the move past that minimal distance... without doing more checks because now that I have to use eachframe that is already quite expensive
a while loop on a very short uisleep (0.001) won't do the trick right? It has to be onEachFrame to work?
it might 
Where do I begin with spawning an AA missile that is locked on to a flying vehicle and that triggers the warning system of that vehicle?
Is there a function to toggle NVG on and off for a player?
https://community.bistudio.com/wiki/Arma_3:_Actions#NVGoggles with action you can force a nvg on and off.
Thank you, I always forget about actions
s q f b i n . c o m
256*?
both should, ideally paa
how can I check if a certain mod pbo is installed
there is https://community.bistudio.com/wiki/allAddonsInfo ๐
Yeah ideally, thing is background isn't changing, and icon is also not changing
thx
any other factors for the image?
like, no transparent background or something like that?
that's what I am using for the texture
texture = __EVAL((__FILE__ select [0, count __FILE__ - 15]) + "\orbat\Iraq.jpg");
color[] = {255,255,255,1};
nope
but once it was loaded, it's stored in the cache
also, use getMissionPath plz
Ok, I just wanted to try this one, just in case
so now it said can not get texture (null)
basically this, when you hover the picture is there, but the logo itself isn't and also the background isn't
is it too big maybe?
so it works?
No? haha, it only appears under the text when I hover on the main ORBAT group
it might need to be stretched for it to be proper (maybe the actual display ratio is not 2:1 but don't change the image's resolution)
(most likely) 1:1 or 16:9
that's what I get currently
I'll try that
<null> seems to be a path error ๐
Yeah I fixed the path you right, so ALMOST there, the Top icon is changed, but now, how do I make it apply also for the background haha?
I will try to stretch it
this icon is 1:1 ratio, so you might need another, separate file
what do you use for the background?
(config-wise)
I thought texture is for the background as well? 0_0
Maaaaaaan I changed the ratio for the image to 16:9
but I am trying to open it with TexViewe 2 to save it as paa
and it would not open and I don't understand why
Ok never mind, 16:9 also doesn't apply to the background
so is there a line for a background?
boi am I stupid
do I use __EVAL(getMissionPath "someFolder\SomeImage.paa"); for insignia as well?
seems not needed
same as here Icon works, but still no backgound
then try w/ __EVAL
and what did you use for insignia?
insignia = "subDir\myTexture.paa"; // ?
I may be dumb but is there eventHandler for executing code on a mission start? I've been looking for ages and fell I'm missing something obvious
init.sqf? initServer.sqf?
You are looking for the init*.sqf scripts from https://community.bistudio.com/wiki/Event_Scripts ๐
or on mission "press play" start @toxic jungle ?
The thing is i'm trying to execute code from a .cpp file
so every time a certain unit type is spawned it activates the code
but it's activating the code when it's spawned in 3den and not in game
so that's not "on mission start"
also that's not exactly scripting, more #arma3_config no?
I guess, it kinda bleeds between them, I'll ask over there anyways
do you want code to start "on mission start" or "on object placement"?
no luck
I tried
insignia = "orbat\Iraq.paa";
and also insignia = __EVAL "orbat\Iraq.paa";
__EVAL(getMissionPath "orbat\Iraq.paa") isn't it ๐
I was just typing that as you we're typing hahaha
I am trying again
OMFG HALLELUJAH
IT WORKS
finally god damn
thank you thank you thank you
I found an Issue, but it's not the ORBAT
the ORBAT works great
apparently the image I use, when I am on High quality and very high quality preset in game it works as indented, but if I change to Ultra it's just an orange box
is it the picture or something?
Final product
came a long way from like 5 hours ago haha so thanks again to everyone who helped, I learned something new today
Both sqf nearestObject [player, "building"]; and sqf nearestObjects [player, ["building"], 2]; show me 0ms as the time they take, so how do I figure which is faster?
isn't there a diag code performance thing that runs the code 1000 times and returns that?
I know there's a button for it in the advanced developer console
I used the button, it shows 0ms...
oh, well ๐ ignore me then ๐
But it does also say, count 1/1000... so It only tried it one time? Anyone knows how to increase that?
editor debug but the scenario running
I mean while moving the character and stuff, not just the editor, run in multiplayer hosted
nearestObjects [player, ["building"], 2];
Execution Time: 0.0051 ms | Cycles: 10000/10000 | Total Time: 51 ms
nearestObject [player, "building"];
Execution Time: 0.0030 ms | Cycles: 10000/10000 | Total Time: 30 ms
when you try to diag in scheduled it will usually give you that result
is ViV just super fancy attachto command? and if so, whats the script that helps it stack vehicles in the area. Like say you have 4 quad bikes on a hemmit, ViV would space out evenly in the bed of the truck
it's config and engine work
ah unfortunate
Anyone know how to check via script who a player has muted? (It's the client checking locally to also filter chat messages)
As in in-game VC mute?
Is there a way to get the compass heading of a given item? i.e. if the named item is 600m due west, it just returns 270
(I'd like the players to have to use 2-3 terminals that give hints that give a compass heading so they have to use their map tools)
Ah, nvm, getDir
....But what's the difference between getDir and getDirVisual
Ah, that shouldn't matter since the target isn't moving. Thanks.
As the existent of getDirVisual suggests it also matters for diretion too
Seems mostly like the Visual mode is faster to update.
But since I'm having them triangulate a building
Ah
MutedPlayer = [];
LEG_mutePlayer = {
params ["_playerName"];
private _players = allPlayers - entities "HeadlessClient_F";
{
if((name _x) isEqualTo _playerName) then
{
MutedPlayer pushBack _x;
_x setVariable ["BIS_noCoreConversations", true];
_x disableConversation true;
[[],{
for [{_i=0}, {_i<5}, {_i=_i+1}] do
{
_i enableChannel false;
};
}] remoteExec ["spawn", _x];
};
} foreach _players;
};
Leg_unMutePlayer = {
params ["_playerName"];
{
if((name _x) isEqualTo _playerName) then
{
MutedPlayer deleteAt _x;
_x setVariable ["BIS_noCoreConversations", false];
_x disableConversation false;
[[],{
for [{_i=0}, {_i<5}, {_i=_i+1}] do
{
_i enableChannel true;
};
}] remoteExec ["spawn", _x];
};
}foreach MutedPlayer;
};
``` Here is a fnc for muting and unmuting players myb you can use it.
Now it doesn't matter... Unless the building rotates itself
multiplayer is limited to 1
yes. Its not a script. Its a super fancy attachto command, that's done in engine
Is there "Special Forces" (SF) mark for ORBAT units? or are those the only one?
couldn't one overwrite/add new stuff to the CfgChainOfCommand?
through modding perhaps, not scripting
I know, just answering the "are those the only one" question with another question
and tbh, "IDK" ๐ (I actually never used ORBAT)
Is player FPS locked when using ORBAT ? So have simple ORBAT and in watch i am waching player fps
with diag_fps when i am not using ORBAT its 60-70 when i enter in ORBAT it goes to 25 ?
might be, or it's so badly optimized the FPS goes down that much
strategic map causes a significant fps drop too iirc
"yeah yeah we wanted the player to have a cinematic experience and limited to 24 FPS!" sweats
I would say SQF UI calculations for 500$ Alex ๐
"People cant see more than 25 fps anyway"
They can't! Any noticeable difference beyond that is due to the games framerate and your monitor's refresh rate combined with the input delay ๐
Wondering what would be a way to speed up position update of a GroundWeaponHolder?
Situation: Client disassembles remote static weapon, 2 backpacks created, I have static weapon owner delete tripod backpack and move primary backpack in its place
The issue, client sees primary backpack at old position, while remote client who owns the backpack (and weapon holder) has it moved
Takes like 5 seconds to update, looks like game sends weapon holders position updates really slowly
Would it be possible to just spawn the Drone and delete the drone, Basicly just avoid the hole assamble and disassemble process ?
Maybe split them into two ground holders?
Too radical of a solution, plus engine still does its disassemble\assemble logic regardless, no way to remove "Assemble" action for example
they're already 2 different weapon holders, I delete tripod one and move primary to tripod position if its closer, the issue is that engine updates ground weapon holders positions way too infrequently, other clients get updated position after several seconds
I guess its some for some attachTo local hackery
Attach to seems to solve many things in this game
The point is to send as less network messages as possible, I could make all clients do setPos* on a remote entity but this is even worse
Wish there was something like syncStateNow ENTITY
Its smthing like buildings with disabled simulation. It takes like 20 seconds to update on clients
Maybe such command can accompany @still forum's future attempt at fixing locality change desync, also let mission designers script sync the state to everyone in the network
Send out current client's object state to everyone else right now
Maybe limit it only to owners of the entity ๐ค
"Send out current client's object state to everyone else right now"
Only the server can do that. But if the changed state is on a client, the client first needs to send to server, and the server then needs to send to clients
How long does it take to change owner of static object from client to server, smthing like ~5seconds?
Yeah, meant that, client sends their current state of the entity to server and then it goes to everyone else
// Params: [Entity, PositionWorld, [VectorDir, VectorUp]]
// Returns: Nothing
both_refunc_setTransformationLocal = {
systemChat str ["both_refunc_setTransformationLocal", _this];
params ["_entity", "_pos_world", "_vdu"];
if(isNull both_setTransformationLocalHelper) then {
both_setTransformationLocalHelper = createTrigger ["EmptyDetector", getPosWorld objNull, false];
both_setTransformationLocalHelper enableSimulation false;
};
if(isNil"_vdu") then {
_vdu = [vectorDir _entity, vectorUp _entity];
};
both_setTransformationLocalHelper setPosWorld _pos_world;
both_setTransformationLocalHelper setVectorDirAndUp _vdu;
_entity attachTo [both_setTransformationLocalHelper, [0,0,0]];
detach _entity;
};
both_setTransformationLocalHelper = objNull;
publicVariable "both_refunc_setTransformationLocal";
In case somebody needs my scripted setPosWorldLocal
if(!isNil"_vdu")
spacing died today :p
Muh saved bytes!
owner change message goes through instantly, its not part of the "normal" sync
So you could change object owner to server, and then call setpos
Won't work, it still takes X amount of time for server to send out positions of slowly simulated entities which I think ground weapon holders are
Then just delete/create new one when position has to update ๐
You cant have speed without sacrifices ๐
Creating and instantly deleting entities is not a good thing, especially engine-created ones, practice shows it ends up desyncing sometimes and clients end up with "Object not found" spam
Would love some help solving for the intersection of 3 planes, given a point and normal for each. Or some other way to find the vertex position of a Geo lod intersection (for snapping).
what's the use case?
want to find the red-boxed corners positions to snap them together. I was coping with object-axes aligned boxes, but these are rotated within the object =(
[points, normals]
[[[-2.28027,-15.0871,5.76712],[-2.24219,-15.1105,5.7718],[-2.22266,-15.0519,5.79391]],[[-0.984948,0.172853,-7.27596e-011],[-0.181124,-0.98346,-1.16415e-010],[-1.61759e-010,0,1]]]
yaaay, vector math
Do you have those points somehow?
aka "you're on your own buddy" ๐ muhahahaaa
Yeah I have points and normals from lineIntersectssurfaces, edited
And you want to do what with them?
I mean you said you want to find those points 
But you have them already?
Those are points slightly off the intersection point, right? where I can aim. the 3 planes intersect at a single point, and that's the point I want
Ah that's what you mean ๐
Well the cross of 2 plane normals gives you the direction of the common line between those 2
If you intersect it with the 3rd plane you get the point
(you also need the common point)
I tried to start there. can get direction of intersect-line with crossproduct of normals, ofc. trouble with the common point xD
Well there's a simpler solution
There was a very clean algorithm I saw a while ago
Google this: Graphics Gems 3 intersection of 3 planes
It's an old book and I saw a snippet of that algorithm on stack overflow too
this one?
As for figuring out the common point it's a very simple equation system of 2 eq and 2 unkn

But the graphics gems method is just cleaner
yaay, complex computations in SQF
thank god this is not done constantly
Accurate reaction
is there any known limit of profilenamespace size
Do identities handle death sounds for man based units?
Or is that something that is handled separately/user solution wise?
storage space afaik
Yes thanks
there are no "death sounds"?
i thought the profile corrupting bug was caused by it getting too big? 
either way, time to log all my players' info on server's profilenamespace ๐
a couple 100mb before it just doesnt load?
I read a long time ago about people with massive save files having issues loading their profile saves unitl cleaning them
seeing as its just raw text i probably dont even need to worry about size limitations do i
try missionProfileNamespace, this will avoid you having to use specifically coded variables (unless you want to share them in other scenarios?)
so handled by user, got it
yeah its logging to be accessed across missions etc. given up using google sheets (authentication is irritating) and airtable just doesnt work for it
discord bot should be able to request that info from the server somehow shouldn't it? ๐ค
them damn mods!
If game does half way through a write, it will be corrupt. The more data the longer it takes to write, the higher chance to die while writing
What are you saving?
Ah. Can you use mission profile namespace thing? Is it possible to access that by name?
player's specialism, qualifications in the unit, time they created a character (doing one character one life), time they joined the unit and number of times they've died with that character
Nah, needs to persist across missions so be dependent on server
oops forgot to disable ping that time, sorry
Server's profilenamespace works fine just wanted to check if it has a limit first
it would be honestly useful to have an identity setup for those kind of death sounds instead of manually having to bind them to each unit and verifying their side/identity on death, but alas its a really niche and case use feature
I forgot how mission profile thing works
That data sounds like stuff you don't want to loose. So probably best to save it in two places
If it's server, you could use a extension to write to text file
Yeah was considering doing that -- I'd imagine server's profilenamespace cannot be accessed by a discord bot but basically anything else can?
run, people - RUN!!
HAHAHA
whoever helped me knows I needed help with the ORBA file, now I almost got it completely but I am a bit stuck again, I am trying to add a faction on BLUFOR, yesterday I made an OPFOR
now, I think I did it correctly, but I am not sure
i.e if I send a request to the server for the info it'd be better to have it read from a text file that is not the server's profilenamespace
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
scroll down to the //TMG part
that's the 2nd faction I am trying to do
it says I am supposed to have }; on line 400
but I don't understand why nor do I see why
waiiiiiiiiiit
I found it
please indent things properly 
don't "deindent" without a }; ๐
That would have to be a extremely elaborate discord bot
one tab for scope
class a
{
//we are now in "scope 1" so we have 1 tab
class b {
class c; //scope 2, 2 tabs
};
};```
I am confused? it works like that so what am I missing
it works, but it's hard to determine where is what!
ohh
this should not happen, for example
i havent been able to get any central database stuff working so communicating straight to arma server seems to be my "easiest" route
google sheets has poor documentation (and requires tons of validation) and airtable just... doesn't work for some reason, its just returning empty strings 
yeah hahaha
what text editor do you use
notepad ++
ok you know the lines you get from brackets to brackets
those should always be correct
so those who are blocked by other text, do I just tab it forward?
is that what you saying?
(the rows)
class A
{
// indent 1
// here
class B
{
// indent 2
// here
class C
{
};
// deindent 2
// here
}; // closing B
// deindent 2
// here
}; // closing A
the lines should always be going down to their closing bracket with no interruptions
what KJW posted ๐
yeah ok but in the ORBAT some rows gotta be under some rows
yes, so you'd have something along the lines of this
oh ok yeah so most of my stuff is like besides couple one's that I missed
สทสฐแตแต แถ แตโฟแต แถฆหข แตสฐแตแต
here class A romnomnom class B & C, B & C are siblings ("neighbours"), A โ B and A โ C, not A โ C
minecraft font its easier for me to read
ty
have i converted someone else to minecraft font
might swap my desktop environment to it who knows
*panic*
i find it easier to read against vsc's dark background than the normal one
this is probably something similar to why people use comic sans isnt it
can vscode be configured so only sqf is comic sans
i dont think so
...instead of doing this recruitment crap arma based i could do it discord based and make bot write to text file on arma server that client then reads from 
C# extension, with json database package.
Used that recently, ultra simple one line of code single text file database
hmmm, would still require either discord bot or arma bot having a file ๐ค
that being said... I could make a .dll to run the discord bot on the server surely?
Server's up 24/7 aside from restarts etc
So if they share the file on the same server I don't need to bother with communicating between servers thankfully
perhaps getPlayerVoNVolume?
i bet chaptGPT could do a nice db integration using nothing but stones and sticks /s
@sullen sigil thanks for the ๐จ backup
those are some pretty spicy reactions hahaha
double trouble
isnt there a mod for discord bot hosting already
there is one for discord rich precense
but besideds that nothing relevant to automation
not quite the same, hmmm
wonder if theres any point in making that ๐ค
How would you even do commands though? Config? 
Or you'd need to have postinit for registering commands or w/e
Callback for received messages. Integrate ingame char into didcord
You can do text commands easily, slash commands uff
"see Valkyrja live!"
built in command to run sqf code based on discord permissions from discord side, arma side can register commands for bot?
then aside from utility commands like ping or w/e just keep it blank so people can go nuts ๐ค
is this better?

https://pastebin.com/fznQf3AU
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
angery
2nd and 3rd platoons should be left by 1 tab
2nd and 3rd motor squad ^
rifleman, weapon, mortar squad ^
and so on
they only indent if theyre inside a new {}
We have a thing like that, using extDB3 to store data about players, like loadouts, position, number of deaths, you name it to mysql db.
Your discord bot can then read from db and leave server alone
no angry
BIG ANGERY
so everything just 1 left?
class a {
class b {
class c;
};
class d {
class e {
class f;
};
};
};```
not everything
if it has the same parent class it should have the same indentation
but it can't be that way, or I am just stupid and I don't get it, if they will go like this, in ORBAT they will go under each other
think doing what dedmen suggested is going to be the best approach -- players wont have persistent loadouts because i hate them
no, indentation is purely aesthetic
curly braces determine heirarchy
class bigdaddy { //No parent classes
| class smalldaddy { //parent classes: [bigdaddy]
| | class tinydaddy { //parent classes: [bigdaddy, smalldaddy]
| | | somepropertiesinhere = 20;
| | };
| };
| class loumontana_sorrylou { //parent classes: [bigdaddy]
| | otherproperties = 32;
| };
};```
any classes in a class are child classes of it, those have indentation.
you can have 2 children, they both have the same indentation
You can imagine it like stacking boxes. If you put 5 boxes into bigger box, they are still within same box (so same identation). But if you put box within a box, within a box, you would go 3 identations left
I have the strangest sense of deja vu about this, but:
The game does not care about whitespace and line breaks. The purpose of a consistent indentation scheme is to make the code human-readable, so you don't get confused about how the hierarchy is laid out. Tabs have no influence on the end product, except to reduce the chances of you making mistakes in the code that does matter.
I acknowledged everything I am just thinking really hard now how to correct it ๐คฃ
The game does not care about whitespace and line breaks
*inserts a non-breakable whitespace in your config*
lol
Sick reference, bro. Your references are out of control
SQF for finding intersection of 3 planes each given by point and normal: https://gist.github.com/ampersand38/128d96cfa69d456d9c1e3acf1ed8d5e5
Most languages dont, sqf has its moments where it cares about spaces, well "cares" like: positionplayer,position(player),position player
Well yes you have to have spaces between commands so it can tell them apart
So it cares ๐
hey, is there any way of changing view distance on a single object for palyers on a server?
So say I can have a space ship that players can view from far away even if their view distance is set to like 2000
setfeaturetype
You can use setFeatureType to make an object appear as far out as the terrain view distance. You can't exceed the terrain view distance.
alright
since that is already featured in Eden enhanced I guess there isnt anything beyond that which I can do
if their terrain view distance is 2km theres no way to make them see something beyond there
so it just organize it for you or something?
if their object is 2km then its higher
There's instructions and a demo video oh, not related to your stuff xD
Ok I am too dumb to reorganize that so I am going to keep it the way it is now, at least I understand what I do which is the most important part, right? right?? 
unless someone wanna help me with that on editable paste bin 
https://pastebin.com/Yt0c1ukR try this
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
OHHHHHHHHHHHHHHH
Yeah I am stupid, sorry
thank you very very much
I see it now
you can write the determinant using dot and cross
It's faster than all that + and *s
Sorry, I'm lost there. I'm finding stuff for using determinant to calculate cross product, but not the other way around.
Has this been made already? I wanted to start on something like this with an extension on the serverside, but If it's already been made that would be amazing
Haven't seen it yet
Going to work on it soon
Need to make a bot hosted from server regardless so may as well make it modular for my own sake
(and so I can lightning strike people from my phone)
The ability for players to report hackers/ask for help into a discord directly ingame, so nice
what you've written there is the same as _v1 vectorDotProduct (_v2 vectorCrossProduct _v3)
also you're not checking the determinant
you must validate that it's not too small abs _det > 1e-6
Ya, currently tinkering with what dedmen suggested for databases for my unit's use then I'll get onto the bot, ask me in like a week if I have a usable thing up yet to keep me motivated -- current issue I can foresee is having to deal with the private keys or w/e
https://community.bistudio.com/wiki/compileFinal
The documentation says the expression can be an array or hashmap, but when I put in a hashmap/array it gives me an error saying it requires a string. I'm trying to compileFinal a hashmap to prevent overwrite, kind of confused if anyone could help.
it says its for version 2.14
It says introduced since 2.14, I assumed having the most updated arma would put me in the clear - could you elaborate why it doesn't?
What is the ETA on 2.14? It would be much easier to wait for it than rewrite around this
you only get 2.14 in the dev branch I believe ๐
"Late summer"
If you switch to the dev branch then you can probably test it.
But it's not MP-compatible with 2.12
Concepts for Most evil slider UX but for View Distance?
"run the distance you want the game to draw"?
with ACE stamina :D
wow. immediate hardcore. I was thinking stuff like distance inversely proportional to speed.
"the distance of your next shot would determine the View Distance... oh, btw, you only have chemlights in your inventory"
Could someone hint me on what am I doing wrong?
_locationsArray = nearestLocations [[worldSize / 2, worldsize / 2, 0], ["NameVillage"], 25000];
for "_i" from 1 to (count _locationsArray) do {
_randomPos = getPos (_locationsArray select (floor (random (count _locationsArray))));
_locationsArray = _locationsArray - [_randomPos];
_randomNameIndex = random 100;
_randomName = "CDF" + str _randomNameIndex;
_x = createMarker [_randomName, _randomPos];
_x setMarkerShape "ELLIPSE";
_x setMarkerSize [300, 300];
_x setMarkerAlpha 0;
};
I'm trying to iterate over all _locationsArray elements and set a marker on them. But this won't work... Can't figure out myself for half a week.
Creates a random index, due to a marker name needs a unique name
No, the other random.
Oh, the first one...
Also why not use forEach ?
https://community.bistudio.com/wiki/forEach
Couldn't get the forEach syntax, so I decided to switch to for
_locationsArray = nearestLocations [[worldSize / 2, worldsize / 2, 0], ["NameVillage"], 25000];
{
_randomNameIndex = random 100;
_randomName = "CDF" + str _randomNameIndex;
_mrk = createMarker [_randomName, getPos _x];
_mrk setMarkerShape "ELLIPSE";
_mrk setMarkerSize [300, 300];
_mrk setMarkerAlpha 0;
} forEach _locationsArray;
wait, you have another _x in there :P
fixed
Wouldn't getting the names be better from cfg and not from nearsetLocation something like:
_village= configFile >> "CfgWorlds" >> worldName >> "NameVillage";
Doubt it tbh.
If i want to post a script in here for questions, how do i make it display like notepad++ like you guys are?
```sqf
// your code here
hint "good!";
```
โ
// your code here
hint "good!";
The marker alpha is being set to 0. Are you sure they're not being created, or is it that they are and you just can't see them?
Ffs, you're right, that's invisible
I'm dumb!
Sorry.
Thank you guys!
Also forEach seems not that complicated after an example!

I'm using the DyCE as a baseline for a scripted random spawning convoy event on my exile server. Only thing the script is missing that I want is added rep when you kill a vehicle
configDyCE.sqf:
DyCE_exileRespect = Random [5000, 10000, 15000];
**fn_spawnConvoy.sqf**this is located in Mission.pbo/addon/DyCE/functions
_vehicle = createVehicle [_vehClassname, _spawnVehiclePos, [], _vehHeight, _special];//POLISHED
_killrep = missionNamespace getVariable "DyCE_exileRespect";
_vehicle setVariable ["vehicle_respect", _killrep];
_vehicle addMPEventHandler ["MPKilled",'if (isServer) then { _this call DyCE_fnc_killrep; };'];
**__fn_killrep.sqf __**this is located in Mission.pbo/addon/DyCE/functions
private ["_Victim","_killer","_Instigator","_InstigatorUID","_KillerRespect","_KillMSG","_RepIncrease"];
_Victim = _this select 0;
_Instigator = _this select 2;
_InstigatorUID = getPlayerUID _Instigator;
if ((!isNull _Instigator) && (isplayer _Instigator)) then
{
_RepIncrease = _Victim getVariable "vehicle_respect";
_KillerRespect = _Instigator getVariable ["ExileScore", 0];
_KillMSG = [[format ["Enemy Vehicle Destroyed!"],_RepIncrease]];
_KillerRespect = _KillerRespect + _RepIncrease;
_Instigator setVariable ["ExileScore",_KillerRespect];
[_Instigator, "showFragRequest", [_KillMSG]] call ExileServer_system_network_send_to;
format["setAccountScore:%1:%2", _KillerRespect, _InstigatorUID] call ExileServer_system_database_query_fireAndForget;
ExileClientPlayerScore = _KillerRespect;
(owner _Instigator) publicVariableClient "ExileClientPlayerScore";
ExileClientPlayerScore = nil;
};
Looking at the log, im getting no errors, but it isn't working. Convoy script still works, vehicles and AI spawn, they go from point A to B, no issue. Just no rep on vehicle kill. 2 weeks into having my own server and 1 week into learning how to script.
You need ` not '
forEach is easy apart from the syntax being backwards :P
and a set at the end too
Oh, I guess you save the sort. This doesn't look like realtime code though so it should be fine.
what will be the best dimensions for slideshow images?
Depending on what you are putting but i usually use 1024x1024 basicly power of 2
What's power of 2?
That thing the Sith do Exponents, specifically the exponent 2 (squared). 1024 is 32^2
That is a dimension that Arma 3 Engine can read so basicly any power of 2 picture can be read like 1024 512 2048 and so on.
no
oh oh got you got you
it doesn't have to be squared
e.g. 128x128
which is 2^7 * 2^7
it has to be a power of 2
i.e. 2 ^ n
2 4 8 16 32 64 128 256 512 1024
ugh
Yea what Leapoard said and if you want rectangle you can use 1024x512 or 512x1024 depending on what object you are adding texture.
Will PAA be better for it though? or is there no real difference? or I have to use JPG/PNG?
You cant really use PNG in arma. If possible use Paa. https://paa.gruppe-adler.de/ here is a good online converter it will tell you if the picture is not right dimensions and stuff like that.
Arma 3 Tools also comes with BI's own Image to PAA converter
If client #1 shoots a projectile and the _projectile object is returned with fired event handler
Can client #2 locally delete the projectile object with deleteVehicle if he gets the object reference remotely from client #1? (By means of publicVariable or such)
yes, but that is expensive af
Hm I thought that projectiles can not be referenced to non-local environments
you can always check isNull under doubt, someone i know was working something along those lines and was able to manipulate bullets, but i dont know the details.
was going to add more but its irrelevant
figured it out, wasn't loading the killrep in the hpp
IIRC there are two different types of projectile. Bullets are local, other stuff is global. Or something like that.
this might be it, something along custom projectiles from crossbow and persistent bolts or so, I always assumed they were just bullets but this makes sense
is there a way to set up an area in which all weapons are removed from a player? (pls ping me with any replies)
yes
i think i just found it actually be doing a web search (i probably should have done that first)
What dimensions you recommend to use for custom flags?
where?
โฆscreen?
yeah one sec
oh
that
I believe it is a 16:9
so stretch/compact e.g a 1920ร1080 to 2048ร1024 and it should work well
is there any way to use direction xyz for a setting of orientation i cannot be arsed with vectordirandup
no, setDir is 2D
is there no other command or stupid way of doing it
Should I also make them paa?
or jpg is fine
ideally paa, jpg is really not recommended
Gotcha
the paa has different level of details, while jpg is all or nothing iirc
at a certain distance, the jpg will simply unload / be of uniform colour, whereas paa gains and loses details as you get closer / away
does it now :0 that is very interesting
I actually noticed the JPG part and I thought it's a bug on my end lol
good to know, thanks!
Do you think I can change the picture on this framed picture with a texture? lol
if it has a texture settable by setObjectTexture yes, otherwise no / workaround
Dang, I will try to find something
see getObjectTextures _theObject to see if something is texturable through hidden selections
are you trying to make names above the map made location or change the name of the map made location?
bruh why the heckkk
I saved a flag in 16:9
and it changed the colors for freaking reason
from red black and white to blue black and gold

the same as 2:1
I don't get it, as soon as I changed the flag and the banner to paa the colors got fucked
Did... did you try to fly The Dress?
config viewer is usually quicker ๐
yeah I don't think PAA works with flags and banners
I have an edited vote kicking ui, and i would like to make it so players can actually get vote kicked. i need a way of runing #vote kick ect on other clients.
JPG was fine for flags and banners, paa on flags and banners changes the color for some reason
my ui alows players to see percentage of votes
basicly im trying to force vote kick by script.
if (voted = 1) then { hint "#vote kick" Badplayer; };
what are you using to convert to paa
tried both that website and also TexViewer2
use arma tools imagetopaa
can anyone help me?
if i put code in a varable how can i run it
say
var1 = hint "cheese";
how would i run the variable as code
i see
you are making a function by doing that
myFunc = {
params [["_fruit", ""]];
hint _fruit;
};
["apple"] call myFunc;
if I have a collection of objects that are all like rad1_1, rad1_2, is there a way to just basically go rad1_*?
i cant get it to properly execute my code
PAA has to be specific resolution to work.
it has to be a power of two number in pixels.
EG: 1:1 resolution 1024x1024
1:2 resolution 512x1024
so numbers like 32/64/128/256/512/1024/2048.
If you fudge up, PAA will change colors or not work at all. Ive learned the hard way, or rather the blue way, as all my paas ended up with bluish hue. and i had to convince people during briefing that HVT is not actually blue.
Also, with a holdAction, I'm having trouble with the exact syntax for executing a script. would it be execVM "scripts\intel_laptopEnc.sqf"; ?
Put an object with var name rad_1 and then copy paste, next one will be rad_2 etc
Yeah, that's what I did with the objects, but now I want to script a thing that grabs all of them, no matter how many I make
I want an array of everything with the name starting rad1_ (just for example, sometimes the name might be painfully complicated later)
Also, I'm still a little foggy on if I should be, from within a holdAction, using execVM or remoteExec.
(This is a simple "hold action on laptop, get diary entry that works for JIP" thing.)
if you create a custom class in the description.ext how do you query those values?... ex:
{
class aph_bp_hummingbird
{
name="Civilian Helicopter";
cost=[0,0,0,0,0,0,0,0,0,0];
type="VehicleAir";
};
};```
does this need to be an addon? I can ``gettext (configfile >> "CfgWeapons"...``` all day, but I am having trouble creating my own class.
Uhh private _myObjects=[]; private _i = 1; while {true} do { private _tmp = missionNamespace getVariable [format["rad1_%1", _i], objNull]; if (isNull _tmp) exitWith {}; // u can directly manipulate object with _tmp variable here _myObjects pushBack _tmp; _i = _i + 1; }; //or do smthing with objects in _myObjects array with forEach later
If u know exactly how many you have, you could use for "_i" from 1 to N do
Instead of while loop, where N is amount of objects you have
(would kill for a better scripting language)
Also i typed this on my phone so idk if it will work straight off the bat, but it should give you general idea.
yeah no that's tremendously helpful
also you're a fucking madlad to be typing that on your phone
Also addHoldAction is a mess, has shitload of parameters and you have to execute it locally on all clients, so yes
[Parameters] remoteExec ["BIS_fnc_holdActionAdd", [0, -2] # isDedicated, true]
That [0, -2] # isDedicated will remote execute it on server, if its locally hosted ie from ingame, but will not execute it on dedicated server, since it cant do action anyways.
Last true is to be added to JIP.
For your script running question idk its been a while since i last used it...
Marko on mobile > chatGPT
for real.
I'm using ZEN's easier way to do holdActions but I've got everything working for now.
hey guys im using this script in the init of a document to add intel for a task in a mission, works fine, only issue is that the addaction is showing up twice? any ideas.
this addAction [
"Take Intel",
{[_this, "action"] spawn BIS_fnc_initIntelObject;},
[],
10,
true,
true,
"",
"isPlayer _this && {_this distance _target < 2} &&
{(side group _this) in (_target getVariable ['RscAttributeOwners', [west, east, resistance, civilian]])}"
];
};
if (isServer) then {
this setVariable [
"RscAttributeDiaryRecord_texture",
"images\GerOldBW.paa",
true
];
[
this,
"RscAttributeDiaryRecord",
["Rescue the Informant", "Rescue the Informant"]
] call BIS_fnc_setServerVariable;
this setVariable ["recipients", resistance, true];
this setVariable ["RscAttributeOwners", [resistance], true];};```
Maybe has has config-defined "Take intel" action?
try removing your addAction and see if its there?
Ii figured it out, im a little special
i used the intel document, and it adds an action thats the same exact name so i thought it was a script error lol. just changed the object the the non intel version
exactly this
lol dumbest mistake ive ever made
dumbest mistake you've made so far

I'm making marker-triggers for a script that spawns enemy
Im new to scripting in arma 3 and could use some help with scripting for a custom faction mod my friend and I are trying to make, we want to make our units spawn randomly out of 9 predefined loadouts
Helping Verdant - Script and Mod Help
If its O2 center position, I think it will be the same regardless of LOD
Is there a way to delete all objects in the group Empty (see picture bottom left) via script?
thing is I checked it says it needs to be 2^x / 2^y right? but it's a flag so it doesn't makes sense that it will be that way
so I think maybe for flags JPG is ok? 
but if I do it 2^x / 2^y it's just a square and it doesn't look like a flag anymore lol
oh
didn't know that
you can have 512x1024 etc
gotcha
if imagetopaa wont convert it chances are youll have issues using any other converter
oh wait, I already did that never mind
would recommend you dont use gruppe adlers converter until youre familiar with imgtopaa because it will convert literally any image
granted converting literally any image is useful for when paint.net breaks something and i cannot be bothered faffing about with it
Yeah it worked (of course lol) thank you
always use the BI Tools until you know the limitations of them (mostly addon builder) imo
Gotcha
and even then addon builder's limitations only really apply to modellers, i've not once had an issue with script/config mods
oh good morning 
literally woke up and went to fix this hahaha
if it was a good morning i would still be asleep
hahahaha understandable
awesome, thank you
Question is it possible to remove map diary Team ?
Nmv i found solution its player removeDiarySubject "Units";
hey guys, trying to make a radio script to play certains songs on a radio object, heres what i got, any suggestions
// Create an array called "songs" and populate it with four song names
songs = ["IFTrack01", "IFTrack02", "IFTrack03", "IFTrack04"];
// Define an action to play each song in the "songs" array
{
radio addAction [_x,{playMusic _x};
];
} forEach songs;
// Define the action to play a random song
radio addAction ["Play random song", {
// Generate a random index into the "songs" array
randomIndex = floor(random count songs);
// Play the music for the randomly selected song
playMusic (songs select randomIndex);
}];
// Define the action to stop playing music
radio addAction ["Stop playing music", {
// Stop any currently playing music
stopMusic;
}];```
```sqf
// your code here
hint "good!";
```
โ
// your code here
hint "good!";
radio addAction [_x,{playMusic _x};
];
Fix the formatting.
radio addAction [_x,{playMusic _x};];
You see the stray semicolon that shouldn't be there
// Generate a random index into the "songs" array
randomIndex = floor(random count songs);
// Play the music for the randomly selected song
playMusic (songs select randomIndex);
we have a command
// Play the music for the randomly selected song
playMusic selectRandom songs;
// Stop any currently playing music
stopMusic;
https://community.bistudio.com/wiki/stopMusic
That command doesn't exist
The playMusic page has a example showing you how to stop music https://community.bistudio.com/wiki/playMusic
ChatGPT intensifies
shhhhh
if you want to use ChatGPT, then please tell it what's going wrong and let it fix it for you
Or when asking for help, don't lie/pretend like its a script you wrote when its not, its important to people helping to know how the script was made, because that provides context on how to help.
Pretending that other peoples work is your own is a shitty thing to do.
Once again I ended up using HASHMAP get [KEY, DEFAULT] instead of HASHMAP getOrDefault [KEY, DEFAULT] 
i never lied about anything, i didnt specifically express that i used a chatbot, which is a tool to help me write the script, wouldnt consider that lying, or theft.
"trying to make a radio script to play certains songs on a radio object, heres what i got"
sounds to me like "I made this" 
If I want to play some custom sounds (military radio sounds, crowd sounds etc.) is this how I do it?
(some video on YT)
Well actually we are tired of ChatGPT in this specific channel/topic so, yeah...
That's a start yes. not sure about that leading \
and I think .wav files don't work
In the first place if you're watching a tutorial video why wouldn't you watch it
need .wss files
or .ogg
arma tools again :p
thats like saying im working on this wooden table in my workshop and you accuse me of stealing from the hammer and nails lol
because it's a guy who made quick tutorials for arma they all like 1 minute and 35 seconds lol
and as a Rookie it doesn't tell me anything
Still struggling with this issue. Is that even possible to do via script?
1 minute and 35 seconds are enough to teach a bit of thing already. Anyways, I don't think a video is good enough to teach A to Z than the wiki page I've sent
of course
Rather, like you're working on a wooden table (not one you made, maybe gotten from someone else or borrowed), and I'm accusing you of pretending you made the table yourself from scratch.
simply put dont come here for issues with things a human didnt write ๐คท
btw, in the video he says it works with no need of a trigger, but checking on some forums everyone said I need a trigger? so is it possible to play them without a trigger?
you act as if I came for praise and accolades, I came with a broken script not looking for respect but help. if u dont want to help because i didnt fumble through it with my minimal knowledge i understand, but dont think I came on a high horse claiming to write that, not my intention, just trying to achieve something cool in game
Teach your IME so you can convert a simple words into the BIKI page!!!!!!!!!!!!!!oh wait it is because I'm using Japanese IME
if I add it my ORBAT description file it's fine right?
the cfgsounds I mean
What is โORBAT description fileโ?
โ what
Or description.ext
that yes
oh yeah i forgot that exists
You're in #arma3_scripting 
hahaha
so my questions was, there is an ORBAT (CfgORBAT) there, that's ok if I add CfgSounds at the bottom?
i repack mods to check one typo because im "lazy" (its easier for me to copy a mod project and modify it than set up a description.ext)
yes
description.ext is just a config file
not the same as config.cpp for more advanced things but it will do
oh and the .wav file someone said .wav files don't work?
chatGPT wont judge u like humans will
the bot has no friends to flex on u infront of
use chatGPT. it wont be 100% on first prompt, but with a bit of effort it produces fine result
i get stuck in loops with it telling it errors and it spitting out the same corrections lol
thats because its crap for sqf
my dog could write better sqf code if he read the wiki
well ur dogs smarter than me lmao
Is there a way to get a list of all objects on EMPTY side?
All you need to learn is to read the wiki
That would've helped with the stopMusic, but not with the semicolon tho
A small suggestion, try using google example "arma3 radio music script". Alot of these things have already been made by other ppl. So you dont need to bother making it in the first place.
honestly i knew that you can playmusic ""; to stop i just had bothered to get there yet bc the foreach loop wasnt working haha
good idea haha, i dont mind trying to make things work on my own (WITH ASSISTANCE FROM AI LMAO)
it has uses for coding but those uses are limited and you shouldnt try use it unless you know what you are doing
its working but each action of the loop is playing the same song, im confused
Problem is, if you dont understand what its doing, you are just making it worse for yourself. You dont learn anything nor can you fix it yourself, so you ask others to fix it for you.
im think it helps me understand when i have something to start with, but i hear you
Ah the _x inside the action is undefined
you need to pass it as parameter
See addAction wiki page
_x is representing each sting in the songs array right?
magic variables my favourite gender fr
so i defined a var called currentsong as _x
then did an add action for each song or _x and executed playmusic on current song
you might have problems using a magic variable as a standard variable name
what do you mean standard var name?
songs = ["IFTrack01", "IFTrack02", "IFTrack03", "IFTrack04"];
{
currentsong = _x;
radio addAction [_x,{playMusic currentsong}];
} forEach songs;
radio addAction ["Play random song", {playMusic selectRandom songs;}];
radio addAction ["Stop playing music", {playMusic "";}];```
As I already told you, you need to pass it as parameter, see addAction wiki page
Ah "arguments" they call it on the wiki page, same thing
I'm currently trying to make infantry follow an exact path that was calculated earlier without doing it's own pathfinding but can't get it to work.
Is there a way to make AI move after using "disableAI 'PATH'"? That would solve all my issues.
would i be using _this? im not sure how to do that.
im reading the wiki lol, if thats what your going to say
PlayMoveNow and manual rotation using setVectorDir
Uhh no, well yes
https://community.bistudio.com/wiki/BIS_fnc_unitCapture
It will look wonky as shit tho, as its primarly intended for air units.
Also with path enabled you could do doMove to control movement more precisely
Anyone?
is there a size limit for audio file? I am trying to convert some files WavToWSS and only 2 files we're converted the rest give me an error for some reason?
what's empty side?
side where dead things go in zeus interface
Is it?
Select them and remove them? Or if u wanna do it in game then no. Layers are gone by that point.
what does side return on the object though?
They go civilian (purple) 
yeah dont think its a side but its whats shown in zeus interface
so just any dead units i think
would imagine its probably something like iterating across civilian side and checking if its alive
I'd like the AI to be able to rotate while doing it but I'll see if I can make it do what I want with playMoveNow, thanks
they're trying to make a script to delete all objects on "empty" side (the empty category in zeus interface)
If you use setVectorDir every frame they will
I don't get it, it gives me this error but I am still able to convert to WSS
Wait then why not just use garbage collector instead?
Invalid bit rate
my guess is the bitrate is outside of the range
probably (hopefully) clamps it to minimum or maximum for the .wss though
I think I misunderstood what that command does. Could be exactly what I need. Thanks
Convert them to ogg. Wss is aweful in quality too
I have 0 clue in audio files lol, what do I do then?
Here is a picture of the objects I want to delete via script
Use another converter to convert the bit rate
They're not civilian
I will but what bit rate should it be? it doesn't say anywhere
44100
Yea, it seems so. Any idea how to identify and delete them via script? It's supposed to be a clean up script after a mission.
Id suggest using inbuilt garbage collector. It does exactly that, deletes dead units and removes wrecks
allObjects - units and their vehicles I guess
What you are doing is, you're making a action with a script that says "play the music stored in variable currentsong"
What you are NOT doing is "play the music that WAS stored in variable currentsong by the time the action was added". Which is what you intended to be doing.
wiki says "Parameters array passed to the script upon activation in _this variable is: "
params ["_target", "_caller", "_actionId", "_arguments"];
so if you add that, your arguments will land in _arguments variable
Oh yeah. These are still alive.
Then https://community.bistudio.com/wiki/allMissionObjects
Just be careful not to remove zeus module too, etc.
Super slow...
dont iterate through allmissionobjects unless you dont value performance
if its every 5 seconds or w/e then schedule it
so
addAction [name, {params ["_target", "_caller", "_actionId", "_arguments"]; use _arguments here}, arguments]
replacing arguments with music name
addAction [musicName, {params ["_target", "_caller", "_actionId", "_arguments"]; playMusic _arguments}, musicName]
Its a cleanup after mission, so who cares xD
Even if you don't iterate over it it's still slow
ya i know
Random Mission Generator - that's why I have to clean up before generating the next mission
Yeah, you just get all objects one way or another, filter out things you wanna keep ie game master module, respawn point etc, and deleteVehicle the rest
Hi guys in Create Diary i am trying to make so player can click and Set up Freq on TFAR code But i cant click on the Number am i doing something wrong ?:
player createDiaryRecord ["Radio_Frequencies", ["Frequencies","
<font color='#FFFFFF' size='35' align='center'>[Radio Frequencies]</font><br/><br/>
<font color='#FFFFFF' size='25' align='center'>HQ / Pilots:</font><br/>
<font color='#6fa8dc' size='15' align='left'>SR:</font>
<color='#FFFFFF' size='15' align='left'execute expression='[(call TFAR_fnc_activeSwRadio), ""75""] call TFAR_fnc_setSwFrequency;'>75</execute><br/>
"]];
Did not find a way to filter those objects
You've kind of merged the <execute> tag with the <color> tag, and I think it needs to be separate. Also there is no <color> tag, it's only a property of the <font> tag which is missing from that line
In other words, try this
<font color='#FFFFFF' size='15' align='left'><execute expression='[(call TFAR_fnc_activeSwRadio), ""75""] call TFAR_fnc_setSwFrequency;'>75</execute></font><br/>```
Ty very much it work.
Smthing like entities [[], ["Logic", "EmptyDetector"], true] - allCurators - allPlayers - [thingIWannaKeep1, thingIWannaKeep2,...]
This could be a solution. I'll give it a shot. Tyvm
is remoteexec a setvariable on the server a better idea than just broadcasting the setvariable? 
(if only the server needs to read the variable)
I think this requires that everything I want to keep is an object (variable in editor) but I can't use classnames. Is that right?
publicVariableServer would be fastest probs
I had no idea that was a thing, thanks -- though I've realised it's probably a better idea to broadcast across network for sake of persistence. trying to create a movement system for objects from scratch is quite difficult it turns out ๐
In the forEach you could check if(!((typeOf _x) in _myWhitelistedClasses) then {deleteVehicle _x};
Or would it be possible to delete everything with a certain distance from a marker which I put into Eden editor? Eg. some sort of safe zone.
nearobjects around marker pos
Ye.
No idea what I did wrong
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
you need a subtitles array even if its empty
oh
titles[] = {0, ""}; iirc
I will try that
well both will work, but it's better to have an absolutely empty array :)
so this titles[] = {}; ?
yes
this will probably overwrite any current subtitles
ok that's funny ๐คฃ
so it works
but
I thought it will work when you around the object that you wrote the line in
didn't realized playsound will play it everywhere
playSound3d
_del = entities [[], ["Logic", "EmptyDetector"], true] - [allCurators] - [player] - [position player nearObjects 300];
{deleteVehicle _x;} foreach _del;
This still deletes all objects around the player. What am i doing wrong?
what does it mean again? 
mmm
I cant test rn, but i think you shouldnt put arrays into arrays, these functions return arrays anyways
it's because of the non capital P 
you can nest arrays just fine
fixed it thanks
Not sure what you mean
Yes but he is removing entries from entities arrays
ok so again, it works, and I changed it to PlaySound3d but I still can hear it on the other side of the map for some reason?
oh it's probably the distance
I will try to delete the distance value
no
yes? I copy pasted it as playSound3d and it didn't work
when I changed it to PlaySound3d
it worked
that's the only thing I changed
how come did it work after I changed the P then?
the whole line is playSound "Mosque";
playSound and playSound3D are not the same
Yeah I get it now, but what is wrong about the line?
That implies P and p are not the only ones you changed
playSound3D requires an array, not a string. You are giving it a string.
I have no idea what is the difference
(don't bully me please I am learning)
we will bully you into learning ๐ ๐
That's a better option lol
An array is a [list, or, "group of items"]. A string is a "plain text data type".
so what comes in the ... part?
gotcha
R T F M ๐
โซ โฌ๏ธ ๐ผ
from https://community.bistudio.com/wiki/playSound3D:
playSound3D [filename, soundSource, isInside, soundPosition, volume, soundPitch, distance, offset, local]
oh my bad I missed it
you can also press F1 in-game when the text cursor is on a command to have a short help (less detailed than the wiki though)
playSound3D ["A3\Sounds_F\sfx\blip1.wss", player]
What does the "player" part do here?
You could just use object say3d "sound"
That is the second item in the array, so it is the second documented parameter. You can find in second place in the list of parameters.
R T F M ๐
Rangers To Fucking Moon? 
Read The Fucking miller
oh LOL
Read Theโฆ Field Manual?
lou is trying to cover up his mistake of not putting rtfw
hahaha
wiki ftw!
rtfb ๐
does it gotta have it? or can I just use
playSound3D ["A3\Sounds_F\sfx\blip1.wss"]```?
it doesnt say if its gotaaa be thereeeeeeee
optional things are marked asโฆ *tu-dummmโฆ* Optional
Without it, how will the command know where the sound should originate?
if it doesnt say optional, its not optional ๐ฎ
OKKKKKKKKKKKKKKK

It is a 3D sound, it can't come from nowhere, it has to have a source

source: i made it up (i am schizophrenic)
I told you ๐
can I actually?
I just need the sound to come out from a freaking radio or a speaker
(well look like that)
Ye
good thing is, if the object gets destroyed the sound will stop
with say3d?
so I did read (YES LOU I READ THE WIKI
) that you can use say3d to play sound inside a vehicle for example? is that the same thing basically?
you can use say3d to play sound inside a vehicle
where
one sec
oh never mind I CANT EVEN READ 
I thought this line
helicopter1 say3d "sound" meant that it will play from the inside
It will play from helicopter
Yeah
you can learn to read,
you can learn to learn,
you can learn to script,
all in one place: #arma3_scripting! ๐
_centerPos = [3452.22, 8241.42, 0];
_radius = 200;
_numShells = 20;
_shellDelay = 8;
_shellType = "Sh_81mm_Mortar";
{
_randPos = [(_centerPos select 0) + (random _radius) - (_radius / 200), (_centerPos select 1) + (random _radius) - (_radius / 2), _centerPos select 2];
_arty = createVehicle [_shellType, _randPos, [], 0, "CAN_COLLIDE"];
_arty setVelocity [0, 0, -100];
sleep _shellDelay;
} forEach (count _numShells);
Any idea why this wont work?
I think I am using it wrong
is it ?
object say3d "audioname.wss"
oh
I AM stupid
object is the object
ForEach cycles thru arrays but you are doing sonething silly down there
NumShells is a number, yet you are telling it to count the amount of entries inside that number, and count would return a number, and ForEach cant cycle thru number...
Try for "_i" from 0 to _numShells do { //ur code }
Also, you need to give it class name of the sound, like youve defined it in CfgSounds in description.ext
(It must not have extension like .wss)
(_radius / 200)??
use getPos' alt syntax, no?
i dunno im using a AI chat thing lol
oh for the love of Me get outta here
Any idea why this wont work?
using a AI chat thing
im so crap at scripting and dont wanna live here
It's really a lot better to put in the effort to read and learn rather than try to get chatbots to do it for you. They will not do a good job, and you won't learn any of the principles required to fix it.
some things i just cant learn. i cant get my head wrapped around it
sound[] = { "fx\wolf1.ogg", 1, 1 };
ths first 1 in the brackets is the volume, is 1 = 100% volume, or literally 1?
RTFB ๐
1 is medium, basic, default. I think it caps out at 10, and can go lower with 0.9 etc.
it doesn't say on godddddddddddddddddd
yes, it says it's the volume but it doesn't say that 1 is 100% or not
grumbles
okay, I give you that. I wanted to update that section anyway ๐ข
I'll deny everything
so 10 is max, got it, I will play with it
this is also why I invite people to read the biki, so sometimes something obvious is not to a newcomer and I can amend ๐
5 no? like playSoundsomething
๐คท maybe
why not just 1?
1 is too quiet, the sound is a mosque prayer sound and it's relaying from speakers pretty high on the mosque
I used to think that until I actually tried.
My impression is that you need to slow down, read and comprehend, and follow the logic chains. Don't rush through and don't start at the end.
In any case, the AI will not solve the problem for you.
also unrelated, I accidently added a wrong line to some unit (somepicture.paa but it's wrong) and I have no idea which is it, is there a way to find it or delete everything lol
isn't your soundfile itself too low?
You can close the scenario, open the mission.sqm in N++, and carefully ctrl+f and remove it.
uhm, let me double check
no it's not
tried 5 it's till pretty quiet
can you set distance on say3d comand?
https://community.bistudio.com/wiki/say3D
Yes, but to figure out how, please read this.
i got it opennnnnnnnnnnnnnnnnnnn
Then read ittttttttttttttttttttttttttttt
and I seeeeeeeeeeeeee itttttttttttttt but i still dont understanddddddddddddddddddddd
maxDistance: Number - (Optional, default 100) Maximum distance in meters at which the sound can be heard
yes but how
do I add it
is it say3d blah blah blah maxdistance
No
MosqueSpeakers say3d "Mosque, 200"?
You are passing an [array,of,parameters], which means you need [the,things,that,enclose,arrays]
[]
so
MosqueSpeakers say3d "Mosque" [200]?
what r u trying to do
Please look at the picture I posted a minute ago
It shows exactly the correct layout of the array
iwrgiedhjguiwh\eairgjhwaesrg
MosqueSpeakers say3d [Mosque, 200]
The sound name needs to be a string
set distance for sound
MosqueSpeakers say3d "Mosque" [200]
// vs
MosqueSpeakers say3d [Mosque, 200]
you dropped " at one point
someone needs to make a App that you tell it what you want and it does everything you need for you xD
Were it so easy
a arma 3 script programe where you select what kind of thing you want, then it generates a working one with clear details on how to change things ect
also known as your brain and the wiki
Would be nice to be able to open wiki page for a command from ingame thougy
it gave me an error for some reason
You have no idea how hard it is to make a computer do this. All this ChatGPT stuff is trying to do it and despite all the money, resources, and time that has been put into it over the last 20+ years, it's still bad.
im trying to find it one sec
what gave you an error
Apparently you miss the quotation there, and Lou's intention there is that
so tell me what is it because I literally copy pasted his line
well slap me and call me an hilly billy
r e a d, understand, apply please ๐ if you don't understand something, ask ask ask
I know what is the general idea of chatgpt, but I never really actually looked into it so I don't really care about it atm lol
specially with spatial sound, realistically speaking some sounds must be +80Db irl to be able to heard in a crowded street. That would somewhat match the sound volume expected from a loudspeaker in masses or so
Does stacking the say3D or playsound3D commands increase volume exponentially or how does that works?
Is it possible to delete all entities with a certain classname from the map via script?
no idea how but it "works" (simply because multiple sounds)
be sure to play them in unscheduled or some delay may happen
at least the ones from the same sound source
yeah so I was just about to ask, it works but it's still quiet, what should I use to up the sound level of the audio file?
is it in a trigger?
I am not using a trigger, it's like ambiance sounds
oh important questions I forgot about that, does the sounds loop?
I am assuming there is a line/command for it
audacity is free and can be used for that
I just checked on a forum apparently you can adjust the volume with db0 ?
you can also stack say3d and playsound3d to make it artificially louder
I am using this code to delete everything which is more than X meters away from the player:
_del = entities [[], ["EmptyDetector"], true] - [allCurators] - [player];
_count = count _del;
_rnd = 0;
for "_rnd" from 1 to _count do {
if (player distance (_del select _rnd) > 100) then {
deleteVehicle (_del select _rnd);
};
};
The only thing which does not get deleted are arrows. For example: "Sign_Arrow_Blue_F", "Sign_Arrow_F", "Sign_Arrow_Yellow_F", "Sign_Arrow_Green_F". Any idea how to delete arrows with a script?
first get the entities and verify if the arrows are even there
this is not a problem of script not deleting _x, its a problem of script not detecting _x
you select _arraySize (from 1 to arraySize instead of 0 to arraySize-1)
use forEach?
@modern meteor โ
(also _rnd isn't random sooo bad naming :p)
private _toDelete = entities [[], ["EmptyDetector"], true] - [allCurators] - [player];
{
if (player distance _x > 100) then { deleteVehicle _x; };
} forEach _toDelete;
Got it, thank you
private _toDelete = entities [[], ["EmptyDetector"], true] - [allCurators] - [player];
{
if (player distance _x > 100) then { deleteVehicle _x; };
} count _toDelete;
'it's even faster!'
unrelated but if you guys are space nerds like me, Starship is doing a flight test today live on YT!
lunch is in 30 minutes
live is named "Starship Flight Test"
w00t! don't hesitate to join #offtopic_science
no access

does the game supports ogg? I just want to make sure because the tools only have wav to wss
yes
You've chosen the "hide offtopic category" role and I'm guessing that link is to a channel in that category
oh right
Yeah, use audacity to normalize sound file, then u can export it directly as ogg. Much better than wss format as ive said before
Yeah that's what I am doing now
I literally had to convert to wav then to wss, pain
Normalizing it will make it louder.
Yeah ive told you before to use ogg ๐
I missed it 
I'm trying to get an array of synchronized objects where the objects are empty props like chairs and tables, however for some reason the synchronizedObjects commands returns empty, it only returns the items if I sync it to a game logic.
this must be really case use, I actually started using count instead since it usually gets a slightly better performance with +100 elements arrays.
I am doing the amplify option and just up it by like 10-15 db
It has normalize effect which will do that. You want loudest wave to reach top of the chart. Also suggestion fade first and last second of audio to silence so you avoid pop sound when it starts/stops playback
Does the synchronizeObjects work only on units?
and game logics and triggers
But not other objects?
Ok, so how can I get a list of objects that are "synced" to another object with acts as an anchor? And no I do not want to use game logic, good luck getting the position correctly with is vital to what I want to do.
synchronizedObjects?
read above
i did
turns out synchronizedObjects does not work on empty objects
if attachTo is being used then attachedTo is handy. Otherwise, build array and do setVariable
yeah, but I wanted something that is very easy to set up in the editor, syncing would be perfect, but for some weird reason synchronizedObjects does not work here, thanks BI
then set up the array building from your side ๐คท
but then you have to name all the bits and bobs with will be time consuming and is jank solution
we have no idea what you're trying to do so cannot provide any more useful advice
sync them all to a gamelogic and have the code identify the main object?
Ok, so Im writing a function that will store a composition, but in a way that you can place little details like notepads and such on tables. Since stuff gets spawned badly when you spawn a composition I came up with an idea to use attach to. I wanted to store relative positions and directions of the details in relations to their "parent" object (ex. a notepad laying on a table), then the parent object is synced to a game logic that acts as a anchor for the whole composition.
Then I wanted to spawn the composition, but use the attachTo to attach the details to a newly spawned parent objects.
I wanted the whole system to be easy to implement and not requiring loads of work or be very fiddly, just so it's easy to build new compositions. Syncing would be perfect if it worked for empty props being synced to other props.

