#arma3_scripting

1 messages Β· Page 192 of 1

crystal ore
#

I need it to be relatively snappy in its transitions between the states and associated music playlists. I don't mind forcing them with generated triggers for certain areas, but I'm working on a horror mission where the player's approach to a given situation is both relatively unknown and I need rapid music transitions to account for monster ambushes

old owl
#

I think the largest caveat in SQF is just the lack of being able to see under the hood when it comes to engine related stuff. Until a week ago I had no idea that particles sources even created network with their effects being local. Kinda just leaves a lot of room to always be learning something new haha. Still love this game and language despite it's quirks and will be very sad to eventually see this chat make it's way into #end_of_life_arma πŸ₯Ή

little raptor
#

test it using the debug console first. from what I see it should work

crystal ore
#

Do you know what transition, radius, and executionRate do?

little raptor
# crystal ore Do you know what transition, radius, and executionRate do?
case "nearEnemies" : {
        //Properties
        private "_radius";
        _radius = missionNameSpace getVariable ["BIS_jukeBox_radius", DEFAULT_RADIUS];
        
        //Enemies container
        private "_enemies";
        _enemies = [];
        
        {
            private "_enemy";
            _enemy = _x;
            
            if (side group player getFriend side group _enemy < 0.6 && { _x distance _enemy < _radius } count units group player > 0) then {
                _enemies set [count _enemies, _enemy];
            };
        } forEach allUnits;
        
        //Return
        _enemies;
    };
#

look at BIS_fnc_jukeBox using the function viewer

#

it uses the radius to detect enemies

crystal ore
#

Ahhh

little raptor
#

transition is the transition time

crystal ore
#

I need to really start digging into the function viewer, thank you πŸ‘

little raptor
#

these are what the transition is used for

//Fade out volume
_transition fadeMusic 0;

sleep _transition;

//Fade volume up
_transition fadeMusic _volume;

playMusic _music;

//The minimum time a track needs to play and not be overridden by a change in behaviour
//By default is the double of the transition time
sleep (_transition * 2);
                
crystal ore
#

One last question, before I stop bothering you and pass out for the night, how does it take the enemy radius and presence and figure out stealth vs combat vs safe?

#

further, do I have to set it to enter stealth or will it just do that if there are enemy in range and nobody is shooting?

little raptor
# crystal ore One last question, before I stop bothering you and pass out for the night, how d...
case "isStealth" : {
        private ["_isContact", "_hasContact"];
        _isContact     = ["isContact"] call BIS_fnc_jukeBox;
        _hasContact    = ["hasContact"] call BIS_fnc_jukeBox;
        
        private "_isStealth";
        _isStealth = _hasContact && !_isContact;
        
        //Return
        _isStealth;
    };
    
    /**
     * Returns if we should play combat music
    **/
    case "isCombat" : {
        private ["_isContact", "_hasContact"];
        _isContact = ["isContact"] call BIS_fnc_jukeBox;
        _hasContact = ["hasContact"] call BIS_fnc_jukeBox;
        
        private "_isCombat";
        _isCombat = _hasContact && _isContact;
        
        //Return
        _isCombat;
    };
    
    /**
     * Returns if we should play safe music
    **/
    case "isSafe" : {
        private ["_isStealth", "_isCombat"];
        _isStealth     = ["isStealth"] call BIS_fnc_jukeBox;
        _isCombat     = ["isCombat"] call BIS_fnc_jukeBox;
        
        private "_isSafe";
        _isSafe = !_isStealth && !_isCombat;
        
        //Return
        _isSafe;
    };
#

hasContact means you know about an enemy

#

isContact means an enemy knows about you (exposed)

crystal ore
#

Gotcha. Thank you very much!

#

Dynamic music has been a dream of mine for years, but getting it to run well has been an absolute nightmare

#

I genuinely learned about this module last night lol

little raptor
#

this function is highly unoptimized tho
actually nvm

crystal ore
#

it's leagues more optimized than what I've been doing

little raptor
#

well yeah but it's not great

crystal ore
#

At one point I was up to 300+ triggers for music alone

little raptor
#
_status = if (!isNil { missionNameSpace getVariable "BIS_jukeBox_forceBehaviour" }) then {
            missionNameSpace getVariable "BIS_jukeBox_forceBehaviour";
        } else {
            switch (true) do {
                case (["isStealth"] call BIS_fnc_jukeBox) : { "stealth"; };
                case (["isCombat"] call BIS_fnc_jukeBox) : { "combat"; };
                case (["isSafe"] call BIS_fnc_jukeBox) : { "safe"; };
                case DEFAULT { "error"; };
            };
        };
#

basically if the condition fails it rechecks for enemies in the next condition meowsweats

old owl
#

@crystal ore Very off-topic but could you send me that peepo love emote you used earlier in a DM? I wanna poach it PepeTeddy

crystal ore
#

If I knew how I would lol

#

I got it from an obscure gun discord lol

old owl
#

Haha even if you just send the emote itself I can rip it

crystal ore
old owl
#

Perfect cheers haha sorry for interrupting productive conversation.

crystal ore
#

They have a whole bunch of fantastic ones

#

Including my favorite

#

Which is how I feel every time I get back into SQF lol

#

Anyway, it is weird it checks the same thing again right after failing

#

If I want to call it to play a specific track, will it then resume normal behavior if the state changes?

tulip ridge
#

Leopard answered your main question, but:

Is it a call to the server who is the only one to have the ownership of all units?
Is incorrect.

AI units placed in Eden before the mission starts will be local to the server (whether that be a dedicated server or the player hosting the mission), but units spawned by a Zeus will be local to their machine.
Player units are also always local to the player's machine

modern plank
#

I know the locality.

modern plank
quiet wind
#

Heyo, apologies for sliding in, quick query, is it possible to use say3D with .ogg files in addons and the base game?
Trying to add them into CfgSounds in the description.ext file but when I play them in game they don't start. They seem to work fine with playSound3D when specifying the full path.
Are the audio files required to be in the mission folder for say3D to work?

tulip ridge
modern plank
#

About remoteExec implem, and what happen when you specify a target like -2 for example. Does it go to the server then the server forwards to all clients? Or is the server skipped? Leonard answered.

tulip ridge
#

I believe that it goes to server and then forwards it to all clients yes

modern plank
#

It seems to be the best implem, as for security topics too.

tulip ridge
#

"Security" doesn't mean much in Arma
If someone can run code, they can do whatever

little raptor
#

well there are others but you know what I mean

modern plank
#

ya.

west nexus
#

I am trying to script a model replacement mod so it will replace model A from mod A, with model B from mod b, while keeping the changes as configured for model B which originally inherited from A.

I tried 3 ways -

  1. use a module that replaces classname A object with B object in mission and this works.

But I do not want to load a module and script it each time per mission. I Want it global as a mod.

  1. write a cfgpatches that is somewhat like this:

class CfgVehicles
{
class modelB;
class modelA: modelB
};

It does load model B in place of A, but the functionality is broken. Is this because is technically looping? ARMA Load ModA, configures modelA, loads modB, inherits and configures model B, then loads the patch which changes classname of modelB to A (which) creates a loop?

  1. rewrite the configuration of ModelB using the config.cpp of modelA and integrate the changes (example)

class CfgVehicles
{
class ModelB;
details from ModelA except
details or parameters B1, B2, B3, etc...
};

It does load model B in place of A, but the functionality is broken like option 2.

I am unsure how to get it to work without the module logic. Appreciate any guidance.

granite sky
#

Definitely an #arma3_config question. But I think the answer is "do not try to do that".

west nexus
#

I will repost there...

ruby turtle
#

How I can setmarkeralpha all markers inside a specific layer?

crystal ore
#

Can you toggle simulation on dead entities?

#

and/or use dynamic simulation?

sterile kraken
# crystal ore Can you toggle simulation on dead entities?

In Arma the engine will by default shut off simulation on dead units (or any objects in that regard) once they’re beyond a certain distance or their ragdoll settles, to save FPS if I remember right. You can force them to stay β€œalive” in the physics world by using some SQF commands, I can write some out for you if you want me to.

crystal ore
#

nah, trying to max out the number of corpses I can have in cities

granite sky
#

Issue with corpses (once ragdoll is done) is usually the rendering, IIRC.

#

Like corpses have a similar rendering cost to live units.

brittle badge
#

i need a guy for testing a new script from me. ist a lamp mounted on helmed etc. just join i wanna see if u join did u become automaticly the headlamp (server is on screenshot)

fair drum
#

You can repeat for however many clients you want.

brittle badge
old owl
# brittle badge How/What u mean "connect with host"

I think he means if you're running client as server using the "host game" feature.

Alternatively if you enable loopback in your Arma 3 server config you can test with multiple different clients in a dedicated server environment provided you have BattleEye off like @fair drum mentioned.

fair drum
#

If you have battleeye on, it will kill all extra clients

#

And what I meant is if you are editing a mission, you can hit play multiplayer which will do the same thing as going to the host menu and hosting. It's faster if you are already editing.

errant iron
#

Given a (simple) object, is there an easy way to tell if it can collide with other objects, assuming its physics wasn't disabled via scripting? I'm doing some object detection around multiple areas for individual vehicle respawns, and I want it to ignore stuff like tent floors and helipads.
I assume this would require inspecting the model's geometry LOD, but simply checking for its presence (or lack thereof) with allLODs doesn't work since they both define that LOD, and it doesn't look like there are any scripting commands beyond that.
(i can get by with substring checks, just wondering if it could be generalized)

granite sky
#

lineIntersectsSurfaces with GEOM/PHYSX maybe.

#

Expensive though. Might be better off checking bounding box height for your purpose.

errant iron
#

curiously the tent floors and helipads' bounding boxes both have a height of ~10m, way taller than my concrete barriers on top of them...

granite sky
#

try boundingBoxReal [_obj, "Geometry"]

errant iron
#

ooh, returns 0 for both and is really fast, 0.0007ms

tulip ridge
#

Is there a way to animate the fire mode "bar"?

Essentially trying to do what a high reloadTime weapon does but in reverse. Haven't had the chance to look at RscUnitInfo (which I'm guessing is where that's defined)

ivory lake
#

you can either
A) script setweaponreloadingtime perframe
B) modify the ui and 'replace' the loading bar with your scripted one

tulip ridge
#

Looks like it might actually be configFile >> "RscInGameUI" >> "UnitInfoSoldier" >> "WeaponInfoControlsGroupLeft" >> "controls" >> "CA_ValueReload". Idd is 300, idc is 154 so might be able to just mess with it normally

proven charm
#

