#arma3_scripting

1 messages ยท Page 69 of 1

fleet sand
#

What what is Super AI ?

wind hedge
#

I will use that!

little raptor
#

well just keep in mind it will break stuff with vanilla AI

#

they must pass thru walls because their pathfinding is wrong sometimes ๐Ÿ˜…

little raptor
fleet sand
little raptor
#

it's a complete AI rewrite

#

Lambs and VCom are vanilla AI (with added enhancements)

#

Super AI is something different

sullen sigil
#

super ai

#

you couldve called it chocolate chip vanilla ai

willow hound
#

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.

fleet sand
little raptor
#

no meowsweats

sullen sigil
little raptor
#

it just does things differently. like a new path finding algorithm and stuff

sullen sigil
#

especially in a military simulation game

#

because believe it or not, chatgpt cannot condone violence

wind hedge
# willow hound You'd still have to use raycasts to determine if the unit is shooting through a ...

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?

little raptor
#

it might blobdoggoshruggoogly

pastel pier
#

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?

grand stratus
#

Is there a function to toggle NVG on and off for a player?

grand stratus
#

Thank you, I always forget about actions

winter rose
#

s q f b i n . c o m

brisk lagoon
#

anyone know the picture size for ORBAT background?

#

I tried 512x216 but no luck

winter rose
brisk lagoon
#

sorry yeah 256

#

is paa not supported for it?

#

maybe?

#

jpg doesn't work as well

winter rose
#

both should, ideally paa

frigid oracle
#

how can I check if a certain mod pbo is installed

brisk lagoon
frigid oracle
#

thx

brisk lagoon
#

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};
winter rose
#

nope
but once it was loaded, it's stored in the cache
also, use getMissionPath plz

brisk lagoon
#

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?

winter rose
#

so it works?

brisk lagoon
#

No? haha, it only appears under the text when I hover on the main ORBAT group

winter rose
#

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

brisk lagoon
#

that's what I get currently

brisk lagoon
winter rose
brisk lagoon
#

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

winter rose
#

this icon is 1:1 ratio, so you might need another, separate file

#

what do you use for the background?

#

(config-wise)

brisk lagoon
#

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

brisk lagoon
winter rose
#

y e s

#

insignia

brisk lagoon
#

boi am I stupid

#

do I use __EVAL(getMissionPath "someFolder\SomeImage.paa"); for insignia as well?

winter rose
#

seems not needed

brisk lagoon
winter rose
#

then try w/ __EVAL

winter rose
#
insignia = "subDir\myTexture.paa"; // ?
toxic jungle
#

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

willow hound
winter rose
#

or on mission "press play" start @toxic jungle ?

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

winter rose
#

so that's not "on mission start"
also that's not exactly scripting, more #arma3_config no?

toxic jungle
#

I guess, it kinda bleeds between them, I'll ask over there anyways

winter rose
#

do you want code to start "on mission start" or "on object placement"?

brisk lagoon
#

I tried
insignia = "orbat\Iraq.paa";

#

and also insignia = __EVAL "orbat\Iraq.paa";

winter rose
#

__EVAL(getMissionPath "orbat\Iraq.paa") isn't it ๐Ÿ‘€

brisk lagoon
#

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

brisk lagoon
#

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

wind hedge
#

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?

upper siren
#

I know there's a button for it in the advanced developer console

wind hedge
upper siren
#

oh, well ๐Ÿ™ƒ ignore me then ๐Ÿ˜…

wind hedge
fair drum
#

are you doing that in game?

#

or just in editor debug

wind hedge
#

editor debug but the scenario running

#

I mean while moving the character and stuff, not just the editor, run in multiplayer hosted

fair drum
#
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
wind hedge
#

Amazing, how do you do: Cycles: 10000/10000?

#

mine is always 1

fair drum
kindred zephyr
#

when you try to diag in scheduled it will usually give you that result

edgy dune
#

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

winter rose
#

it's config and engine work

edgy dune
#

ah unfortunate

grand stratus
#

