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
#arma3_scripting
1 messages Β· Page 192 of 1
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 π₯Ή
test it using the debug console first. from what I see it should work
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
Ahhh
transition is the transition time
I need to really start digging into the function viewer, thank you π
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);
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?
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)
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
this function is highly unoptimized tho
actually nvm
it's leagues more optimized than what I've been doing
well yeah but it's not great
At one point I was up to 300+ triggers for music alone
_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 
@crystal ore Very off-topic but could you send me that peepo love emote you used earlier in a DM? I wanna poach it 
Haha even if you just send the emote itself I can rip it

Perfect cheers haha sorry for interrupting productive conversation.
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?
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
I know the locality.
My question was exactly about that:
then the server "forwards" your message to the final target(s)```
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?
For things like remoteExec yes they go to the server. A client only knows whats local to its own machine, which you can check with the local command
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.
I believe that it goes to server and then forwards it to all clients yes
It seems to be the best implem, as for security topics too.
"Security" doesn't mean much in Arma
If someone can run code, they can do whatever
all traffic always goes thru the server. only in p2p networks can clients communicate with each other directly
well there are others but you know what I mean
ya.
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 -
- 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.
- 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?
- 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.
Definitely an #arma3_config question. But I think the answer is "do not try to do that".
I will repost there...
How I can setmarkeralpha all markers inside a specific layer?
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.
nah, trying to max out the number of corpses I can have in cities
Issue with corpses (once ragdoll is done) is usually the rendering, IIRC.
Like corpses have a similar rendering cost to live units.
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)
Turn off battle eye, and start two instances of the game. Connect one to the host while host is on play multiplayer in the editor.
You can repeat for however many clients you want.
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.
it has workt thank u!!
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.
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)
lineIntersectsSurfaces with GEOM/PHYSX maybe.
Expensive though. Might be better off checking bounding box height for your purpose.
curiously the tent floors and helipads' bounding boxes both have a height of ~10m, way taller than my concrete barriers on top of them...
try boundingBoxReal [_obj, "Geometry"]
ooh, returns 0 for both and is really fast, 0.0007ms
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)
you can either
A) script setweaponreloadingtime perframe
B) modify the ui and 'replace' the loading bar with your scripted one
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
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;
yes but the extra part is the foreach , which seems to be ignored
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
but should give you error message though
The syntax is correct, it's just ignored
yeah
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.
is it a special one or does it look like this one?
if the latter, see https://community.bistudio.com/wiki/Arma_3:_ORBAT_Viewer
is this exactly the script to build this orbat (TF aegis) ?
No.
nothing is ignored. the game does this:
(FOR do CODE) forEach ARRAY
right now your code returns nil and thus it fails silently.
now if your code returned a code, it would do the forEach too:
_ar = [0,1,2];
for "_i" from 0 to (count _ar - 1) do
{
systemchat format ["i %1",_i];
{systemChat str _x}
} foreach _ar;
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) π
SQF syntax is pretty much nothing but math expression
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.
well im bad at math too lol
I mean like a+b, -a and a = 1
now substitute those +- with a word and you have SQF π
a+b -> unit addAction action
-a -> alive player
yea i get your point now
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.
in hindsight btw, I would have preferred forEach _array do {} to {} forEach _array
...yes
for readability and not "wait where is that code block coming from" π
Dedmen plz fix
of course, even do is a binary command.
or array forEachDo code
eventually (and better for performance I know)
well yeah but this also requires a new data type (thus harder to implement)
like FOR
I guess even just forEach is good 
well with this level of flexibility that SQF has you might just be able to figure your own new syntaxes jk π
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?
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. 
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;
do you see it with syntax highlight? ^^
Error number line?
There is no camCommit1ed command.
xD
I use this command on my last mission without anyproblem
Oh comited is correct
get ride of the number there lol
t1ed
the⦠erm⦠the 1 key is next to the T on the cambodian keyboard?
I know, sometimes happens to me too, losing time finding out that I put a wrong letter in variable
Camcommitted is correct
this may help you m8 this is my Intro.sqf
I would just recommend to invert if:
if (!hasInterface) exitWith { };
camCommitted
camCommitted
camCommitted
https://community.bistudio.com/wiki/camCommitted
-# camCommitted
"Revolver Ocelot" π
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?
That's the custom info UI. You can look at how some other mods do a pip view, like ctab.
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:
- The camera is looking at something else entirely for him
- 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];
- camSetTarget
- Unrelated issue for script but model
-
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
camSetTargetor is there a clever way to utilizecamSetTargetin this scenario? -
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?
- You can attachTo the camera to the desired bone of the drone in this context
Prefix your global variables
Wdym
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_
(This advice is not about this code, but general good-to-have habit)
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
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.
How difficult would this be to script as a landing sequence?
I made a quick render just so showcase
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?
//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);
};
}];
depends on your skills. relatively easy if you're familiar with vector math
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
Oh awesome, Thank you
@vital nimbus you bet my brother
Pretty easy if you understand/ lean setvelocity trans and attachto/ disablesimulation
Though the animation on the ship docking would be pretty annoying in model.cfg
what about https://community.bistudio.com/wiki/BIS_fnc_unitCapture for the landing sequence?
AFAIK would only work for a mission and would be hard to line up possible just not for a mod
ok
After seeing it here I played around with it. Works like a charm for what i tried it but does anyone know how the varDone parameter of BIS_fnc_unitPlay is supposed to work?
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!";```
~~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 
Is that how the carrier landing works?
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
What objects are you creating?
Sounds via the say3D command
I'm retrieving them via allMissionObjects "#soundsonvehicle" but that only returns my sound, nobody else's
say3D takes an object. What object are you using?
a vehicle (Offroad), is it best to create an invisible object and delete that instead?
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.
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
Do you specifically want to kill all of them at the same time? Not the one attached to a specific vehicle?
Yeah just the one strapped to the specific vehicle, the drivers of which have an action to turn it off
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.
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
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?
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
Using ACE actions so unless I can wrap a function within a function I'll precompile it and run it from that statement
// 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];
?
You don't have to create a function for an interaction's statement
class YourPrefix_whateverAction {
statement = "[_target, 'someSound'] call YourPrefix_fnc_playSound";
};
Or skip a layer and dump the function contents in there.
It's never great writing code in config files though.
True, just testing it now
Seems to work locally, I'll find out in 30 mins if it works on the server π
Cheers lads
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.
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?
but if you want to spawn a script on each vehicle checking its states, this will propably have a great impact on performance
No but you likely cannot follow how the carrier does it due to how you are landing it
Iirc the carrier uses vector math for the launch system behind the functions and a geo lod for everything else
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?
There is not
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?
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
https://pastebin.com/CR5h0FfL - client aspect
https://pastebin.com/3keEbbYc - server aspect
obviously not exactly what hes looking for, but you could modify it to do your own custom damage handling when dealing with munitions that have submunitions
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
Caution: in the next Arma update, due in the next week or 3, rockets and missiles will start being affected by their arming distances, and they will start doing kinetic damage when they hit without being armed. You might want to wait and see how this change behaves before you start working on this.
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
Use Zeus Enhanced.
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.
Thank you
Activation: any player
Condition: this && player in thisList
Play music code in on activation field.
This should do it.
I accidentally sat through an 8 hour lecture on vector math once and all I remember is that itβs really difficult
2D vector math is easy but 3D not so much
Make it so people drop like a rock when my vehicle crew pumps them with 30mm within the arming range
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
All you need to know in arma is vector is line ask in this channel for help modifying it
For now, you can add a force to the character when hit and add some custom damage.
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 ?
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.
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 ?
Well, you could do that. Or you could use spawn to create a scheduled context for your code.
ill look into this then, thank you
additional question, can i make the text linger for longer when using the BIS_fnc_Info text
No, but you could try one of the other similar functions, like BIS_fnc_dynamicText or BIS_fnc_EXP_camp_SITREP
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?
It's fucked, restart the server?
having trouble finding documentation on it, I assume LSTRING() is a CBA macro for something?
Yes, it's for stringstables
@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
Could try a suppressed event handler?
Definitely triggers on players, and AI too I think
how to know that the bot wanted to shoot with gp and will shoot?
I need to determine if the rifle is currently in GL mode
maybe currentWeaponMode or weaponState player select 2
weaponstate might be better and checking the current magazine to be sure its shotShell (grenade)
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
not ideal (for mods), but it should work with https://community.bistudio.com/wiki/BIS_fnc_itemType
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"};
"GL_3GL_F" call BIS_fnc_itemType doesnt return anything tho
weird, is it a weapon class?
_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.";
};
yeah, it works like that
Just check if it's isKindOf ["UGL_F", configFile >> "CfgWeapons"]
You can't
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)
unless the GL is part of the weapon then i dont know
// 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
Tested it real quick and seems to work, even with RHS weapons.
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
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 
That doesn't address their issue, which they said they've already solved anyway.
oh ok thx man
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;```
!code
How to use SQF syntax highlighting in Discord
```sqf
// your code here
hint "good!";
```
β
// your code here
hint "good!";
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.
how can I tell if my gun is in muzzle mode?
view the upper right corner
currentMuzzle?
(or weaponState if you want more details)
thanks
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 
it is defined per faction iirc
seek in the config, then you can get the array and selectRandom on it
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.
hmm, i only found CfgFactionClasses and that didn't seem to have any info beyond their display name, flag, and side
see what NikkoJT wrote above - seek identityTypes
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
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
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;
What are you expecting it to do?
I'm expecting it to disable the group's mine detection. It works for groups placed in the editor, but not on spawned groups.
Any locality differences?
It's single player, and it is all in the same script.
The groups are the same side too?
Probably the same as faces
You set identityTypes in the voice's config which adds that voice to the given "pools", and then you specify a pool in the unit's config
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.
I guess that's it, they are on the same side, using it on a different side seems to work.
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
@cunning crane you can try https://steamcommunity.com/sharedfiles/filedetails/?id=501966277&searchtext=deamons+and+zombies
juts mind its not compatible with ACE
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?
Vanilla or ace
Ace is easy, idk about vanilla
@fallen crow yes, and was discussed before with script example ...
I wish the forum worked ...
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;
thanks guys you are a rockstar π
I must assume that I should paste the script into initPlayerLocal.sqf in the mission folder or should I paste it in the init.sqf of the mission folder or where should I paste it?
initPlayerLocal, running that on the server wouldn't do anything
Dude thank you so much ππΌ Iβll def give that one a go and play around with it. Do you know any that are Ace compatible? One of the mods Iβm running for the server has Ace as a dependency so I have to use it there, though I do have some Ace features disabled like stamina, vehicle ammo cook off, etc
how to open the script?
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
@cunning crane alas its not, but otherwise is very good zombie mod, with different kind of zombies
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
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```
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.
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
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?
{[_x] excecVM ....} forEach [vehicle1, vehicle1, ...]
Provided your script takes an object.
This is not best practice but gets the job done.
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
But that's something different entirely.
yes yes i know
And if you dig enough there was a big discussion I had in here about why that was ill advised
he useing Ace right ?
What exactly?
yeah what is ill advised
Don't remember...was years ago. Performance related I think?
It's a onetime thing at mission start so not a big deal.
well i only have 1 Ammo box with that in the init so there no Performance lost
Ours has the addaction and call all inside the whitelist script which is executed in initplayerlocal
if you really want to know the best way, open up the END_Game mission and have a look there @brazen smelt
But anyway I'll try that out in the morning.
that END_GAME Mission will show you alot
Ill look at it in the morning then
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
you can either do what r3vo said, or take the array as an argument like that and put forEach loop inside your script to iterate each one of those objects
This was probably just about it being a bit better to use a function rather than to execVM a "naked" script file. Using a function means it's compiled once at the start, while execVM compiles every time you use it. Functions are generally faster and more convenient to use.
However, for a one-time event during mission loading, the difference is fairly minor.
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.
not tested....just found it (Rel Date 2020) :
https://steamcommunity.com/sharedfiles/filedetails/?id=1606871585
- Okt. 2024 - 4:24
"The recent ACE update has heavily modified the medic part. Now with this mod, players and other AI soldiers can still survive when been hit multiple times by a big crowed of zombies"
Won't work anymore
I wrote how to make it work here -> #arma3_scripting message
Anyone know a small script to apply to a vehicle for spawn them already destroyed without the big explosion ?
setDamage
Well, the array version.
_vehicle setDamage [1, false] Actually works these days.
It used to kill stuff nearby still.
Thank you guys, will check it out ! π
Only tested on profiling branch though, but I think it was already fixed for 2.18.
Definitly working!! Thx you π
can the lamps be made brighter to illuminate bigger area?
set object scale
i tried that out of curiosity and it actually causes less light because the lamp is further from the surface
You can script a light that goes further
how?
ah i see, thx! i guess those commands only work with the light object
does bigger light mean more lag though?
no. only number of lights matter
_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
ok thx everyone
im thinking of making my own lamp object, is it possible to make that brighter than vanilla lights?
no
really, its hardcoded or what?
scotty im talking about new lamps now
you can change its parameters, but it's still "vanilla"
new lamps ?
editor objects
oh i see
i dont get it, not possible to create brighter lamp/light?
i think you can
ok thx!
yea got bigger light now, by raising intensity value. but dont know if im doing it the right way
I believe https://community.bistudio.com/wiki/setLightAttenuation is what ur looking for
that maybe it (Attenuation class) but still trying to figure the proper values. thx
Howdy, would anyone be willing to give me a hand with Arma Life scripting stuff?
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 ;
β¦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.
Ah, fair enough
clearUniformCargoGlobal and addUniformCargoGlobal are commands that do not exist
remove the first one, replace the second one with addItemCargoGlobal, you should be good
Thank you so much!
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
its only gonna keep getting worse. i swear we see more chat jippity stuff here every day
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;
Joo mate
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... "
What is the exact goal here? How this script is not achieving it?
I'm trying to figure out what you are asking. If the server has remoteexec locked down, then you are out of luck and need to find one that allows it for your public Zeus script.
setup a set of teleporters, each with actions to teleport to all the others, passing the variable name for each object that I want to be a teleporter, and the name to show for that teleporter in the action.
It seems to work fine but I wasn't sure if there was a better way to do any of what I'm doing
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
If you use modules enhanced, this is done with the register teleporter module. If you want to do something similar, feel free to look at the code behind.
I still don't know what you're asking. Your English is difficult to understand.
When you say confirm, do you mean allowed by battleye?
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........
Pictures: https://steamcommunity.com/sharedfiles/filedetails/?id=3472082945 if u don't understand what I mean
Do you have more info on 19, 35, and 39? What other info do those kicks give?
They just say Battleeye Kick #19 ur not allowed to enter the server 120 seconds again
You replied to wrong person.
Sure, there would be a better solution (performance wise or feature/functionality wise) but I surely won't advice it in this context. Because you do not really have a clear vision of the better script, so we don't, and you said (implied) your script is working fine already, so it is hard to tell what to do
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.
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:
- create a wrapper function that executes code on newly spawned tracker groups.
- 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:
The action names are in CfgActions GearOpen OpenBag
Thank you! I didnβt even know there was a specific PF discord. Gonna try this out and check out that discord later today
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.
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.
Thank you so much dude ππΌ much appreciated!
Strange. The local-only parameter defaults to false, and I haven't touched it. Still doesn't seem to play the sound on my other machine. For reference, I've formatted my command like this: "playSound3D [getMissionPath "sounds\test.ogg", player];". To clarify, the sound does play on my machine.
Hello. Is it possible that an external script change a _local variable? o.O
Yes, for example, if local var isn't private.
interesting...
It depends, mostly because of scope stuff
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?
Yes
Correct. To prevent this, you should use private/privateAll inside your funcs.
Yeah, just always private everything by default
Okay, thanks, now I understand the importance of private
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
Also just use the keyword, not the array (e.g. private _foo = "bar"). It doesn't have much of a performance cost while the array version does
hmmm interesting
yes I tend to do like this, the array version confuses me
problem solved, that was it
I wonder why that is
Array version obviously has to make an array for one reason
Dedmen explaining when I asked about it
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
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
That's a #arma3_config question, since you would need to create a new magazine for the handheld mg42.
You can technically use some handheld mags for vehicles but it can have some issues I think?
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
AI as in soldier or turret (vehicle)? Former impossible, latter lockCameraTo
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.
hello m8s: can we sleep; inside a addMissionEventHandler
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
};
}];
hmmm ok thx m8
@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
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;
addScoreSide should be executed on server side.
remoteExec ... got it, thanks @faint burrow
PS: works well with
[west, -2] remoteExec ["addScoreSide", 2];
has anyone got problems using startLoadingScreen? it seems sometimes the loading screen wont change to my custom screen. and no loading screen appears
Could you share your code
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)
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?
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
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
How are you setting the arm patches?
"All projectiles" is a stretch. The best you could do is check every frame with allObjects (fast objects, probably) and inAreaArray.
In the attributes. I also tried the init for setting insignia, nothing works
Yeah thats really all I want, not all projectiles but anything missile or shell base
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??
They definitely work in multiplayer, I'm guessing you have some other issue
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 π
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?
Then I have no idea what the matter could be and it's really frustrating
Not yet and I'm currently at work
I'd try with vanilla and see if the issue occurs
If it does work, then try loading mods until it breaks
That's gonna be a hell of a lot of restarts innit
or is there an easier way to find this out
Load half the mods. If it works, load half of the rest. If it doesn't, unload half of what's left.
can't get any more clr then that
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.
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
if what you want is not already in Multiplayer options, you'll have to script it
yea
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
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
what did you use in MP options?
what options? "respawn in custom position" ?
yeah I mean MP respawn options
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
idk which BIS fnc controls the selected spawn pos. maybe try looking at some of those like BIS_fnc_respawnMenuPosition
ok thx
I think in these cases it's best to just script the respawn using the BIS function, cuz you can target specific entities
well im just doing some moveout and setposATL "to fix this"
@tough abyss effect is global, for everyone
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
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.
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?
It's unique for commands
It would make more sense if the allowed features were just synced. Rather than everything being local
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
You're not including your pboprefix in your path to your function
i wanna put a video in the back of the menu of arma with my mod but that doing this
can you come vocal pls ?
No, I'm at work
This is a pretty simple issue though
with arma tool " addon builder"
Can you show your settings when packing?
And in options?
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
so i have to do like that ?
just call the mod " FOICC"
If that's the name of the folder you're packing, yes
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;
};
};
};
};
now look
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
okay im posting that there
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 ?
Post the code and config.
me ?
Do you know where that setting is under? I might have to tinker with that
Since ACE has like a gazillion addon settings in the menu
It only affects actual vehicles, it's under ACE Vehicles though
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
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.
you have some syntax errors in your code. it should be something like: ```sqf
TFG_TicketAdd = { [west, 1] call BIS_fnc_respawnTickets; }; // This should be in some sqf file
this in some createDiaryRecord:```
"<execute expression='call TFG_TicketAdd'>Add a Ticket</execute>";
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!
Depends on what you're wanting to include. If you just want a lot of the basic macros (GVAR, FUNC, etc) you'd just:
#include "\z\ace\addons\main\script_macros.hpp"
Though those macros do expect some other stuff to be defined, which you can find here:
https://github.com/acemod/ACE3/blob/master/addons/main/script_mod.hpp
I see, as of now I only need the PATH macros
wait I might be stupid
those are CBA
whoops
oh, and where should I put the CBA source?
See here https://github.com/acemod/ACE3/tree/master/include
Consider using hemtt to build and this template https://github.com/TACHarsis/hemtt-mod-template/
that makes a whole lot of sense
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
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.
Oh yeah, I did read something about filepatching
will do
wait, it does not work
like
it compiles
but QPATHTOEF and ect. give the wrong path
Without content hard to say why
like, without the actual output?
if so, how could I get hemtt to output what it actually is?
if needed I can send a github repo
Those macros assume you are using a "main prefix", e.g. your pbo prefixes are like z\yourPrefix\addons\addonName
Would help
I do have a main prefix
ight gimme a sec
Ah i see
You're not defining the prefix macro before including the cba ones
https://github.com/Goaty1208/AComS/blob/dev/addons/main/config.cpp#L1
So I need to define them before including them?
Yes
For example here in my own template, I have some script_component and script_mod files that define that stuff
https://github.com/DartsArmaMods/ModTemplate/tree/main/addons/main
Then other addons just define their component macro, and then include the script mod / script macros from the main addon
https://github.com/DartsArmaMods/ModTemplate/blob/main/addons/common/script_component.hpp
I see
uhhh
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
Ace discord also has a dedicated hemtt channel btw, that's where pings for new updates are put out
Oh I see, thanks for the info!
Could someone confirm some network questions regarding enableSimulation for me?
- 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.
- Is this still true or was this only true prior to the creation of
enableSimulationGlobal? - What exactly do these network updates contain or what did they previously contain?
- Even with the command
enableSimulationbeing local, is there any aspect where network is still used?
In ace how do I whitelist specific items from certain categories while keeping other catagories untouched?
You can just remove the items, an item will only ever be in one category
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
Just do whichever is easiest, whitelist or blacklist
See the scripting examples here:
https://ace3.acemod.org/wiki/framework/arsenal-framework.html
(If you want it to affect all arsenals at least)
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 :./
It's really not
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
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
That mod has a broken model.cfg, the mod author needs to fix it
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
Uh, no-one really knows unless they have the source code. But the principle would be that moving objects will be sending position/velocity etc network updates from the machine where they're local. If their simulation is disabled then code may assume that they're not moving.
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.
Yea, almost wanted to tag Dedmen on it but pretty sure he doesn't like
so just hoping he answers haha 
π¨ dedmen π¨
- yes
- position, movement, fuel, etc. (depends on the object) the game computes an "error" based on changes and sends a network message if the error exceeds a threshold.
- I don't understand. enableSimulation is just a flag. enableSimulationGlobal just sets the flag globally by sending a network message
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
Honestly read this question as "Why are you asking? It sounds like you're trying to do something very weird" :P
We just use it a lot and I just wanna make sure we are not introducing a lot of overhead from it :)
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;```
_array deleteAt (_array find _random)
Because +/- with arrays is slow, those create new arrays
hmmm, even if _array deleteAt (_array find _random)is using two commands
But it doesn't create a new array
yeah
This creates two new arrays, the one containing _random and the result of the -
of course, it makes sense
I was creating a false memory that "find" is a very slow command
Thank you.
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)
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?
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.
What am I doing wrong here?
wait
I think I see the issue now
I might very well be stupid
nice sqf moves there π
Where's QPATHTOEF defined? Can't find it.
I included it from CBA
but I am not actually using it for the function, come to think of it
Is your PBO prefix set up correctly?
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.
ah
uhh yeah it's my first time doing this so it may be a bit messy
soo what should I do?
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
I see
I think the prefix matches the CBA macro trash but I'm not staring at it too hard.
so a QPATHTOF would make make sense?
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"
alright
It's correct as it is
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.
Which is what they're including
https://github.com/Goaty1208/AComS/blob/dev/addons/main/script_macros.hpp#L6
so I did a thing right?
shrugs
that would be surprising haha
Yes
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
Well, after I'll have had dinner I'll fix the function path then
oh yeah right makes sense
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
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
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
Yeah, you are right, it's just that I had forgotten to change that
https://github.com/Goaty1208/AComS/blob/dev/addons/main/config.cpp#L8
version is also usually a number for CBA's versioning system. There's a couple related properties for it:
https://github.com/CBATeam/CBA_A3/blob/master/addons/main/script_macros_common.hpp#L66
I see
Usually each version number is set in a script_version file (https://github.com/DartsArmaMods/ModTemplate/blob/main/addons/main/script_version.hpp) and you can also configure hemtt to use that for version numbers as well https://github.com/DartsArmaMods/ModTemplate/blob/main/.hemtt/project.toml#L7
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
Β―_(γ)_/Β―
It's optional, if you don't really care about tracking versions than I wouldn't mess with it
I mean, looks like something reasonable to keep track of
ok wait I do actually have that header
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?
Thanks. Too bad.
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 (((
do it in notepad++? 
anyway, there's no command but you can write a function for it
Need only in sqf code...
just read it element by element and add to a string
pretty sure you can just string the array
he wants to indent it and separate by lines tho
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";
};
that's preformatted manually
You must string the array in order to copyToClipboard it anyway
I find how do this
copyToClipboard (format ["[%2%3%2%1%3]",_veh joinString toString [44,10,9],tostring [9],tostring [10]]);
Is there a mod that adds medals?
Anyone know the locality of Attached & Detached events yet? The biki doesn't.
i wanna create a faction for my mod but there is a probleme
Forgot to say thank you, this pointed me in the right direction and gave me an even better idea π
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.
#arma3_gui message
Done the same topic earlier
Oh okay, I should post it in gui. I was confused where I should post this problems thank I'll take a look
Ah okay I'll check it out
Thank you
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
any way to play CfgSFXs entries without a trigger or having a corrosponding cfgVehicles entry?
I don't think so, the closest alternative is playSound3D command.
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
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
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!):
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
please tag me @brittle badge 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.
i have no idea where them flags are from, and also you forgot 1 flag
Montenegro, Germany, and Croatia
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?
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
you could try:
_sideNumber = getNumber(configfile >> "cfgvehicles" >> "vehicle_class" >> "side");
_vehSide = _sideNumber call bis_fnc_sideType;
hm
sup guys
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
try https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#EpeContact, never tested it myself
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 -.-
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
How are you trying to play the sound?
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";
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
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?
Only if you have "show file extensions" turned on in Windows Explorer
If you don't have extensions turned on, then it's still a .txt file. The .txt extension is just hidden.
maybe thats it lol
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.
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
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 π
did you also use private for time_remaming_mins? I assume you want time_remaining_mins though
kinda update i spent like 3 hrs googling this poop -.-
get rid of that spelling error
yeh lol, its all just spammed for drafting lol
no the time var is public and needs to be public
π
just gunna test pvt tho
If the text doesn't update, double check your ctrl id as your first step.
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
You are welcome
this place makes me uncomfortable
lol, to many people whos work ive studyed lol
i am not worthy
lol
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
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
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
@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?
Help: im looking for documentation for event handler that detects chat, global chat, side chat ect. Specifically detecting words within the chats.
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.
Post your code
I do remember the unit capture being a bit strange, if the fps was to low it would not record shooting.
Other similar issues.
does anyone know wjhy this isnt killing the targets , its just exploding and no damage is done
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;
hmm true
did you take a look into the functions viewer?
Iβm not familiar with that
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
are you using some kind of sci-fi mod? because I couldnt find "orbital cannon" in vanilla
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
i dont know what mod it is, but i did find it in the functions viewer now that im aware of it
I'm doing this rn for the moduleCas, and I got a real cool support CAS for the players to use it
cool, now time to study it, copy and paste it in your notepad, and check the parameters, see if you can call it yourself first, by executing the script itself
thank you!
if you don't understand what the code is doing, abuse the use of systemChat command
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;
};
};
}];
Looks ok. But the spawn is ugly. How often will that function be triggered?
It only triggers when the specific tank fires its main weapon, so not very often.
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.
Is this? if (!local _unit) exitWith {};
I don't do this often, try to stick to vanilla so wanna double check I add the correct stuff from my list.
actually maybe isServer is better.
Not sure if Fired is guaranteed to work just because the object is local. Camera might be miles away.
what would that line look like? Don't have that on my list.
if (!isServer) exitWith {};
but that one you can do before installing the event handler.
cool cool, thanks for information.
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?
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
You can't.
from what i know, once its dead.. its dead
It's sad. Because vehicle itself is not dead
((vehicle player) setDamage 0); from debug would be the fastest if you're in it
cursorTarget setDamage 0; if outside
It's not working in this situation
that wont work if the veh is truely dead
But it's not actually dead
I believe the variable name should be called like this:
ace_nightvision_noiseScaling
And you could just change it via setvariable:
player setVariable ["ace_nightvision_noiseScaling", 2, true];
ty will give it a try tomorrow or so!
you could use <object> setHitPointDamage ["HitEngine", 0];
Why do you keep discussing this? It was already established that you can't.
No, noiseScaling is a setting, not something saved to the unit
You can't (shouldn't), noiseScaling is a CBA setting which you shouldn't change the value of directly
You can repair individual hit points of a vehicle providing it is not toally dead which is apparently the case
I don't know. @zealous arrow i've already tried all that things with hotpoints and parts
Is this a a3 standard vehicle or a custom one?
Just check it by yourself befor suggesting π
just quickly glanced over CBA's functions, would CBA_fnc_settings_set be suitable for OP?
https://github.com/CBATeam/CBA_A3/blob/master/addons/settings/fnc_set.sqf
and curiously it has the option to avoid persistence
Yeah that'd be fine, ACE does it in a couple places as well
No matter where it comes - behaviour is the same
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
Dude
Just check it before mate
Is this the case over multiple situatuions?
What you mean?
Does this happen over different missions/situations?
Or is it specific to this one situation?
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
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:
-
The Zeus places a stored helipad composition with this stored code inside.
-
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.
-
After enabling, the standard Arma night vision changes to blue (arctic) instead of vanilla green for each player.
-
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.
-
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.
-
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.
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.
but what does the server differentiate between? there are so many scripts that run on remote exec etc. why not that?
this applies to ALL OTHERS as well. if ANYONE sees something that is wrong with the code regarding battleeye compliance, then please mark me with @ immediately and let me know. (if you have a solution, please let me know as well)
welcome to arma
π
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
exitWith cannot have else indeed
welp that slightly complicates things thanks. Guess an else isn't technically necessary with exitwith lol
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
@fair drum u wanna try it again? U helped in this one time and i changed a lot. By now, it's just a single remote exec call that I can't seem to fix properly. (at least I assume it's only one left)
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?
Do you mean me?
this has been an issue long assed time
https://youtube.com/shorts/9PK7pwIriyU?si=yYYP6E7vz88uFYpQ
can anyone tell me how he made the plane fly like that (stunts)
"This video was created using content of Bohemia Interactive a.s."
"Copyright Β© 2022 Bohemia Interactive a.s. All rights reserved."
"See www.bistudio.com for more information."
#sho...
?
just normal?
@brittle badge didn't get u
first off that's clearly not even an A-10, so you shouldn't trust anything that channel says. never mind that's just YouTube's title stuff being confusing
Secondly, I doubt there's any scripting involved. They probably just had a player flying the plane.
He flies quite normally with the Shikra. (DLC airplane) as far as I can see. But that's nothing compared to what I partially did back then. 5 Shikras against 1 Black Wasps at once.
u can use any outputs like joysticks
and set teh sensitiv high asf
then how do I get the recordings or the pov from the turret or nato?
A little something called "multiplayer"
bro I'm new to this thing
no problem
that's why I'm asking
if u have quastions im one of the best pilots in arma 3. (*hrem BlackWasb)
god damn, don't crosspost stuff man
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.
bro scripting isn't a big thing but there aren't any documentation available online
There is actually. https://community.bistudio.com/wiki/Introduction_to_Arma_Scripting
just a basic but other languages gave a proper information regarding every syntax
That's what the wiki page for each command is for
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..
I can confirm that 
I was wondering how do even make these things this good
i sayed u
if u want to make it lifetime with u as cameraman than do it so
what?
place a cheetah and a shikra in teh air
Near the top of that page I linked, in the Scripting Topics section, there's a table of links. At the moment they're probably all blue.
Once you've made them all purple you can start complaining about things being missing from the documentation :U
I really can't understand what he's tryna say
okay I'll it's 6 o'clock in the morning here
https://youtu.be/7RGv7UNriXs?si=0zu6v2ReRqJhIrld go to 03:08
Do whatever you want at your own pace.
Point is the information's out there. (But I'd still recommend using a simple project to learn it, not one that involves trying to get the AI to do precision flying.)
do u understand it with the video?
did he create a server or smth?
this is the editor.
. by -> 03:08 seconds this is what i sayed for u to to the same like in the video taht u postet
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
Difficult to do that at the same time as flying, though.
what ever ur keybind is
That's why this is almost certainly multiple players.
yeah
the defense is easy
like a very simple script
but I need to control the accuracy to be lessen like in the video
im gonna sleep. hope someone can help me in this if he bored.
gnm8
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)
u can also set a camera in zeus
Options:
- a simple (for a mod) config mod to increase the gun dispersion
- bruteforce use of
lockCameraToor similar commands to force an AI to miss - it's literally just a player. It's all players. One in the plane, one in the AA, one on the camera.
Come to think of it there's another option: using a fired event handler to change the velocity of the projectiles as they're fired
@zealous arrow wich hitpoint do you mean?
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?
Why not setHitpointdamage?
Execute it on the user who is local to the Veh and it works smoothly
I did suggest that too π
"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
^