funny arma script moment, can you spot what is wrong with this code? ```sqf
_ar = [0,1,2];

for "_i" from 0 to (count _ar - 1) do
{

systemchat format ["i %1",_i];

} foreach _ar;

winter rose
#

hahaha

#

(yes 😁 for/forEach, _i/_x)

proven charm
#

_x is any/nil in there...

#

and forgot to say, it does compile and run..

tulip ridge
#

It works as expected for me

#
i 0
i 1
i 2
proven charm
#

yes but the extra part is the foreach , which seems to be ignored

tulip ridge
#

Oh I just noticed that

Yeah that's not going to work because it makes no sense at all

#

You're trying to feed a for do into a forEach

proven charm
#

but it does work πŸ˜„

#

atleast the for part does

tulip ridge
#

No _x is undefined there, like you said

#

The forEach isn't doing anything

proven charm
#

thats right

#

somehow the compiler just magically ignores it (the foreach)

tulip ridge
#

Yeah what's weird about that

#

Compilers dropping unecessary things isn't strange

proven charm
#

but should give you error message though

tulip ridge
#

The syntax is correct, it's just ignored

proven charm
#

yeah

kind hatch
#

Hello, small question: does anyone have the complete script of Task Force Aegis as an ORBAT or can tell me how I can best build it? I need it for a mission. I would be very grateful to you.

winter rose
kind hatch
#

is this exactly the script to build this orbat (TF aegis) ?

faint burrow
#

No.

little raptor
proven charm
#

you seem to understand the parser well Leopard, this stuff is bit over my head, as i dont really know how parsers work (apart from my own parsers lol) πŸ™‚

little raptor
granite sky
#

SQF is actually not a bad way to learn some parser basics because it has an extremely simple parser. Like there are minimal code structures.

proven charm
little raptor
#

a+b -> unit addAction action
-a -> alive player

proven charm
#

yea i get your point now

granite sky
#

The various bracket types never have any context-specific meaning. () is just precedence brackets, [] declares an array. {} declares a code block.

#

And things like forEach that look like specialised code structures in other languages are just binary commands, and function like all the other binary commands.

winter rose
#

in hindsight btw, I would have preferred forEach _array do {} to {} forEach _array

granite sky
#

...yes

winter rose
#

for readability and not "wait where is that code block coming from" πŸ˜„
Dedmen plz fix

granite sky
#

of course, even do is a binary command.

little raptor
#

or array forEachDo code

winter rose
little raptor
#

like FOR

little raptor
proven charm
#

well with this level of flexibility that SQF has you might just be able to figure your own new syntaxes jk πŸ˜…

kind hatch
#

One more thing, does any of you have a list of images that can be displayed on a whiteboard, for example, a map of LZ Connor or Camp Rogain?

hushed turtle
#

Many times I fotgot units and typed {} forEach _group. Expecting forEach to take variable of datatype GROUP or even SIDE and just loop through it's units. blobdoggoshruggoogly

buoyant hound
#

Hello any help about this error?

#
_camera = "camera" camcreate position cp1; 
_camera cameraeffect ["internal", "back"]; 
_camera camPrepareTarget t5;
_camera camCommitPrepared 0; 
_camera camPreparePos position cp2;
_camera camPrepareTarget t5;
_camera camCommitPrepared 5; 
_camera camPrepareFOV 0.700;
waitUntil {camCommit1ed _camera};its error line!
_camera cameraEffect ["terminate","back"]; 
camDestroy _camera;
winter rose
buoyant hound
faint burrow
#

There is no camCommit1ed command.

thin fox
#

xD

buoyant hound
winter rose
buoyant hound
#

Oh comited is correct

thin fox
winter rose
#

t1ed

buoyant hound
#

Yes i think its the fkng
prob

#

How that number moved there

#

Sht

winter rose
#

the… erm… the 1 key is next to the T on the cambodian keyboard?

thin fox
#

I know, sometimes happens to me too, losing time finding out that I put a wrong letter in variable

buoyant hound
#

Camcommitted is correct

pallid palm
#

this may help you m8 this is my Intro.sqf

buoyant hound
#

Its done

#

That number just change

winter rose
#

no camPrepareTarget?? Heresy!! πŸ˜„

#

joke aside, good camera code, approved

faint burrow
#

I would just recommend to invert if:

if (!hasInterface) exitWith { };
winter rose
#

anytime!

#

too late
you had one job
saying nohomo before

drowsy geyser
winter rose
#

"Revolver Ocelot" πŸ˜‚

finite bone
#

How does the game create the drone view camera as a side PiP in the HUD of the UAV Operator and is this function available publicly for use?

digital hollow
#

That's the custom info UI. You can look at how some other mods do a pip view, like ctab.

finite bone
#

I'm trying to project the UAV feed in a dedicated MP mission using the code below. When this is executed (even with MAX PiP View Distance and Quality settings), I can see the feed clear in the screen but the other player (with the same settings as mine) has two problems:

  1. The camera is looking at something else entirely for him
  2. The projection is very choppy (see pic)

Any help is appreciated

livefeed_display_1 = createVehicle ["Land_TripodScreen_01_large_F", [18018.8, 1585.73, 0], [], 0, "CAN_COLLIDE"];
recon_uav_check = createVehicle ["USAF_MQ9", [1650.01, 18686.3, 2145.86], [], 0, "FLY"];    
createVehicleCrew recon_uav_check;    
recon_uav_check flyInHeight 1000;   
publicVariable "recon_uav_check";   
publicVariable "livefeed_display_1";
publicVariable "MyDisplayTerminal";
livefeed_display_1 setObjectTextureGlobal [0, "#(argb,512,512,1)r2t(uavrtt,1)"];   
{
    recon_cam = "camera" camCreate [0,0,0];    
    recon_cam cameraEffect ["Internal", "Back", "uavrtt"];    
    recon_cam attachTo [recon_uav_check, [0,0,0], "laser_start", true];
    recon_cam camSetFov 0.1;
    recon_cam camCommit 0;    
    ["featureCamera", {recon_cam cameraEffect ["Internal", "Back", "uavrtt"]}] call CBA_fnc_addPlayerEventHandler;     
    ["cameraView", {recon_cam cameraEffect ["Internal", "Back", "uavrtt"]}] call CBA_fnc_addPlayerEventHandler;     
    ["unit", {recon_cam cameraEffect ["Internal", "Back", "uavrtt"]}] call CBA_fnc_addPlayerEventHandler;     
    ["visionMode", {recon_cam cameraEffect ["Internal", "Back", "uavrtt"]}] call CBA_fnc_addPlayerEventHandler;  
} remoteExec ["call", 0, recon_uav_check];
warm hedge
#
  1. camSetTarget
  2. Unrelated issue for script but model
finite bone
# warm hedge 1. camSetTarget 2. Unrelated issue for script but model
  1. The drone is supposed to be controlled by another player live so, its more of a tactical planning / recon. Is there way to ensure consistency without camSetTarget or is there a clever way to utilize camSetTarget in this scenario?

  2. Thats good to know. Is there a recommended model for this projection or is it all trial and error?

Additionally, shouldn't the model issue also affect me?

warm hedge
#
  1. You can attachTo the camera to the desired bone of the drone in this context
finite bone
#

Wdym

tulip ridge
#

livefeed_display_1 is a global variable, you should add a unique prefix to it.

E.g. ACE prefixes all of their global variables with ACE_

warm hedge
#

(This advice is not about this code, but general good-to-have habit)

tender fossil
#

Prefixes should be used to avoid possible global variable name clashes e.g. when playing with mods enabled. Won't be fun to find out random errors and weird behaviour due to you and a mod using the same global variable names, as they are often hard to track down because there won't necessarily be syntax errors but faulty semantics instead

granite sky
#

to be fair, a mission is the one place you can usually get away without prefixing, on the grounds that any half-decent mod will be prefixing all their stuff.

#

But it's good to get into the habit.

digital iron
vital nimbus
#

Hi I'm new and I'm looking of a script to override or Init I'm not sure. Is there a script that runs when a AI controlled playable-character respawns? I have a mission already with a init.sqf and a onPlayerRespawn.sqf . My current scripts work everytime a character controlled by a player respawns, but the characters controlled by the computer are not triggering onPlayerRespawn.sqf
Also, I have tried using the init field of the character in the editor, but that's only running once when the game starts. Or, alternative question, is there a place to see the different scripts you can include in your missions directory?

pallid palm
#
//AiRespawn.sqf
addMissionEventHandler ["entityRespawned",{
    params ["_unit"];
    
    if ((!isPlayer _unit or side group _unit isEqualTo west) &&
    (side group _unit) isNotEqualTo East &&
    _unit isKindOf "CAMANBase") then 
    {
        // can put some loadout stuff here if you wanted
        [_unit] joinSilent (group player);
    };
}];
little raptor
pallid palm
#

all i use is this cuz of trees and stuff (but that's for choppers not planes)

#
waitUntil { sleep 3; (helo2 distance pad2LZ <=140) or !alive Helo2 or !canMove Helo2 or !alive Pilot2 };
helo2 land "land";
#

ofcorse that's just part of my 1 of my Scripts, in my chopper command

#

some day (if i ever learn how to make a mod) i may just make my chopper command into a Mod for Arma 3

#

my chopper command allows you to take the controls of the chopper at any time

#

or release the controls to give back control to the Ai pilot

#

even has water insertion and extraction

#

WooHoo Arma 3

#

dam i got so excited talking about my chopper comand i got to go smoke a cigg now lol

#

oh btw thx to @tulip ridge (and many others) that helped me with, all the scripts in my chopper command, thx you so much guys

#

it works so good its like a dream come true

pallid palm
#

@vital nimbus you bet my brother

lime rapids
#

Though the animation on the ship docking would be pretty annoying in model.cfg

proven charm
lime rapids
proven charm
#

ok

tough geode
hallow mortar
#

It uses setVariable to place a variable in the specified object's namespace (presumably containing true) once the playback is finished, so you can monitor it with your own scripts to detect when it's done.

#

So you could do something like this:

[_someUnit, _captureData, [_someUnit, "my_playback_state_var"]] spawn BIS_fnc_unitPlay;
waitUntil { _someUnit getVariable ["my_playback_state_var", false] };
systemChat "playback done!";```
tough geode
#

~~That's what i assumed it would do but it never update the Variable for me πŸ€” ~~ Ok i just had an extra ] no clue how it even worked in the first place meowsweats

digital iron
quiet wind
#

Is there any way to retrieve other player's local objects and delete them?
I've used remoteExec to play a sound on each machine, but I have no idea how to use deleteVehicle to stop everyone's local sound

granite sky
#

What objects are you creating?

quiet wind
#

Sounds via the say3D command

#

I'm retrieving them via allMissionObjects "#soundsonvehicle" but that only returns my sound, nobody else's

granite sky
#

say3D takes an object. What object are you using?

quiet wind
#

a vehicle (Offroad), is it best to create an invisible object and delete that instead?

granite sky
#

ah never mind, I see the issue.

#

Best bet is probably to store the returned sound object on the player locally with setVariable, and then use remoteExec again to delete those locally.

#

But at some point you'd need to call a function with remoteExec, not just commands.

quiet wind
#

Yeah, the problem being is that multiple of these vehicles exist and that the sounds can be played at the same time.
Car A can be playing Sound A
Car B is also playing Sound A
But all players should still hear the audio

#

Whether I can store these using setVariable and push? them into an array of sorts

granite sky
#

Do you specifically want to kill all of them at the same time? Not the one attached to a specific vehicle?

quiet wind
#

Yeah just the one strapped to the specific vehicle, the drivers of which have an action to turn it off

granite sky
#

In that case probably better to setVariable on the vehicle (locally).

#

But you could do something like a global hashmap of vehicle netID -> sound object as an alternative.

quiet wind
#

That could work, if only I had more than 20 minutes to code it πŸ˜„

#

Annoyingly I can't get the sound "object" when doing remoteExec on say3D

#

To run the whole function locally would be the answer, though, how that's done in an action is delving deeper into the rabbit hole

#

Global function that then remote calls another function? Or is that too messy? πŸ˜„

#

Cheers for the help nonetheless

timber shore
#

So made a simple enhanced vehicle damage script, which creates steam or smoke can drain fuel and damage tyres if certain conditions are met

#

how would i have it monitor every vehicle in an MP environment though?

tulip ridge
#

Just create a function that runs say3D and saves the returned sound object to the vehicle

Then have another function that gets the sound object on the vehicle and deletes it

quiet wind
#

Using ACE actions so unless I can wrap a function within a function I'll precompile it and run it from that statement

tulip ridge
#
// fn_playSound.sqf
params ["_vehicle", "_sound"];

private _soundObject = _vehicle say3D _sound;
_vehicle setVariable ["YourPrefix_whatever_sound", _soundObject];

// fn_deleteSound.sqf
params ["_vehicle"];
deleteVehicle (_vehicle getVariable ["YourPrefix_whatever_sound", objNull]);

// to use it
private _targets = [0, -2] select isDedicated;
[_someVehicle, "CfgSoundsClass"] remoteExecCall ["YourPrefix_fnc_playSound", _targets];

// when its over
[_someVehicle] remoteExecCall ["YourPrefix_fnc_deleteSound", _targets];
tulip ridge
#
class YourPrefix_whateverAction {
    statement = "[_target, 'someSound'] call YourPrefix_fnc_playSound";
};
granite sky
#

Or skip a layer and dump the function contents in there.

#

It's never great writing code in config files though.

quiet wind
#

True, just testing it now

#

Seems to work locally, I'll find out in 30 mins if it works on the server πŸ˜„
Cheers lads

placid root
#

you could add certain eventhandlers to it. but fuel,damage tyres have to be called by the owner of the vehicle to take a gloal effect. the particle effects have to be called on every machine.

cloud zenith
#

Is there a way to use triggers to get NR6 reinforcement points to increase its pool size?

if i start with a small pool of say 5 and want to have capture points act as "ticket" increases is this possible?

placid root
#

but if you want to spawn a script on each vehicle checking its states, this will propably have a great impact on performance

lime rapids
lime rapids
#

Iirc the carrier uses vector math for the launch system behind the functions and a geo lod for everything else

primal trench
#

Is there an easy way to create an event handler that looks for explosive projectiles hitting before their arming distance and applying the damage that they should have done directly to what they hit?

tulip ridge
#

You'd need to manually calculate the damage based on the many related properties, and also (presumably) have that work through ace's wound handlers as well

#