Anyone know how to check via script who a player has muted? (It's the client checking locally to also filter chat messages)

warm hedge
#

As in in-game VC mute?

molten yacht
#

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

molten yacht
#

Ah, that shouldn't matter since the target isn't moving. Thanks.

warm hedge
#

As the existent of getDirVisual suggests it also matters for diretion too

molten yacht
#

Seems mostly like the Visual mode is faster to update.

#

But since I'm having them triangulate a building

warm hedge
#

Ah

fleet sand
# grand stratus Anyone know how to check via script who a player has muted? (It's the client che...
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.
warm hedge
#

Now it doesn't matter... Unless the building rotates itself

still forum
still forum
brisk lagoon
#

Is there "Special Forces" (SF) mark for ORBAT units? or are those the only one?

winter rose
#

"Recon"/"AttackRecon"?

#

usually, the doc reflects the available options

jade acorn
#

couldn't one overwrite/add new stuff to the CfgChainOfCommand?

winter rose
#

through modding perhaps, not scripting

jade acorn
#

I know, just answering the "are those the only one" question with another question

winter rose
#

and tbh, "IDK" ๐Ÿ˜„ (I actually never used ORBAT)

fleet sand
#

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 ?

jade acorn
#

might be, or it's so badly optimized the FPS goes down that much

#

strategic map causes a significant fps drop too iirc

winter rose
#

"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 ๐Ÿ˜„

stark fjord
#

"People cant see more than 25 fps anyway"

sullen sigil
#

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 ๐Ÿ™‚

meager granite
#

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

fleet sand
stark fjord
#

Maybe split them into two ground holders?

meager granite
meager granite
# stark fjord Maybe split them into two ground holders?

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

stark fjord
#

Attach to seems to solve many things in this game

meager granite
#

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

stark fjord
#

Its smthing like buildings with disabled simulation. It takes like 20 seconds to update on clients

meager granite
#

Send out current client's object state to everyone else right now

#

Maybe limit it only to owners of the entity ๐Ÿค”

still forum
#

"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

stark fjord
#

How long does it take to change owner of static object from client to server, smthing like ~5seconds?

meager granite
meager granite
#
// 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

winter rose
#

if(!isNil"_vdu")
spacing died today :p

meager granite
#

Muh saved bytes!

still forum
stark fjord
#

So you could change object owner to server, and then call setpos

meager granite
#

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

stark fjord
#

Then just delete/create new one when position has to update ๐Ÿ™‚

meager granite
#

Too radical

#

Though if I could, I'd ditch engine Assemble and scripted my own

stark fjord
#

You cant have speed without sacrifices ๐Ÿ˜„

meager granite
#

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

digital hollow
#

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).

winter rose
#

what's the use case?

digital hollow
#

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]]]

south swan
#

yaaay, vector math

little raptor
winter rose
#

aka "you're on your own buddy" ๐Ÿ˜„ muhahahaaa

digital hollow
little raptor
#

And you want to do what with them?

#

I mean you said you want to find those points thonk

#

But you have them already?

digital hollow
#

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

little raptor
#

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)

digital hollow
#

I tried to start there. can get direction of intersect-line with crossproduct of normals, ofc. trouble with the common point xD

little raptor
#

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

south swan
#

this one?

little raptor
south swan
little raptor
#

But the graphics gems method is just cleaner

south swan
#

yaay, complex computations in SQF

kindred zephyr
#

thank god this is not done constantly

sullen sigil
#

is there any known limit of profilenamespace size

kindred zephyr
#

Do identities handle death sounds for man based units?

Or is that something that is handled separately/user solution wise?

winter rose
little raptor
sullen sigil
#

either way, time to log all my players' info on server's profilenamespace ๐Ÿ™‚

kindred zephyr
sullen sigil
#

seeing as its just raw text i probably dont even need to worry about size limitations do i

kindred zephyr
kindred zephyr
sullen sigil
#

discord bot should be able to request that info from the server somehow shouldn't it? ๐Ÿค”

winter rose
still forum
still forum
sullen sigil
# still forum What are you saving?

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

sullen sigil
#

oops forgot to disable ping that time, sorry

#

Server's profilenamespace works fine just wanted to check if it has a limit first

kindred zephyr
# winter rose _them damn mods!_

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

still forum
#

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

sullen sigil
#

Yeah was considering doing that -- I'd imagine server's profilenamespace cannot be accessed by a discord bot but basically anything else can?

brisk lagoon
#

Hey guys

#

new day new problems

#

lol

winter rose
#

run, people - RUN!!

brisk lagoon
#

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

sullen sigil
brisk lagoon
#

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

sullen sigil
#

please indent things properly notlikemeow

brisk lagoon
#

Lol what did I do

#

explain me, I am a noob, I literally just started yesterday

winter rose
#

don't "deindent" without a }; ๐Ÿ™‚

still forum
sullen sigil
brisk lagoon
winter rose
#

it works, but it's hard to determine where is what!

brisk lagoon
#

ohh

winter rose
#

this should not happen, for example

sullen sigil
# still forum That would have to be a extremely elaborate discord bot

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 notlikemeowcry

brisk lagoon
sullen sigil
brisk lagoon
#

notepad ++

sullen sigil
#

ok you know the lines you get from brackets to brackets

#

those should always be correct

brisk lagoon
#

so those who are blocked by other text, do I just tab it forward?

#

is that what you saying?

#

(the rows)

sullen sigil
winter rose
#
class A
{
// indent 1
  // here
  class B
  {
  // indent 2
    // here
    class C
    {
    };
    // deindent 2
  // here
  }; // closing B
  // deindent 2
// here
}; // closing A
sullen sigil
#

