#arma3_scripting

1 messages ยท Page 163 of 1

lavish stream
#

Can't you pass args to addMissionEventHandler now?

meager granite
#
_player setVariable ["asd_initialPos", getPos _player]
meager granite
#

Oh yeah

#

They're forced to be an array though

hallow mortar
#

Not the most impenetrable of obstacles

weak isle
meager granite
#

And if is skipped completely (no then nor else executed) because your statement returns nil which mutes any command it is used in. So both then and else get nil and do nothing

#

Oh you also need _player there

#

I guess MEH args is the way then

#

Actually, you already use global vars for the MEH, might as well have initial pos and player there too

#
TAG_player = _player;
TAG_initialPos = getPos _player;
if ((TAG_initialPos distance (getPos TAG_player)) < 3) then {
#

Or move everything into MEH args and use _thisArgs

weak isle
#

Why does it have to be that complicated?

But thanks. It works

old owl
#

What Sa-Matra said is correct. Just alike an addAction when you use an inline code block, within the command; you are still spawning an entirely new script.

meager granite
weak isle
meager granite
#

Event scripts are all executed in a brand new scope, you need to keep this in mind

meager granite
#

If this is called in scheduled or some UI unscheduled contexts it will also fire an error, but in usual unscheduled context it just mutes any commands.

weak isle
#

The script is triggered with a task, can I prevent other players from triggering the task too?

Like the task disappears while a player is using it?

old owl
#

Yea, you'd likely either want to have some sort of variable broadcast over the network or remoteExec to handle that.

// Variable on taskNPC is available to all clients
taskNPC setVariable ["complete", true];
// Executes a script on all clients
// Alternatively could change -2 to individual players nearby by getting distance of allPlayers or using nearestObjects. 
["complete"] remoteExec ["TAG_fnc_taskManagement", -2];
timid glen
#

OMG YOU ARE FANTASTIC

#

Can I marry you? Platonically?

#

How does it function? Sadly there is no documentation included

still forum
#

There is documentation included, its inside the script file

timid glen
#

ah okay thanks!

still forum
#

You'll probably not know what to do at

Before you run the script create your LODs, the proxies will be placed in all lods, you will want 0.0 and Geometry at minimum (unless you want the object to have no collision)
I don#t remember how to create LODs in object builder, but #arma3_model will know

timid glen
#

I will try my hand at it once I get home

#

just a couple hours to go

#

Ill tag you once I figure it out or someone explains it if youd like

weak isle
#

Only for clarification. The script should work in multiplayer right?

#

(when triggered from an Action)

meager granite
#

Do you want all players see the same progress bar?

meager granite
#

Actions are all executed on client who pressed the action, no need to remote exec it then

weak isle
#

oh, ok

thin fox
#

2.18 hotfix, let's see if I can use the EH unitKilled

#

working, thank you devs

pallid palm
#

hello friends, How do i get the Client to onMapSingleClick poisition in a DED server

#

ofcorse Arma 3

proven charm
#

you want to send position from client to server?

pallid palm
#

yes

proven charm
#
onMapSingleClick
{
 [_pos] remoteExec ["HereComesThePosition", 2];
};
``` and server must have HereComesThePosition function defined
pallid palm
#

ahh i see ok cool

#

sweet m8 thx

#

totaly awsome my friend thx

#

i love you man lol it works awsome WooHoo yeah Arma 3

placid spear
#

Is there a sane way to control artillery/mortar gun elevation/azimuth without getting into animation manipulation? Trying to make a gun line that can be controlled from a single position (without artillery calculator)

cobalt path
#

question, I am making a different Fulton Script. I am currently having 2 issues:

  1. The Baloon, changes its size to what I want, and than changes it back to its default size
  2. After line 80, players are moved into the transport aircraft. But something damages the players and the aircraft making it almost explode and go down.

https://pastebin.com/GxcYzFA8

foggy stratus
#

How can I detect if an AI unit is of class Sniper, MG, or Medic?

little raptor
foggy stratus
little raptor
#

Yes. That's not the role tho. That's the textSingular/textPlural entry

foggy stratus
#

Thanks.

tardy osprey
#

heyo folks. i'm trying to make a small SP mission, and i'm starting the mission out by having a squad gather up, then heading over and waiting for an inbound helicopter. Right now, the helicopter will behave normally by landing and letting AI board, if timed correctly. However, if the player takes too long to go to their squad and too long to move over the the landing site for the helicopter, the helicopter will take off again 2 - 3 seconds after touching down. It will only stay down if anticipating someone boarding it. (Get in WP)

So what i'd like to have the helicopter do, is stay on the ground, until everybody has boarded the helicopter. How do i go about this?

royal quartz
#

Hi guys trying to use the "LoadMagazine" command to change the ammo in a vehicles turret, currently trying to just change a slammers tank ammo from AP to HE using either of the following but neither is working. The online documnetation says use the magazine not ammo type so tried but that dident work. So I tried the ammo type instead still no.

(vehicle player) loadMagazine [[0], "cannon_120mm", "16Rnd_120mm_HE_shells_Tracer_Red"];

(vehicle player) loadMagazine [[0], "cannon_120mm", "Sh_120mm_HE_Tracer_Red"];
little raptor
#

You don't need to turn off the engine

pallid palm
#

copy that Leo

little raptor
#

Just setFlyInHeight and force it helo setFlyInHeight [0, true]

tough abyss
#

I have got really really good help in here with a script with a spawn reinforcements function. It is working in ONE mission, I have tried it on other missions with no luck at all. I have no Idea why it just works on one mission and I'm all out ideas to test so I need your help, for real, I will gladly send some coffee/beer money for the help cause this is so god damn important to me.
I have made 2 zip files that contains all that's needed
Regarding the script, when I say it doesn't work, it means that the "function" Call reinforcements isn't showing in scroll wheel menu

tardy osprey
pallid palm
#

now were talking more scripting

little raptor
tardy osprey
#

Yeah, the helicopter is landing, then either waiting for a Get in WP, or for everyone to have boarded, to then move to the obj

pallid palm
#

oh this is singleplayer oops

little raptor
tardy osprey
little raptor
#

u1, u2 u3 are the units that should board

#

myHelo is the var name of your helo

tardy osprey
#

i have all unit names listed there, and set the trigger to skip waypoint upon completion, but i assume this wont be enough?

little raptor
#

What is your whole setup again? (Other related triggers/waypoints)

tardy osprey
#

Right now, it's set up so that The player, along with the rest of the squad joins up with the Squad lead

#

Which is on a hold WP, until the player arrives, then he will move to a new hold WP to "wait" at the Helipad. This Hold WP will skip once the helicopter comes down to land

#

So yeah, in the off chance that the player doesnt get a move on very quickly, the squad lead wont move to the Hold WP in time, thus it wont prompt the Heli to stay on the ground.

#

And i'm not sure how to keep the heli forced on the ground, with the SetFlyInHeight. What would i need to do to "spawn" the script?

echo yew
#

Anyone found a workaround for magazine deletion bug when reloading?

tulip ridge
royal quartz
echo yew
#

there is no update for server side right?

tulip ridge
#

Yes your server needs to be updated as well

royal quartz
tulip ridge
tardy osprey
# little raptor What is your whole setup again? (Other related triggers/waypoints)

Okay, so i put the findIf Alive command in the trigger next to the helipad and given the Heli the appropriate var. The helicopter now stays landed, as the waypoint wont skip. Problem is the Squad lead moves towards the helipad before the player has entered the trigger that removes his first Hold WP.
Edit: Ah i see, I have 2 triggers that skips the waypoints for the squad lead, because i have 2 hold waypoints. So if the player takes long enough, the skip waypoint trigger on the helipad will delete both hold WPs and the SL will board the helicopter without everyone else, and you're blocked from completing the mission (Unable to board.)

#

Ah, helicopter stays grounded regardless if i have boarded it or not lol.

little raptor
tardy osprey
little raptor
# tardy osprey Okay, so i put the findIf Alive command in the trigger next to the helipad and g...

tbh since I'm not a mission maker this whole mess with triggers and waypoints seem too overcomplicated to me
You can just do this which is much simpler:

  1. For the part where you have to go to heli to get in, simply use a Move waypoint, with isTouchingGround heli as its condition. Followed by a get in waypoint
  2. For helicopter landing and waiting, then moving to next waypoint:
    Put down an invisible helipad where you want the heli to land and name it pad
    Then add 2 Move waypoints to the heli. One to where you want it to land (where pad is), the other to the next destination
    In the first waypoint activation statement, use this:
[] spawn {
 heli landAt [pad, "GET IN"];
 heli flyInHeight [0, true];
 waitUntil {
  sleep 1;
  !alive heli || [u1, u2, u3] findIf {alive _x && !(_x in heli)} < 0
 };
 heli flyInHeight 50;
};

This will make the heli move there, land, wait for everyone to get in, and finally take off and move to the next destination

tardy osprey
echo yew
#

Bohemia recently broke something in initialization?

#

my mission was working perfectly fine like 2 years ago now it's full of bug

#

some clients crashing just after the download of the mission, initPlayerLocal.sqf is not even executed

pallid palm
#

does this show to all on DED server,,, Pilot2 globalChat "BlackHawk Must Be Empty Before You Call Insertion Chopper";

#

and hello again

#

maybe not i guess

#

im exec it from the server

#

Arma3 ofcorse

winter rose
pallid palm
#

oh no lol ok

#

i knew it some how

winter rose
#

if it is in a waypoint, I believe it execs on all machines

pallid palm
#

no its in a script

#

i never use waypoints my missions is to dinamic

#

ah i see thx Lou awsome

#

"Message 1" remoteExec ["systemChat"];
"Message 2" remoteExec ["systemChat"];
// will result in
// "Message 1"
// "Message 2"
// in this exact order on clients

still forum
pallid palm
#

ok i completed all the changes to all the system chat stuff here goes 1st test, keep your fingers crossed he he i love it

#

ofcorse it all works thx Lou: and all you awsome guys: i love you guys !!!

#

i did change one thing i had to add a littel more hight to the water insertion chopper script

#

or should i say to the water insertion part of the script

#

thx againe you guys for all the help you guys have givin me, really i love you guys thx again

jade abyss
#

Does anybody knows, if there is a max. length of "GroupID"?

cobalt path
cobalt path
#

Well ye probably, but what

proven charm
#

setdir? i had this issue but forgot which command it was

cobalt path
proven charm
#

no

cobalt path
#

My script spawns a drone
spawns Balloon, disables its damage and than simulation.
Than attaches it to the drone and sets ballon scale to 3.
few seconds later to 5 and than 10.
Is the order wrong or smth?

#

It works in SP

proven charm
#

oh then check the commands locality

#

you might need to remoteExec some of the commands

cobalt path
#

Maybe, but in MP, it would change its size to desired one for a frame, and than it would go back to normal size. And other people could see it as well. So the command did execute for everyone. Its just reverted for some reason

proven charm
#

hmm

fleet sand
#

my guess is you have a drone and you are attaching balloons to that drone and changing their size.
Because Drone is moving you are gonna have to update size of balloons each frame or in while loop. So they would be custom size even when moving on a drone.

cobalt path
# fleet sand my guess is you have a drone and you are attaching balloons to that drone and ch...

I thought that too, but according to the wiki

// multiple MP-compatible options
// global simple object
private _globalSimpleObject = createSimpleObject ["C_Offroad_01_F", getPosASL player, false];
_globalSimpleObject setObjectScale 0.1; // once is enough as long as it is not moved
// local normal object
private _localNormalObject = "C_Offroad_01_F" createVehicleLocal getPosATL player;
_localNormalObject attachTo [player, [0, 2, 1.5]]; // normal object must be attached
_localNormalObject setObjectScale 0.1; // once is enough as long as it is not moved
// local simple object
private _localSimpleObject = createSimpleObject ["C_Offroad_01_F", getPosASL player, true];
_localSimpleObject setObjectScale 0.1; // once is enough as long as it is not moved

I assume mine would fall under "// local normal object"

#

oh wait

#

as long as its not moved.....
But I could swear I could change it in zeus manually and it should stick

#

okay nvm I will try eachframe....doesnt wanna work either

opal zephyr
#

The wiki for setObjectScale isnt 100% accurate. I would suggest trying to use a simple object instead of a vehicle (you can still use the classname) and see if that works. If not then create a simple object and updates its position each frame instead

tight cloak
#

whipping up a little puzzle segment. just looking for some advice on the section.
6 switches, combination code.
current thought process:
make an empty array.
flipping a switch puts a number into the array.
trigger evaluates the array and if its incorrect then resets all the switches, if correct sets the task as done and procedes the mission

#

but how to weave in instant feedback? so rather than wait for all 6 inputs, how would i make it check for every input

tulip ridge
#
// initServer.sqf
// three inputs for example
TAG_correctInputs = [0, 0, 1];
publicVariable "TAG_correctInputs";
TAG_leverInputs = [0, 0, 0];
publicVariable "TAG_leverInputs";
// fn_flipSwitch.sqf
params ["_index", "_value"];

TAG_leverInputs set [_index, _value];
publicVariable "TAG_leverInputs";

if (_value == (TAG_correctInputs select _index)) then {
    hintSilent "Correct";
} else {
    hintSilent "Incorrect";
};

if (TAG_leverInputs isEqualTo TAG_correctInputs) then {
    // sequence is correct
};
#

Wrote that on mobile, could have some syntax issues but should be mostly correct

#

You could do true / false too, 0 / 1 was just less to type

tight cloak
#

ty for the help

tight cloak
#

index issue

#

how do i notify the game in which order they are pressed?

raw vapor
#

My brain is being stupid today.
I want to create tasks for an op with an investigative theme to it. I would like to use scripts such as Hold Action or trigger areas to make the tasks appear to players and then change their status (completed/assigned/cancelled/failed, whatever).

What I don't quite know how to do is what the line of script is I'm looking for to say hey taskName1 you are now visible all players or hey taskName1 you are now marked as COMPLETED to all players

Can someone point me in the right direction? I'm not even sure what to look for on the wiki.

tight cloak
#

while the value works. index doesnt

#

as this solution simply works for a correct combination. not if in the event the combination is wrong

faint burrow
raw vapor
#

Oh so BIS_fnc_taskSetState is what I am looking for

#

Thanks!

tight cloak
tulip ridge
#

So if you had three levers on a wall, the first would pass [0, _upOrDown], the second would pass [1, _upOrDown], and the third would pass [2, _upOrDown]

#

Essentially are you wanting them to be pressed in the correct order or just that they are in the right state?

tight cloak
#

correct order

#

ive got it working, now its just animating the levers which isnt working

#
if !(isServer) exitwith {};
this addAction [
    "flip switch", 
    {
        params ["_target", "_caller", "_actionId", "_arguments"];
        [3] call CBB_fnc_puzzle;
        this animateSource ["switchposition",0];
        this animateSource ["light",0];
        [this, "OFF"] remoteExec ["switchLight",0,true];
    }, 
    nil, 
    1.5, 
    true, 
    false, 
    "", 
    "true", 
    3, 
    false, 
    "", 
    ""
];

this is what the addaction looks like

#
initserver.sqf
TAG_correctInputs = [1,3,2,6,5,4];
publicVariable "TAG_correctInputs";
TAG_leverInputs = [0, 0, 0, 0, 0, 0];
publicVariable "TAG_leverInputs";
TAG_leverInputs_index = -1;
publicVariable "TAG_leverInputs_index";
switches = [switch_1,switch_2,switch_3,switch_4,switch_5,switch_6];
function
params ["_value"];
TAG_leverInputs_index = TAG_leverInputs_index + 1;
publicVariable "TAG_leverInputs_index";
TAG_leverInputs set [TAG_leverInputs_index, _value];
publicVariable "TAG_leverInputs";

if (_value == (TAG_correctInputs select TAG_leverInputs_index)) then {
    hintSilent "Correct";
} else {
    hintSilent "Incorrect";
    TAG_leverInputs_index = -1;
    publicVariable "TAG_leverInputs_index";
    TAG_leverInputs = [0, 0, 0, 0, 0, 0];
    publicVariable "TAG_leverInputs";
    {
    _x animateSource ["switchposition",0];
    _x animateSource ["light",0];
    [_x, "OFF"] remoteExec ["switchLight",0,true];
    } forEach switches;
};

if (TAG_leverInputs isEqualTo TAG_correctInputs) then {
    puzzle = true;
};
#

ive tried _target and _this select 0

tulip ridge
#

Not sure about the animating part, can't check, but you could simplify the logic by just keeping all the current inputs in an array (which it already is), and then just checking if the last 6 elements are correct

tight cloak
#

im not sure how as right now with the index ticking up. if its incorrect it resets and if its correct it keeps ticking up. once it has hit all 6 correctly it sets a variable true which lets the mission progress

#

if someone screws up then id want it to reset. trail and error and paying attention to clues then makes sense

tulip ridge
#

I'm not saying you have to change it, could make the logic simpler

Not sure how to write it out properly but like:

private _lastSequence = TAG_leverInputs select [...]; // last six elements in the array
if (_lastSequence isEqualTo [1, 3, 2, 6, 5, 4]) then {...};
#

Would save you having to track the index

And you know if the array is less than six elements, then it also can't be right

#

If it's working now, you could just leave it

winter rose
#

or keep an empty array, and check elements when they are 6 - if incorrect, reset to an empty array
this resets values and prevents from having "sliding" acceptable values

tight cloak
#

for the sake of user feedback and speed however, id rather it be a case of "hit lever 1, lever 2, oh shit lever 3 didnt work as they all reset so it must be another" problem solving for players

#

rather than inputting 6 levers to find out its wrong

#

forgive me if im reading what you guys are saying wrong

winter rose
#

IDK what you want ๐Ÿ˜„

tight cloak
#

me too lou

#

me too ๐Ÿ˜ฆ

tight cloak
#

lou, we have made flying carriers. i cant make a simple puzzle made for 3 year olds

#

i just want a combination of switches to work

#

and if any are out of order it resets

#

that is all

winter rose
#
  • input 6 numbers
    • if 6 wrong, reset, else open
  • input any numbers
    • if the last 6 entered digits are OK, open
  • input 6 numbers
    • if one of them is wrong, reset (w/ feedback to the player)
#

(F Discord formatting)

winter rose
#

then have a fixed array (the code), and you can use the index as you said

  • if input nยฐ0 != arr select 0, reset
  • if input nยฐ1 != arr select 1, reset
    and if input nยฐ5 is OK, ding ding ding we have a winner
tight cloak
#

so with the prior conversation with dart. it works as of current. for my own learning sake. what is more optimized / better about this approach of evaluating the last 6?

#

rather than just feeding it each time until it spits it back out

winter rose
#

why do you want to check the last 6 ๐Ÿ‘€ ๐Ÿ˜„

#

logically, you do not have to check that "previous 6 chars were OK", rather "last 6 inputs were not errors" ๐Ÿ˜„

tight cloak
#

i cant remember what its called but basically the addaction was faster than the function to flip the switch was the issue ive just solved

shut flower
#

Does anybody knows if there is a possibility to rapify sqf files? I just found a (working) sqf file which seems to be rapified

tardy osprey
# little raptor tbh since I'm not a mission maker this whole mess with triggers and waypoints se...

Unfortunately this doesnt seem to work, the helicopter does not land. I've set the 1st move waypoint for the heli directly on top of the helipad, marked the helipad with the variable. but the helicopter goes past the helipad, hovers for 30 seconds, and then gives me an error messages, followed by going to the next objective. The infantry will go to the move marker and display "wait" next to the helipad, waiting for the heli that will never land.

#

Actually nevermind, I realised what the problem was like 5 minutes later, i didn't define all the variables in the script. So instead of the default "heli", i needed to put in "myHelo" which is the variable name of the helo. And now it works flawlessly, thank you very much. ๐Ÿ™‚ Edit: Well while the loading procedure works, after the infantry squad has disembarked the heli, the heli will fly a little bit up into the air and just go around casually hovering over the landing zone, not really following the next waypoint to get away from the combat zone, i suppose the aforementioned script has something to do with this?

indigo snow
#

rapify : binarise

#

you can't binarise sqf files

#

the maker probably used defines to obscure it

#

raP only applies to text with class statements basically

pallid palm
#

hello again Arma 3 friends
if im useing a chopper script, that has the chopper name _heli,
how would i move the player in the Cargo of the chopper on DED server
i can't seem to get it right
im useing a addaction script from the flagpole, what should i put in the script

#

this is what i have so far

#

it seems to me this should work

fair drum
#

@pallid palm post everything when asking questions

shut flower
little raptor
#

Is it far away from the landing zone?

#

Did you use the same skip waypoint stuff (which as you said yourself was deleting more than 1 of your waypoints)
All I can say is that it's not related to what I wrote. If it was the heli wouldn't have moved at all

indigo snow
#

sure but the engine wont be able to use that as a sqf file

shut flower
#

I can load in that sqf file

indigo snow
#

in what sense? sqf files are loaded as a string and then compiled and interpreted by the engine.

shut flower
#

If i take this script, put it in a pbo and make a entry in the cfgfunctions it will be parsed

#

The pbo itself can't be opened properly. There are a few errors during opening the pbo

#

could be that the file in the pbo is correct but the pbo is obfuscated so the opened file seems to be corrupted

rich falcon
#

Any way to fix

toString [34];

Returning 2 double quotes ("") instead of one (")?

south swan
#

wat

rich falcon
#

toString [34] is meant to return one double quote mark ("), but sometimes returns two ("")

south swan
#

maybe it's ' " '?

rich falcon
#

Nope

#

if I run it like that it gives me " "" "

#

And other times gives me the correct single double quotation mark

granite sky
#

toArray toString [34] correctly returns [34]

#

so I guess it's an output printing issue.

south swan
rich falcon
#

Yeah that's what I think is happening

granite sky
#

What are you actually using it for?

rich falcon
#

Still completely messes up my script

rich falcon
#

Unfortunately removing the 34 from the toString array doesn't work and returns the array of typeOf but without any (") separating them, just blank classnames

granite sky
#

If you want raw text output then you can do text toString [34]

south swan
#

i mean, given that "" is escaped " you have 'U_IG_leader", U_I_CombatUniform_shortsleeve", U_I_Uniform_01_shortsleeve_F' when converted to ' string

#

and having single instance of " does match your code

rich falcon
#

Yeah no I worked it out as I was typing a reply to this

little raptor
rich falcon
#

The issue was caused by me using
copyToClipboard str T1UF
Removing str fixed the issue immediately

#

Thanks for the help and guiding me there!

tardy osprey
# little raptor Did you use the same skip waypoint stuff (which as you said yourself was deletin...

I only used skip waypoint triggers on the squad leader of the infantry squad. The helicopter never had any. The next move waypoint is halfway across the island which might be 1 km? And then the next one is a get out command at the airfield. (Cause i dont know how to despawn stuff just yet.)

Something is causing the helicopter to stay put above the landing zone, i didnt have a problem with these waypoint markers before the script was used, so i assumed the ai of the heli got confused after the infantry left? How to fix it im not quite sure. Hope it makes sense. As said before the script works perfectly when picking up people. ๐Ÿ‘

little raptor
little raptor
meager granite
#

Wish Deleted event handler worked on simple objects, would be so useful

tardy osprey
little raptor
#

So they are in the same group? If so you don't have to name them individually. You can just name the whole group and do units myGrp findIf ...
Also regarding the heli, no it works fine no matter how many WPs you have before drop off

#

Do you also use the transport unload wp for dropping them off?

tardy osprey
indigo snow
#

I'm not quite sure what you ran into but it's not raPified. might be .ebo but i dont have any .ebo files on my pc currently

shut flower
#

ebo?

indigo snow
#

the encrypted .pbo type BI uses for new DLC

shut flower
#

alternative file pbo encoding? or what is this exactly

#

ah. any way to make a ebo or unpack a ebo?

indigo snow
#

The entire point of them is that you shouldnt

#

So i'm not going to help with that

shut flower
#

hm

#

ok, thanks anyway

indigo snow
#

I also think its stupid to encrypt stuff but thats another topic

tribal crane
#

That shouldn't compile.

shut flower
#

I don't want to encrypt, I want to decrypt that pbo. It's not from arma files, it's from a server

indigo snow
#

if it actually is an encrypted file, which im still not sure it is if its an sqf, its encrypted for a reason

#

the license would definitively not allow you to decrypt it

shut flower
#

There is no real license

tribal crane
#

Is the function defined when you point it to that file?

shut flower
#

nope

indigo snow
#

...

#

If i take this script, put it in a pbo and make a entry in the cfgfunctions it will be parsed

#

whatever you think this file is, its not a raPified sqf file

shut flower
#

hm, strange

tribal crane
#

Some other script might loadFile it and parse out itself.

indigo snow
#

ah good call

#

at least its not raPified

rose dirge
#

could anyone help me, putting images on screens??

meager granite
#
private _pic = findDisplay 46 ctrlCreate ["RscPicture", -1];
_pic ctrlSetText "\A3\EditorPreviews_F_Orange\Data\CfgVehicles\Land_Pumpkin_01_F.jpg";
rose dirge
meager granite
#

no, in init.sqf you need to wait until display is done loading first

#
waitUntil {!isNull findDisplay 46};
private _pic = findDisplay 46 ctrlCreate ["RscPicture", -1];
_pic ctrlSetText "\A3\EditorPreviews_F_Orange\Data\CfgVehicles\Land_Pumpkin_01_F.jpg";
rose dirge
#

whats the variable name for the screen?

faint burrow
#

There is no such.

hallow mortar
#

I think there's been a misunderstanding. I don't think they want to put it on the player's screen, I think they want to put a picture on an in-game screen, like a monitor object

hallow mortar
#

Usually that's done with setObjectTexture/Global, provided the object is set up with the appropriate selections

rose dirge
#

yh im trying to do it with gpt atm i think im using the wrong file path

sullen sigil
#

Do not.

#

chatgpt cannot write sqf

rose dirge
#

im not using the sqf just where to go

hallow mortar
#

If you're working with an Editor object, a lot of relevant object types have a field in their Attributes for setting their screen texture, so you don't need to worry about the script, just the file

#

Are you trying to use an image that's included in the mission, or one from the base game/a mod?

rose dirge
#

just trying to add one from my files a custom one in a cutscene

hallow mortar
#

Okay, but any file you want to use must be either part of an addon (the packages that make up the base game and mods) or part of the mission (included in the folder that contains the mission.sqm). It matters which of those two options it is, and you cannot use files that aren't in one of those two places.

rose dirge
#

yh ive placed it inside the mission folder im thinking im using the wrong file path

hallow mortar
#

The path uses the mission folder as its root. So if the file is in the base level of the mission folder, then the path is just "picturename.paa". If it's in a subfolder, then the path is "subfoldername\picturename.paa"

rose dirge
#

does it need to be a .paa?

hallow mortar
#

It can be a jpeg, but PAA is recommended. Other types aren't supported. There's a converter in the Arma 3 Tools package available on Steam.

#

The image also needs to conform to specific size rules: both dimensions' pixel lengths must be powers of 2. Not necessarily the same power of 2 - e.g. 256x512 would be accepted.

rose dirge
#

ive got them to paa but its still not working

#

its just a white screen

#

i think i might be in the wrong game folder

faint burrow
#

Could you provide the path to the file, screenshots, error messages... Or should we guess?

rose dirge
#

thats to the mission folder

#

ive got it saved in it

mint edge
#

hello, do you know how to add a sound when changing gear on a vehicle?

hallow mortar
# rose dirge its just a white screen

Just to clarify, does this mean it's just showing a white screen, or that you just want a white screen? Because the latter can be done by procedural texture and then we don't need to deal with any of this

rose dirge
#

hold on ill take a ss

hallow mortar
#

Okay, just checking

#

Did you make sure the image follows the size rules I mentioned before? They really do matter, it will legitimately stop it from working completely, not just result in a stretched or squished image

rose dirge
#

what the power of two?

#

should i just send the file?

#

would that make it easier>?

hallow mortar
#

Not to me, I'm on my phone :U

rose dirge
#

the dimensions i dont think are to the power of 2

hallow mortar
#

They absolutely must be otherwise it will not work

rose dirge
#

ill get a differnet image and see if that works#

#

1920x1080 is that to the power of 2

#

math isnt mathing atm

faint burrow
rose dirge
#

ffs

faint burrow
rose dirge
#

alright thanks

#

ive got a 512x512

#

this should work right?

hallow mortar
#

Provided it's a PAA or JPEG

faint burrow
hallow mortar
#

(and if PAA, converted properly, not just changing the file extension by hand)

jade acorn
#

and paa better, since jpegs might not render properly and your whiteboard will be a blackboard for people who did not walk close enough (or zoom in)

rose dirge
#

i put it in and its not showing a white screen anymore its just the normal screen

hallow mortar
#

BTW, just a little advice, not related to this issue specifically - it's not recommended to have A3 files, including your profile files, in areas managed by OneDrive. OneDrive's activities can make it difficult for Arma to access files when it needs to, which can lead to corrupted profiles.

rose dirge
#

that would have been great to know before all of this

#

all of my stuff is in a onedrive i think

#

yh

hallow mortar
#

Well, I didn't notice it until you posted the picture of the file path :U

rose dirge
#

welp welp

#

idk how or if i can transfer all the files off

hallow mortar
rose dirge
#

cause my main directory of steam-steamapps-common-arma3 doesnt have any of the missions in it

hallow mortar
rose dirge
#

ive followed multiple videos and nothing works fr

proven charm
#

doesnt arma have issue reloading graphic files ?

rose dirge
#

just a white screen

hallow mortar
#

How are you applying this texture? Object's Editor attributes? How did you convert it to PAA (if you did)?

rose dirge
#

i used a website to convert it

#

im using the object specific

#

im using the rugged large screen and using the object specific at the bottom of the details and just putting in SCP.paa with the same file in the mission folder

indigo wolf
#

How do i silently make all AI of a group change side?

hallow mortar
# rose dirge

Your 512x512 image is only 24 KB? That's a little suspicious

indigo wolf
hallow mortar
#

It takes an array of units so just give it units _group

rose dirge
#

cause everyone saying i have to go to arma 3 other profiles but i dont have that

tall barn
#

New to scripting. I would love to talk to someone who knows how this works. Dm would be prefered to not interrupt the public chat

hallow mortar
hallow mortar
tall barn
finite bone
#

Sure

rose dirge
#

cause i looked at another screen that worked by default and it had the file path of a3 as the beginning but idk where that is

#

yh my al intro works so i guess im in the right place

hallow mortar
#

Your files are not part of the base game so they don't go in the same place.

rose dirge
#

roger, i just dont know why nothing is working

#

it seems like a problem with the file know but idk what

#

you said that 24kb for 512x512 is suspicous

#

maybe i could try another file?

hallow mortar
#

I'm on my desktop now, you can send me the original image and I'll run it through the BI conversion tool.
* I don't mean the very first one that was the wrong size, send me one that's the right size but before conversion to PAA

rose dirge
#

alr gimme a sec

#

this is the file

hallow mortar
#

Wow, I don't know the last time I saw a JFIF

#

Yeah the BI converter doesn't even support JFIF. I'm going to convert it to something reasonable in Photoshop first, but that might be a clue that it didn't convert properly in the web converter

rose dirge
#

roger

hallow mortar
#

Right, so the main lesson here seems to be "don't use JFIF for this". It did not originally want to convert and had to go through some intermediary steps to be acceptable.
Definitely start with a JPEG or PNG and convert from there to PAA.

rose dirge
#

ill try and find a file thats peg

hallow mortar
#

The Rugged Large Screen is actually not a square texture, so I've taken the liberty of sizing it properly for you.

rose dirge
#

ok thanks

hallow mortar
#

huh, looks like I didn't quite match the shade of black on the background properly. Oh well, I'm sure you can figure that part out ๐Ÿคท

rose dirge
#

hmm still not worrking youve done alot so dont worry ill just try something else

hallow mortar
#

Can you tell me exactly (I mean exactly and in full) what you're putting in the file path field in the Editor?

#

I ask because I tested myself before sending that

rose dirge
#

"SCP.paa"

#

thats what im putting in

hallow mortar
#

Remove the quotes

rose dirge
#

yh i didnt put the quotes in

hallow mortar
#

You had another SCP.paa previously, one of the non-functional ones, right? I assume you overwrote it with mine.
Arma caches image files when they're first loaded, and if you tell it to load another file with exactly the same path, it will use the cached version. Rename the file and try the new name, or restart the game.

rose dirge
#

yh i overwrote and deleted the other scp.paa's

hallow mortar
#

Yeah, so Arma's probably gone "oh, scp.paa? I've already got one of those in memory, no need to fetch it from disk again" and continued to use the old broken file. Try it with a new name, or restart to force it to reload the file.

rose dirge
#

im restarting atm ill tell you if it works or not

#

thanks for all of this tho

#

omfg it actually works

#

thank you so much

#

genius

flint topaz
#

Is there a way to disable an objects friction, but keep it being collideable? I can do any changes .p3d or just scripting, but would prefer a scripting way if possible

warm hedge
#

I believe friction is not adjistable

flint topaz
#

I'm trying to emulate players movement with an object, but it just keeps falling over due to friction

finite bone
#

Why is this throwing an error O.osqf _tempVeh = ["B_Quadbike_01_F", mapclick_pos, [], 0, "CAN_COLLIDE"]; createVehicleCrew _tempVeh; Error in expression < mapclick_pos, [], 0, "CAN_COLLIDE"]; createVehicleCrew _tempVeh; Error createvehiclecrew: Type Array, expected Object

#

wait im dumb nvm kmao - didnt' create a vehicle just an array lmao

flint topaz
#

but the whole thing is complicated, so that's not really an excuse

exotic gyro
#

Most stairs should be geo'd as ramps anyway

#

Would be a shit geo lod if they weren't

#

Waste of components

foggy stratus
flint topaz
#

it will break the fundamentals of the system

#

I'll send a video soon explaining better

#

@foggy stratus

pliant stream
#

i guess they encrypted the whole file this time with these ebo files? old arma 2 dlc only had an encrypted header ๐Ÿ˜„

flint topaz
#

Check the description for a list of issues I am trying to resolve

foggy stratus
flint topaz
#

if not where would I create one

warm hedge
#

Have I... what? I'm not a developer

flint topaz
#

ohh I always thought you were apologies

#

mind pointing me in the right direction of where you can request new functions/features and more importantly where to report bugs

I believe it's the Forums, but was curious if you knew the correct categories just don't want to put in the wrong place

open hollow
flint topaz
#

but I'll take a look as it might help me work out a solution thanks

open hollow
#

im not sure how WMO do it, but i guess you can replicate it for any surface in any direction

flint topaz
#

and yes I have the code been slamming my head into a wall the last 2 days working on it

#

great progress, but still some things I want to sort out

open hollow
#

well it works really well already...

#

you are close to make it perfet ๐Ÿ˜„

raw vapor
#

How can I get a "Hold Action" to execute on all players, including join-in-progress players who arrive later?

Like say I want to use a hold action to change a flag texture, or put intel in everyone's diary. I need it to run once on all machines who join or are already in-game.

#

Previously I had a problem where I used a hold action to change a flag texture, ergo raising a flag over a captured location. But then nobody else could see the flag get changed.

faint burrow
tulip ridge
#

Pretty sure there's a global arg for hold actions

raw vapor
#

One of these days I'm going to understand how the fuck to use remoteExec intuitively. pain
Right now I struggle to make sense of how to write it out correctly and outside of a handful of commands I can't seem to understand it.

Let's start with a simple example.
How does _myFlag setFlagTexture "\ca\misc\data\sever_vlajka.paa"; look in remoteExec?

opal zephyr
#

[_myflag, "\ca\misc\data\sever_vlajka.paa"] remoteexec ["setFlagTexture"]; + targets/jip

tulip ridge
raw vapor
hallow mortar
#
_left command _right;
[_left, _right] remoteExec ["command",_targets,_JIP];```
opal zephyr
tulip ridge
#

Just use remoteExecCall, it doesn't need to run scheduled

hallow mortar
#

https://community.bistudio.com/wiki/remoteExec
By default, remoteExec broadcasts to all machines, but only once at the moment of execution.
It has optional settings to broadcast only to specific machines, and also to add the command to the JIP queue so JIP clients will execute it when they join.

raw vapor
#

Okay so let me try writing it up myself for that simple flag command, then I'll move onto something more complex.

opal zephyr
#

Using it with JIP in my opinion can be bad depending on what you're doing. In your case it should probably be on. But if you were broadcasting something like damage, or something that really should happen once in that moment then jip will break things for people

raw vapor
#

Okay, will keep that in mind. Right now my use case is just visual stuff or diary entries for intel I want players to collect.

#

I'll get to the diary stuff after I first make sure I got the flag thing down

opal zephyr
#

For the diary, make sure you check if the entry already exists so that people who leave and re-join dont get the same entry again

raw vapor
#

_myFlag setFlagTexture "\ca\misc\data\sever_vlajka.paa"
becomes
[_myFlag, "\ca\misc\data\sever_vlajka.paa"] remoteExec ["setFlagTexture",0,true];
so it executes on all clients, including JIP clients.

#

Is this correct?

faint burrow
#

A would replace true with _myFlag.

raw vapor
#

I thought

faint burrow
#

Read more.

hallow mortar
# raw vapor But that field is for this

Read closer: it can also be a String or Object, in which case the JIP entry gets a unique flag which can be overwritten if necessary, and if the object in question is deleted, the JIP entry is removed.

raw vapor
#

Ohhhhh.

#

Okay.

#

That makes sense.

#

You don't want to execute code if there's no need for it.

hallow mortar
#

Be careful with this, especially in the case of objects, because if any other remoteExec uses that object as its JIP reference, it will overwrite anything that was in the queue before. For some objects this is more likely than others, but there is no separation for different script/mods or different commands being sent, so it's very easy to get accidentally overwritten.

winter rose
#

yeah, I wish it wasn't "one slot" only
more like "provide an object" and get a JIPid AND get the JIPid removed if the object is deleted

hallow mortar
# raw vapor Okay so let me try writing it up myself for that simple flag command, then I'll ...

In terms of converting to remoteExec, that command is actually the most complex it can get.
There are three kinds of SQF commands: nular, unary, and binary.
Nular commands require no arguments. They're pretty simple to remoteExec. e.g. disableSerialization.
Unary commands require one argument. Also quite simple to convert. disableUserInput true, for example.
Binary commands require two arguments, one on the left, one on the right. e.g. _object setPosASL _position. You've just figured out how to do that, and it's also pretty simple, right?
There are no commands which work on any other principle. Anything that appears to have more arguments actually still only has two - one of them will just be an array containing sub-arguments. That array is still treated as one argument for remoteExec; keep it intact and use the same rules as any other.

raw vapor
#

but I appreciate the help

#

So it sounds like my other need, which is to trigger diary entries, has to be done through some other means than remoteExec...

opal zephyr
#

Nah, remoteexec it

hallow mortar
#

Welllllll....I'd suggest making it into a function and remoteExec'ing the function, so you're not adding a full diary entry's worth of text into the JIP queue, but it is possible.

raw vapor
#

Well again using a hold action:
_caller createDiaryRecord ["Diary", ["Intel title", "Intelligence goes here!"]];
how would that look?

opal zephyr
#

try writing it first

#

You got it

hallow mortar
#

That is a binary command with two arguments, left and right. It's exactly the same as the flag texture command.

raw vapor
#

Yeah I realized the moment you said it, it's not actually as complicated as I thought at first.

#

Wait, shit. There is a problem. I need that intel to show up for all players. Uhh.

_caller createDiaryRecord ["Diary", ["Intel title", "Intelligence goes here!"]];
maybe becomes
[player, "['Diary', ['Intel title', 'Intelligence goes here!']]"] remoteExec ["createDiaryRecord",0,true];
That doesn't look right. Maybe ' instead of " but it still doesn't look right.

hallow mortar
#

You've added an extra set of "" that do not need to be here

#

The left argument of createDiaryRecord is an object. OK, done. The right argument is an array. You don't need to turn that array into a "string" to remoteExec it. Just keep it intact.

raw vapor
#

Oh, really?

#

[player, ["Diary", ["Intel title", "Intelligence goes here!"]]] remoteExec ["createDiaryRecord",0,true];
Oh yeah, that makes more sense.

hallow mortar
#

That being said, player is not necessarily the correct thing to use here. The command player will be evaluated (resolved into a unit) before the command is sent. So the other machines will receive the player of the sending machine.
To fix that, and also for other reasons, the best solution would be to turn this into a function (https://community.bistudio.com/wiki/Arma_3:_Functions_Library) and remoteExec that. Everything will then be executed locally to the receiving machine, and the receiving machine will already know what text to use so that doesn't have to be sent over the network.

raw vapor
#

I was about to say, someone once said to me player should "never be used online"

#

and I do not know enough to argue

hallow mortar
#

All that being said though, I don't actually know what the object argument for createDiaryRecord even does. It may not matter what object is used. The wiki doesn't give a clear explanation.

hallow mortar
# raw vapor I was about to say, someone once said to me `player` should "never be used onlin...

That's not a rigid rule, you just need to understand how it works (which isn't that complicated). It's a command that returns the current local player unit, at the moment it was executed. Like getPosASL returns the current position of a thing at the moment it was executed.
The only player-specific behaviour that changes online is that it doesn't work on DS and HC machines, because they don't have a player unit. The other stuff is just a basic rule of SQF/remoteExec: anything not contained in a { code } data type is executed here and now (according to order of operations), which includes being executed before the remoteExec is sent.

#

remoteExec itself is also a normal binary command and works on the same rules.

// getPosATL player is resolved before createVehicle executes
_vic = createVehicle ["Land_FieldToilet_F", getPosATL player];
// player is resolved before remoteExec executes
[player, 1] remoteExec ["setDamage"];```
indigo snow
#

havent really looked into it

#

encryption is dumb in most cases

#

(with regards to arma modding that is)

foggy stratus
#

@warm hedge Just want to say again how much I appreciate your animations viewer and animations. I salute you sir! ๐Ÿซก

cold rampart
#

Anyway have an idea why my helicopter is not going to waypoint 2,3,4 on dedicated. But it is working in editor and when locally hosted: http://pastebin.com/uPPyX9k6

#

anyone*

#

On dedicated it moves to waypoint 1 and stays there and hovers

pure hawk
#

Hi guys,
I need some help here with this code
waitUntil {
({alive _x && _x in _heli} count units _taskforce1) == count units _taskforce1
};

What I am trying to do here I put a waypoint for my helicopter to land and pick put my group or who's still alive in my group. the point when I put this code in the waypoint didn't work. It landed but after we rode the heli it didn't move the next waypoint and I don't know what should I do to fix?

faint burrow
#

You don't need waitUntil.

pure hawk
#

I had tried this before that but it didn't work either.

faint burrow
#

Where is the code inserted?

pure hawk
#

in the final waypoint

#

which the mission will end

faint burrow
#

Screenshot?

pure hawk
#

Oh, dude! Thanks a lot, it works now. I wrote something wrong I think and I couldn't see it initially. I can't believe that I spent almost 2 hours trying to do that ๐Ÿ˜‚ โœŒ๏ธ

mellow jolt
#

I'm trying to have a series of commands for the Zeus that are self deleting after they are used throughout an op but when I try and capture the action id I keep getting undefined variable errors. Here's my code which is in my Zeus unit's (window) init field.

["Start Helicopter countdown",
 {
   call sq_helicopterSpawn;
   window removeAction _heliCount;
 }
 ,nil,0,false,true,"","true",-1,true
];```
tulip ridge
#

Also use three backticks for code blocks

#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

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

// your code here
hint "good!";
mellow jolt
#

How can I do that when the addAction operation is the one generating the number I need to pass?

tulip ridge
#

The action id is already passed

mellow jolt
#

how do I make it visible to the action then?

tulip ridge
#

It shows how to on the wiki

params ["_target", "_caller", "_actionId", "_arguments"];
#

Those are the parameters passed to the statement

queen cargo
#

in regards of the script file
very strange thingy
definitly would like to see the whole PBO to do some research

mellow jolt
#

Thank you. Quoting that bit of code was enough for me to realize I needed to add it into my add action.

Sorry, but I don't do any coding for a living. The wiki makes a lot of assumptions on low level reader knowledge of basic scripting concepts and what Arma is doing during every action.

["Start Helicopter countdown",
 {
   call sq_helicopterSpawn;
   params ["_target", "_caller", "_actionId", "_arguments"];
   window removeAction _actionId;
 }
 ,nil,0,false,true,"","true",-1,true
];```
faint burrow
#
params ["_target", "", "_actionId"];

_target removeAction _actionId;
mellow jolt
#

is using _target better that just using the unit?

faint burrow
#

Yes.

#

_target is window in your case.

tulip ridge
faint burrow
cold rampart
#

It's just a mission

#

No mod

tulip ridge
mellow jolt
queen cargo
#

so?

tulip ridge
#

That comment was about something else, not your action on its own

mellow jolt
#

sorry just realized. Reading now a couple times to understand

#

ok I got it

#

should be harmless

queen cargo
#

still pbo

merry shard
#

Hi everyone! I'm pretty new to 3DEN and Zeus stuff and I'm kinda smooth-brain when it comes to scripting. So far I've gotten things to work but I'm currently stuck on something. (To clarify up-front, I don't really know anything about .sqf files, so if this kind of thing would require a .sqf to work then I'll probably ask how to do that.)

What I'm trying to do is EITHER:
1 - Teleport all players inside a Trigger area to another location on the map. I have a hold action (I'm using 3den enhanced) that triggers a fade-out/fade-in and I'd like to insert the teleport in the middle of that.
OR
2 - Send a private notification or message to my (and any other Zeuses') screen when the hold action is triggered, so that I know when to manually teleport the group of players.

I'm not sure which one would be easier to implement though. Any help would be big appreciate ๐Ÿ’™

#

(If anyone that wants to help would like to DM me to keep the chat less congested, I should have my DMs open to anyone I share a server with, or you can friend req me. Whatever works for you)

tulip ridge
mellow jolt
pure hawk
#

Hi guys ๐Ÿ˜‚ . I have a little issue with this code
private _units = units Taskforce1;

if (alive player) then {
private _currentIndex = _units find player;
private _nextIndex = (_currentIndex + 1) % count _units;
private _nextUnit = _units select _nextIndex;

if (alive _nextUnit) then { 
    player = _nextUnit; 
    _nextUnit setLeader group _nextUnit; 
    hint format ["Switched to %1, now you are the team leader!", name _nextUnit]; 
}; 

};

taskforse1 is my unit's group but I am trying to switch between the units in my group and at the same time I will be the team leader, not the AI so I used this code with a trigger and activation is "noun" or "anybody". I left the condition as "this". In the activation bar I typed this code but I didn't work yet.

#

got this one for Chatgpt

tulip ridge
# merry shard Hi everyone! I'm pretty new to 3DEN and Zeus stuff and I'm kinda smooth-brain wh...

They'd be roughly the same difficulty, so might as well automate it.

In your hold action's statement you could do something like:

// vanilla allPlayers command also returns headless clients 
private _players = ([] call CBA_fnc_players) select {
    _x inArea YourTrigger; // trigger variable name
};

private _teleportPos = getPosASL TeleportObject, // object to teleport to
{
    _x setPosASL _teleportPos;
} forEach _players;
pure hawk
#

And when I asked him should I give them variable names? He said no and I didn't.

tulip ridge
merry shard
#

Oh cool, quick response, I'll try it in a moment!

merry shard
#

Holy shit it works perfectly hell yeah

tulip ridge
#

Nice ๐Ÿ‘

fierce canyon
#

this disableAI"PATH"; help this code aint working and idk why

warm hedge
#
  1. How you've done that
  2. How you can be sure it isn't working
fierce canyon
#

the ai still moves

#

i put it into int...

#

oh

#

i see now

warm hedge
#

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

fierce canyon
#

i was looking for if there was another tab but i didnt remeber

#

now i gotta fix every unit thats supposed to not move pikachusurprised

tardy osprey
shrewd stratus
#

Could anyone help me out real quick?
Im trying to have a trigger destroy a helicopter when it takes damage.
I tried this from some stuff i read online

Condition:

Activation:
h1 setdamage 1;

runic surge
#

Is there always an error with precision when setting an object's vectors?

runic surge
#

unless you want it to only be destroyed after it's health is below 10%, which is what you have

#

at that point I don't think the trigger would make much difference though, vehicles are basically destroyed at 0.1 and can explode after that point

shrewd stratus
runic surge
#

I might have it backwards then. Damage might return 0 at full health

#

so try damage >= 0.1

shrewd stratus
#

Yeah anything i try doesnt seem to work. its like damage h1 doesnt return a value..

count magazines h1 <= 0 did work in another test, so the problem im having seems to be with using "damage"

runic surge
#

are you absolutely sure h1 is the variable name? and that it's set correctly?

shrewd stratus
#

Yeah h1 is the variable name for the heli.

runic surge
#

try throwing damage h1 in the debug menu and see what the return says

shrewd stratus
#

It worked, i had the heli's simulation disabled by another trigger when the mission launched and that was causing issues it seems.

runic surge
#

makes sense

shrewd stratus
# runic surge makes sense

Thanks for the help regardless, i was about to give up on "damage h1 >" so im glad you convinced me to keep trying

storm cradle
#

Shot in the dark here...
I was looking into these two, recording seems to work and there's data in BIS_fnc_diagAAR_data

https://community.bistudio.com/wiki/BIS_fnc_diagAAR https://community.bistudio.com/wiki/BIS_fnc_diagAARrecord

But I simply can't get BIS_fnc_diagAAR to replay data, I'm sure I'm missing something, can anyone point me in the right direction?

I suspect there's a dedicated display for the AAR but I can't find it, I tried passing default/map/spectator displays and nada...
["Init", [_anAARDisplay]] call BIS_fnc_diagAAR;

jade abyss
#

Erm oO Since when, can you " select " from a String?!

queen cargo
#

for half a year or so

jade abyss
#

Oh boy, i wish id knew that earlier -.-

unkempt marsh
#

How does the BIS_fnc_showAANArticle function work? specifically for deciding who sees the article. theres no parameters for who calls the function or anything. and it's not something that is done on the side of the server. (ie. respawn settings) so i don't understand how it's possible to call it for a specific person or for all people connected to the game?

cosmic lichen
#

it is UI, so local. You need to use remoteExec.

unkempt marsh
#

so would it be possible to call it with a {}foreach units players; and then that would show it to all clients?

#

or do i need to use {remoteExec BIS_fnc_showAANArticle;}foreach units players?

cosmic lichen
#

What players should see it?

unkempt marsh
#

all

#

but im interested in the programming side as to how to specify

#

and where to put specifications

cosmic lichen
#

[parametersToTheFunction] remoteExec ["BIS fnc showAANArticle", 0];

queen cargo
#

just in case you are bored @jade abyss :)

{
    assign simple ()
        ""
    endAssign
    
    assign simple (::string s)
        s
    endAssign
    
    fnc simple scalar length ()
        count _this
    endFnc
    
    fnc simple string subString (scalar off, scalar len)
        _this select [off, len]
    endFnc
    
    fnc simple scalar indexOf (::string s)
        _this find ( s )
    endFnc
    
    fnc simple bool contains (::string s)
        (_this find ( s ) ) >= 0
    endFnc
    
    fnc simple string toString ()
        _this
    endFnc
    
    fnc simple array<scalar> toArray()
        toArray _this
    endFnc
    
    fnc simple string append(::string s)
        _this + ( s )
    endFnc
    
    fnc simple array<string> split(::string delimiter)
        _this splitString ( delimiter )
    endFnc
    
    fnc simple string toUpper()
        toUpper _this
    endFnc
    
    fnc simple string toLower()
        toLower _this
    endFnc
}```
pretty much all you can do with strings in one command (could have missed something, if i did --> tell me)
tough abyss
#

Anyone knows what the point of:
_test2 = bis_functions_mainscope playMove ""; if (isnil "_test2") then {_test2 = false};
in the BI initFunction.sqf is?

queen cargo
#

i am more surprised by the bis command
or is that a typo?

jade abyss
#

erm

tough abyss
#

It's a game logic.

allVariables bis_functions_mainscope
-> ["didjip","isdedicated"]
#

an object

proven charm
#

cant figure why remExec doesnt return JIP string. i tried this: sqf private _remId = [_newdevice,_devSide] remoteExecCall ["setDeviceUnloadAction", call getDeviceHandlerSides, true]; I also tried with targets 0 but same result

#

ugh nevermind , had to be in multiplayer mode

stable dune
#
... remoteExec ["FNC", 0, true]
jade abyss
#

I bet

proven charm
#

yeah it seems to work with sides as the targets though wiki says "The JIP parameter can only be used if the targets parameter is 0 or a negative number."

jade abyss
#

its the hidden announcment to HL3

#

Yep, definitly.

proven charm
#

so with targets as sides it gives me JIP string but can i trust that works, is the wiki wrong?

queen cargo
#

wait HL3 is being developed by BI?`

#

god no

jade abyss
#

Of course! Huge Landscape, many Vehicles and an uber-Strider, that can shoot you from 3km!

pure hawk
#

Hello, I have an issue with this code and I don't know how I can fix it.

if (alive player) then {
private _currentIndex = _units find player;
private _nextIndex = (_currentIndex + 1) % count _units;
private _nextUnit = _units select _nextIndex;

if (alive _nextUnit) then { 
    player = _nextUnit; 
    _nextUnit setLeader group _nextUnit; 
    hint format ["Switched to %1, now you are the team leader!", name _nextUnit]; 
}; 

};

I want to switch to any unit in my group and at the same time I will be the team leader. I got this code from ChatGPT and when I asked it I should change _nextUnit and name the units' variable names it said no I didn't have to do.

cosmic lichen
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

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

// your code here
hint "good!";
cosmic lichen
#

player = _nextUnit;
This cant work

#

you are trying to assign a value to a command

#

I got this code from ChatGPT
notlikemeow

stable dune
jade abyss
#

@tough abyss
The whole thing is a bit confusing:

if (!isNil "bis_functions_mainscope") then {
        private ["_test", "_test2"];
        _test = bis_functions_mainscope setPos (position bis_functions_mainscope); if (isnil "_test") then {_test = false};
        _test2 = bis_functions_mainscope playMove ""; if (isnil "_test2") then {_test2 = false};
        if (_test || _test2) then {0 call (compile (preprocessFileLineNumbers "a3\functions_f\misc\fn_initCounter.sqf"))};
    };
hallow mortar
# proven charm yeah it seems to work with sides as the targets though wiki says "The JIP parame...

This would be because if the targets parameter is anything else, the game can't know if a JIP client is going to be eligible at the time the JIP queue is sent to the client. When the client receives the queue, the player may not have selected a side yet; their machine network ID can't be reliably predicted so using that is not smart; objects either transfer their locality after the JIP queue is processed or just shouldn't be targeted again if they change locality.

tough abyss
#

Yeah. Whats the point?

hallow mortar
#

0 is safe because it means everyone. Negative IDs are safe because it means everyone except specific IDs. 2 doesn't work because the server is never going to JIP.

jade abyss
#

bis_functions_mainscope = _grpLogic createunit ["Logic",[9,9,9],[],0,"none"];

proven charm
#

ok thx for the info. i will just go with zero

jade abyss
#

Oo

#

wait, what?
createcenter sidelogic;
_grpLogic = creategroup sidelogic;

tough abyss
#

A2

jade abyss
#

Yeah

#

"//--- Create functions logic (cannot be created when game is launching; server only)"

tough abyss
#

The initFunctions.sqf does really strange stuff.

humble bough
#

is there a way to detect if a player is on a rock specifically? surfaceType only returns type of surface on world floor

tough abyss
#

Logics cannot be global (createVehicle fails, only createVehicleLocal works). No idea what createUnit does with logics.

jade abyss
#

Line 630 + below

proven charm
humble bough
runic surge
#

you could compare the player's positionATL and positionAGL

proven charm
#

rock surface check might work and if the surface is grass or something then he's not on rock

runic surge
#

that might work

#

you'll have to test some areas where it is close to the surface to see how precise it is

tough abyss
#

Whats there?

jade abyss
#

uno momento, searching for the start definition of _recompile

pure hawk
hallow mortar
#

You are doing player = _nextUnit;. This means that you are trying to set the value of the global variable player to whatever _nextUnit is.
You can't do this because player is an existing command. (https://community.bistudio.com/wiki/player) You can't create global variables with the same names as commands.

jade abyss
#

ah, nvm

queen cargo
#

quickly grabbing my tin foil hat

tough abyss
#

recomple is from _this and comes from the engine

#

0,1,2,3,4

jade abyss
#

_recompile = if (count _this > 0) then {_this select 0} else {0};

tough abyss
#

yes

pure hawk
tough abyss
#

poor mans params

jade abyss
#

At least, its working

tough abyss
#

Well, I'm currently debugging the stuck in loading screen bug when the host changes the mission

jade abyss
#

never noticed something like that

tough abyss
#

Pretty annoying. 100% reproducable

#

The host uses #missions while others are still in the loading screen of the previously selected mission

jade abyss
#

Ah, yeah. I remember. Was also in A2 and the rest.

#

Hell, i even think in OFP

tough abyss
#

It's probably the same initFunctions.sqf ๐Ÿ˜‰

jade abyss
#

๐Ÿ˜„

queen cargo
#

never change a running system @tough abyss

jade abyss
#

Ah, thats why we use an Engine from 1999 ๐Ÿ˜„

proven charm
# hallow mortar This would be because if the targets parameter is anything else, the game can't ...

I did some tests to figure out how exactly JIPs in case of sides works and to my surprise the JIP worked just fine. I tested with dedi and two clients of which the seconds was JIP client. I tested using this code: ```sqf
testJip =
{
diag_log format ["TESTING JIP!!!?? %1 %2 %3", player, side player, playerside];
};

if(isServer) then
{
[] remoteExecCall ["testJip", [west], true];
};``` it always printed side WEST properly (in JIP client). so not sure but it seems like sides target is working (with JIP)

stable dune
hallow mortar
runic surge
#

my script for placing powerlines works perfectly in VR, including around the water area where the terrain has altered height

#

it doesn't work in any other terrain, exact same conditions

#

whyyyyy

pallid palm
#

hmmmm

#

makes me think it may have something to do with the ground level

jade acorn
#

getUnitLoadout (get3DENSelected "object") why doesn't this work? Says one element provided, two required, while getUnitLoadout is supposed to take just the object classname, unit in this case

warm hedge
#

get3DENSelected actually returns array in array

jade acorn
#

so it's displayed wrong here?

runic surge
pallid palm
#

how bout this

#

player setVariable ["Saved_Loadout",getUnitLoadout player]; and then on respawn player setUnitLoadout (player getVariable ["Saved_Loadout",[]]);

jade acorn
#

thought of using 3den Agency mod to simplify the process but it adds to much stuff I'd have to manually remove, just need a way to get the loadouts from the editor so I can apply them later to an agent

pallid palm
#

yeah thats it

#

up there

#

i use this to do that

#

USMC = group this; _handler = this execVM "loadouts\NATO_Soldier.sqf";

#

an exsample of this would be in the mission End Game

runic surge
#

Is getPosASL affected by terrain?

pallid palm
#

again i want to thx all you awsome people for helping me on Arma 3 stuff all my stuff works perfect now WooHoo Arma 3

#

i love you guys

#

im having so much fun in Arma 3 i just love it

#

Best game ever

runic surge
#

script seems to work closer to the water but stops in areas above terrain that gets arbitrarily too high

#

I don't see why that should matter

pallid palm
#

can you sink the pole into the ground to get a excepable hight maybe

#

or something like that

runic surge
#

I'm not using poles I am just using helper spheres

pallid palm
#

oh ok

runic surge
#

I'm sill at the stage of connecting the line to two points

pallid palm
#

i see hmm ok

#

thats funny i want line out and you want them in

hallow mortar
# runic surge Is getPosASL affected by terrain?

The Z component of getPosASL is the object's absolute height above the terrain-wide water plane (base level, not waves). It does not take terrain into account. That's the point of the difference between posASL and posATL.

pallid palm
#

or ASLW

faint burrow
runic surge
#

because I am using positionASL and vector commands specifically so I don't have problems with terrain height

#

and I don't, up until like 50m above sea level

#

then the wire just points straight up into the air

#

I should mention this isn't a problem in vr, even well above 50 meters, even above the water area

hallow mortar
#

Vector commands don't consider terrain at all. (Which is why you shouldn't use them with ATL positions)

runic surge
#

so what could be the cause

pallid palm
#

im thinking smoke is coming out of my ears

#

i know 1 thing when you get this right yull be the guy to talk to about power lines

hallow mortar
runic surge
#

it's a script to place an object and point it at one of the two objects so each end lines up

#

it's just connecting a 50 meter line to 2 spaced objects. That's it

#

I have a semi-functional version that uses attachto but I can't scale it after the fact

#

or maybe I can, idk

willow hound
#

So what does the core code look like?

tough abyss
#

Giving this a last shot haha
I have a script and it is working in ONE mission, I have tried it on other missions with no luck at all. the exact same script. I have no Idea why it just works on one mission and I'm all out ideas to test so I need your help, for real, I will gladly send some coffee/beer money for the help cause this is so god damn important to me.

I have made 2 zip files that contains all that's needed
Regarding the script, when I say it doesn't work, it means that the "function" Call reinforcements isn't showing in scroll wheel menu

runic surge
#

I just test it by placing two named objects and executing that code in its entirety from the debug menu

tough abyss
#

But thats an ironic cynical aphorism (that doesn't even exist in common English). @queen cargo

queen cargo
#

i know :3

#

isnt it beautiful?

willow hound
#

That code is complicated. I can't even tell what problem it's supposed to solve.
So you place two objects and then use that code to dynamically create, position, rotate and scale a powerline model so that it connects the two objects?

final harbor
#

Hello, how to hang a script (Action) on only one bulletproof vest, when putting on this bulletproof vest, the "explosion" button appeared, after removing the bulletproof vest it disappeared. Without using endless checks.

faint burrow
runic surge
#

using that setpitchbank function is inconsistent and I don't know why but the correct result is always possible. It's just a matter of the order of certain values when it is called. So it places several and chooses the best match.

tough abyss
#

Hah. Apparently you can create global game logics with createUnit.

a = createGroup sideLogic createUnit ["Logic",[0,0,0],[],0,"NONE"];
publicVariable "a"
willow hound
#

I'm bad at math and I don't understand that fnc_SetPitchBankYaw (from https://community.bistudio.com/wiki/setVectorDirAndUp#Notes, right?), but there might be a problem in that function (gimbal lock?) or you might be using it wrong ๐Ÿคทโ€โ™‚๏ธ
Maybe @little raptor is willing to take a look, he knows his maths.

dire island
#

I am having an issue passing a variable from a script to another script:

(just for testing purposes, I am adding actions to a whiteboard's init field)

this addAction ["Slides for basic infantry course", {[[whiteboard_2, 1], "scripts\WB_addAction_FVMU1.sqf"] remoteExec ["execVM", 2];}]; 

The "(Erase the board)" action works as expected (and indeed any actions that call WB_drawTexture directly work fine). The second action ("Slides for basic infantry course") is meant to replace all actions with the option to draw slides for a specific course, but the resultant added actions don't work.

WB_drawTexture.sqf:

_wb = _this select 0;
_texture = _this select 1;

playSound3D [getMissionPath "aud\whiteboard.ogg", _wb, false, getPosASL _wb, 1, 1, 0];  
_wb setObjectTextureGlobal [0, _texture];

WB_addAction_FVMU1.sqf:

_wb = _this select 0;
removeAllActions _wb;
_wb addAction ["(Erase the board)", {[[_wb,'img\wb\blank.paa'], "scripts\WB_drawTexture.sqf"] remoteExec ["execVM", 2];}];
_wb addAction ["Draw: Bound by fireteams 1", {[[_wb,'img\wb\eor-vxl.paa'], "scripts\WB_drawTexture.sqf"] remoteExec ["execVM", 2];}];
_wb addAction ["Draw: Bound by fireteams 2", {[[_wb,'img\wb\eor-ansats.paa'], "scripts\WB_drawTexture.sqf"] remoteExec ["execVM", 2];}];
_wb addAction ["Draw: Peel left/right", {[[_wb,'img\wb\eor-blixt.paa'], "scripts\WB_drawTexture.sqf"] remoteExec ["execVM", 2];}];```
Despite using the exact same code to assign a value to _wb in both scripts, _wb seems to be unassigned inside WB_addaction_FVMU1.sqf. The "(Erase the board)" action works when added from the init field, but not when added by WB_addAction_FVMU1.sqf. If I run  ``systemChat str _wb;`` from inside WB_addAction_FVMU1.sqf, it returns the string "whiteboard_2", but the variable can't be passed from WB_addAction_FVMU1.sqf to WB_drawTexture.sqf.

Am I missing something? Why can _wb be passed from WB_drawTexture.sqf from the init field, but not to WB_drawTexture.sqf from WB_addAction_FVMU1.sqf?

Error message when using actions added by WB_addAction appended below:
willow hound
#

The addAction code is not in the same scope as the local variable _wb. As such, it never sees the value of _wb:

//Scope 1
_wb = whiteboard_2; //_wb exists and has a value in Scope 1.

_wb addAction ["Action", {
  //Scope 2
  systemChat str _wb; //_wb is undefined and has no value in Scope 2.

  _wb = "Hello World!"; //_wb is now defined in Scope 2, but it has a different value than the _wb in Scope 1!
  systemChat _wb; //Hello World!
}];

systemChat str _wb; //whiteboard_2
```You don't encounter this problem in the whiteboard's init field because you use a global variable (`whiteboard_2`) there. The global variable can be seen by all scripts.
To fix this, either use a global variable or use the `arguments` parameter of `addAction` to pass the value of `_wb` to the `addAction` code.
#

Bonus issue: removeAllActions has local effect, so you need to remoteExec that too ๐Ÿ™ƒ

dire island
little raptor
# runic surge https://pastebin.com/fFEq2hce

I didn't really check the math but I can tell you some stuff from a quick look:

  1. There are vector commands. You don't need to write vector stuff manually (e.g. the part where you calculate _linePos can be simplified to (_posA vectorAdd _posB) vectorMultiply 0.5), or _posOffsetScaled which is just _posOffset vectorMultiply_scale
  2. There's no need to use pitch bank yaw. You already have vectors. Then you convert them to angles. Then convert them to vectors again?!
  3. You create some dummy objects just to use modelToWorld. Arma has matrix commands too. You can just do this:
_side = _dir vectorCrossProduct _up;
_matrix = matrixTranspose [_side, _dir, _up];
_modelToWorld = {
   params ["_pos", "_rotation", "_offset"];
  _offset vectorAdd flatten(_rotation matrixMultiply (_pos apply {[_x]}));
};

[_relativePositions select 0, _matrix, _lp] call _modelToWorld;
#

Also another note: when dealing with vectors, use vectorDistance not distance

#

And this:

sqrt ((((_posB select 0) - (_posA select 0)) ^ 2) + (((_posB select 1) - (_posA select 1)) ^ 2)))

is just vectorMagnitude _vector

jade abyss
#

Tested?

wild raptor
#

I'm building a mp mission where the players will be working undercover for a while. And I was wondering if there is a way to have there weapon holstered when the get out of vehicules?

faint burrow
#
player action ["SwitchWeapon", player, player, -1];
tough abyss
#

Yes.

lunar cedar
#

_objInformant setName "Mr Smith;

this works in single player (as stated in the docs), but im not finding any option to set a name in multipler, and i cant see how its possible to spawn a unit and give it a name too... anyone know of a way?

proven charm
faint burrow
proven charm
#

that too has local effect ๐Ÿ™‚

faint burrow
#

When executed on server, the identity will be JIP compatible.

proven charm
#

ah nice

#

or is that just JIP thing and you still need remExec to current clients. after that server handles JIP. not sure ๐Ÿ™‚

faint burrow
#

I use this function on my server without remoteExec, and it works fine.

proven charm
#

alright then ๐Ÿ‘

lunar cedar
#

thank you, will give that a try ๐Ÿ™‚

opal zephyr
#

Does anyone know of a way to check if the user is using the splendid camera or spectating?

faint burrow
#

Try to check if their displays are not null.

opal zephyr
#

Hm good idea

solid gale
#

Can someone help me with a script issue? server issue? I think something happened to Arma 3 after the recent update. I've had my server files for about 6 months, and everything was working fine. But now, when I run it, nothing shows up when you try to open the ATM or the car shop. Even when you execute the code to open it, nothing appears. However, when you execute it globally and someone else is nearby, it works for them but not for you. Sounds crazy, i want to add that there is no errors on RPT log on the client or the server.
even if you try to do execute for the console nothing shows up and no errors.

[] spawn Soldiers_fnc_atmMenu;

Video shows what is the problem that I'm facing
https://youtu.be/OaUHxB2Tu-c

faint burrow
#

You should provide the source code of Soldiers_fnc_atmMenu.

wild raptor
#

I<m trying to use it in an eventhandler (getout) but nothing.

faint burrow
#

Provide your code.

wild raptor
#

Placed on the unit which is player and playable : player addEventHandler ["GetOut", {player action ["SwitchWeapon", player, player, -1];}];

faint burrow
digital jacinth
#

question for UI2Texture. I am applying a display to a UserTexture object.
is it possible for it to support transparency? Right now i am having this texture with an alpha channel.

Instead of being transparent as usual, it shows up green.

#

effectivly looks like this ingame

solid gale
# faint burrow You should provide the source code of `Soldiers_fnc_atmMenu`.
#include "..\..\script_macros.hpp"
/*
    File: fn_atmMenu.sqf
    Author: Bryan "Tonic" Boardwine

    Description:
    Opens and manages the bank menu.
*/
private ["_units","_type"];

if (!life_use_atm) exitWith {
    [format[localize "STR_Shop_ATMRobbed",(LIFE_SETTINGS(getNumber,"noatm_timer"))],true,"slow"] call Soldiers_fnc_notificationSystem;
};

if (!dialog) then {
    if (!(createDialog "Soldiers_BankUI")) exitWith {};
};

_hasCheated = call Soldiers_AC_CheckMoney;
if (_hasCheated) exitWith {};

disableSerialization;
_units = CONTROL(8999520,122);

lbClear _units;
CONTROL(8999520,120) ctrlSetText format ["%1%2","$",[BANK] call Soldiers_fnc_numberText];
CONTROL(8999520,121) ctrlSetText format ["%1%2","$",[CASH] call Soldiers_fnc_numberText]; 

private _playersToCount = [playableUnits, [], { name _x }, "ASCEND"] call BIS_fnc_sortBy;


{
    _name = name _x;
    if (alive _x && (!(_name isEqualTo profileName))) then {
        private _index = _units lbAdd format ["%1",name _x];
        _units lbSetData [_index,str(_x)];
    };
} forEach _playersToCount;

lbSetCurSel [122,0];
dire island
# willow hound The `addAction` code is not in the same scope as the local variable `_wb`. As su...

So obviously (as I found out during testing), this doesn't work in multiplayer since addAction is local. I tried removing if (!isServer) exitWith {}; from all constituent scripts and changing the final argument on remoteExec from 2 to 0, which in my mind should cause all scripts to execute on all clients, thus fixing the issue. However, when I test in 3den's multiplayer, the scripts don't seem to execute (no actions are added to the whiteboard when running WB_addAction_FVMU1.sqf). Any ideas?

faint burrow
solid gale
faint burrow
solid gale
# faint burrow Use https://community.bistudio.com/wiki/diag_log, then check RPT-file.
23:30:01 Cannot intersect with a3\structures_f_epc\civ\accessories\atm_02_f.p3d - missing skeleton bones
23:30:01 Cannot intersect with a3\structures_f_epc\civ\accessories\atm_02_f.p3d - missing skeleton bones
23:30:01 Cannot intersect with a3\structures_f_epc\civ\accessories\atm_02_f.p3d - missing skeleton bones
23:30:01 Cannot intersect with a3\structures_f_epc\civ\accessories\atm_02_f.p3d - missing skeleton bones
23:30:01 Cannot intersect with a3\structures_f_epc\civ\accessories\atm_02_f.p3d - missing skeleton bones
23:30:01 Cannot intersect with a3\structures_f_epc\civ\accessories\atm_02_f.p3d - missing skeleton bones
23:30:01 Cannot intersect with a3\structures_f_epc\civ\accessories\atm_02_f.p3d - missing skeleton bones
23:30:01 Cannot intersect with a3\structures_f_epc\civ\accessories\atm_02_f.p3d - missing skeleton bones
23:30:01 Cannot intersect with a3\structures_f_epc\civ\accessories\atm_02_f.p3d - missing skeleton bones
23:30:01 Cannot intersect with a3\structures_f_epc\civ\accessories\atm_02_f.p3d - missing skeleton bones
23:30:01 Cannot intersect with a3\structures_f_epc\civ\accessories\atm_02_f.p3d - missing skeleton bones
23:30:01 Cannot intersect with a3\structures_f_epc\civ\accessories\atm_02_f.p3d - missing skeleton bones
23:30:01 Cannot intersect with a3\structures_f_epc\civ\accessories\atm_02_f.p3d - missing skeleton bones
23:30:01 Cannot intersect with a3\structures_f_epc\civ\accessories\atm_02_f.p3d - missing skeleton bones
23:30:02 "!!!============================!!!"
23:30:02 "civ_1 ATM GOT OPENNED AT 222.265"
23:30:02 "Life_use_atm true"
23:30:02 "Has Cheated false"
23:30:02 "!!!============================!!!"
faint burrow
#

createDialog creates dialog. Check what it returns. If false then there is probably a bug in display config.

#

You can also try creating dialog directly using createDialog "Soldiers_BankUI".

manic kettle
#

Anyone have a link to explain how to setup file-patching for dev?

pallid palm
#

if you want to spawn a enemy in and name it this is for you

"O_Officer_F" createUnit [_spawnPos, _grp, "EOfficer1=this;", 0.0, "COLONEL"];
#

@lunar cedar

#

don't you just click on the setting in steam @manic kettle

manic kettle
#

in the launcher yeah but i want to know how to actually make the game reload functions...

pallid palm
#

some functions can't be reloaded

#

iv found anyway

#

like if you enable saving it seems bad

#

i'm not sure about dev

#

i use stable

solid gale
# faint burrow You can also try creating dialog directly using `createDialog "Soldiers_BankUI"`...

https://youtu.be/LeB67-cKWSg

#include "..\..\script_macros.hpp"
/*
    File: fn_atmMenu.sqf
    Author: Bryan "Tonic" Boardwine

    Description:
    Opens and manages the bank menu.
*/
private ["_units","_type"];

if (!life_use_atm) exitWith {
    [format[localize "STR_Shop_ATMRobbed",(LIFE_SETTINGS(getNumber,"noatm_timer"))],true,"slow"] call Soldiers_fnc_notificationSystem;
};

// if (!dialog) then {
//     if (!(createDialog "Soldiers_BankUI")) exitWith {};
// };

createDialog "Soldiers_BankUI";

_hasCheated = call Soldiers_AC_CheckMoney;
if (_hasCheated) exitWith {};

disableSerialization;
_units = CONTROL(8999520,122);

lbClear _units;
CONTROL(8999520,120) ctrlSetText format ["%1%2","$",[BANK] call Soldiers_fnc_numberText];
CONTROL(8999520,121) ctrlSetText format ["%1%2","$",[CASH] call Soldiers_fnc_numberText];

private _playersToCount = [playableUnits, [], { name _x }, "ASCEND"] call BIS_fnc_sortBy;


{
    _name = name _x;
    if (alive _x && (!(_name isEqualTo profileName))) then {
        private _index = _units lbAdd format ["%1",name _x];
        _units lbSetData [_index,str(_x)];
    };
} forEach _playersToCount;

lbSetCurSel [122,0];
 0:09:11 "!!!============================!!!"
 0:09:11 "civ_2 ATM GOT OPENNED AT 277.691"
 0:09:11 "Life_use_atm true"
 0:09:11 "Has Cheated false"
 0:09:11 "277.691 DiagLog is True"
 0:09:11 "!!!============================!!!"
tame lion
#

Got a question for anyone thats familiar with ACE, specifically ACE interactions. I want to add an interaction to a vehicle class, however I don't want it to be a part of the MainInteractions tree (the ones that always show up in the center of the vehicle). Instead I want the action to show up at a modelToWorld position, similar to how the remove/replace/patch wheel interactions show up on the vehicle wheels instead of the main actions menu. I've tried following the wiki for Ace interact, however the interactions are not showing

tame lion
#

@wild star tried that, but it doesn't seem to be putting the actions anywhere on the vehicle. Here is the code:

EMP_Menu_location  = [-1.5,-2,-1];
.
.
.
EMP_vehicle_menu_action = [
    "emp_vehicle_menu_action",
    "EMP",
    "",
    {},
    EMP_vehicle_condition,
    {},
    nil,
    EMP_Menu_location,
    5
] call ace_interact_menu_fnc_createAction;
.
.
.
[
    EMP_Vehicle_Class,
    0,
    [],
    EMP_vehicle_menu_action
] call ace_interact_menu_fnc_addActionToClass;```
#

disregard, now its working as expected. Probably my fault for just reinitializing the code w/o actually deleting the old interactions

tough geode
#

Maybe i'm just stupid atm. but was there an easy way to check if a targeted heli is unarmed or armed? ๐Ÿค”

opal zephyr
tough geode
#

Not really working reliable for some of the modded helis with door gunners

#

I could check the heli and all turrets for a weapon but at that points it feels like it's gonna be faster to just check it against a list of all the armed helis on the server

tulip ridge
#

Do config lookups on first check, and then save the result

tough geode
#

Could easily do that but at that point i also can just create an array with all armed helis and just check if the target is in that array ^^

#

Was wondering if there is an more elegant solution but don't seems like it atm. ^^

solid gale
faint burrow
#

In button click event handler?

#

You can also use this:

if (dialog) then {
    closeDialog 2;
};

createDialog "Soldiers_BankUI";
upbeat hill
#

is it possible to make vehicles invisible and still drive them?

opal zephyr
#

If it uses hidden selections you could set all the textures to a blank path. You'd be able to see the character inside it though

tulip ridge
#

Does using hideObject make them undrivable?

warm hedge
#

hideObject also disables PhysX so... I do believe yes

runic surge
#

anyway are you saying that the issue is caused by the issues you pointed out?

#

also I don't see why distance wouldn't work anyway

little raptor
little raptor
little raptor
#

Also your "closenessarray" order seems wrong

#

First you should put the distance, then the object

#

Example:

  [([_dml1,[_objA,_objB]] call BTH_fnc_LineClosenessCheck select 2), _dml1],
runic surge
#

Why does that matter?

#

as long as sort works the order shouldn't be a problem, right?

little raptor
#

It sorts by the first, then second, etc. element

#

idk what happens if you sort by object first

#

Maybe it won't make a difference and goes straight to second

runic surge
#

It hasn't failed in my testing

#

perhaps that is the issue though

#

well, it wasn't. none of the results are correct if I don't delete them. some are closer than the one that normally remains, probably because the average cancels out the distance or something

#

I can fix that but it isn't the main problem.

#

I'll try some other changes but I don't see how those differences could relate to terrain height

upbeat hill
runic surge
upbeat hill
#

So i'm trying to make it so if a player has a flashlight on in the trigger they take damage. Would i need to make an array to put people that currently have a flashlight in that array to do damage to them in the true part?

This stuff below is currently in the On Activation part of the trigger.

_retVal = if (isFlashlightOn == true) then { "It's true" } else { "It's false" };

faint burrow
#

I would make the trigger to be local and use this activation condition:

(player inArea thisTrigger) and { player isFlashlightOn (currentWeapon player) }
upbeat hill
faint burrow
#

I updated trigger condition.

upbeat hill
#

also why do it locally for?

faint burrow
upbeat hill
#

oh interesting

faint burrow
upbeat hill
#

oh

#

so it stops it doing it for every player

#

so its good to use local if i only want it to apply to a single person fufilling that condition?

faint burrow
#

It depends. In your case I think it's better using local trigger because I'm not sure isFlashlightOn and currentWeapon will work fon non-local units.

upbeat hill
#

ok i see

#

so what happens if i wanted to be able to do this to any unit regardless if its ai or not. is there a variable that corresponds the any unit in the trigger?

faint burrow
#

In this case you should use server trigger and check all units (thisList) within the trigger.

upbeat hill
#

ah i see

#

Thank you for your help i understand this alot more now.

faint burrow
#

Something like that:

  • Activation: anybody.
  • Server only: checked.
  • Condition:
_unitsToBeDamaged = thisList select { (_x getEntityInfo 0) && { alive _x } && { _x isFlashlightOn (currentWeapon _x) } };

thisTrigger setVariable ["unitsToBeDamaged", _unitsToBeDamaged];

(count _unitsToBeDamaged) > 0
  • On act.:
_unitsToBeDamaged = thisTrigger getVariable "unitsToBeDamaged";

{
    _x setDamage ((damage _x) + 0.05);
} forEach _unitsToBeDamaged;
upbeat hill
#

wow ty once again

blissful current
#

When I add an addAction to a human player, the other players in MP are able to activate it. I want this.

However I don't want the human player that has the addAction on him to be able to activate it. Could this achieved?

#

I have it written like this:

scout addAction [
    "<t color='#FFFF00'>""So, you're our carson?""</t>", 
    { 
    // code goes here. scout is the human unit variable name.
    }, 
    nil, 
    8, 
    false, 
    true, 
    "", 
    "ActionTalkToCarson && AllowActionTalk",
    4
];```
meager granite
#

init.sqf?

blissful current
#

This is in initPlayerlocal

meager granite
#

Alright

#

_target != focusOn && ActionTalkToCarson && AllowActionTalk

#

Have this condition

#

Basically don't show the action if target (unit with action) is currently controlled unit (player, etc.)

#

Actually _target != _this could be even better

#

instead of focusOn

blissful current
#

Hmmm except I do want the action to be shown if it controlled by a player. I just dont want it to be shown to the player that is controlling the unit. Everyone else can see it is OK. Sorry its confusing. Am I explaining OK?

meager granite
#

This is exactly what you want

#

don't show if you're the unit the action is added to

blissful current
#

Awesome! tyvm, I will test it out now!

#

Works perfect. TYVM!

#

Hmmm OK, now what about if I DONT want a certain unit to be able to use an addAction?
Perhaps then the condition field would use: _caller != UnitXYZ?

meager granite
#

_this

#

it has its own variables

#

!(_this in [_target, UnitXYZ]) && ActionTalkToCarson && AllowActionTalk

blissful current
meager granite
blissful current
meager granite
#

just list any units you want in that array

unkempt spindle
#

how to make slideshow in arma 3

fair drum
unkempt spindle
#

but in controler i don't have interactions

tulip ridge
#

You can rebind the interact key

unkempt spindle
#

i have interact i can pick up and drag and cary

tulip ridge
#

Then you have some stuff missing in the module

old owl
#

How bad is the performance difference of sending a hashmap over the network opposed to other types like an array or string? I know a string will ideally be the most performant would love to be able to utilize the data I am sending as a hashmap. Don't wanna murder network though in the process.

To give more detail on the data I am working with right now, it is an array with the size of 10 (excluding 0) and has various different types. Each of those values could also easily and conveniently be given a key if added to a hashmap. This data (which is unique to each object) is applied on hundreds of objects as public variables which is available to all clients in the session (which can be upward 120 players).

fair drum
#

how often are you sending it

old owl
# fair drum how often are you sending it

It shouldn't need to be changed or modified all that often but with it being public it will be in the JIP queue for every client who connects and we do have a lot of players

#

JIP is probably my highest concern but I will say I am also a little unknowledgeable regarding the ins and outs of how the queue works short of just a base understanding of what it is and what data it takes

fair drum
#

in your scenario, i wouldn't worry about it. its not frequent or large enough to have an issue

mellow jolt
#

I'm having trouble understanding how to properly tell player's computers to execute a script or pre-compiled function using a script.

  1. I have the script skyDive.sqf that uses player to effect a single target in various ways, tested and functional on myself using the console and execVM "functions\skydive.sqf";.

  2. I've compiled that script in initPlayerServer.sqf.

  3. I'm using a trigger set to player faction/present and currently have this in the activation section:

["functions\skyDive.sqf"]remoteExec ["execVM",_players];```
4. I've been trying various different variations of `remoteExec`, `execVM`, and anything else I can find, but I keep getting incorrect data type errors. Please tell me what extremely simple thing I should actually be doing.
old owl
#

Thank you by the way for your response ๐Ÿ™‚

fair drum
#

its all serialized before sending anyways

old owl
fair drum
#

if you send that every second, then you'll start bogging

old owl
#

Haha nothing like that thankfully :D

fair drum
#

try to reduce what you want to send. there probably isn't a need for what you are doing and can be shortened

old owl
fair drum
#

the amount in your case. there probably isn't a reason why you need to send that many object variables

#

you can choose to trust the client a little more

old owl
# mellow jolt

Give me a sec to verify but I believe it is because _players is a bool ๐Ÿ™‚

#

Ahhh

#

Yeah so if you do in the return will be a bool true or false of whether it found the value in the array. So your remoteExec target is not actually an expected Number, Side Object, Group or String but a bool which isn't valid. I could have sworn bools could actually be used as targets previously but still not likely what you are intending.

mellow jolt
#

ahh, so what would be the correct way to find an array of players in a trigger area?

old owl
mellow jolt
#

oh inArea?

#

lemme test

#

no that's Boolean too

#

well let me run that down on my own. That question will have been answered already. Thanks!

old owl
#

@mellow jolt You could try this although there may be a better way to do it depending on what trigger you are using I imagine.

// _object could be the object the trigger is attached to or any perferred object
_players = nearestObjects [_object, ["CAManBase"], 100, true]; // CAManBase to prevent rabbits from being picked up hehe
["functions\skyDive.sqf"] remoteExec ["execVM",_players];

Also not sure what kind of mission you are working in but figured I'd also pass this your way too if you have not seen it before. It is a real life saver as you no longer have to specify file paths when using commands like execVM, spawn, call or remoteExec :)
https://community.bistudio.com/wiki/Arma_3:_Functions_Library

mellow jolt
#

Here's the correct code for the activation field in the trigger to fire the thing:

remoteExec ["fn_skydive",_players];```
#

the script is actually for a horror op to suddenly black a player out, teleport them up 750 meters, and then catch them just before they splat, black them out again and place them safely back where where they started and then wake them back up.

titleText ["","BLACK OUT",10];
0 fadeSpeech 0;
0 fadeEnvironment 0;
0 fadeSound 0;

player setUnconscious false;

player allowDamage false;
_origin = getPosAtl player;
_jump = getPosAtl player;
_jump set [0,(_jump select 0) - 500];
_jump set [1,(_jump select 1) - 500];
_jump set [2,(_jump select 2) + 750];
player setPosAtl _jump;

5 fadeSpeech 1;
5 fadeEnvironment 1;
5 fadeSound 1;
titleText ["","BLACK IN",10];
uiSleep 2.5;
dynamBlur = ppEffectCreate ["DynamicBlur",100];
dynamBlur ppEffectAdjust [10];
dynamBlur ppEffectEnable true;
dynamBlur ppEffectCommit 1;
uiSleep 0.5;
dynamBlur ppEffectAdjust [0];
dynamBlur ppEffectCommit 2.5;
uiSleep 2.5;
dynamBlur ppEffectEnable false;
ppEffectDestroy dynamBlur;

_alt = 1000;
Index = 25;
while { Index < _alt } do
{
    _altArray = getPosAtl player;
    _alt = _altArray select 2;
};

titleText ["","BLACK OUT",0.25];
uiSleep 0.5;
player setPosAtl _origin;
player setUnconscious true;
uiSleep .5;
titleText ["","BLACK IN",10];
player setUnconscious false;
player setPosAtl _origin;
uiSleep 5;
player allowDamage true;```
#

I don't want to catch more than just the person who sets off the trigger

#

I didnt know about nearestObjects so thats handy to have in my back pocket though

tulip ridge
worldly kite
#

Hello, i'm not an expert in A3 scripting and now i need some help. I know how to set a custom role and a custom loadout, but how can i set multiple loadouts to one role?

fair drum
runic surge
# runic surge no luck so far. I haven't the slightest clue I am doing any of the changes right

I'm at a loss. I tested with deformer and the results didn't improve. The script works perfectly at all elevations less than about 50m above sea level. It works anywhere on flat terrains, and semi-flat terrains as well. I don't know what to make of it honestly.

A bug maybe? I am way out of my area of knowledge with pretty much any kind of vector math but at the same time I can't find any indication that the vector commands would be affected by height like what I'm seeing.

The shape/slope/roughness of the terrain seems not to matter. idk

little raptor
#

Can you show me a screenshot of the issue too?

runic surge
#

One moment

runic surge
#

I might have literally just figured it out give me a minute to verify

#

Nah I just improved the results a bit but it is still off for some reason. I'll send some screenshots

#

The one at the beach has perfect alignment, slightly height up, still perfect. Even higher, the alignment is off. It was off by much more before but the best result still looks like in the screenshot

#

I have verified that all the possible orientations are being considered. When I don't delete the extra dummy objects at this height, none of them align, so it isn't a selection issue.

little raptor
#

ok. what about the script?

runic surge
little raptor
#

Those yellow spheres are s1 and s2 right?

runic surge
#

yeah

#

the red line is just a custom model I made for debugging

#

Land_Powerline_01_Wire_50m_f works with the provided offset. To test you could literally just paste the entire code into the debug menu after mission start

little raptor
# runic surge `Land_Powerline_01_Wire_50m_f` works with the provided offset. To test you coul...

Try this:

BTH_fnc_placeLineBetweenPoints = {
    params ["_o1", "_o2", "_model", "_offset"];
    
    private _p1 = getPosWorld _o1;
    private _p2 = getPosWorld _o2;
    
    private _dir = _p1 vectorFromTo _p2;
    private _up = vectorNormalized ([_dir#1, _dir#0 * -1, 0] vectorCrossProduct _dir);
    
    private _line = createVehicle [_model, [0,0,0]];
    private _bb = boundingBoxReal _line;
    private _size = (_bb#1 vectorDiff _bb#0)#1;
    
    private _center = (_p1 vectorAdd _p2) vectorMultiply 0.5;
    private _scale = (_p1 vectorDistance _p2) / _size;
    _line setPosWorld (_center vectorAdd (_offset vectorMultiply _scale));
    _line setVectorDirAndUp [_dir, _up];
    _line setObjectScale _scale;
};
posOff = [0,0,-0.36];
[s1,s2,"Land_Powerline_01_Wire_50m_f",posOff] call BTH_fnc_placeLineBetweenPoints;
#

I removed the length parameter because you can just fetch it from the bounding box

runic surge
#

I'll try that. Btw, this:

(sqrt ((((_posB select 0) - (_posA select 0)) ^ 2) + (((_posB select 1) - (_posA select 1)) ^ 2)));

seems to work better than
(vectorMagnitude _vector)

little raptor
#

It's 2d distance. If you set vector's Z to 0 vectorMagnitude will be the same as what you wrote

runic surge
#

that's closer, but the offset doesn't seem to be applied correctly. The offset is meant to be in model space

little raptor
#

Oh. In which model space?

runic surge
#

I got this same issue when applying the height offset to the world position

#

the wire model

#

so it applies in the same way no matter how the wire is oriented

#

without it, the ends of the wire rise up since the models origin is in the center where it hangs down

little raptor
#

Ah that's what it is

#

Well you can fetch its value from bounding box too

#

But anyway to correct the fnc...

runic surge
#

I don't understand about 50% of your version of the function so I have no idea where to make any changes

little raptor
#

Yeah I'm modifying it rn

little raptor
# runic surge I got this same issue when applying the height offset to the world position
BTH_fnc_placeLineBetweenPoints = {
    params ["_o1", "_o2", "_model"];
    
    private _p1 = getPosWorld _o1;
    private _p2 = getPosWorld _o2;
    
    private _dir = _p1 vectorFromTo _p2;
    private _up = vectorNormalized ([_dir#1, _dir#0 * -1, 0] vectorCrossProduct _dir);
    
    private _line = createVehicle [_model, [0,0,0]];
    private _bb = boundingBoxReal _line;
    private _size = (_bb#1 vectorDiff _bb#0)#1;
    
    private _center = (_p1 vectorAdd _p2) vectorMultiply 0.5;
    private _scale = (_p1 vectorDistance _p2) / _size;
    _line setVectorDirAndUp [_dir, _up];
    _line setPosWorld (_center vectorAdd (_up vectorMultiply (_bb#0#2 * _scale)));
    
    _line setObjectScale _scale;
};

[s1,s2,"Land_Powerline_01_Wire_50m_f"] call BTH_fnc_placeLineBetweenPoints;
#

You can remove the offset from the code btw. I forgot

#

Removed

runic surge
#

You're a genius lmao

#

or I'm just really dumb

#

this seems to work perfectly either way

little raptor
runic surge
#

yes exactly

faint burrow
south swan
#

inb4 allPlayers inAreaArray theTrigger ๐Ÿฟ

faint burrow
#

Why check all players when you can check objects already within the trigger?

little raptor
#

Tho Dedmen recently added SimpleVM which can improve loop performance

south swan
#

because a) running a single command on bigger data set may come up faster than running code loop
b) depending on trigger settings thisList may be way bigger than allPlayers (i.e. activation of ANY and 200 bots on 12 players server)
c) inAreaArray doesn't require trigger to have activation conditions that include players. It can even check for nothing at all and effectively be just a location definition
๐Ÿคทโ€โ™‚๏ธ

faint burrow
#

As I understood, the trigger is already set to detect any player, in which case the players within the trigger area will be in thisList, so you can just use this var instead of doing the work again to get all players and filtering them. ๐Ÿคท

south swan
#

if it only detects players - why is there a need to filter them out in the first place? If it detects more than just players - see points a and b. Anyways my "hurrdurr, it can be" arguments don't mean anything without testing in the real (or at least real-ish) environment. And even setting up for testing is likely not worth it until those checks have noticeable impact on game performance.

little raptor
#

Either way I don't think the difference is that large to matter which way you do it ๐Ÿ˜…

patent goblet
#

just for your info if no longer needed...

faint burrow
patent goblet
runic surge
#

why do you have to call it like that

#

regardless it places WAY too many objects

#

has lots of gaps too

little raptor
patent goblet
#

Because this function is not in CfgFunctions by default but is exclusive to the campaign, nothing prevents you from adding it to yours to simply do [My_obj1,My_obj2] call BIS_orange_fnc_createPowerLine

runic surge
#

I imagine this is for missions

#

3 meter segments, none are scaled as this predates that functionality being scriptable

little raptor
runic surge
#

and there are gaps between them at some distances

patent goblet
runic surge
#

alignment does look pretty good tho

little raptor
runic surge
#

wouldn't be ideal for terrains to have a trillion 3 meter segments rather than a single line for every pole (minus 1 for the end of each line)

#

I still wish I found that first though lol

#

Leopard figured it out in like 2 minutes after I posted my 5th failed attempt so no problem anymore lol

#

I already have a function that will place specific memory points relative to each power pole so I can just combine the two and generate accurate powerlines at any distance for large areas

patent goblet
runic surge
#

the gaps might be a result of the LENGTH 2.9 with the 3 meter rope model though

#

Thanks for letting me know anyway though lol I can still think of some uses for this

flint topaz
#

@foggy stratus, @open hollow This is an updated version of the script. You can hopefully see the improvements, so thanks for the encouragement and advise
https://www.youtube.com/watch?v=wzH7IrSAIFk

Again if you view the description of the video you can see what things I want help with, so any help in that regard would be greatly appreciated

DISCLAIMER: The music used in this video is not owned by me. This is a non-commercial usage, and all rights remain with Bungie

Song Used: Deep Stone Crypt Lullaby - Bungie. All rights reserved.

Advanced Zero Gravity Script Development for Arma 3
I am currently developing an advanced zero-gravity script for the game Arma 3. While this project ...

โ–ถ Play video
remote cobalt
#

Hey folks, its a simple question but I was wondering if anybody experienced this before.

I know already had two missions were I had the problem that a variable in a script was not changed on the server even though I used "publicVariable".

In both instances it was in a script that was executed through a "Hold Action", everything else in the script worked, even stuff that came after the public Variable was set.

The Data Type was in one Mission Boolean and in the other a Number.

When I changed the variables in the Debug Console it worked flawlessly. When I repeated the mission myself (with lot less players obviously) and when i tested it local, this problem never occured.

Is there a limitation of "publicVariable" i do not know? Does anyone have a reliable workaround for this? Every hint would be helpful.

foggy stratus
open hollow
#

early optimization is the root of all evil... but you need to do it someday lol

open hollow
#

player addForce [[0,0,1], [0,0,0], false]
is just me or this isnt working? ( i mean i get inconsius)

fair drum
remote cobalt
#
if (!isServer) exitWith {};

["task02cargo", "SUCCEEDED"] call BIS_fnc_taskSetState;

objCount = objCount + 1;
publicVariable "objCount";

["Roger, supply coordinates recieved. Supply Drop One secured.","TOC","cargo1"] remoteExec ["UAMT_fnc_quickMsg"];

sleep 5.8;

if (objCount == 4) then {
    ["Excellent work, Rangers. Mission accomplished. You are RTB.","TOC","end"] remoteExec ["UAMT_fnc_quickMsg"];
    sleep 5.1;
    "scripts\UAMTScripts\MissionControlCenter\MCC_chapter_missionend.sqf" remoteExec ["execVM",2];
}
else {
    ["Move on to your next Objective.","TOC","moveOn"] remoteExec ["UAMT_fnc_quickMsg"];
};
round scroll
#

is it possible to change the 'transportSoldiers' capacity via script? Background is there are two Trader planes, one with transportSoliders =9 and one with = 0 (for cargo transport). I would like to switch between versions via a service menu, but the transportSoldiers capacity stays to the initial spawned version

true frigate
#

Hey is anyone able to give me a hand with an initPlayerLocal.sqf script?

Got this here:

sleep (random 7)+15;
player say3D ["Attack1", 1000, 1, false, 0];
player addForce [player vectorModelToWorld [5000,0,2000], [0,0,0]];
for "_i" from 0 to 15 do {
    [player, 1, "body", "vehiclecrash"] call ace_medical_fnc_addDamageToUnit;
};```
Now at the moment, obviously, the say3D command only runs on the local machine, but I'd like for it to play on every machine at one specific local player's position. 
I have an idea to use remoteExec 0 with another script, but I need to pass the local player's position to make sure it's created at the right place.
#

Is there an easier way of doing this, or does anyone know how I could pass information through the remoteExec function?

#

Thanks ๐Ÿ™‚

remote cobalt
#

Do you know what Player does say the sound?

If so you could cover that with an if so that the sound is only triggered on the player who says the line:

if (vehicleVarName player == "player_1") then {
    playsound3D ["path\Attack.ogg",player,false,getPos player,1,1,1000];
};
true frigate
remote cobalt
true frigate
#

No haha, the script is on initPlayerLocal, so it just runs independently on every system.

#

That's why no other players can hear the say3D command at the minute

remote cobalt
true frigate
#

Ahh right I see now. Sorry mate I'm incredibly tired.

remote cobalt
true frigate
#

I should mention that this is triggered based on other variables

            if (_soundDetect >= 10) then {
                systemChat "Player is Detected!";
                sleep (random 7)+15;
                        playsound3D ["sounds\Attack1.ogg",player,false,getPos player,1,1,1000];
                player addForce [player vectorModelToWorld [5000,0,2000], [0,0,0]];
                for "_i" from 0 to 15 do {
                    [player, 1, "body", "vehiclecrash"] call ace_medical_fnc_addDamageToUnit;
                };
                _soundDetect = 0;
            };```
#

So I don't know if loading would be an issue with it, as it's only conditional. I see how my old snippet does look like it's loaded on startup, though.

remote cobalt
#

Nope, if its caught with that, this should work fine.

true frigate
#

Hmm, the sound path is AQP.VTF_Korsac_Winter\sounds\Attack1.ogg

But for some reason, although
playSound3D ["A3\Sounds_F\sfx\blip1.wss", player, false, getPosASL player, 1, 1, 200]; works fine playSound3D ["sounds\Attack1.ogg", player, false, getPosASL player, 1, 1, 200]; does not.