What's your goal exactly?

fair drum
#

samatra and I found something last year that may help what he wants and I use it for scripting custom damage values from explosives (ignoring shrapnel hits). let me see if i can find it

crystal ore
#

for my sins I'm trying to use the eden triggers to execute code only on players inside the trigger zone. Just trying activation: any player doesn't do it, nor does call{player in thisList && vehicle player in thislist}

#

I need the currently playing music to be local to just the players within the trigger zone, but it's playing it for everybody

hallow mortar
verbal ravine
#

As Zeus is there a way to execute code on all of the selected objects in zeus? I'm wanting to be able to run some arbitrary scripts over selected objects as I develop some features while I'm testing features as a mission maker.
I think I'm looking for some way to access the selected objects in the Zeus left hand panel, but I'm not sure on the function to get them

cosmic lichen
#

Use Zeus Enhanced.

hallow mortar
#

If the community you're making missions for doesn't use ZEN, then I'd be cautious about working with it loaded. Easy to end up with an accidental dependency.
If that is the case and you just want to work with the debug console, https://community.bistudio.com/wiki/curatorSelected is the command to get your current selection.

verbal ravine
#

Thank you

hushed turtle
digital iron
proven charm
#

2D vector math is easy but 3D not so much

primal trench
tacit bear
#

Hi. I am working on an Arma 3 Exile Mod server and wanted to share my latest script.

I made this script as an attempt to add some variety and balance and incentivize players to pick any outfit they want and not the one with best stats. As I was writing it I realised I could make it extensively flexible, so that other people can make use of it.

https://github.com/TheGrayJacket/ConfigOverwriteGenerator_Arma3/tree/main

GitHub

The purpose of this code is to allow Arma 3 server admins to easily create a complete override for specific attribute of all specific type of objects. - TheGrayJacket/ConfigOverwriteGenerator_Arma3

lime rapids
fair drum
chrome spoke
#

Hey im trying to do an intro text for a mission

[ "LOCATION", "TIME"] spawn BIS_fnc_infoText;

[0, 3, false, false] call BIS_fnc_cinemaBorder;

sleep 4;

[ "TEAM NAME", "LEADER"] spawn BIS_fnc_infoText;

sleep 2;

[1, 3, false, false] call BIS_fnc_cinemaBorder;

Effect i want is that there is a letterbox with the first text "location / time" followed by the team name and their SL name after which the letterbox disappears

i thought sleep commands would make it work but it seems all of the script happens at once, any advice on how to do it ?

hallow mortar
#

Where are you putting this code?
Some contexts are unscheduled - they run right now in the current frame, rather than being managed by the script scheduler. Suspension isn't allowed in these contexts because it would freeze the game.

chrome spoke
#

oh i put it as a trigger with the condition of true and delay of 2 seconds

#

i assume it would be better to have it as separate triggers at delays ?

hallow mortar
#

Well, you could do that. Or you could use spawn to create a scheduled context for your code.

chrome spoke
#

ill look into this then, thank you

additional question, can i make the text linger for longer when using the BIS_fnc_Info text

hallow mortar
#

No, but you could try one of the other similar functions, like BIS_fnc_dynamicText or BIS_fnc_EXP_camp_SITREP

round hazel
#

Hey folks! For some reason, Arma (originally played on a dedicated server) just started running client side. Everyone could move around in their own game, but other players weren't synced over. Any ideas?

granite sky
#

It's fucked, restart the server?

ocean folio
#

having trouble finding documentation on it, I assume LSTRING() is a CBA macro for something?

ocean folio
#

holy localization, alrighty that makes sense

#

ty

pallid palm
#

@chrome spoke or you could look up there to the post i made at β€” 5/21/2025 4:30 PM it might help you in some way

tulip ridge
glass nest
#

how to know that the bot wanted to shoot with gp and will shoot?

glass nest
#

maybe currentWeaponMode or weaponState player select 2

ivory lake
#

weaponstate might be better and checking the current magazine to be sure its shotShell (grenade)

proven charm
#

all those commands seems to return "GL_3GL_F" for the grenadier guy but i dont know how to check if that is infact grenade launcher

thin fox
sharp grotto
#

For Fired EH you can also do this. Downside it also triggers for other underbarrels (.50 cal etc).

if(_weapon isNotEqualTo _muzzle) then {systemChat "Fired Underbarrel"}; 
proven charm
#

"GL_3GL_F" call BIS_fnc_itemType doesnt return anything tho

thin fox
proven charm
#

dont know

#

muzzle

thin fox
#

hmm that's why

#

the functions needs the weapon class

proven charm
#

yeah

#

maybe you have to get the weapon item and get that one's type

sharp grotto
#
_muzzle = toLower currentMuzzle player;
if (
    _muzzle find "3gl" > -1 ||
    _muzzle find "ugl" > -1 ||
    _muzzle find "eglm" > -1 ||
    _muzzle find "m203" > -1 ||
    _muzzle find "gp25" > -1
) then {
    hint "Grenade Launcher is active!";
} else {
    hint "Not a grenade launcher.";
};
thin fox
tulip ridge
tulip ridge
#

That's odd that it fails for that
I guess you'd just have to check with the config parents command (I forget the name)

proven charm
tulip ridge
#
// or specific weapon / muzzle
private _weapon = currentWeapon player;
private _muzzle = currentMuzzle player;
private _parents = (configFile >> "CfgWeapons" >> _weapon >> _muzzle) call BIS_fnc_returnParents apply { configName _x };
_parents find "UGL_F" != -1;
#

I guess isKindOf fails for classes in different "levels" of config

sharp grotto
tulip ridge
#

Yeah I was testing it on vanilla stuff and it was fine
I doubt there'd be many mods that don't have their ugls inherit from UGL_F somewhere

finite bone
#

Quick while help - How do I run the while loop as long as a variable Ive set is true?

Example, I have a variable TEST_variableSuccess with the value true - I want to run the while loop based on this variable. If its false, exit the while loop.

#

Wait - I'm dumb I kept using ( and ) instead of { and } for while condition checking kmao

hallow mortar
#

That doesn't address their issue, which they said they've already solved anyway.

pallid palm
#

oh ok thx man

west nexus
#

Hey all, previously I was trying to swap terrain models via config and after rewriting model configs, I had issues where some Y and Z offsets were off, probably due to different origins. I am SQF illiterate so looked into other modder's codes that would either allow setting origins per model per config or look at a script that would take lookup a model, record its coordinates, and swap another model into the same coordinates. I came across DP's OCP mod with their search and replace script. It works using an array, hurray, BUT if multiple classname are very similar, it would also swap the models for those as well resulting in nested models in the same position.

Example array replacing CUP with Livonia models:

  [ "Land_Ind_Pec_03","Land_CementWorks_01_brick_F",0],
  [ "Land_Ind_Pec_03a","Land_CementWorks_01_brick_F",0],
  [ "Land_Ind_Pec_03b","Land_CementWorks_01_grey_F",0]```
#

The script would first run through the first line and swap ALL 3 cup models with the first replacement so there would be 3x of those models on the map. Then it would replace the next two, a and b variants again, with the replacement. Lastly, it would swap in Land_CementWorks_01_grey_F for Land_Ind_Pec_03b but, if the player walks up to a Land_Ind_Pec_03b object, they can open 2 to 3 sets of doors with nested models!

#

Is there a way to explicitly replace the models based on the exact classname? Or is this due to inheritecy cascades in the original configs?

#

actual script code below here

if(!isNil {OCP_sNr_OFF})then{if(OCP_sNr_OFF)exitWith{};};
if(isNil {OCP_DEBUG})then{OCP_DEBUG = false;};
myBuildings = [
  [ "Land_Ind_Pec_03","Land_CementWorks_01_brick_F",0],
  [ "Land_Ind_Pec_03a","Land_CementWorks_01_brick_F",0],
  [ "Land_Ind_Pec_03b","Land_CementWorks_01_grey_F",0]
];
for "_i" from 0 to(count myBuildings-1) do 
{
  _CurrentBuilding    = (myBuildings select _i) select 0;
  _bldgObjects = nearestObjects [(getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition")), [_CurrentBuilding], 20000];
  _countBldgs = count(_bldgObjects);
  if(OCP_DEBUG)then{diag_log format["eXpochDEBUG:searchNreplace 1 - _CurrentBuilding:%1 _countBldgs:%2 _bldgObjects:%3 ", _CurrentBuilding, _countBldgs, _bldgObjects];};
  if!(_countBldgs < 1)then
  {
    _ReplacementBuilding = (myBuildings select _i) select 1;  
    _DirectionOffset    = (myBuildings select _i) select 2;  
    {  
      hideObjectGlobal  _x;
    
      _myReplacement = createVehicle [_ReplacementBuilding, getPosATL _x, [], 0, "CAN_COLLIDE"];
      _myReplacement setDir (getdir _x) + _DirectionOffset;
      _myReplacement setPosATL (getPosATL _x);
      if(dynamicSimulationSystemEnabled)then
      {
        _myReplacement enableDynamicSimulation true;
      }else{
        _myReplacement enableSimulationGlobal false;
      };
    } forEach nearestObjects [(getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition")), [_CurrentBuilding], 20000];
  };
};

OCP_sNr_Finished = true;```
hallow mortar
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```
↓

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

It's because of the use of nearestObjects.
https://community.bistudio.com/wiki/nearestObjects
This command uses isKindOf matching - it detects objects that are the specified type, or that inherit from the specified type.
You need to find a similar command that uses exact matching (I don't recall off the top of my head if there are any, or what they are), or add a second check to confirm that the found object is typeOf the specified class.

glass nest
winter rose
#

(or weaponState if you want more details)

errant iron
#

Is there a way to get a set of identities that Arma uses for a given unit, like a rifleman from NATO / CSAT / Gendarmerie? I'm adding a setting to my recruit system to customize identities without changing the actual unit class (for BE filter convenience), and it'd be nice to use a predefined set from Arma and not handpick classes from CfgIdentities directly meowsweats

winter rose
#

seek in the config, then you can get the array and selectRandom on it

hallow mortar
#

Units have a list of identity pools defined in their identityTypes config property. Facewear and faces which are tagged into those pools via their own identityTypes property are available to those units.

#

So you could generate your list by getting the unit's identityTypes from its config, and then scraping CfgFaces for classes that are in one of those pools.

errant iron
winter rose
#

see what NikkoJT wrote above - seek identityTypes

hallow mortar
#

Names are handled separately, by the genericNames entry in the unit's config, which refers to a class of the same name in CfgWorlds >> genericNames

#

I think voices are also done through identityTypes but I'm not sure exactly what that correlates to for voices

errant iron
#

i see the same identityTypes array contains language tags like "LanguageRUS_F", but im thinking this is probably beyond the effort i want to put into replicating arma's randomized identities

iron flax
#

I can't seem to disable a spawned group's mine detection, any ideas why? I'm using this.
{ _x disableAI "MINEDETECTION"; } forEach units grp_1;

granite sky
#

What are you expecting it to do?

iron flax
#

I'm expecting it to disable the group's mine detection. It works for groups placed in the editor, but not on spawned groups.

granite sky
#

Any locality differences?

iron flax
#

It's single player, and it is all in the same script.

granite sky
#

The groups are the same side too?

tulip ridge
fair drum
#

I think if the mines are already shared among the side, it won't matter if minedetection is enabled or disabled (since its detection, like from nothing). that's why your spawned units wouldn't respond to disabling the minedetection. the initial groups already found and reported them among the side.

iron flax
#

I guess that's it, they are on the same side, using it on a different side seems to work.

cunning crane
#

Hey everyone! Does anyone have a script or a good starting point where I could have all of one specific factions units turn into zombies after they’re killed? I’m using webknights zombie pack currently for my undead

split ruin
fallen crow
#

Hi guys. I hope everyone is well! I just want to know how I can limit the Arsenal with the insignia (recruit, private, private 1, corporal, major corporal, sergeant etc etc)

The initial idea is that when you are recruited and you have said patch. The arsenal doesn't show you anything. And as you ascend, certain things in relation to your rank will be unlocked within the arsenal.

Help me 😦 Is this possible?

tulip ridge
split ruin
#

@fallen crow yes, and was discussed before with script example ...

#

I wish the forum worked ...

tulip ridge
#

Here's a quick ace sample I put together, if that's what you're using:

["ace_arsenal_displayOpened", {
    private _insignia = ace_player call BIS_fnc_getUnitInsignia;
    private _blacklistedItems = []; // Items to remove from arsenal

    switch (_insignia) do {
        case "privateInsigniaName": {
            _blacklistedItems append []; // Items privates can't have
        };
        case "sergeantInsigniaName": {
            _blacklistedItems append []; // Items sergeants can't have
        };
        case "officerInsigniaName": {
            _blacklistedItems append [];
        };
    };
    
    // Use execNextFrame to ensure it applies to current opened arsenal
    [{ call ace_arsenal_fnc_removeVirtualItems }, [ace_arsenal_currentBox, _blacklistedItems]] call CBA_fnc_execNextFrame;
}] call CBA_fnc_addEventHandler;
fallen crow
#

thanks guys you are a rockstar πŸ˜„

fallen crow
tulip ridge
cunning crane
glossy latch
#

how to open the script?

cloud zenith
#

Is there a way to use triggers to get NR6 reinforcement points to increase its pool size?

if i start with a small pool of say 5 and want to have capture points act as "ticket" increases is this possible

split ruin
#

@cunning crane alas its not, but otherwise is very good zombie mod, with different kind of zombies

glass nest
# glass nest how can I tell if my gun is in muzzle mode? view the upper right corner

the task was to make it so that the AI ​​in the GP mode would lose the skill, because the skill set to shoot bullets at the same time made the GP hit 100 percent

_muz = (getarray (CfgW >> primaryweapon _un >> "Muzzles")) select {!(_x in ["this","SAFE","FOLD"])};
    if (count _muz > 0) then 
    {
        _un addEventHandler ["WeaponChanged", {
            params ["_object", "_oldWeapon", "_newWeapon", "_oldMode", "_newMode", "_oldMuzzle", "_newMuzzle", "_turretIndex"];
            if !FFA_MUZZLE exitwith {};
                _muzl =  getarray (CfgW >> _newWeapon>> "Muzzles") select {!(_x in ["this","SAFE","FOLD"])};
                if (count _muzl > 0) then 
                {
                    call {
                        if (_newMuzzle in _muzl) exitwith {
                            _object setSkill ["aimingAccuracy", (_object Skill "aimingAccuracy")/3];
                        };
                        if (_oldMuzzle in _muzl) exitwith {
                            _object setSkill ["aimingAccuracy", ffa_aimingAccuracy];
                        };
                    };
                };
        }];
    };

Thanks everyone - everything works

sharp grotto
#

You can easily make it compatible with ACE (Ryanzombies), you can just overwrite the damage function (RZ_fnc_zombie_attackHuman) inside the missions init.sqf
You can find the original code inside@RyanZombies\Addons\ryanzombies\functions\fn_preInit.sqf, just copy the part for the RZ_fnc_zombie_attackHuman and edit the damage part.
And use https://github.com/acemod/ACE3/blob/4cb358ebf2b476e80be01e8aeb022c12ce2918dc/addons/medical/functions/fnc_addDamageToUnit.sqf

[_target, 1, "body", "stab", player] call ace_medical_fnc_addDamageToUnit```
tough abyss
#