the lines should always be going down to their closing bracket with no interruptions

winter rose
#

what KJW posted ๐Ÿ˜„

brisk lagoon
# sullen sigil

yeah ok but in the ORBAT some rows gotta be under some rows

winter rose
#

inside

#

not "under"

sullen sigil
#

yes, so you'd have something along the lines of this

brisk lagoon
#

oh ok yeah so most of my stuff is like besides couple one's that I missed

sullen sigil
#

yes

#

make it all of it like that

open fractal
winter rose
open fractal
#

ty

sullen sigil
#

have i converted someone else to minecraft font

open fractal
#

might swap my desktop environment to it who knows

winter rose
#

*panic*

sullen sigil
#

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

open fractal
#

can vscode be configured so only sqf is comic sans

sullen sigil
#

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 notlikemeowcry

still forum
sullen sigil
#

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?

still forum
#

Yush

#

But then it's offline when server is off blobdoggoshruggoogly

sullen sigil
#

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

winter rose
#

perhaps getPlayerVoNVolume?

kindred zephyr
#

i bet chaptGPT could do a nice db integration using nothing but stones and sticks /s

winter rose
kindred zephyr
#

those are some pretty spicy reactions hahaha

sullen sigil
#

isnt there a mod for discord bot hosting already

kindred zephyr
#

there is one for discord rich precense

#

but besideds that nothing relevant to automation

sullen sigil
#

not quite the same, hmmm
wonder if theres any point in making that ๐Ÿค”

still forum
#

Sounds nice
Discord bot API in sqf

#

Has uses

sullen sigil
#

How would you even do commands though? Config? notlikemeowcry

#

Or you'd need to have postinit for registering commands or w/e

still forum
#

Callback for received messages. Integrate ingame char into didcord

#

You can do text commands easily, slash commands uff

winter rose
#

"see Valkyrja live!"

sullen sigil
#

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 ๐Ÿค”

brisk lagoon
sullen sigil
#

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 {}

stark fjord
brisk lagoon
winter rose
#

BIG ANGERY

sullen sigil
#
class a {
  class b {
    class c;
  };
  class d {
    class e {
      class f;
    };
  };
};```
sullen sigil
#

if it has the same parent class it should have the same indentation

brisk lagoon
sullen sigil
sullen sigil
#

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

stark fjord
#

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

hallow mortar
#

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.

brisk lagoon
#

I acknowledged everything I am just thinking really hard now how to correct it ๐Ÿคฃ

winter rose
brisk lagoon
#

lol

digital hollow
stark fjord
hallow mortar
#

Well yes you have to have spaces between commands so it can tell them apart

stark fjord
#

So it cares ๐Ÿ˜„

stray flame
#

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

sullen sigil
#

setfeaturetype

hallow mortar
#

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.

stray flame
#

alright

#

since that is already featured in Eden enhanced I guess there isnt anything beyond that which I can do

sullen sigil
#

if their terrain view distance is 2km theres no way to make them see something beyond there

brisk lagoon
sullen sigil
#

if their object is 2km then its higher

digital hollow
brisk lagoon
#

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?? meowsweats

#

unless someone wanna help me with that on editable paste bin blobdoggoshruggoogly

fleet sand
brisk lagoon
#

Yeah I am stupid, sorry

#

thank you very very much

#

I see it now

little raptor
#

It's faster than all that + and *s

digital hollow
#

Sorry, I'm lost there. I'm finding stuff for using determinant to calculate cross product, but not the other way around.

grand stratus
still forum
#

Haven't seen it yet

sullen sigil
#

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)

grand stratus
little raptor
#

also you're not checking the determinant

#

you must validate that it's not too small abs _det > 1e-6

sullen sigil
grand stratus
#

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.

proven charm
#

it says its for version 2.14

grand stratus
granite sky
#

Because the released version is 2.12

#

2.14 is the next one.

grand stratus
#

What is the ETA on 2.14? It would be much easier to wait for it than rewrite around this

proven charm
#

you only get 2.14 in the dev branch I believe ๐Ÿ˜‰

granite sky
#

If you switch to the dev branch then you can probably test it.

#

But it's not MP-compatible with 2.12

digital hollow
#

Concepts for Most evil slider UX but for View Distance?

south swan
#

"run the distance you want the game to draw"?

granite sky
#

with ACE stamina :D

digital hollow
#

wow. immediate hardcore. I was thinking stuff like distance inversely proportional to speed.

south swan
#

"the distance of your next shot would determine the View Distance... oh, btw, you only have chemlights in your inventory"

restive hinge
#

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.

granite sky
#

So what's with the random?

#

Like why not do what you said?

restive hinge
#

Creates a random index, due to a marker name needs a unique name

granite sky
#

No, the other random.

restive hinge
#

Oh, the first one...

restive hinge
#

Couldn't get the forEach syntax, so I decided to switch to for

granite sky
#
_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

restive hinge
#

Hm, this won't make markers unfortunately

#

Can't quite get why

fleet sand
granite sky
#

Doubt it tbh.

stray jackal
#

If i want to post a script in here for questions, how do i make it display like notepad++ like you guys are?

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

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

// your code here
hint "good!";
hallow mortar
restive hinge
#

I'm dumb!

#

Sorry.

#

Thank you guys!

#

Also forEach seems not that complicated after an example!

stray jackal
#

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.

hallow mortar
#

You need ` not '