Best thing would be not to use a script that is constantly checking / polling the vehicles, but using event handlers as Don suggested.
I'd suggest the Hit event handler. It only fires on the machine where the vehicle is local, so you have less problems with setFuel locality.

fallen crow
#

Hi, thanks for sharing the possible solution to the issue of badges and ranks based on the arsenal. I'm working on that aspect (although I'm still waiting for the designs from the mod editor). I'm currently preparing a campaign about Haiti and the situation there.

I'm working on improving the gameplay experience for the Combat Engineer role. In my community, I try to ensure that each role has not only clearly defined functions for their work. And there's something I've been thinking about a lot, not only in terms of logistics but also construction.

I know what Fortify does, but I'd like to know if I can create and link the behavior of the acex_fortify_buildLocationModule module to the vehicle I have in the UK3CB_B_MTVR_Repair_WDL image.

Since the module would only let me use Fortify in a specific area. And that's what I need, engineers can only use Fortify when they have the truck at a maximum distance of 20 meters (construction materials issue). I would greatly appreciate the help

brazen smelt
#

Say I want to merge a bunch of ```sqf
[arsenal_1, arsenal_2, etc] execVM "scripts\Arsenal.sqf";


I tried researching the issue but I seem to be going into a rabbit hole of execVM code optimizations, function compiling, etc.

So what exactly would be the best practice here?
cosmic lichen
#
{[_x] excecVM ....} forEach [vehicle1, vehicle1, ...]
#

Provided your script takes an object.

#

This is not best practice but gets the job done.

pallid palm
#

lol i would just put ```sqf
this addAction ["<t color='#ff1111'>Arsenal</t>",{["Open",true] spawn BIS_fnc_arsenal}];

#

in each box init

#

but thats just me

cosmic lichen
#

But that's something different entirely.

pallid palm
#

yes yes i know

brazen smelt
#

And if you dig enough there was a big discussion I had in here about why that was ill advised

pallid palm
#

he useing Ace right ?

pallid palm
#

yeah what is ill advised

brazen smelt
cosmic lichen
#

It's a onetime thing at mission start so not a big deal.

pallid palm
#

well i only have 1 Ammo box with that in the init so there no Performance lost

brazen smelt
#

Ours has the addaction and call all inside the whitelist script which is executed in initplayerlocal

pallid palm
#

if you really want to know the best way, open up the END_Game mission and have a look there @brazen smelt

brazen smelt
pallid palm
#

that END_GAME Mission will show you alot

brazen smelt
#

Ill look at it in the morning then

pallid palm
#

rgr m8

#

you will love the way they have it laid out in there

#

and thats by BIS also

#

but im sure you can make it for Ace also

thin fox
hallow mortar
#

It's good to learn about functions, and once you do you'll be able to use them very naturally, but you don't have to do it for this issue.

sharp grotto
#

Won't work anymore

cunning pelican
#

Anyone know a small script to apply to a vehicle for spawn them already destroyed without the big explosion ?

granite sky
#

Well, the array version.

#

_vehicle setDamage [1, false] Actually works these days.

#

It used to kill stuff nearby still.

cunning pelican
#

Thank you guys, will check it out ! πŸ™‚

granite sky
#

Only tested on profiling branch though, but I think it was already fixed for 2.18.

cunning pelican
proven charm
#

can the lamps be made brighter to illuminate bigger area?

winter rose
#

set object scale

proven charm
#

i tried that out of curiosity and it actually causes less light because the lamp is further from the surface

digital hollow
#

You can script a light that goes further

proven charm
#

how?

digital hollow
proven charm
#

ah i see, thx! i guess those commands only work with the light object

#

does bigger light mean more lag though?

little raptor
#

no. only number of lights matter

pallid palm
#
_light1 = "#lightpoint" createVehicle (getPosATL C1);
_light1 setLightIntensity 2.0;
_light1 setLightBrightness 5.0;
_light1 setLightDayLight true;    
_light1 setLightFlareSize 10;
_light1 setLightFlareMaxDistance 1000;    
_light1 setLightAmbient [1,0.3,0];
_light1 setLightColor[1,0.3,0];
#

there you go @proven charm

proven charm
#

ok thx everyone

#

im thinking of making my own lamp object, is it possible to make that brighter than vanilla lights?

little raptor
#

no

pallid palm
#

yes up there see

#

_light1 setLightBrightness 5.0;

proven charm
#

scotty im talking about new lamps now

little raptor
#

you can change its parameters, but it's still "vanilla"

pallid palm
#

new lamps ?

proven charm
pallid palm
#

oh i see

proven charm
pallid palm
#

i think you can

little raptor
#

it's possible iirc

#

see the reflectors class

proven charm
#

ok thx!

proven charm
#

yea got bigger light now, by raising intensity value. but dont know if im doing it the right way

proven charm
golden geyser
#

Howdy, would anyone be willing to give me a hand with Arma Life scripting stuff?

light magnet
#

I'll be perfectly honest, i don't the first thing about scripting, im using ChatGPT to make a "simple" script to create a supply box for me and my friends that have TCGM uniforms in it to unlock them in antistasi. Im currently in the Eden editor.

player addAction ["Spawn TCGM Crate", {
private _box = "B_supplyCrate_F" createVehicle (player modelToWorld [0, 2, 0]);
_box allowDamage false;

clearItemCargoGlobal _box;
clearWeaponCargoGlobal _box;
clearBackpackCargoGlobal _box;
clearMagazineCargoGlobal _box;
clearUniformCargoGlobal _box;

private _uniforms = [
    "TCGM_f_underwear", "TCGM_f_underwearGray", "TCGM_f_underwearLGreen", "TCGM_f_underwearWGreen",
    "TCGM_f_underwearBlue", "TCGM_f_underwearDGreen", "TCGM_f_underwearBrown",
    "TCGM_f_PantiesBlack", "TCGM_f_PantiesBlue",
    "TCGM_f_Thong_Blk", "TCGM_f_Thong_Wht", "TCGM_f_Thong_LGreen", "TCGM_f_Thong_WGreen",
    "TCGM_f_Thong_Blue", "TCGM_f_Thong_DGreen", "TCGM_f_Thong_Brown",
    "TCGM_f_Thong_Maya", "TCGM_f_Thong_Flowers", "TCGM_f_Thong_Leafs", "TCGM_f_Thong_Hearts", "TCGM_f_Thong_Poker",
    "TCGM_F_Wetsuit_B", "TCGM_F_WetsuitShort_B",
    "TCGM_F_Mini_Range", "TCGM_F_Mini_Competitor", "TCGM_F_Mini_Journalist", "TCGM_F_Mini_Marshal",
    "TCGM_F_Mini_IDAP", "TCGM_F_Mini_Navy", "TCGM_F_Mini_Casual2", "TCGM_F_Mini_Casual3",
    "TCGM_F_Mini_Casual4", "TCGM_F_Mini_Casual5", "TCGM_F_Mini_ScotchR",
    "TCGM_F_Sport_1", "TCGM_F_Sport_2", "TCGM_F_Sport_3", "TCGM_F_Sport_4", "TCGM_F_Sport_5",
    "TCGM_F_Paramedic",
    "TCGM_F_Soldier1", "TCGM_F_Soldier1_RollUp",
    "TCGM_F_SoldierParamilitary", "TCGM_F_SoldierParamilitary2",
    "TCGM_F_SoldierParamilitary_RollUp", "TCGM_F_SoldierParamilitary2_RollUp"
];

{
    _box addUniformCargoGlobal [_x, 15];
} forEach _uniforms;

systemChat "Crate spawned with 15x each TCGM uniform.";

}];

#

and it keeps giving me this error '...oGlobal_box: clearUniformCargoGlobal |#|_box; private _uniforms = [ "TCGM...' Error Missing ;

winter rose
#

…incredible, isn't it?

#

please see the 2yo pinned message, "don't bring ChatGPT here"

it's because AI hallucinates commands that do not exist, breaking all that

#

the syntax is usually acceptable, but the results… not so much.

light magnet
#

Ah, fair enough

winter rose
#

clearUniformCargoGlobal and addUniformCargoGlobal are commands that do not exist
remove the first one, replace the second one with addItemCargoGlobal, you should be good

light magnet
#

Thank you so much!

quartz parcel
#

Relatively new to all of this so I hope I am in the right place. I'm setting up a mission using the Prairie Fire DLC and a couple of mods, main one being Alive. One of the mods I'm using is Quyet Thang which gives the PAVN/VC more/better looking kit options. I made some sub-factions/units in the orbat creator and Alive is spawning them just fine.
I'm also using the tracker module from the SOG DLC, but it will only spawn in vanilla PAVN units. Would anyone be able to point me in the right direction to get the tracker module to spawn custom orbat classes or Quyet Thang mod classes? Is there a script that I could use to get it to only affect trackers?
Thank you

fair drum
manic oak
#

New to scripting, I'm cannibalizing another script i found that didn't do exactly what I wanted, anything glaringly obvious that could done better here?

the idea is that this will get called in initPlayerLocal.sqf like

[[["teleporter_1", "teleporter 1"], ["teleporter_2", "teleporter 2"], ["teleporter_3", "teleporter 3"]]] execVM "teleporters.sqf";
params ["_teleporters"];

// Loop through each teleporter and add actions to all other teleporters.
{
    _currentTeleporterVar = _x select 0;
    _currentTeleporterObj = missionNamespace getVariable [_currentTeleporterVar, objNull];
    if (isNull _currentTeleporterObj) exitWith { diag_log format ["Teleporter object not found: %1", _currentTeleporterVar]; };

    {
        _targetVar = _x select 0;
        _targetName = if (count _x > 1) then { _x select 1 };

        // Only add actions for *other* teleporters
        if (_targetVar != _currentTeleporterVar) then {
            _currentTeleporterObj addAction [
                format ["<t color='#FFFFFF'>Travel to %1</t>", _targetName],
                {
                    params ["_target", "_caller", "_actionId", "_arguments"];
                    private _var = _arguments select 0;
                    private _name = _arguments select 1;

                    private _nextPos = getPos (missionNamespace getVariable _var);
                    _nextPos = _nextPos vectorAdd [1, 0, 0]; // slight offset

                    _caller setPos _nextPos;

                    sleep 4;
                    titleFadeOut 2;
                },
                [_targetVar, _targetName],
                1,
                true,
                true,
                "",
                "true",
                4
            ];
        };
    } forEach _teleporters;

} forEach _teleporters;
brittle badge
#

What's up

#

So, one question.

#

Is it possible to find some one on the server ho can script something just battleeye confirm? Becurse my night vision Script is done but not Battleeye confirm (remote exec call... "

warm hedge
fair drum
manic oak
brittle badge
fair drum
fair drum
#

When you say confirm, do you mean allowed by battleye?

brittle badge
# fair drum I still don't know what you're asking. Your English is difficult to understand.

Sorry, my native language is Croatian, so I only speak German. I asked if someone could please help me create the Battleeye Confirm script. If I place my script/Helipad on the ground, it actually works perfectly, but I keep getting Battleeye Kick #19, 35, 39...etc. That's why I'm asking. I know it's sometimes due to Remote Exec Call, etc., but my knowledge of Battleeye scripting isn't sufficient for that.

#

This is a perfect version rn of my night vision Script wehre the Zeus has a menu to enable a local player menu (press H) for player wehre they can switch betweet 8-10 different night vision modes. Like Black/Wihte, Modern Warefare, Cyan........

fair drum
#

Do you have more info on 19, 35, and 39? What other info do those kicks give?

brittle badge
#

They just say Battleeye Kick #19 ur not allowed to enter the server 120 seconds again

warm hedge
lucid niche
#

Hi,
does anyone know which functions run in the background when using the command AI submenu (key 6) for actions? I'm specifically interested in "Inventory" and "Open subordinate's inventory". So far I googled this:
player action["gear", targer_unit];
But I'm not sure if it's right. I know what those commands do practically and which are theirs differences, but need to know what runs in the background.

analog mulch
# quartz parcel Relatively new to all of this so I hope I am in the right place. I'm setting up ...

shoutout to Veteran29 for making this, just reposting it from his pinned message on the SOG:PF discord

Here's how I would approach the problem:

  1. create a wrapper function that executes code on newly spawned tracker groups.
  2. use that wrapper function to overwrite the loadouts of the units with setUnitLoadout
    Code examples for executing custom code on newly spawned Tracker Area groups:
    https://gist.github.com/veteran29/cdff6bc1d43378eff0b96bd332ca4324#file-ontrackerspawn-sqf

Example mission:

Gist

Code examples on how to customize S.O.G. Prairie Fire Tracker area module behaviour - customizeTrackerLoadout.sqf

digital hollow
quartz parcel
sinful osprey
#

As the command "playSound3D" is marked "Global Effect" according to https://community.bistudio.com/wiki/playSound3D, does that mean that running playSound3D via the debug console's "local exec" button will transmit the sound to everyone on the network? In practice, what I'm wondering is if I'd need to remoteExec the command or not.

hallow mortar
#

The sound is played for all machines, regardless of which machine executed the command. You don't need to remoteExec it.

#

That is, unless the Local Only optional parameter is set to true, in which case it will only be played on the machine that executed the command.

cunning crane
sinful osprey
thin fox
#

Hello. Is it possible that an external script change a _local variable? o.O

faint burrow
#

Yes, for example, if local var isn't private.

thin fox
#

interesting...

tulip ridge
#

It depends, mostly because of scope stuff

thin fox
#

so it explains what is going on

#
diag_log str _posLogic; // Normal pos
[] call PIG_fnc_updateCasMenu;
diag_log str _posLogic; // returns [0,0,0] 

In some other part of other function (that is called in the updateCasMenu), I use the same variable

_posLogic = _plane getVariable ["PIG_CAS_attackPos", [0,0,0]];
#

so it updates then

#

because isn't private?

tulip ridge
#

Yes

faint burrow
tulip ridge
#

Yeah, just always private everything by default

thin fox
#

Okay, thanks, now I understand the importance of private

tulip ridge
#

There are some cases where you might not want to
Like iirc _player, _target, and _actionParams for ace interactions are alrwadybdefined because they aren't privated

#

Which makes simpler conditions / statements easier because you don't need a params when you're just doing a single statement in config

tulip ridge
thin fox
#

problem solved, that was it

tulip ridge
#

Dedmen explaining when I asked about it

grim cipher
#

hi guys, just had a question. i'm using ORBAT from the ALiVE mod to make a faction and i'm having an issue where ORBAT interface only lets me pick units for the "driver" and "gunner" roles, it autofills the rest of the vehicle with the same unit im assuming, so the commander ends up being a crewman too. not the end of the world, but just wondering if there's a fix or workaround for future reference.

i did a test where i set the commander as the driver and a crewman as the gunner, ended up with two commanders in the tank: one driving and one in the actual commander seat. is there a way to manually define who goes in which seat via script or something?

#

here is the class code

solar sigil
#

can anyone point me in the right direction, been at this all day - trying either A. make SOG prairie fire's 250rnd mg42 vehicle mags function with the handheld mg42, or B. create a new mag for the handheld mg42 that holds 250 rounds - i believe i'd have it working if i would make my own loadout template for the SOG whitelisted arsenal, but the default arsenal whitelist they have on their site is out of date so i'm not trying to use it

tulip ridge
chilly bronze
#

is it possible to programatically make an AI aim their gun at a specific angle/elevation, whether in editor or though an addon? or is it only possible to detect when an AI fires using an event handler, and intercept/replace the projectile

warm hedge
#

AI as in soldier or turret (vehicle)? Former impossible, latter lockCameraTo

foggy stratus
# chilly bronze is it possible to programatically make an AI aim their gun at a specific angle/e...

Sounds like you are asking 2 different things. It is programmically possible to make AI aim anywhere if you place an invisible target where you want them to aim. Which seems unrelated to "detect when an AI fires using an event handler and intercept/replace the projectile" (also possible). In this video you see AI aiming at various elevations to track a bird in flight (there is an invisible man target attached to the bird they are targeting). https://www.youtube.com/watch?v=sAcmMBwMias

AI are getting better and better at hitting birds in flight (about 20 to 30% of the time with shotguns). Wait for flamethrower at end...pretty funny.

β–Ά Play video
pallid palm
#

hello m8s: can we sleep; inside a addMissionEventHandler

proven charm
#

no you cant. you have to use spawn inside the EH to be able to sleep

#

like ```sqf
addMissionEventHandler ["EntityKilled", {
params ["_unit", "_killer", "_instigator", "_useEffects"];
[] spawn
{
sleep 1;
hint (str cansuspend); // Shows true
};
}];

pallid palm
#

hmmm ok thx m8

queen cargo
#

@tough abyss just add some way to trigger it? if you got ACE3 running you can use their UI for example, action menu also fine, ... ton of ways
asking "i want a ui to start a job" is just ridiculus
and as said, the UI itself to plant something should never be graphical
it has to be in the game somehow by eg. attaching the whatever to the player and then adding some keys to move it more in detail

split ruin
#

addAction to buy a vehicle works fine in eden but not on dedi ... it doesn't substract side score (I am using it as currency cause its already in the game I guess)

_actionA1 = ["quadbike","Build Mule 2SP","",
    { 
        params ["_target", "_player", "_actionParams"];
        
        _sideScore = scoreSide west;
        if (_sideScore < 2) exitWith {hint "Earn more Score Points!"};
        west addScoreSide -2;
        
        _veh = createVehicle ["vn_b_wheeled_m274_01_01",helipadA,[],0,"NONE"];
        [_veh, 1] call ace_cargo_fnc_setSize;
        _veh enableDynamicSimulation true;
        _action = ["recycle","Recycle","",
        { 
            params ["_target", "_player", "_actionParams"];
            [2,_target] call KIB_fnc_reCycle;
        },{true}] call ace_interact_menu_fnc_createAction;
        [_veh, 0, ["ACE_MainActions"], _action] call ace_interact_menu_fnc_addActionToObject;
        ["build"] remoteExec ["BIS_fnc_showNotification",0];
    },{true}] call ace_interact_menu_fnc_createAction;
[_depot, 0, ["ACE_MainActions","vehicles"], _actionA1] call ace_interact_menu_fnc_addActionToObject;
faint burrow
#

addScoreSide should be executed on server side.

split ruin
#

remoteExec ... got it, thanks @faint burrow
PS: works well with

[west, -2] remoteExec ["addScoreSide", 2];
proven charm
#

has anyone got problems using startLoadingScreen? it seems sometimes the loading screen wont change to my custom screen. and no loading screen appears

proven charm
#

this is my full code (trying to retry if failed): ```sqf
waituntil
{
// Open load screen, check if fails and retry
startLoadingScreen [call loadingScreenTitle, "FoWLoadingScreen"];

uisleep 1;

private _s = uiNamespace getVariable ['gcCtiLoadScrn', displayNull];

if(isnull _s) then
{
#if DEBUG_MODE
hint format ["LOADSCREEN WAS NULL %1", time];
diag_log "Retrying to start loading screen";
#endif

};

!isnull _s
};

#

that's my fix for the problem (Or I hope it is)

empty leaf
#

hey guys, I am looking for a mod which adds the reforger aim down sight logic to arma 3

https://feedback.bistudio.com/T190436

effectively the opposite of what is being asked in this link

so that when using trackIR you can look left and right and have a sight misaligned - wanting this for the immersion it would bring, anyone know of a mod which would do this?

nocturne bear
#

Hello pros,
how come the insignias show up on the arm patches for me but not for any of my friends in the mission? I'm trying to make different armies with country flags on their shoulders but I'm the only one able to see them.

We have the exact same mod list and we start the mission at the exact same time, he doesn't join after it started. Any ideas why they're not showing?

#

Feel free to @ me

silent cargo
#

I see the forums are still down and I couldnt find any good references elsewhere, I am looking to create a safezone that deletes all projectiles entering a predefined area such as a marker location.

Are any of you familiar with something like this, or have any already made scripts I could reference or use

tulip ridge
granite sky
nocturne bear
silent cargo
nocturne bear
#

Like I don't understand why there's attributes for insignia and even an init-line but it still doesn't work?

#

Like how?

#

There's a lot of mods on the workshop adding tons of insignias too but for what purpose? To play it in singleplayer only??

tulip ridge
nocturne bear
#

I can see all the insignias just fine but my friend can't despite being there from the very start of the lobby and the exact same modlist

#

Is there an ACE setting or something or any other known setting preventing insignias from showing or what is going on 😭

tulip ridge
#

Only ace related thing is that ace (by default) removes the insignias from vehicles when you get in

#

Have you tried testing it in vanilla?

nocturne bear
nocturne bear
tulip ridge
#

I'd try with vanilla and see if the issue occurs
If it does work, then try loading mods until it breaks

nocturne bear
#

That's gonna be a hell of a lot of restarts innit

#

or is there an easier way to find this out

granite sky
#

Load half the mods. If it works, load half of the rest. If it doesn't, unload half of what's left.

pallid palm
#

can't get any more clr then that

digital hollow
#

That works on AI which are local to where the command is run. If you put it in unit init, it will be run everywhere, so it will work.

proven charm
#

can you somehow deselect the respawning position in the menu? I want player to respawn at death position in some cases. like when medic revives him

little raptor
#

if what you want is not already in Multiplayer options, you'll have to script it

proven charm
#

yea

little raptor
#

well to do what you want just don't let the players "die" in the first place. just make them unconscious. that's also how the vanilla revive works

proven charm
#

hmm actually i dont know whats going on, in some tests the player respawned inside ambu and in some tests it doesnt

#

maybe i just clicked something hmmm

little raptor
#

what did you use in MP options?

proven charm
#

what options? "respawn in custom position" ?

little raptor
#

yeah I mean MP respawn options

proven charm
#

ok just that i think

#

these actually: ```
respawn = 3;
respawnTemplates[] = {"MenuPosition","Counter"};
respawnOnStart = 0;

#

it seems if theres ambu selected player will respawn on that. but if there is static respawn position selected then player stays on death position

little raptor
#

idk which BIS fnc controls the selected spawn pos. maybe try looking at some of those like BIS_fnc_respawnMenuPosition

proven charm
#

ok thx

thin fox
proven charm
#

well im just doing some moveout and setposATL "to fix this"

split ruin
#

@tough abyss effect is global, for everyone

tulip ridge
#

Locality for disableAI is really weird. Each machine essentially keeps its own list of what the AI can do, but the only one that's used is the one where the ai is local

granite sky
#

I don't feel like this is weird. Target knowledge (inc reveal) and most event handlers work the same way.

#

Hmm, I guess setBehaviour, setCombatMode and setSkill claim to be global effect.

hushed turtle
#

I don't thing it's that weird. What are other options anyway? Make it global or keep it only on machine where unit local and change their locality together?

tulip ridge
#

It's unique for commands
It would make more sense if the allowed features were just synced. Rather than everything being local

tight verge
#

hello everyone

#

i need some help for modding pls

#

im doing a mod but i have a big problem rn and i dont know how to get rid of it

#

if anyone pls can help me just text me

#

look that shit

#

im tired of this fck

tulip ridge
#

You're not including your pboprefix in your path to your function

tight verge
#

i wanna put a video in the back of the menu of arma with my mod but that doing this

tulip ridge
#

Your file path isn't complete

#

How are you packing your mod?

tight verge
#

can you come vocal pls ?

tulip ridge
#

No, I'm at work
This is a pretty simple issue though

tight verge
tulip ridge
#

Can you show your settings when packing?

tight verge
#

yeah

tulip ridge
#

And in options?

tight verge
tulip ridge
#

Alright yeah
So every pbo file has a "prefix" which is how you path to files in it.

Currently you're telling Arma to look at an addon named functions. Put the name of the folder (TheFlames...) before the functions part

#

So \"TheFlames...\functions\fn_init.sqf"

#

Or whatever folder it is you're packing, hard to tell since the name is so long

tight verge
#

so i have to do like that ?

tulip ridge
tight verge
#

originally this is that : class CfgFunctions {
class FOICC {
class CommandAndControl {
class init {
file = "functions\fn_init.sqf";
postInit = 1;
};
class showIntroVideo {
file = "functions\fn_showIntroVideo.sqf";
};
};
};
};

but im gonna change by

class CfgFunctions {
class FOICC {
class Init {
file = "\TheFlamesOfInsurgencyCommandAndControl\functions"; // βœ… Chemin corrigΓ© avec pboprefix
class init {
postInit = 1;
};
};
};
};

tulip ridge
#

Not related to your CfgFunctions

tight verge
#

so what do i have

#

to do

tulip ridge
#

Fix your config, you're mostly likely updating base classes for stuff and not inheriting it

#

Assuming you modify that class at least, it could he another mod you're loading

#

If that is your mod changing stuff, head to #arma3_config though and post your config for the main menu stuff

tight verge
#

okay im posting that there

fallen crow
#

Some body can helpme?. I try to implemantate ORBAT on my community but dont work 😦 and i don't know why 😱 I just wanna made the same thing but my image dont show up.. How i can solved this issues ? it's because the logo.paa 128x128 or i need to be tiny ?

cosmic lichen
#

Post the code and config.

tight verge
nocturne bear
#

Since ACE has like a gazillion addon settings in the menu

tulip ridge
#

It only affects actual vehicles, it's under ACE Vehicles though

nocturne bear
#

And there's like no other settings affecting insignias? Or any mod you know of like the CUP ones (I'm talking abot really popular ones) that could mess with the insginia?
I have a huge collection of maps built up with 50 mods for roleplay sessions and would hate do lose like half of that just for insignias to show, but this is still a mistery.

I didn't try to unload half the mods etc. yet tho because it needs two people testing it because I never had issues on my end, but I'm starting to lose my mind on this

brazen smelt
#

Trying to add an ability for admins to add/remove respawn tickets mid-mission through a sort of Admin Menu in the briefing screen so we can correct for arma stuff during our one life events. So far I got the following

if (serverCommandAvailable '#kick') then {
    player createDiarySubject ["Admin Menu","Admin Menu"];
    player createDiaryRecord ["Admin Menu", ["Admin Menu","
    <font color='#ffd000' face='PuristaBold'>ADMIN MENU</font>
    <br/><br/>
    "]];
};

And I think the command(s) I want to add are something along the lines of

TFG_TicketAdd = [west, 1] call BIS_fnc_respawnTickets;
<execute expression=""call TFG_TicketAdd"">Add a Ticket</execute>'";

I know I need to define and execute an expression but I mean it clearly does not work and I'm not familiar with them at all but I don't want it to be overly designed either.

proven charm
#

this in some createDiaryRecord:```
"<execute expression='call TFG_TicketAdd'>Add a Ticket</execute>";

placid glen
#

Hi fellers! I have a question: (I am new to modding but I know C++) how would I go about including CBA/ACE macros in my mod's files? Do I just have to #include them in? If so, which files do I have to include? Thanks!

tulip ridge
placid glen
#

wait I might be stupid

#

those are CBA

#

whoops

placid glen
placid glen
#

and I didn't think that hemtt still had templates, so thanks!

#

Ok, yeah, fixed thank you so much

#

to be fair, I could have forseen that it would've been something like normal C++ but whatever

#

unrelated but I should've done all of this macro business before wasting like an hour with wrong paths lol

digital hollow
#

It works if you can work with it. If you want to get more tools in place look into filepatching and disable compile cache for live loading code changes, plus debug engine, and script profiler.

placid glen
#

will do

placid glen
#

wait, it does not work

#

like

#

it compiles

#

but QPATHTOEF and ect. give the wrong path

stable dune
placid glen
#

if so, how could I get hemtt to output what it actually is?

#

if needed I can send a github repo

tulip ridge
tulip ridge
placid glen
tulip ridge
placid glen
tulip ridge
placid glen
#

I see

#

ok I have the solution I believe

#

forgor a file

#

ALRIGHT, FIXED IT

#

wohoo

#

thanks ya'll

#

I can now close like ten browser tabs

tulip ridge
placid glen
tulip ridge
old owl
#

Could someone confirm some network questions regarding enableSimulation for me?

  1. On the Wiki I see a comment posted by Krause in 2011 saying that objects with it enabled will not send updates across the network.
  2. Is this still true or was this only true prior to the creation of enableSimulationGlobal?
  3. What exactly do these network updates contain or what did they previously contain?
  4. Even with the command enableSimulation being local, is there any aspect where network is still used?
inland iris
#

In ace how do I whitelist specific items from certain categories while keeping other catagories untouched?

tulip ridge
inland iris
#

in that case Imight have to remove like 100+ items from every single catagories to make them accessable
while if I do whitelisting its only the iteams I want the players accessing the arsenal to have access to

tulip ridge
#

Just do whichever is easiest, whitelist or blacklist

#

(If you want it to affect all arsenals at least)

inland iris
#

basically Im trying to make limited arsenal
but ace arsenal is extremly icky with this

#

and I tried to find an asnwer about my question but its behind the forum maintaince block :./

tulip ridge
#

Just call ace_arsenal_fnc_initBox with whatever items you want if its a specific box, or remove items you do want when the display is opened if you want it to be for all

autumn gorge
#

hello. anyone know how to fix this error?

https://i.postimg.cc/tTprSM1S/skeleton.png

I have a mission, which was saved some months ago, but after some update of arma 3 it won't load (game crash). I thought something is wrong with Zombie and Demons mod, but it works normally when I create new mission. Only in my mission not. Tried to replace and remove this object (zombie) in mission.sqm, but no success. There is only 1 object (zombie from this mod) is placed on the map

tulip ridge
autumn gorge
#

hm. indeed. Added }; and it works. but looks like the author is not interested. need to make a fix. weird that it happens only in old saved missions