granite sky
#

forEach is easy apart from the syntax being backwards :P

hallow mortar
granite sky
brisk lagoon
#

what will be the best dimensions for slideshow images?

fleet sand
brisk lagoon
#

What's power of 2?

hallow mortar
#

That thing the Sith do Exponents, specifically the exponent 2 (squared). 1024 is 32^2

fleet sand
brisk lagoon
#

oh oh got you got you

little raptor
#

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

hallow mortar
#

ugh

fleet sand
#

Yea what Leapoard said and if you want rectangle you can use 1024x512 or 512x1024 depending on what object you are adding texture.

brisk lagoon
#

Will PAA be better for it though? or is there no real difference? or I have to use JPG/PNG?

fleet sand
brisk lagoon
#

oh sickkk

#

thank you

hallow mortar
#

Arma 3 Tools also comes with BI's own Image to PAA converter

drifting portal
#

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)

kindred zephyr
#

yes, but that is expensive af

drifting portal
kindred zephyr
#

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

stray jackal
#

figured it out, wasn't loading the killrep in the hpp

granite sky
#

IIRC there are two different types of projectile. Bullets are local, other stuff is global. Or something like that.

kindred zephyr
lunar goblet
#

is there a way to set up an area in which all weapons are removed from a player? (pls ping me with any replies)

lunar goblet
#

i think i just found it actually be doing a web search (i probably should have done that first)

winter rose
#

yes

#

๐Ÿ˜„

#

but kudos to you, let us know if you need further assistance ๐Ÿ™‚

brisk lagoon
#

What dimensions you recommend to use for custom flags?

brisk lagoon
#

Custom flag (Flag Pole)
and Custom Banner

#

any clue?

winter rose
#

flag on poles are 2:1 iirc

#

"custom banner" = ?

brisk lagoon
#

So there are those banners and you can apply texture to them

#

Pretty big-ish size

winter rose
#

โ€ฆscreen?

brisk lagoon
#

yeah one sec

brisk lagoon
#

banner

winter rose
#

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

sullen sigil
#

is there any way to use direction xyz for a setting of orientation i cannot be arsed with vectordirandup

sullen sigil
#

is there no other command or stupid way of doing it

brisk lagoon
#

or jpg is fine

winter rose
brisk lagoon
#

Gotcha

winter rose
#

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

kindred zephyr
brisk lagoon
#

good to know, thanks!

#

Do you think I can change the picture on this framed picture with a texture? lol

winter rose
#

if it has a texture settable by setObjectTexture yes, otherwise no / workaround

brisk lagoon
#

Dang, I will try to find something

winter rose
fair drum
brisk lagoon
#

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

manic sigil
sullen sigil
brisk lagoon
#

yeah I don't think PAA works with flags and banners

oblique pewter
#

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.

brisk lagoon
#

JPG was fine for flags and banners, paa on flags and banners changes the color for some reason

oblique pewter
#

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; };

sullen sigil
brisk lagoon
sullen sigil
#

use arma tools imagetopaa

oblique pewter
#

can anyone help me?

oblique pewter
#

if i put code in a varable how can i run it

#

say

#
var1 = hint "cheese";
#

how would i run the variable as code

fair drum
#
var1 = { hint "cheese"; };

call var1
#

@oblique pewter

oblique pewter
#

i see

fair drum
#

you are making a function by doing that

#
myFunc = {
     params [["_fruit", ""]];
     hint _fruit;
};

["apple"] call myFunc;
molten yacht
#

if I have a collection of objects that are all like rad1_1, rad1_2, is there a way to just basically go rad1_*?

oblique pewter
#

i cant get it to properly execute my code

stark fjord
# brisk lagoon tried both that website and also TexViewer2

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.

molten yacht
#

Also, with a holdAction, I'm having trouble with the exact syntax for executing a script. would it be execVM "scripts\intel_laptopEnc.sqf"; ?

stark fjord
molten yacht
#

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.

molten yacht
hallow spear
#

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.
stark fjord
#

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

molten yacht
#

oh interesting

#

thank you

stark fjord
#

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

molten yacht
#

(would kill for a better scripting language)