granite sky
#

Last time I tried disabling simulation on an object and moving it directly with script it had some very weird/broken behaviour, even locally. So maybe don't do that.

old owl
#

Yea, almost wanted to tag Dedmen on it but pretty sure he doesn't like PingRee so just hoping he answers haha petdedmen

proven charm
#

🚨 dedmen 🚨

little raptor
#

ok now I understand 3. one way would be if you use a command on the object that sends a network message. not sure if the game still does it automatically for some other kind of simulation message

granite sky
#

Honestly read this question as "Why are you asking? It sounds like you're trying to do something very weird" :P

old owl
#

We just use it a lot and I just wanna make sure we are not introducing a lot of overhead from it :)

iron flax
#

I want to set the alpha of a random marker from an array. How would I then remove the randomly selected marker from the array?

 
_random = selectRandom _array; 
 
_random setMarkerAlpha 1;```
tulip ridge
thin fox
#

_array = _array - [_random] also works

#

funny that ^ is a little slower

tulip ridge
#

Because +/- with arrays is slow, those create new arrays

thin fox
#

hmmm, even if _array deleteAt (_array find _random)is using two commands

tulip ridge
#

But it doesn't create a new array

thin fox
#

yeah

tulip ridge
thin fox
#

of course, it makes sense

#

I was creating a false memory that "find" is a very slow command

iron flax
granite sky
#

Only O(1) version is:
_random = _array deleteAt floor random count _array;

#

Well, O(1)-ish. The array shuffling is super fast compared to the comparisons.

#

(you replace both the selectRandom and delete lines with this)

buoyant frigate
#

Hey guys, question.

In my scenario I have a box being used as a "stash", and I want to keep the items in this container between scenario restarts (as restarting the scenario will completely wipe the container). How can I do this?

granite sky
#

You can use profileNamespace to store the data. Or missionProfileNamespace but that's busted on Linux.

#

Use commands like itemCargo to read the data and addItemCargoGlobal to write it.

placid glen
#

What am I doing wrong here?

#

wait

#

I think I see the issue now

#

I might very well be stupid

thin fox
placid glen
#

ok nevermind

#

what's the issue here?

granite sky
#

Where's QPATHTOEF defined? Can't find it.

placid glen
#

but I am not actually using it for the function, come to think of it

hallow mortar
#

Is your PBO prefix set up correctly?

granite sky
#

I don't think anything here is set up correctly but it's a tangled web :P

#

Like the script_macros.hpp is using this:#include "\x\cba\addons\main\script_macros_common.hpp"

#

But the CBA files are also included in the repo, so that's not where they're going to be.

placid glen
#

uhh yeah it's my first time doing this so it may be a bit messy

#

soo what should I do?

granite sky
#

I don't know. It doesn't match so you can go either way.

#

You're specifying /GOATY_AcomS/functions as the function path, but your actual prefix for that PBO is z\acoms\addons\main

granite sky
#

I think the prefix matches the CBA macro trash but I'm not staring at it too hard.

placid glen
#

so a QPATHTOF would make make sense?

granite sky
#

probably :P

#

If you want to use your CBA includes instead of the ones actually in CBA then you should also fix that, but I imagine they're the same (atm) and you have a CBA dependency anyway.

#

The path to your own includes from script_macros.hpp would be:
#include "include\x\cba\addons\main\script_macros_common.hpp"

granite sky
#

It's correct if you want to use CBA's files directly.

#

but generally if people include them in their repo they're trying to use their own copy.

tulip ridge
granite sky
#

Ah never mind, thought the include folder was inside the addons/main.

#

pixels :/

placid glen
#

so I did a thing right?

granite sky
#

shrugs

placid glen
#

that would be surprising haha

tulip ridge
#

Include is a folder for hemtt, when including something from outside your own mod, it needs to be added there in a matching file structure

placid glen
#

Well, after I'll have had dinner I'll fix the function path then

tulip ridge
# placid glen

But yeah, you're issue here is that this doesn't match what you have in your PBOPREFIX

You can just do file = QPATHTOF(functions); and it should work as expected

placid glen
#

makes sense

#

sooooo yup, I spent half of my day to do a thing only to forget about it ten minutes later

#

awesome

#

will fix it later

granite sky
#

The icon one should probably be using QPATHTOF instead of QPATHTOEF given that it's in the same PBO, but it'll work either way if the component name is main

placid glen
tulip ridge
placid glen
#

I see

tulip ridge
placid glen
#

ohhh yeah right I had read about that actually

#

thanks

#

at some point I had that set up but for some reason I removed it

tulip ridge
#

Β―_(ツ)_/Β―

#

It's optional, if you don't really care about tracking versions than I wouldn't mess with it

placid glen
#

I mean, looks like something reasonable to keep track of

#

ok wait I do actually have that header

placid glen
#

Ok fixed it

#

thanks Dart, thanks Gendo

foggy stratus
#

When a unit goes prone in grass clutter, the grass is flattened, and stays that way for about a minute after unit leaves that position. Is the duration clutter stays flattened a config value that a mod could change?

little raptor
#

no

#

it starts from 30 seconds and ends at 90 seconds

foggy stratus
last cave
#

Guys. How better split a array elements for CopyToClipBoard?

// copytoclipboard str _VehArray
//Code in one line
[["Land_TTowerBig_2_F",[1.4531,-0.4578,0.0000],0.0000,true,true,false,{}],["Land_HBarrierBig_F",[-1.6011,-7.9136,0.0000],2.6670,true,true,false,{}],["Land_HBarrierBig_F",[6.9922,-8.0981,0.0000],2.5367,true,true,false,{}],["Land_HBarrierBig_F",[10.8044,-3.0986,0.0000],72.7045,true,true,false,{}],["Land_HBarrierBig_F",[5.9788,3.9626,0.0000],223.6830,true,true,false,{}],["Land_HBarrierBig_F",[-1.3362,8.4583,0.0000],23.8359,true,true,false,{}],["Land_HBarrierBig_F",[-8.3276,1.8633,0.0000],289.7778,true,true,false,{}],["Land_TBox_F",[-5.5986,1.5740,0.0000],289.6627,true,true,false,{}],["Land_GuardHouse_02_F",[-10.4263,-8.4658,0.0000],272.6631,true,true,false,{}]]

need to format the array like this

// copytoclipboard ??? _VehArray ???
[
    ["Land_TTowerBig_2_F",[1.4531,-0.4578,0.0000],0.0000,true,true,false,{}],
    ["Land_HBarrierBig_F",[-1.6011,-7.9136,0.0000],2.6670,true,true,false,{}],
    ["Land_HBarrierBig_F",[6.9922,-8.0981,0.0000],2.5367,true,true,false,{}],
    ["Land_HBarrierBig_F",[10.8044,-3.0986,0.0000],72.7045,true,true,false,{}],
    ["Land_HBarrierBig_F",[5.9788,3.9626,0.0000],223.6830,true,true,false,{}],
    ["Land_HBarrierBig_F",[-1.3362,8.4583,0.0000],23.8359,true,true,false,{}],
    ["Land_HBarrierBig_F",[-8.3276,1.8633,0.0000],289.7778,true,true,false,{}],
    ["Land_TBox_F",[-5.5986,1.5740,0.0000],289.6627,true,true,false,{}],
    ["Land_GuardHouse_02_F",[-10.4263,-8.4658,0.0000],272.6631,true,true,false,{}]
]

I cant find commands for this (((

little raptor
#

do it in notepad++? notlikemeow

#

anyway, there's no command but you can write a function for it

last cave
#

Need only in sqf code...

little raptor
#

just read it element by element and add to a string

atomic niche
#

pretty sure you can just string the array

little raptor
#

he wants to indent it and separate by lines tho

last cave
#

Anyway in utilis... its work... (copy button)

/*
    INCLUDE INHERITED ENTRIES: false
    SHOW CLASSES ONLY: false
    UNLOCALIZED TEXT: true
    CONFIG PATH: bin\config.bin/CfgVehicles/Land_HBarrier_3_F
    SOURCE ADD-ON(S): A3_Structures_F_Mil_Fortification
*/

class Land_HBarrier_3_F: HBarrier_base_F
{
    author = $STR_A3_BOHEMIA_INTERACTIVE;
    mapSize = 3.55;
    class SimpleObject
    {
        eden = 0;
        animate[] = {};
        hide[] = {};
        verticalOffset = 0.798;
        verticalOffsetWorld = 0;
        init = "''";
    };
    editorPreview = "\A3\EditorPreviews_F\Data\CfgVehicles\Land_HBarrier_3_F.jpg";
    _generalMacro = "Land_HBarrier_3_F";
    scope = 2;
    scopeCurator = 2;
    displayName = $STR_A3_CFGVEHICLES_LAND_HBARRIER_3_F0;
    model = "\A3\Structures_F\Mil\Fortification\HBarrier_3_F.p3d";
    icon = "iconObject_2x1";
};
little raptor
#

that's preformatted manually

hallow mortar
last cave
#

I find how do this

copyToClipboard (format ["[%2%3%2%1%3]",_veh joinString toString [44,10,9],tostring [9],tostring [10]]);
nocturne bear
#

Is there a mod that adds medals?

granite sky
#

Anyone know the locality of Attached & Detached events yet? The biki doesn't.

tight verge
#

i wanna create a faction for my mod but there is a probleme

buoyant frigate
rough vortex
#

This is what I got, I am trying to figure what I need to do to disable the mini-map when the player is holding my mod GPS.

warm hedge
rough vortex
rough vortex
warm hedge
#

Because both channels are not too inappropriate either should in this context doesn't matter, as long as you take it only in one channel

formal stirrup
#

any way to play CfgSFXs entries without a trigger or having a corrosponding cfgVehicles entry?

ornate whale
#

I don't think so, the closest alternative is playSound3D command.

brittle badge
#

A question. I have an effect. I want all players on a server to receive this effect locally. Which section of the Bohemia wiki is intended for this?

cosmic lichen
#

remoteExcec I guess

#

But with that little info it could be anything.

brittle badge
brittle badge
# brittle badge <@444053322312318976> https://pastebin.com/ezmfeNgT

this is my script to give public zeus players a local menu where they can choose which night vision filter they would like to have (Black/White, Modern Warfare/Toxic Green...) etc. There is a finished steam version. However, this is not Battleye confirmed (Error #19) due to remote exec call.... so I had to define everything somehow outside but I can't manage to transfer any effect to another player. Here is the original script -> (goes into a helipad init, is saved as a composition, and then placed by the zeus on the ground! needs CompositionLevel2!):

https://pastebin.com/gbx2X741

#

please tag me @brittle badge in a response etc

brittle badge
# brittle badge please tag me <@572903427533832200> in a response etc

If no one can help me, then I ask for an answer to the question above (A question. I have an effect. I want all players on a server to receive this effect locally. Which section of the Bohemia wiki is intended for this?) -> The 3 main languages that I speak have been marked with flags as a reaction.

pallid palm
#

i have no idea where them flags are from, and also you forgot 1 flag

hallow mortar
quaint raven
#

Hi I wanted to design an objective for invade and annex for objectives, speficially the unsung mod, eg: the radio tower, hq etc. Is there a way to make a base composition and have it autoconvert to a SQF file so its easier to make?

open marsh
#

hi

#

why does arma not recognize empty blufor vehicles as blufor?

#

If a vehicle is empty/uncrewed even if its a blufor tank, is it immediately acivilian vehicle?

#

all iwant is to target BLUFOR vehicles regardless if theyhre empty or not, and land vehicles, wit hwheels and stuff, not friggin launchers and static guns and stuff

#

the ones that belong to BLUFOR, not any other side lol jesus it's liek rocket science

thin fox
open marsh
#

aweosme lemme try

#

wow thank u

#

ur a god man

brittle badge
#

hm

lunar lichen
#

sup guys

open marsh
#

I have a vehicle that impacts an object how xan inmake an explosion occur second it impacts, for example titan at missile when it hits tank, is it with event handler@thin fox

lunar lichen
#

was woundering if anyone could help me out? im trying to maake a small HUD type display but im unable to update the text on the display as i get a Serialization error, code,

disableSerialization;
ui = uiNamespace getVariable "SENPAI_HUD";
timer = _ui displayCtrl 1003;
timer ctrlSetText format["%1 : %2", Time_Remaming_mins, Time_Remaming_secs];

#

^ error

#

sorry guys, dont like to bug you all lol, im sure ive messed somthing easy up too -.-

trail rose
#

Try _ui instead. Use private vars

#

Same with _timer

blissful lake
#

I'm trying to get a character to speak a custom voiceline. The file is named houndeyereportin but I keep getting the error that houndeyereportin isn't found.
class CfgSounds
{
sounds[] = {};

class houndeyereportin
{
    name = "houndeyereportin";   // name of sound
    sound[] = {"sounds\houndeyereportin.ogg", 1, 1, 100}; 
};

};

#

This is what I have in my description.ext file

#

and I have a subfolder in the mission named sounds with houndeyereportin

#

in it

hallow mortar
#

How are you trying to play the sound?

blissful lake
#

I'm trying to play it through a unit named "houndeye1" which the player will play as

#

and in the units init I have houndeye1 say3D "houndeyereportin";

hallow mortar
#

Are you sure your description.ext is being picked up? For example, are other things defined in it and working properly?
There are some common mistakes in this area, like description.ext actually being description.ext.txt, or description.ext accidentally being placed in the wrong mission folder

blissful lake
#

The only thing I have defined in the description.ext file is the stuff for the voice line. I simply made a text document and then renamed it to description.ext which I thought would change it from a .txt to a ext?

hallow mortar
#

If you don't have extensions turned on, then it's still a .txt file. The .txt extension is just hidden.

blissful lake
#

maybe thats it lol

hallow mortar
#

Windows will warn you about potentially breaking the file if you actually change the extension. If there was no warning you didn't do it right.

blissful lake
#

yea I never got a warning LOL

#

I just turned it on so i'm gonna check now

#

oh my gosh you were right I just noticed it does have .ext.txt in it

#

yup and now it plays the file

#

thank you so much

lunar lichen
#

thanks, i ussualy dont private my vars when testing lol, that did clear the error but the text did not update -.-

#

thanks for the help πŸ˜ƒ

trail rose
#

did you also use private for time_remaming_mins? I assume you want time_remaining_mins though

lunar lichen
#

kinda update i spent like 3 hrs googling this poop -.-

trail rose
#

get rid of that spelling error

lunar lichen
#

yeh lol, its all just spammed for drafting lol

#

no the time var is public and needs to be public

trail rose
#

πŸ‘

lunar lichen
#

just gunna test pvt tho

trail rose
#

If the text doesn't update, double check your ctrl id as your first step.

lunar lichen
#

i think i know what it might be

#

hold up πŸ˜›

#

ok, the reason the text was not updating was because i forgot to re-set uiNamespace setVariable after i was trying to fix the first issue πŸ˜›

#

thanks for all the help @trail rose

trail rose
#

You are welcome

lunar lichen
#

this place makes me uncomfortable

#

lol, to many people whos work ive studyed lol

#

i am not worthy

#

lol

thick tide
#

I'm having a problem with a fix for ITC that I implemented. The night vision is bugged when using ITC's maverick and/or TGP MFD. I scripted a fix for it that works perfectly in single player but for some reason doesn't work in multiplayer. I issue, from what I understand, is in vanilla ITC a overlay is placed over the screen showing either the maverick or TGP MFD screen. This is handled differently in multiplayer. Anyone have an idea how to fix i?

#

This is the steam workshop link to my mod:

#

The itc_air/functions/targeting/createCamera.sqf is where the change was made for the night vision

open marsh
#

Hey Man quick question how do I create munition explosion for a plane I am forcing to impact into an object that has no explosive.

#

Its a suicide drone

#

also how do I make it move into something , utilizing arma physics and normal acceleration, because right now I have to constantly set velocity

tender nest
#

howdy fellas, im trying to call the orbital cannon module from the fire support zeus module using the script as a "broken arrow" thing that the players can use, however i have no idea how, could yall point me to some resources or lmk how? ive been at this for a few hours lmao

lunar lichen
#

@trail rose you wouldnt happen to know how to make the display open in the background instaid of the foreground, so you can move ect with it open?

zealous ether
#

Help: im looking for documentation for event handler that detects chat, global chat, side chat ect. Specifically detecting words within the chats.

buoyant hound
#

Hello, i just use unit capture to rec jet move and fire informations

Unitplay cmd worked correctly but fire no
Jet just move as data recorded but no shoot
Any tip?
Play and fire data stored at sqf file and called with execvm on game.

warm hedge
#

Post your code

zealous ether
#

I do remember the unit capture being a bit strange, if the fps was to low it would not record shooting.

#

Other similar issues.

open marsh
#

does anyone know wjhy this isnt killing the targets , its just exploding and no damage is done

sharp grotto
#

Could try a different type of explosion. That should be more reliable
For example

private _boom = createVehicle ["DemoCharge_Remote_Ammo", [0,0,100], [], 0, "CAN_COLLIDE"];
_boom setPosATL (getPosATL _target);
_boom setDamage 1;
open marsh
#

hmm true

thin fox
tender nest
thin fox
#

is it a mod?

tender nest
# thin fox is it a mod?

thats an excelent question, im trying to use the fire support orbital cannon, ive never seen zeus without it but ive only ever played with 20+ mods

thin fox
#

but, in theory, in the editor, you can open the functions viewer, and search the file that call this orbit support, and then, you can study it on how you can apply for the players

tender nest
#

i dont know what mod it is, but i did find it in the functions viewer now that im aware of it

thin fox
#

I'm doing this rn for the moduleCas, and I got a real cool support CAS for the players to use it

thin fox
tender nest
#

thank you!

thin fox
#

if you don't understand what the code is doing, abuse the use of systemChat command

spice vigil
#

Hello, I just want to check something quickly. Is this script safe for multiplayer?

Config:

    class Steve_30k_Tanks {
        class Init {
            file = "Steve_30k_Tanks\Init";
            class addTankFiredEH {};
        };
    };
};
class Extended_Init_EventHandlers {
    class Steve_Sic_Tank_V_Base {
        class Steve_30k_Tanks_EH {
            init = "_this call Steve_30k_Tanks_fnc_addTankFiredEH;";
        };
    };
};```