stark fjord
#

Also i typed this on my phone so idk if it will work straight off the bat, but it should give you general idea.

molten yacht
#

yeah no that's tremendously helpful

#

also you're a fucking madlad to be typing that on your phone

stark fjord
#

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...

winter rose
#

Marko on mobile > chatGPT

molten yacht
#

for real.

#

I'm using ZEN's easier way to do holdActions but I've got everything working for now.

warm sentinel
#

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];};```
meager granite
#

try removing your addAction and see if its there?

warm sentinel
#

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

warm sentinel
#

lol dumbest mistake ive ever made

fair drum
warm sentinel
restive hinge
snow finch
#

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

meager granite
#

Some objects boundingCenter is insane

fair drum
#

Helping Verdant - Script and Mod Help

hallow mortar
meager granite
grizzled cliff
#

missionConfigFile

#

instead of configFile

modern meteor
#

Is there a way to delete all objects in the group Empty (see picture bottom left) via script?

brisk lagoon
#

so I think maybe for flags JPG is ok? notlikemeow

sullen sigil
#

no, use paa

#

whole image doesnt need to be used texture

brisk lagoon
#

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

sullen sigil
#

you can have 512x1024 etc

brisk lagoon
#

gotcha

sullen sigil
#

if imagetopaa wont convert it chances are youll have issues using any other converter

brisk lagoon
sullen sigil
#

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

brisk lagoon
sullen sigil
#

always use the BI Tools until you know the limitations of them (mostly addon builder) imo

brisk lagoon
#

Gotcha

sullen sigil
#

and even then addon builder's limitations only really apply to modellers, i've not once had an issue with script/config mods

brisk lagoon
#

oh good morning meowthis
literally woke up and went to fix this hahaha

sullen sigil
#

if it was a good morning i would still be asleep

brisk lagoon
#

hahahaha understandable

hallow spear
#

awesome, thank you

fleet sand
#

Question is it possible to remove map diary Team ?
Nmv i found solution its player removeDiarySubject "Units";

warm sentinel
#

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;
}];```
wicked roostBOT
#
How to use SQF syntax highlighting in Discord

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

// your code here
hint "good!";
sullen sigil
#

^ plz

#

but i already see issues

warm sentinel
#

the first foreach loop is messing up

#

i think

still forum
#
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;
warm hedge
#

ChatGPT intensifies

warm sentinel
still forum
#

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.

meager granite
#

Once again I ended up using HASHMAP get [KEY, DEFAULT] instead of HASHMAP getOrDefault [KEY, DEFAULT] notlikemeow

warm sentinel
still forum
#

"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" blobdoggoshruggoogly

brisk lagoon
#

If I want to play some custom sounds (military radio sounds, crowd sounds etc.) is this how I do it?
(some video on YT)

warm hedge
#

Well actually we are tired of ChatGPT in this specific channel/topic so, yeah...

still forum
warm hedge
#

In the first place if you're watching a tutorial video why wouldn't you watch it

sullen sigil
#

need .wss files

still forum
#

or .ogg

sullen sigil
#

arma tools again :p

warm sentinel
brisk lagoon
#

and as a Rookie it doesn't tell me anything

modern meteor
warm hedge
#

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

still forum
sullen sigil
#

simply put dont come here for issues with things a human didnt write ๐Ÿคท

brisk lagoon
sullen sigil
#

playSound

#

where is the /wiki command goddamnit :D

warm sentinel
warm hedge
#

Teach your IME so you can convert a simple words into the BIKI page!!!!!!!!!!!!!!oh wait it is because I'm using Japanese IME

brisk lagoon
#

the cfgsounds I mean

warm hedge
#

What is โ€œORBAT description fileโ€?

sullen sigil
#

โ“ what

brisk lagoon
#

sorry I didn't say it right

#

I meant the description file where my ORBAT is written

sullen sigil
#

if you have a config.cpp

#

cfgsounds can be added there

warm hedge
#

Or description.ext

brisk lagoon
sullen sigil
#

oh yeah i forgot that exists

warm hedge
brisk lagoon
#

hahaha

#

so my questions was, there is an ORBAT (CfgORBAT) there, that's ok if I add CfgSounds at the bottom?

sullen sigil
sullen sigil
#

description.ext is just a config file

#

not the same as config.cpp for more advanced things but it will do

brisk lagoon
#

oh and the .wav file someone said .wav files don't work?

sullen sigil
#

yes

#

use arma tools to convert to wss

pulsar bluff
#

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

warm sentinel
sullen sigil
#

thats because its crap for sqf

#

my dog could write better sqf code if he read the wiki

warm sentinel
#

well ur dogs smarter than me lmao

modern meteor
#

Is there a way to get a list of all objects on EMPTY side?

still forum
#

All you need to learn is to read the wiki

#

That would've helped with the stopMusic, but not with the semicolon tho

stark fjord
#

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.

warm sentinel
#

honestly i knew that you can playmusic ""; to stop i just had bothered to get there yet bc the foreach loop wasnt working haha

warm sentinel
sullen sigil
#

no

#

cut out the ai

warm sentinel
#

but dad

#

there gunna take over eventually anyways

sullen sigil
#

it has uses for coding but those uses are limited and you shouldnt try use it unless you know what you are doing

warm sentinel
#

its working but each action of the loop is playing the same song, im confused

stark fjord
warm sentinel
#

im think it helps me understand when i have something to start with, but i hear you

still forum
#

Ah the _x inside the action is undefined

#

you need to pass it as parameter

#

See addAction wiki page

warm sentinel
#

_x is representing each sting in the songs array right?

warm sentinel
#

so yes

#

okay

sullen sigil
#

magic variables my favourite gender fr

warm sentinel
#

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

sullen sigil
#

you might have problems using a magic variable as a standard variable name

warm sentinel
#

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 "";}];```
still forum
#

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

grim pasture
#

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.

warm sentinel
#

im reading the wiki lol, if thats what your going to say

little raptor
stark fjord
brisk lagoon
#

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?

little raptor
sullen sigil
little raptor
#

Is it?

stark fjord
# modern meteor Anyone?

Select them and remove them? Or if u wanna do it in game then no. Layers are gone by that point.

sullen sigil
little raptor
#

They go civilian (purple) thonk

sullen sigil
#

so just any dead units i think

#

would imagine its probably something like iterating across civilian side and checking if its alive

grim pasture
little raptor
#

Well I thought he meant the objects side in 3den think_turtle

#

(yellow)

sullen sigil
#

they're trying to make a script to delete all objects on "empty" side (the empty category in zeus interface)

little raptor
brisk lagoon
#

I don't get it, it gives me this error but I am still able to convert to WSS

stark fjord
#

Wait then why not just use garbage collector instead?

sullen sigil
#

my guess is the bitrate is outside of the range

#

probably (hopefully) clamps it to minimum or maximum for the .wss though

grim pasture
stark fjord
brisk lagoon
#

I have 0 clue in audio files lol, what do I do then?

modern meteor
little raptor
modern meteor
#
{deletevehicle _x} foreach (units civilian);
#

does not work

little raptor
#

They're not civilian

brisk lagoon
little raptor
#

44100

modern meteor
stark fjord
#

Id suggest using inbuilt garbage collector. It does exactly that, deletes dead units and removes wrecks

little raptor
modern meteor
#

But it does not delete these objects, does it?

#

The garbage collector I mean

still forum
# warm sentinel would i be using _this? im not sure how to do that.

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

stark fjord
little raptor
#

Super slow...

sullen sigil
#

dont iterate through allmissionobjects unless you dont value performance

#

if its every 5 seconds or w/e then schedule it

still forum
#

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]

stark fjord
#

Its a cleanup after mission, so who cares xD

sullen sigil
#

oh after mission

#

didnt see that bit

little raptor
sullen sigil
#

ya i know

modern meteor
stark fjord
#

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

fleet sand
#

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/>
"]];
modern meteor
hallow mortar
#

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/>```
stark fjord
modern meteor
#

This could be a solution. I'll give it a shot. Tyvm

sullen sigil
#

is remoteexec a setvariable on the server a better idea than just broadcasting the setvariable? notlikemeowcry

#

(if only the server needs to read the variable)

modern meteor
stark fjord
sullen sigil
#

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 ๐Ÿ˜„

stark fjord
modern meteor
#

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.

sullen sigil
#

nearobjects around marker pos

brisk lagoon
#

No idea what I did wrong

sullen sigil
#

you need a subtitles array even if its empty

brisk lagoon
#

oh

sullen sigil
#

titles[] = {0, ""}; iirc

brisk lagoon
#

I will try that

sullen sigil
#

or just {}

#

don't know if empty empty works

winter rose
#

it does

#

that's what should be used actually ๐Ÿ˜„

sullen sigil
#

yeah i realised that as i was typing meowsweats

#

@brisk lagoon titles[] = {}; not what i sent

winter rose
#

well both will work, but it's better to have an absolutely empty array :)

brisk lagoon
#

so this titles[] = {}; ?

sullen sigil
#

yes

sullen sigil
brisk lagoon
#

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

sullen sigil
#

playSound3d

brisk lagoon
#

ah ok

#

thanks

modern meteor
#
_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?

brisk lagoon
#

what does it mean again? notlikemeowcry

sullen sigil
#

you did the syntax wrong

#

read the wiki

brisk lagoon
#

mmm

stark fjord
brisk lagoon
sullen sigil
#

you can nest arrays just fine

brisk lagoon
#