Sqf file:

```params ["_vehicle"];

_vehicle addEventHandler ["Fired", {
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_mag", "_projectile"];

    if (_weapon == "Steve_N_Laser_Core") then {
        deleteVehicle _projectile;

        [_unit] spawn {
            params ["_unit"];

            sleep 5.2;

            private _muzzleMemPoint = "V_M_G_Beg";
            private _dirMemPoint = "V_M_G_End";

            private _muzzlePos = _unit modelToWorld (_unit selectionPosition _muzzleMemPoint);
            private _dirPos = _unit modelToWorld (_unit selectionPosition _dirMemPoint);

            private _dirVec = _dirPos vectorDiff _muzzlePos;
            private _speed = 500;
            private _velocity = _dirVec vectorMultiply _speed;

            private _shell = createVehicle ["Steve_NL_Sic_Rnd", _muzzlePos, [], 0, "CAN_COLLIDE"];

            _shell setVectorDirAndUp [
                vectorNormalized _dirVec,
                [0, 0, 1] vectorCrossProduct (vectorNormalized _dirVec)
            ];
            _shell setVelocity _velocity;
        };
    };
}];

cosmic lichen
#

Looks ok. But the spawn is ugly. How often will that function be triggered?

spice vigil
granite sky
#

Might be multiplicative with nearby player count.

#

In which case you'd want a local check in the event handler.

#

The Fired EH triggers for the server plus any client machine within visible/audible distance of the shot.

spice vigil
granite sky
#

actually maybe isServer is better.

#

Not sure if Fired is guaranteed to work just because the object is local. Camera might be miles away.

spice vigil
#

what would that line look like? Don't have that on my list.

granite sky
#

if (!isServer) exitWith {};

#

but that one you can do before installing the event handler.

spice vigil
#

cool cool, thanks for information.

daring geyser
#

Hello to everyone! One little question. When a vehicle (RHS M109 for example) gets into water, engine indicator goes semitransparent. After that I can't get it back to work. That is what getAllHitPointsDamage shows:
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] I have no Idea how to fix the engine. Even if a vehicle is outside a water. Maybe someone know?

trim tree
#

hi, does anybody know if it is possible to change the ace addon setting for night vision called "NVG Noise Scale" through scripts while the mission is running?

#

I want to have an EMP style event happen where the nvgs of the players all get fried and this effect would really suit it

#

but i didnt find any function that would talk to it in my search

tough abyss
#

You can't.

lunar lichen
#

from what i know, once its dead.. its dead

daring geyser
#

It's sad. Because vehicle itself is not dead

zealous arrow
#

((vehicle player) setDamage 0); from debug would be the fastest if you're in it

#

cursorTarget setDamage 0; if outside

daring geyser
#

It's not working in this situation

lunar lichen
#

that wont work if the veh is truely dead

zealous arrow
#

'It's sad. Because vehicle itself is not dead'

#

quote πŸ˜›

daring geyser
#

But it's not actually dead

fleet sand
trim tree
#

ty will give it a try tomorrow or so!

zealous arrow
#

you could use <object> setHitPointDamage ["HitEngine", 0];

tough abyss
#

Why do you keep discussing this? It was already established that you can't.

tulip ridge
tulip ridge
zealous arrow
#

You can repair individual hit points of a vehicle providing it is not toally dead which is apparently the case

daring geyser
#

I don't know. @zealous arrow i've already tried all that things with hotpoints and parts

zealous arrow
#

Is this a a3 standard vehicle or a custom one?

daring geyser
#

Just check it by yourself befor suggesting πŸ˜ƒ

errant iron
#

and curiously it has the option to avoid persistence

tulip ridge
#

Yeah that'd be fine, ACE does it in a couple places as well

daring geyser
#

No matter where it comes - behaviour is the same

zealous arrow
#

Every suggestion I have provided will work, the first 2 will totally restore a vehicle to 0 damage, the last will restore only the engine

tough abyss
#

Dude

daring geyser
#

Just check it before mate

zealous arrow
#

Is this the case over multiple situatuions?

daring geyser
#

What you mean?

zealous arrow
#

Does this happen over different missions/situations?

#

Or is it specific to this one situation?

daring geyser
#

Sure. It happens again and again πŸ˜ƒ When you get into the water and your engine turnes off - say goodbye to that vehicle and forget about _veh setDamage 0

#

Asking about it here i just wanted to confirm this issue as impossible to resolve

brittle badge
#

So, I will now raise the question for the 6th or 7th time here: can someone finally help me? It can't be that difficult to fix a simple 'remote exec call 0'. Overall, I've done that. BUT I still keep getting the 'battleeyekick #13'. It is related to remote exec, but I just don't see the mistake and I don't know how to proceed. Since JANUARY! I have been trying to finally bring this script to a conclusion and have already asked for help here multiple times. Still, so far, no one has taken the time to help, which I find unfortunate. After all, this script serves ALL players for public Zeus!

Basically to explain it to you, the following is the case in this script:

  1. The Zeus places a stored helipad composition with this stored code inside.

  2. After placing the helipad, it deletes itself and a menu for the Zeus appears. In this menu, the Zeus can then enable or disable the script (night vision script) for players.

  3. After enabling, the standard Arma night vision changes to blue (arctic) instead of vanilla green for each player.

  4. After enable, each player gets a LOCAL menu that they can open with H (those who put the weapon away on H due to Core shouldn't complain, just change your damn key in Core and be done with it). In this menu, you will find 8 different night vision options (filters). Modern Warfare, Toxic Green, ArmA 3 Vanilla, etc., something for everyone. After clicking on the respective button, the effect is applied and becomes the standard night vision filter.

  5. When a player joins the server for the first time, they receive the Arctic night vision and the H-Menu (local player menu) if the script has been automatically activated.

  6. In the menu, there are buttons for later purposes with ON/OFF that do not have any value yet and are only decorative until the script works fully and I can focus on a real thermal vision from UV-IR. BUT FOR THAT, THIS DAMN SCRIPT NEEDS TO FINALLY WORK!. I haven't made any progress for 6 MONTHS and I'm just annoyed.

#

so much for that. what the script does and how it works.
I have simplified an original code here (which is UNACCEPTABLE for battleeye)
|->https://pastebin.com/LDfJUFC9<-|

and

a code that should actually now be battleye confirmed,
|->https://pastebin.com/3pxXzRQQ<-|

but for some reason it is not! I always get kicked from the game as soon as I place the helipad on official servers with the reason "Battleeyekick #13 Remote Exec..." something.-> I urgently need to solve this problem.

hallow mortar
#

It's not a mistake. It's a security restriction on the server.

#

The server is configured to block some or all commands from being remoteExec'd.

brittle badge
brittle badge
lunar lichen
#

welcome to arma

daring geyser
#

πŸ˜„

tidal idol
#

Can anyone help me figure out why my if/exitwith is throwing an error? Debug says error is immediately before exitWith, Type Array, Expected Code

wait shit i think its a bracket error

warm hedge
#

exitWith cannot have else indeed

tidal idol
#

welp that slightly complicates things thanks. Guess an else isn't technically necessary with exitwith lol

zealous arrow
#

Hitpoint does get fixed but you are correct in saying it is un-usable, IIRC this doesn't happen in ArmA 2? Likely why I'm getting confused, should check the feedback/bug tracker

brittle badge
granite sky
#

The whole point is to prevent you running arbitrary code on the server and it looks like you want to run arbitrary code on the server?

lunar lichen
#

this has been an issue long assed time

idle moss
idle moss
#

@brittle badge didn't get u

hallow mortar
brittle badge
#

u can use any outputs like joysticks

#

and set teh sensitiv high asf

idle moss
#

then how do I get the recordings or the pov from the turret or nato?

hallow mortar
idle moss
#

bro I'm new to this thing

brittle badge
idle moss
#

that's why I'm asking

brittle badge
#

if u have quastions im one of the best pilots in arma 3. (*hrem BlackWasb)

thin fox
#

god damn, don't crosspost stuff man

hallow mortar
# idle moss bro I'm new to this thing

Well, it's a multiplayer game. One player flies the plane, one player controls the anti-air vehicle (could be AI but probably a player for safety), one player controls the camera.
There are ways to do this solo via scripting, but it's way easier to just grab a couple of friends and film it that way.

#

If you are completely new to this, then I wouldn't recommend trying to recreate this with scripting as your first project. Controlling AI behaviour, especially fine control of aircraft, is tricky even for experienced scripters.

idle moss
#

bro scripting isn't a big thing but there aren't any documentation available online

idle moss
#

just a basic but other languages gave a proper information regarding every syntax

tulip ridge
#

That's what the wiki page for each command is for

brittle badge
# idle moss that's why I'm asking

go in editor, place a unit (solider), place a game master modul, set the varibale name to z1 by the unit, go in the game master modul and type by owner z1. click on forced interface, right klick on the game master modul and go to synchronized and swipe it on the unit. now press play in singleplayer. u start in a zeus menu whats a life time editior wehre u can playce stuff lifetime and let tham fight aso..

idle moss
#

I was wondering how do even make these things this good

brittle badge
#

if u want to make it lifetime with u as cameraman than do it so

idle moss
#

what?

brittle badge
#

place a cheetah and a shikra in teh air

hallow mortar
idle moss
#

I really can't understand what he's tryna say

idle moss
hallow mortar
idle moss
#

okay

#

thanks for the info

brittle badge
idle moss
#

did he create a server or smth?

brittle badge
idle moss
#

qhh

#

I was wondering if u guys kno which camera mod he used?

brittle badge
#

u can be player and camera man on the same time. u let capture OBS studio 1 window wehre the camera is and the 2nd window u fly as pilot.

#

all is showed up in the video

idle moss
#

i saw that

#

but see he's zooming in and moving the screen also

brittle badge
#

u can move in editor with camera. (WASDQE)

#

or QY

hallow mortar
#

Difficult to do that at the same time as flying, though.

brittle badge
#

what ever ur keybind is

hallow mortar
#

That's why this is almost certainly multiple players.

idle moss
#

yeah

#

the defense is easy

#

like a very simple script

#

but I need to control the accuracy to be lessen like in the video

brittle badge
#

gnm8

hallow mortar
#

It is possible to script cinematic cameras (camCreate etc) but the tracking and zooming etc is probably done manually in this case, because doing it with scripting and lining it up with the aircraft would be a pain. You don't need a mod for that; the game comes with a camera mode, the Splendid Camera, which can be accessed from the ESC menu (if you're the admin)

brittle badge
hallow mortar
idle moss
#

okay

#

I'll recreate then

#

nvm bye ill let u guys kno

#

if I have any problem

hallow mortar
jade abyss
#

@zealous arrow wich hitpoint do you mean?

nocturne bear
#

Is there any easy way to turn a unit into an agent? Google is giving me weird results

#

Like a code line for the init of a placed unit in editor that turns them into an agent on start?

#

Without using extrernal files or codes?

zealous arrow
#

engine

#

setDamage in theory restores all HP's to 0

#

Or we'd hope πŸ˜›

jade abyss
#

Why not setHitpointdamage?

#

Execute it on the user who is local to the Veh and it works smoothly

zealous arrow
#

I did suggest that too πŸ˜›

fallen locust
#

"When a vehicle (RHS M109 for example) gets into water, engine indicator goes semitransparent."
I would bet its a variable set on a vehicle πŸ˜› @daring geyser

zealous arrow
#

^