fixed it thanks

stark fjord
brisk lagoon
#

oh it's probably the distance

#

I will try to delete the distance value

brisk lagoon
#

when I changed it to PlaySound3d

#

it worked

#

that's the only thing I changed

warm hedge
#

๐Ÿค”

#

SQF commands are case insensitive

winter rose
hallow mortar
brisk lagoon
#

how come did it work after I changed the P then?

the whole line is playSound "Mosque";

hallow mortar
#

playSound and playSound3D are not the same

brisk lagoon
#

Yeah I get it now, but what is wrong about the line?

warm hedge
#

That implies P and p are not the only ones you changed

brisk lagoon
#

sorry the line is

#

playSound3d "Mosque";

hallow mortar
brisk lagoon
#

I have no idea what is the difference notlikemeowcry (don't bully me please I am learning)

winter rose
#

see examples

#
playSound "mySound";
// vs
playSound3D ["abc", ...];
winter rose
brisk lagoon
hallow mortar
#

An array is a [list, or, "group of items"]. A string is a "plain text data type".

brisk lagoon
winter rose
hallow mortar
winter rose
brisk lagoon
winter rose
#

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)

brisk lagoon
#

playSound3D ["A3\Sounds_F\sfx\blip1.wss", player]

What does the "player" part do here?

stark fjord
#

You could just use object say3d "sound"

hallow mortar
brisk lagoon
sullen sigil
#

Read The Fucking miller

brisk lagoon
#

oh LOL

winter rose
#

Read Theโ€ฆ Field Manual?

sullen sigil
#

lou is trying to cover up his mistake of not putting rtfw

brisk lagoon
#

hahaha

winter rose
#

rtfb ๐Ÿ˜„

brisk lagoon
sullen sigil
#

read

#

the

#

wiki

#

please

brisk lagoon
#

it doesnt say if its gotaaa be thereeeeeeee

winter rose
#

optional things are marked asโ€ฆ *tu-dummmโ€ฆ* Optional

hallow mortar
#

Without it, how will the command know where the sound should originate?

sullen sigil
#

if it doesnt say optional, its not optional ๐Ÿ˜ฎ

brisk lagoon
#

OKKKKKKKKKKKKKKK

winter rose
hallow mortar
#

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

brisk lagoon
sullen sigil
#

source: i made it up (i am schizophrenic)

winter rose
brisk lagoon
#

I just need the sound to come out from a freaking radio or a speaker

#

(well look like that)

stark fjord
#

Ye

winter rose
#

good thing is, if the object gets destroyed the sound will stop

brisk lagoon
#

with say3d?

stark fjord
#

Contrary to what it says inamate objects can say things

#

Ye.

brisk lagoon
#

so I did read (YES LOU I READ THE WIKI meowsweats ) that you can use say3d to play sound inside a vehicle for example? is that the same thing basically?

winter rose
brisk lagoon
#

one sec

#

oh never mind I CANT EVEN READ notlikemeowcry
I thought this line
helicopter1 say3d "sound" meant that it will play from the inside

stark fjord
#

It will play from helicopter

brisk lagoon
#

Yeah

stark fjord
#

Try it, you will see the effect

#

I mean hear

winter rose
coarse dragon
#
_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?

brisk lagoon
#

oh

#

I AM stupid

#

object is the object

stark fjord
stark fjord
# brisk lagoon object is the object

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)

winter rose
#

use getPos' alt syntax, no?

coarse dragon
#

i dunno im using a AI chat thing lol

winter rose
winter rose
coarse dragon
#

im so crap at scripting and dont wanna live here

hallow mortar
#

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.

coarse dragon
#

some things i just cant learn. i cant get my head wrapped around it

brisk lagoon
#

sound[] = { "fx\wolf1.ogg", 1, 1 };

ths first 1 in the brackets is the volume, is 1 = 100% volume, or literally 1?

hallow mortar
#

1 is medium, basic, default. I think it caps out at 10, and can go lower with 0.9 etc.

brisk lagoon
brisk lagoon
#

yes, it says it's the volume but it doesn't say that 1 is 100% or not

winter rose
#

grumbles
okay, I give you that. I wanted to update that section anyway ๐Ÿ˜ข

brisk lagoon
#

LOU WAS WRONG, EVERYONE TAKE A SCREENSHOT QUICK

winter rose
#

I'll deny everything

brisk lagoon
winter rose
#

this is also why I invite people to read the biki, so sometimes something obvious is not to a newcomer and I can amend ๐Ÿ™‚

hallow mortar
brisk lagoon
#

so cap is at 5?

#

I will try 5

winter rose
#

why not just 1?

brisk lagoon
#

1 is too quiet, the sound is a mosque prayer sound and it's relaying from speakers pretty high on the mosque

hallow mortar
brisk lagoon
#

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

winter rose
hallow mortar
brisk lagoon
#

no it's not

#

tried 5 it's till pretty quiet

#

can you set distance on say3d comand?

hallow mortar
brisk lagoon
#

i got it opennnnnnnnnnnnnnnnnnnn

hallow mortar
#

Then read ittttttttttttttttttttttttttttt

brisk lagoon
#

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

hallow mortar
brisk lagoon
#

MosqueSpeakers say3d "Mosque", "200"

#

is that right?

hallow mortar
#

No

brisk lagoon
#

MosqueSpeakers say3d "Mosque, 200"?

hallow mortar
#

You are passing an [array,of,parameters], which means you need [the,things,that,enclose,arrays]

#

[]

brisk lagoon
#

so
MosqueSpeakers say3d "Mosque" [200]?

coarse dragon
#

what r u trying to do

hallow mortar
#

Please look at the picture I posted a minute ago

#

It shows exactly the correct layout of the array

brisk lagoon
#

iwrgiedhjguiwh\eairgjhwaesrg

MosqueSpeakers say3d [Mosque, 200]

hallow mortar
#

The sound name needs to be a string

brisk lagoon
winter rose
#
MosqueSpeakers say3d "Mosque" [200]
// vs
MosqueSpeakers say3d [Mosque, 200]

you dropped " at one point

coarse dragon
#

someone needs to make a App that you tell it what you want and it does everything you need for you xD

hallow mortar
#

Were it so easy

coarse dragon
#

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

sullen sigil
#

also known as your brain and the wiki

#

Would be nice to be able to open wiki page for a command from ingame thougy

brisk lagoon
hallow mortar
brisk lagoon
#

im trying to find it one sec

winter rose
brisk lagoon
#

(black box on top)

hallow mortar
#

Have you......read it?

#

Because it says exactly the issue

warm hedge
#

Apparently you miss the quotation there, and Lou's intention there is that

brisk lagoon
#

so tell me what is it because I literally copy pasted his line

winter rose
#

I did not correct it

#

I showed you where the issue was

brisk lagoon
#

well slap me and call me an hilly billy

winter rose
#

r e a d, understand, apply please ๐Ÿ™ƒ if you don't understand something, ask ask ask

stark fjord
#

And dont use chatgpt for sqf

#

(Unless you know sqf)

brisk lagoon
#

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

kindred zephyr
# winter rose isn't your soundfile itself too low?

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?

modern meteor
#

Is it possible to delete all entities with a certain classname from the map via script?

winter rose
#

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

brisk lagoon
#

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?

coarse dragon
#

is it in a trigger?

brisk lagoon
#

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

kindred zephyr
brisk lagoon
kindred zephyr
#

you can also stack say3d and playsound3d to make it artificially louder

modern meteor
#

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?

kindred zephyr
#

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

winter rose
#

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;
modern meteor
#

Got it, thank you

kindred zephyr
#
private _toDelete = entities [[], ["EmptyDetector"], true] - [allCurators] - [player];
{
  if (player distance _x > 100) then { deleteVehicle _x; };
} count _toDelete;

'it's even faster!'

modern meteor
#

But having problems to detect arrows

#

Not sure if they can deleted via script

kindred zephyr
#

they can

#

since they can be detected with nearObjects command family

modern meteor
#

right

#

thank you

#

i will test this

brisk lagoon
#

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"

winter rose
brisk lagoon
#

no access

#

does the game supports ogg? I just want to make sure because the tools only have wav to wss

still forum
#

yes

hallow mortar
# brisk lagoon no access

You've chosen the "hide offtopic category" role and I'm guessing that link is to a channel in that category

brisk lagoon
#

oh right

stark fjord
brisk lagoon
#

Yeah that's what I am doing now

#

I literally had to convert to wav then to wss, pain

stark fjord
#

Normalizing it will make it louder.
Yeah ive told you before to use ogg ๐Ÿ™‚

thorn saffron
#

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.

kindred zephyr
brisk lagoon
stark fjord
#

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

thorn saffron
#

Does the synchronizeObjects work only on units?

digital hollow
#

and game logics and triggers

thorn saffron
#

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.

sullen sigil
#

synchronizedObjects?

thorn saffron
#

read above

sullen sigil
#

i did

thorn saffron
#

turns out synchronizedObjects does not work on empty objects

digital hollow
#

if attachTo is being used then attachedTo is handy. Otherwise, build array and do setVariable

thorn saffron
#

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

sullen sigil
#

then set up the array building from your side ๐Ÿคท

thorn saffron
#

but then you have to name all the bits and bobs with will be time consuming and is jank solution

sullen sigil
#

we have no idea what you're trying to do so cannot provide any more useful advice

digital hollow
#

sync them all to a gamelogic and have the code identify the main object?

thorn saffron
#

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.