#arma3_scripting

1 messages ยท Page 218 of 1

granite sky
#

Does the heli's engine stay running?

manic sigil
#

Yeah, its still spooled up amd ready to go, infact if it takes any fire at all itll take off and fly a littl ways away before coming to a hover.

Im away from my computer now, but that posted segment of code was an extract before the next two waypoints for exfil get added for the helicopters, gunship and non- alike, to follow, which work fine. If the errant 'Waypoint' is deleted the Mi-24 takes off and leaves.

Otherwise, everything works as well as I could hope for (okay, some oddity with units being added to the curator interface but im working on it); the only hiccup is the Loiter waypoint not operating correctly.

Ill give an interceding MOVE command a try first, since my alternative is a sleep 180 - and while I dont intend to use this more than once at a time, that still feels rough xD

pallid palm
#

Woohoo: What you waiting for Gi, Get Your Ass in here: ๐Ÿ™‚ thx Nikko ๐Ÿ™‚

#

sorry im having so much fun i can't help it

fleet sand
#

Quick question does anybody have a working garage system in arma 3 that they can share.
I need a option where i can save and load vehicles to it.
https://github.com/HakonRydland/A3-HR-Garage/tree/main
Something like this system would be perfect just the problem here the loading of saved vehicles is broken.
When you load from save it gets error at this location:

    A3-HR-Garage/HR_Garage/addons/Garage/Core/fn_reloadCategory.sqf
   //Line 34
    _y params ["_displayName", "_class", "_lockedUID", "_checkedOut", "", ["_lockName", ""]];
    private _index = _ctrl lbAdd _displayName;
    _ctrl lbSetData [_index, str _x];
    _ctrl lbSetValue [_index, _x];

expected number got array and i dont know how to fix this.

GitHub

This is my custom Garage and logistics system for Arma 3 - HakonRydland/A3-HR-Garage

thin fox
granite sky
#

@fleet sand You could try the version from Antistasi. Has a lot of bugfixes.

#

Hmm, load from save like vanilla save though?

fleet sand
granite sky
#

ah ok, fine

pallid palm
#

hello all again: Can we add a Killed EVH like this to a enemy group

#
_grp addEventHandler ["Killed",{
    [_this select 1, _this select 0] spawn EnemyDead;
}];
granite sky
#

Nope, only units.

pallid palm
#

ahhh darn ok

granite sky
#

oh wait

#

There is UnitKilled as a group EH though.

pallid palm
#

ahh cool ill have a look thx m8

#

ahh i see

granite sky
#

Parameters are different so you'll need to tweak.

pallid palm
#

yes sir thx you m8

hushed turtle
#

Can just add it in forEach

fleet sand
# granite sky <@263862165079851009> You could try the version from Antistasi. Has a lot of bug...

I was thinking of that just its gonna be pain to go trough each file and try to get rid of antistasi fncs that are intergraded.
Example like this:
```sqf
private _systemTime = systemTimeUTC;
if(_lockTime isEqualTo []) then {_lockTime = _systemTime;};
private _timeSpan = [_systemTime, _locktime] call A3A_fnc_systemTimeDurationToTimeSpan;
_tooltipText = format [localize "STR_HR_GRG_Feedback_LockedToolTip_Ago", _tooltipText,
[_timeSpan, 0,0,false,2] call A3A_fnc_timeSpan_format

In here: https://github.com/Antistasi-Ultimate-Community/A3-Antistasi-Ultimate/blob/unstable/A3A/addons/garage/Core/fn_reloadCategory.sqf
GitHub

Antistasi Ultimate - Discord https://discord.gg/antistasiultimate - Antistasi-Ultimate-Community/A3-Antistasi-Ultimate

granite sky
#

whoops

pallid palm
#

what was that again @hushed turtle was that to me ?

granite sky
#

Who put that in there :/

pallid palm
#

lol

granite sky
#

Unless you need the lock time functionality you can just delete that section.

#

In general there shouldn't be Antistasi calls in the APL-ND bits.

#

That one was clearly missed in review :P

hushed turtle
fleet sand
# granite sky That one was clearly missed in review :P

I know but this is another example where i would need to go trough each file:
there is a few files that are litterd with A3A fnc.

private _nodes = [HR_GRG_dispVehicle, _static] call A3A_Logistics_fnc_canLoad;
 if (_nodes isEqualType 0) exitWith {};
 (_nodes + [true]) call A3A_Logistics_fnc_load; //we know we can load it, just need the nodes from can load
 hintSilent ""; //clear load hint

https://github.com/Antistasi-Ultimate-Community/A3-Antistasi-Ultimate/blob/unstable/A3A/addons/garage/Core/fn_confirmPlacement.sqf

GitHub

Antistasi Ultimate - Discord https://discord.gg/antistasiultimate - Antistasi-Ultimate-Community/A3-Antistasi-Ultimate

granite sky
#

I think the garage requires logistics?

#

It uses it to put statics in vehicles.

pallid palm
#

@hushed turtle yeah i'm trying to add a Group Killed EVH to a group

hushed turtle
#

Groups don't get killed

#

Only deleted

#

But that happens later when group no longer has any members

#

If at all

pallid palm
#
_group addEventHandler ["UnitKilled", {
    params ["_group", "_unit", "_killer", "_instigator", "_useEffects"];

    // not sure what to put here
}];
hushed turtle
#

What are you trying to do?

pallid palm
#

well umm i have this function i made and for the enemydown part i need to add EVH to the group to be dead

#

so it can spawn the next part

hushed turtle
#

Do the spawn part when there are no alive group member remaning

old owl
# fleet sand Quick question does anybody have a working garage system in arma 3 that they can...

Not sure what your intended purpose is but there is an Altis Life framework built off the original one made by tonic that I'm pretty sure has one. Gonna be years more out of date then Antistasi but if it helps as a reference.

https://github.com/AsYetUntitled/Framework

GitHub

Altis Life RPG mission framework for Arma 3 originally made by @TAWTonic. - AsYetUntitled/Framework

pallid palm
#

ok i'll get it i may have to split the Function into 2 parts

#

or 2 functions

#

well thats the easy way anyway ๐Ÿ™‚

#

thx so much m8

#

i know im over thinking it but well you know ๐Ÿ™‚

#

im not sure what you ment when you said do the foreEach thing

hushed turtle
pallid palm
#

ahhh ok i see ๐Ÿ™‚ ok cool thx m8

old owl
# old owl Not sure what your intended purpose is but there is an Altis Life framework buil...

Also FWIW tho depending on what you're doing might also just be better off making your own. Our vehicle garage is actually the most sickening spaghetti code there is due to it just being old. Only thing you really need for a garage system is a hashmap like you mentioned and whatever you wanna have along with it and a UI that references the vehicle class config for it's icon and details.

If you do that tho my advice would be is to store the vehicle attributes as a hashmap or an array which can be made as such. Just so you don't have to deal with array hell whenever you wanna add a new feature or something later.

pallid palm
#

@hushed turtle how does this look is this ok m8

#
_grp addEventHandler ["UnitKilled", {
    params ["_group", "_unit", "_killer", "_instigator", "_useEffects"];

    if (({ alive _x } count units _group) == 0) then
    {
        0 spawn EnemyDead;
    };
}]; 
hushed turtle
#

Is EnemyDead global function? Then yeah

pallid palm
#

yes

#

ok cool

hushed turtle
#

And it's _group, not _grp

pallid palm
#

but the var name of my group is _grp

#

should i change that

hushed turtle
#

It's _group in EH code

pallid palm
#

oh i see

#

ok Awsome

#

i fixed it

#

see up there

#

ok now to test it woohoo ๐Ÿ™‚

#

oh hell yeah Woohoo thx so much Guys works great @hushed turtle @granite sky

drowsy geyser
#

i have an issue where when i createDisplay "RscDisplayEmpty" and add a button to that display then whenever i press anywhere, my button dosent get highlighted when i hover above it with the mouse cursor, is this known issue and how can i fix this?

proven charm
#

you cant click the button?

drowsy geyser
#

yes, and it doesn't get highlighted like blinking when you hover above it

proven charm
#

well make sure the button class is ok

drowsy geyser
#

this only happens when i click somewhere on the screen

proven charm
#

maybe your display looses focus dunno

drowsy geyser
#

is there something like a priority order?

little raptor
drowsy geyser
#

this solved my issue thanks

teal drum
#

How does one get all available 3DEN layers via SQF?

thin raven
#

Hey
Is anyone here by chance good at scripting in SQF? I'm very bad at scripting in general, and trying to fix one issue for around a week already. It's mission editing related. Would be great if someone could offer some help blobcloseenjoy

I'm trying to make A2/A2OA Warfare work with custom Map/Addons.
Fortuntaely there wasnt a single issue with making it work with custom map, even without predefined positions.
However, when im trying to make warfare use a custom faction, trying to fix it became a nightmare for me lol.

I'm Referring to "Warfare 1" Wiki on Bohemia but it seems to be outdated. If I'm correct, it just says to change classnames for each side and for each soldier but by doing it nothing changes.

In my mission folder I have

InitMission.sqf file which then goes to Init_Common.sqf

InitMission.sqf


BIS_WF_Common SetVariable ["customInitCommonScript","Common\Init\Init_Common.sqf"];    // Using a custom common script.
BIS_WF_Common SetVariable ["customInitServerScript",""];                // Using core server script (Must always be included even when no custom server script is used.)```


And in **Init_Common.sqf**

BIS_WF_Common SetVariable ["eastFactions",[Localize "85_SOV_Army_TuSG"]];            ||85_SOV_Army_TuSG is custom faction cfg im using||

BIS_WF_Common SetVariable ["EastHQIdentity","WFHQ_RU"];

ESOLDIER etc. I have addon classnames and it seems that they spawn normally, same as EREPAIRTRUCK etc.
I also have set eastDefaultWeapons and resistanceDefaultWeapons which work fine as well.

And at the end of Init_Common.sqf I have this script

[] Call Compile PreprocessFile "Common\Config\Config_Structures.sqf";

This file seem to work fine as well. Without any "Config_Barracks.sqf" it just defines standard Takistani soldiers and vehicles, but as soon as I add a Config_Barracks.sqf file ( even from vanilla missions ) it completely breaks and there is nothing in the buy tab.
thin raven
# thin raven Hey Is anyone here by chance good at scripting in SQF? I'm very bad at scripting...

My guess is that it lacks some definite script which would tell Arma to use the classes defined in Configs such as Config_Barracks/Config_LightFactory etc, but with my retardness and lack of general knowledge in scripting is nearly impossible ๐Ÿ™

I also tried looking about any info possible on BI forum and official Wiki and using Warfare missions given by BI itself for Arma, but it didn't work.

split ruin
#

going to a server just to download a mission, then trying to edit it and realize its rockets science meowfacepalm just join the server and have fun

thin raven
split ruin
#

in general when you just start with sqf open a complex mission and trying to understand/edit is the worst way to learn

#

better start small and gradually learn by doing simple missions first, sorry if this doesn't help you

#

guys here will help you but only if you understand what are they writing in sqf otherwise is pointless

grim yoke
#

Hey,
Maybe one of you has an idea.
I have a function ([] spawn max_phone_fnc_initPhone;) that is not being executed.
It doesn't matter whether I execute it on the server side or client side (in the initFiles).
But when I put it in the debug console, it executes immediately without any errors or problems.
There are no error logs for this file, only โ€œconsequential errorsโ€ that occur because this file was not executed.
It's the AltisLife Framework.

old owl
grim yoke
#

Hey ,
i just spawn it like in my message above.

I spawn it in a file that is execVM in the initPlayerLocal.sqf

so initPlayerLocal.sqf

#include "script_macros.hpp"
/*
    File: initPlayerLocal.sqf
    Description:
    Starts the initialization of the player.
*/
if (!hasInterface && !isServer) exitWith {
    [] call compile preprocessFileLineNumbers "\life_hc\initHC.sqf";
};

CONST(BIS_fnc_endMission,BIS_fnc_endMission);

[] execVM "core\init.sqf";
[] execVM "briefing.sqf";

and then
core\init.sqf

[...]
{
    _x params [["_chan",-1,[0]], ["_noText","false",[""]], ["_noVoice","false",[""]]];

    _noText = [false,true] select ((["false","true"] find toLower _noText) max 0);
    _noVoice = [false,true] select ((["false","true"] find toLower _noVoice) max 0);

    _chan enableChannel [!_noText, !_noVoice];

} forEach getArray (missionConfigFile >> "disableChannels");

if (life_HC_isActive) then {
    [player getVariable "userID", player getVariable ["realname", name player]] remoteExec ["HC_fnc_wantedProfUpdate", HC_Life];
} else {
    [player getVariable "userID", player getVariable ["realname", name player]] remoteExec ["life_fnc_wantedProfUpdate", RSERV];
};

[] call life_fnc_hudSetup;
[] call life_fnc_globeLoop;
[] spawn theprogrammer_core_fnc_clientInit;
[] spawn The_programmer_Duty_fnc_init_Service;
[] spawn max_phone_fnc_initPhone;

if !(profileNamespace getVariable ["license_civ_driver_removed",false]) then {
    license_civ_driver = false;
    profileNamespace setVariable ["license_civ_driver_removed",true];
    [2] call SOCK_fnc_updatePartial; saveProfileNamespace;
};

diag_log "----------------------------------------------------------------------------------------------------";
diag_log format ["               End of Altis Life Client Init :: Total Execution Time %1 seconds ",(diag_tickTime - _timeStamp)];
diag_log "----------------------------------------------------------------------------------------------------";
old owl
#

Without having more details really tough to say what the issue is. What my head goes to though is some variable is not set at the time you spawn the script. Could add this at the start of max_phone_fnc_initPhone to rule it out:

waitUntil {time > 60};
grim yoke
glossy pine
#

Machine network ID
A server always has an ID of 2, every new client has the next number (the first client will be number 3, second client number 4, etc.)

Is this correct on the wiki? I always get ID 4 when I connect first, there are no headless clients

granite sky
#

My recollection is that the first client gets 4. I wouldn't count on it though.

meager granite
#

That's true, server is 2, first client is 4

hushed turtle
errant jasper
#

isn't the leader the one changing the groups command?

hushed turtle
#

It fires when I order(through command menu) one of my unit to move example

#

But it seems like it's the leader yeah

#

_this in the EH is for example: [B Alpha 1-1,"MOVE"]

#

Looks like I don't need it anymore, but would like get position where unit is heading when executing order, like when ordered to move by his leader. I don't see any command, which would return that though

proven charm
lapis raven
#

In multiplayer, is there a distinction between the eventhandlers used for dying, and manually respawning?

proven charm
#

you want to know if player manually respawned?

lapis raven
#

in essence, yeah

#

The idea is to track that in some way

proven charm
lapis raven
#

Bugger, okay

proven charm
#

but with the help of people from here i made function to do this

lapis raven
#

Ooo!

proven charm
#
playerManualRespawnCheck =
{
 while { true } do
 {
  private _display = findDisplay 49;

  private _respawnButton = _display displayCtrl 1010;

  // Create the button event when display is created again
 if(!(_display getVariable ["respawnButtonSet",false])) then
{
  uinamespace setVariable ["escMenuDisplay",_display]; // Message box uses this display (the menu)

 _display setVariable ["respawnButtonSet",true];

_respawnButton ctrlAddEventHandler ["ButtonClick",
{

private _ctrlButtonOK =    (uinamespace getVariable "escMenuDisplay") displayctrl 235106;

[_ctrlButtonOK] spawn
{
params ["_ctrlButtonOK"];
sleep 0.01;

// If player clicked ok to make respawn
 _ctrlButtonOK ctrlAddEventHandler ["ButtonClick",
{
 player setvariable ["manualRespawn", true];

}];
};

}];

};
  sleep 0.1;
 };
};
``` something like that not fully tested so i hope it works
thin fox
lapis raven
#

I see... I'll look into it, and see if this script works. Thank you both for the help!

pallid palm
#

hello all: So if i create a ammobox Box1: by scripting: and i add a killed EVH to the Box1 does the Killed EVH go away after the box is killed

#

i think it does but im not sure now

hallow mortar
#

The Killed EH is attached to the box. The box can only be killed once. What do you imagine the Killed EH would do after the box has been killed, even if it isn't deleted?

pallid palm
#

i see thats what i was thinking

#

so i also repete spawning the box and also adding the EVH to the new box1

#

after the old 1 is killed of course

#

but now im sure ๐Ÿ™‚

#

i'll tell you what: it sure is fun learning from you Nikko ๐Ÿ™‚ thx so much you make me Smile ๐Ÿ™‚

hushed turtle
#

You have to create new killed HE for new box

#

Only exception to this rule are some persistent EHs on players, which stay on player even after respawn

hushed turtle
hallow mortar
#

A lot of object EHs do actually persist on the corpse/wreck after death; for example, the Hit EH can still fire if a dead object is hit again. AddActions also persist. But the Killed EH in particular just...can't fire even if it does remain, so unless you're doing some real weird stuff with that death-reversing setDamage syntax that isn't on stable branch yet, it doesn't matter.

hushed turtle
#

Interesting

#

Resurrecting dead objects... That's quite interesting

granite sky
#

For buildings you can resurrect them and the only thing that breaks is the Killed EH :P

#

In some cases the EH still fires, just with objNull as the unit.

#

I think that was probably EntityKilled rather than Killed though. I forget.

hushed turtle
#

Buildings swap model for destroyed ones, so I guess that's what breaks it

granite sky
#

Ah no, it was Killed.

#

So in fact the EH is not removed on death.

#

Not really, the original model is still there and when you run setDamage 1 it pops it back up to the surface and deletes the ruin object.

#

Everything else works fine as far as I can tell. AI pathing, doors, whatever.

#

BuildingChanged EH still works too.

hushed turtle
#

Look at code found on setDamage page:

0 spawn
{
    private _house = cursorObject;
    _house setDamage 1;
    sleep 5;
    _house setDamage 0;
};

It makes it look like destroying buildings creates new objects(the destroyed ones)

granite sky
#

Maybe the problem isn't the ruin but the intermediate damage stages that buildings have.

#

There is a lot of object-swapping going on.

pallid palm
#

it does create a new destroyed building

#

@hushed turtle yes i created a new killed EVH for the new box yes

#

but for the enemy groups killed EVH i remove the EVH

#

or you what i mean right

#

Interesting shooting dead corpse lol ๐Ÿ™‚

eternal spruce
#

Is there a way to have the AI set their collision lights on while in flight and have their combat behavior set to "aware or combat" ?
C17_1 setCollisionLight true;, C17_1 action ["CollisionLightOn", C17_1]; , _vehicle setCollisionLight true;
and nothing worked, also I tried the enable lights in the Editor as well.

eternal spruce
spring stone
#

Hey guys, I have a question: Right now I have put my server to the Veteran difficulty. Therefore we don't see waypoints on the screen (the grey thingy showing you where a waypoint is). That is okay, actually that is what I wanted. I only have one problem...I would like to have that enabled for pilots. Be it for everybody who is in an air vehicle or only for specific role....both would be okay. Is there any way to achieve that?

#

Maybe an addition: I'm speaking of self created waypoints...those you can put on your map yourself!

spiral trench
#

@Moony you mean the map shift + click marker, right?

keen stream
#

Thats the wpperm or something. I disabled it on my server. Still works for players in sophisticated vehicles.

frail dune
vagrant cedar
#

for my mod I have a read/write extension, this is the code I have some pretty basic security functions I am wondering if they are good enough or not. I feel like I have overlooked something major

errant jasper
#

Security against what? What exactly is your threat definitions? Are you running it on the server or client? Doesn't matter much much the extension is secure if there is possibility to inject arbitratry strings the extension

vagrant cedar
errant jasper
# vagrant cedar It is a client side mod, right now I have made sure that the user themselves can...

Okay, but I still don't understand the threat. You do all kind weird stuff to erase PE headers, prevent debug attachments, ensuring zeroing memory after use, indirect comparison via hashing etc.. So one might think you want to prevent Clients from reading the data, that is servers might possible store client-related data on the client you don't want client to read. So you protect the memory.

But then waht the extension is doing is being a key-value based storage based on files. But the files are completely unprotected and accessible.

#

(Successfully) restricting calls from going outside the "root" might protect read of user's file, but that still enable other attacks like just spam-creating entries. Or a bad mod overwriting a good mod's keys.

vagrant cedar
errant jasper
# vagrant cedar yeah thats a fair point, tbh I just put in promt in antigravity tell this code t...

I suspected something like that. But that second paste looks much more reasonable; I wouldn't let the first one run on my system, for sure!

While protecting the extension from the client is running can have its uses the main threat is that you are indirectly doing stuff on the user's machine via user input. The most secure way is to run extensions server-side only, with server-side code. That prevents a lot of possible attacks.

If that is not possible, and you do not have 100.000% (yes that many zeroes) over what SQF code executes, then you are in a very hostile environment. Someone could run your extension with arbitrary input, so anything you extension does to the system is a possible vulnerability. In your case you are interacting with the file system and based on input to your extension opening and reading files. Trying to prevent .. and symlinks is admirable (and the only "legit" thing in your first version IMO; though I am not sure that will be enough!). Would you be confident it is 100.000% not somehow able to "escape" any file root access "sandboxing attempt" and access C:\Users\username\AppData\BitCoinWallet\Wallet.bin ? And since they managed to trigger via SQF it is not impossible they could extract the READ data either. This is the threat environment you have positioned yourself in with a client side extension with system access varying by user input.

Honestly, I would recommend not composing paths and maybe use SQlite (it only uses few files for many entries) or something with fixed path (or at most a single basename with only alpha-numerical symbols).

#

This is also getting offtopic, non-SQF based extension development belongs better in #arma3_tools probably.

vagrant cedar
brave mountain
#

hey guys! Time ago in order to sync 2 animations using a game logic with "this attachTo [logic1, [0,0,0]];" would make the 2 AI soldiers start the animation on same time and play till the end sync, now I tried again but does not work anymore? I mean, they start to play the animations but they are not sync at all

little raptor
#

it was probably only random. there's no such thing as syncing animations with attachTo

brave mountain
#

I'm pretty sure it would work like a charm, but I just came back after 1 year and I forgot few things

#

this was a message from @warm hedge : Prepare 4 units, name they, attachTo to a GameLogic (className: "Logic"), play animations same time.

#

it used to work, now it does not

little raptor
#

to "sync" them you just need to play them at exactly the same time:

isNil
{
  sol1 switchMove [_move];
  sol2 switchMove [_move];
};
brave mountain
#

sorry, prob I explained badly...I meant to sync animations that ARE SUPPOSED to be sync.. like the "abuser" one...

little raptor
#

oh that's what you mean. it could be related to order of object creation maybe? what's your setup?

brave mountain
#

so, I placed a game logic named "logic1" then on first soldier I put this in his init : this attachTo [logic1, [0,0,0]];this switchMove "Acts_Abuse_abusing";

#

and this on second soldier : this attachTo [logic1, [0,0,0]];this switchMove "Acts_Abuse_abuser";

#

years ago game logic would sync them up perfectly, now I'm not able to get it done lol

little raptor
#

in debug console run attachedObjects logic1 and see if they're attached (after running the scenario)

winter rose
brave mountain
little raptor
brave mountain
#

you see? they mix up lol

little raptor
#

I literally just tested it and it works fine

brave mountain
#

you tried the 2 abuse animations?

little raptor
brave mountain
#

can you please paste here the codes you used?

little raptor
#

your exact code

brave mountain
#

also, out of curiosity, the 0,0,0 on game logic is "standard" right?

little raptor
little raptor
brave mountain
little raptor
#

and this is the logic

brave mountain
#

mmm...

#

might it be a mod problem then? lol

little raptor
#

you probably didn't name the logic correctly. check it again

little raptor
brave mountain
#

it's correct indeed

little raptor
#

try without mods blobdoggoshruggoogly

brave mountain
#

is it normal when I start the mission the 2 soldiers get teleported some meters away? shouldn't they stay on game logic same position?

little raptor
#

depends on the animation

brave mountain
#

oh yeah cause the animation needs some "space" to happen right

little raptor
#

yeah that's why you do attachTo to make sure their origin is synced, but the position of the body in model space can be far from origin

little raptor
brave mountain
#

mmm no I aways get the abusing one too much forward from the other

#

Anyway, thanks a lot man, I'll try without mods and see otherwise...its ok anyway, I won't record those scenes lol

#

@warm hedge I summon you from the scripting abyss ๐Ÿ˜‚

little raptor
spring stone
#

@spiral trench Yes I mean those @frail dune Actually we use cTAB. I also have to say, that this request comes from my pilot. I was not able to test if it is working or not (since I never use these marker). I'll do it now ^^

brave mountain
little raptor
#

then logic1 is not defined

#

try isNil "logic1" if it says true it's undefined

brave mountain
#

works without mods

#

also, says "true" while playin the game

#

sorry

#

false

#

I meant

#

so maybe its a mod problem?

little raptor
#

idk. maybe a mod is deleting your logic

brave mountain
#

๐Ÿ˜ฎ

little raptor
# brave mountain false

you mean with mods it returns false? or without? (without mods it's correct so it should return false)

little raptor
brave mountain
#

hold on, I tried again with those WW2 mods and now it works lol

#

let me see if it's fixed now

#

the magical game restart always works...

#

works good now

#

lol

#

@little raptor reaction now :

#

xD

little raptor
#

yeah hmmyes

brave mountain
#

thanks a lot again man

spiral trench
#

How about this @spring stone ```
onMapSingleClick {toLower typeOf player find "pilot" == -1}

hard vessel
#

trying to do a custom sector control similar to HLL. my plan was once a sector is captured the next becomes available to attack while the one just captured has to be defended. once the second point is captured the first one becomes unavailable while the third turns on to attack and so one, same in reverse, if a sector is lost the one that could be attacked becomes unavailable while the 1st has to be defended again. also having vehicles and objects spawn in on the first sector once captured and respawn once destroyed and stop spawning if that sector is lost.

spring stone
#

Okay, I should add that I'm shit at scripting but I'm learning it atm...therefore it would be very nice, if you could quickly explain what this does (as I said, learning scripting and it would help me ... learn xD)

hard vessel
# thin fox AAS style?

if that includes a back and fourth instead of normal aas where once its captured thats it than yes

spring stone
#

@frail dune Now I know what you see and yes it does but my pilot is actually not interested in the directional aspect of this marker that much but in the distance this marker shows him ^^ That something cTAB does not accomplish

spiral trench
#

@spring stone It will just prevent shift + click markers from being placed if the unit placing them does not have "pilot" in its class name.

spring stone
#

Mhhh, that could actually be a workaround. I'll look into it. Thank you for the help! ^^

tame thistle
#

Two questions:

How can you show the map UI in a texture like in the Expeditionary forces Combat Boat...

#

and... Would it be possible to show the radar UI in a texture, like the map?

thin fox
granite sky
#

In theory you can put any UI on a texture.

spiral trench
#

You could alter it for pilots in the sense they are in the pilots seat of some air vehicle, like so onMapSingleClick {vehicle player isKindOf "Air" && driver vehicle player == player}

jade abyss
#

Anybody remebers the way to check, if a player is inside a building?

frail dune
#

@spring stone Give your pilots an Android tablet or something similar? If you have the map tools activated on the tablet you will see information like bearing, distance and altitude on whatever you point at within the interface map.

spring stone
#

@frail dune While thats true, its very unhandy going onto the big screen while flying each time you want to know the distance to the AO. Also the biggest problem is, while on the big screen the game forgets every input and you will slowly go to the ground ^^

frail dune
#

Yep. It doesn't cancel the input or anything for me, so I think that might be a joystick issue? Either way, I see what you mean. This is why we need working and interactable MFDs with terrain following radar and GPS markers ๐Ÿ˜›

spring stone
#

It does it for me (Keyboard and Joystick) and yes...you are right T^T

frail dune
#

RHS has a very basic terrain radar in their jets, but it's very rough. Not interactable or anything, but still very cool.

radiant lark
#

I wanna make my own radio system on the game, using radioChannelCreate etc. I will need to override push to talk keybind, and possibly enable / disable push to talk as well. All via scripting or modding.

Any way of doing that?

radiant lark
spiral trench
#

How about this @jade abyss lineIntersects[visiblePositionASL player,AGLToASL(player modelToWorldVisual [0,0,10]),player];

jade abyss
#

nah, there was something different, since this one doesn't react, when the player is watching out of the window ๐Ÿ˜ฆ

#

just cant remember..

spiral trench
#

I'm pretty sure there is no command, you can only check via some scripted solution usually involving some lineIntersect* command.

jade abyss
#

ha, boundingbox

spiral trench
#

Yeah, my problem with bounding box is it's not particularly accurate, but I guess it can be sufficient in some cases.

#

and youd want to use boundingBoxReal

warped oak
#

How does the say3d work, I have this

#

class CfgEnvSounds {

sounds[]={};

class battle2
{
   name="battle2";
   sound[]={"battle2.ogg",db+10,1.0,160};
   soundNight[]={"battle2.ogg",db+10,1.0,160};
};

};

class CfgSounds
{
sounds[] = {};

class sound1
{
    name = "sound_1";
    sound[] = {Missaaukko.ogg, db+10,1.0,160};
    titles[] = {};
};

};

#

EnvSound work great

#

On AI charecter I have this

#

this say3D "sound1"

hushed turtle
#

Indeed, specifying group for once ain't clear enough

_grp setCurrentWaypoint [_grp, 1];
winter rose
hushed turtle
#

None, I'm just making fun of it meowawww

radiant lark
jaunty ravine
#

Does anyone know what triggers Land_FirePlace_F to actually light the fire? Had a look at the config in the config viewer and didn't find any UserActions sub-class. Trying to execute some code when the player lights the fire or puts it out.

hushed turtle
finite cipher
#

Hi, I'm new with scripting. I like to unlock a gate with a trigger but something is not working correctly. It must be something simple but I don't get it. ๐Ÿ˜…
When I step on the trigger I hear the activating sound but gate is still locked.

hushed turtle
#

lock is for vehicles. To open gate you need to play animation

#

For that you need to look in config for gate's animations and play it using command

finite cipher
#

ok, I can't change the value in Doors States with script?

hushed turtle
#

You can do that with script

#

You can open any door or gate in buildings using script

thin pine
#

Can someone tell me what a 'background control' is? aka the difference between class ControlsBackground and class Controls in Arma UI scripting

hushed turtle
finite cipher
#

Perfect ๐Ÿซก , thx

hallow mortar
finite cipher
hushed turtle
#

It's in config

radiant lark
#

can camCreate be used reliably for an admin menu? (100 - 200 cameras)
EDIT: I guess not because of the inmense amount of rendering needed

open hollow
radiant lark
#

But considering the limits of the
human eye, might wanna make it 10 or 20

dark viper
#

20 pip rendered cameras?

open hollow
warm hedge
#

Can anyone confirm the rope length is actually capped to 100m, or it is defined in a config?

pallid palm
#

i remember John Jordan says yes capped at 100m

frail dune
#

I'm still trying to figure out how to modify a backpack on the ground. Using TFAR, I want to set the backpack to speaker and frequency 70.0. Putting the relevant code into the init does not work, I assume due to it being in a groundweaponHolder. According to nkey, who made TFAR, I would have to use the everyBackpack function to reference the backpack, but I'm unsure how to do it exactly (I'm a bit of a scripting noob). I need these two functions to be executed on the backpack:

[_x, "radio_settings", "70.00"] call TFAR_fnc_setLrFrequency;
[_x, "radio_settings"] call TFAR_fnc_setLrSpeakers;

granite sky
#

That was just what I saw from testing. I wouldn't know about secret config vars.

ivory lake
#

there's some config properties for how long the rope can stretch etc and ones for slingloading

#

but thats about it

#

ie.

class CfgSlingLoading
{
    ropeLength = 10.0;
    hookMinRange = 4.0;
    abortHeight = 20.0;
    abortRange = 15.0;
    unwindSpeed = 2.0;
    slmMaxAltitude = 40.0;
};
class cfgVehicles 
{
    class Rope: All
    {
        access = 0;
        scope = 2;
        displayName = "";
        simulation = "rope";
        model = "";
        side = 8;
        maxRelLenght = 1.1;
        maxExtraLenght = 20.0;
        alwaysTarget = 0;
        irTarget = 0;
        irScanRangeMin = 0;
        irScanRangeMax = 0;
        irScanToEyeFactor = 1;
        laserTarget = 0;
        laserScanner = 0;
        nvTarget = 0;
        nvScanner = 0;
        artilleryTarget = 0;
        artilleryScanner = 0;
    };
};
warm hedge
#

Thanks, much obliged

meager granite
#

Did anyone get issues with setVariable global being not reliable since last patches?

#

Like some clients not getting some\all variables assigned to entity

#

I can't confirm it but looking at what's going on in the mission this is what I think happens

#

Considering how fucking broken MP since last few patches with people floating on top of vehicle, no uniforms and such this looks like possibility

jade abyss
#

Floating on top of vehicles? oO Never heard of that one.

meager granite
#

It happens all the time on our servers since last one or two stable patches

#

People get into vehicle, their body floats around and other can get into same seat. Happens with any seat, not just gunner as it was since A2

#

Sometimes people get out of vehicles, they walk around and shoot others while everyone (maybe only some?) see them inside vehicle

#

Both in King of the Hill and Wasteland.

drowsy geyser
#

is a there an ingame function or script that spawns flies/insects? i remember there was one but im not sure if it was vanilla

cosmic lichen
#

There is but I don't think it works as it was originally written for arma2

drowsy geyser
#

i found it but it dosent have the sound effects will have to add it myself

jade abyss
#

oh wow oO

#

I remember... wasn't there a bug several versions before? When you ran-over someone (but didn't killed him) -> Nobody could see him

meager granite
#

yes its been there since alpha and still not fixed

jade abyss
#

For a short period it was fixed, then came back iirc

foggy stratus
last cave
#

I donโ€™t understand at all how to adequately set up Color Corrections so that it turns out natural, and not as if someone put a colored film on the screen. I want to create a slightly grayish and slightly white effect for the snowy weather. But the color correction always seems unnatural.

#

Bruh....

warm hedge
#

Not sure what is unclear in the instructions in BIKI, what is your intention and code

radiant lark
radiant lark
#

Whatโ€™s the technical explanation of the bug that makes you be stuck to walls and die while floating? The animation while it happens is afalpercmstpsnonwnondnon
And the player seems to behave like on a freefall (Z vector rapidly decreases). I suppose the death happens when the player gets unstuck and the negative Z vector makes it act as if it had fallen to the ground (handleDamage EH also behaves the same way when you intentionally jump out of a building). But why the hell would it get stuck in the first place?

sharp grotto
radiant lark
sharp grotto
radiant lark
#

I was about to start doing lineIntersect ๐Ÿ˜‚

proven charm
#

does anyone know a good way to prevent parachute opening when player respawns? when respawning at carrier this sometimes happens and its not just visual thing but I think the chute sometimes kills the player

proven charm
#

no just normal respawn at marker/position

winter rose
#

they don't open parachute

proven charm
#

ya they shouldnt....

winter rose
#

remove mods and try again?

proven charm
#

very little mods but i can try that too

#

well cant repro it on new mission so it could be just my mission and lag that causes it or my mission does something weird

winter rose
#

hmyep, otherwise I don't see what is happening

proven charm
#

i know for a fact that lag can cause weird things in respawn, i even made ticket about it

#

so who knows ๐Ÿ™‚

winter rose
#

Arma'd

proven charm
#

wow i just spawned in water with the parachute too ๐Ÿ˜ฎ

#

yep got a repro now ๐Ÿ˜‰

#

same thing without mods

winter rose
#

zomg, more Dedmen werkz for 2026

proven charm
#

late christmas present to the devs ๐Ÿ˜‰

#

its because if the respawn point is not at the carrier deck height but above it, then player respawns in water.. and very deep

#

i will definitely make ticket about this once i get the time

winter rose
#

ah yeah, something like "15m above waterโ€ฆ no carrier surface? OK, make it 15m above terrain"

proven charm
#

yeah weird

hushed turtle
split ruin
#

@proven charm this can be rectified by getting PosASL of the object when its on deck and then setting it right after spawn

proven charm
finite bone
#

Is there way to get the position of a road in a radius? I'm trying to spawn a vehicle somewhere within 2500m but it HAS to be on the road

proven charm
low spear
#

Hi
I've written a whole bunch of scripts for Arma 3 (including one I posted on the forum back then, which has since been updated). And since the forum closed, I don't know where to share them. What's the universal source for scripting now?

#

I have a whole github accompanied by a mission file that groups everything together (the mission file that serves as a test bench and experimentation tool)
Most of the scripts aren't revolutionary; I mainly focus on reading configfiles and randomization, AI spawning, and automatically generating "sector" modules from the cities in the configfile (CfgWorld).

It's more of a starting point for those who want to begin scripting

warm hedge
#

Steam Workshop or Guide could be a good guidance source, IMO

low spear
#

Do people actually read guides on Steam?

#

But it's true that writing a guide could be relevant
need to see if it's possible to format it correctly, including the code

pallid palm
#

lol i make the best missions imho ๐Ÿ™‚ its so much fun woohoo i love it ๐Ÿ™‚ well that's what my clients say anyway ๐Ÿ™‚

#

thx so much guys for helping me with all the sqf scripting stuff

radiant lark
#

Your clients??!!

low spear
#

Players is like clients i guess

#

By the way, I still haven't tried scripting on Reforger. I learned it's more complicated and requires using an additional tool called "Workbench"

I imagine the SQF file is no longer used

#

Give servername

#

yeah i understood

#

This one ?

#

I can host my sort of catch-all/sandbox mission

#

With all the scripts I've made

#

For me, it's just a sandbox scenario.

I don't know how to create a "scripted" mission or come up with ideas.
I just script random ideas and add everything I script to my mission, which includes all the Blufor vehicles, respawns, and AI that spawns on the map (and is marked on the map as soon as it's detected by an ally)

#

I'm going to look into automating artillery fire soon, specifically if an enemy is spotted by an ally and within firing range

#

Good idea

simple sorrel
#

I think this is a config question. Any of yall know how to get other attributes to show up in a custom module?? I have the combo & edit boxes working but Iโ€™m trying to get marker color/brush drop down to appear in the module and itโ€™s not working. Any insight much appreciated. Images to follow:

#

Thatโ€™s the module config.cpp the edit/combo/checkbox works but most the others donโ€™t.

low spear
simple sorrel
#

Yeah I wanted to get some of them into a custom module

#

I just started exploring making my own modules, my test module works it creates a marker with info parsed from the module. But I was trying to get a sense of how many total attributes a module can have for future

#

Yeah, and if there was a way to get a multi-line text box that would be cool

low spear
#

@simple sorrel Maybe something like this ?

class MarkerColor {
        displayName = "Marker color";
        tooltip = "Select a color";
        property = "XXModule_MarkerColor";
        control = "Combo"; // Type
        defaultValue = "'ColorRed'";

        class Values {
            class Red { name = "Red"; value = "ColorRed"; };
            class Blue { name = "Blue"; value = "ColorBlue"; };
            class Green { name = "Green"; value = "ColorGreen"; };
            class Black { name = "Black"; value = "ColorBlack"; };
        };
simple sorrel
#

@Nixx, thatโ€™s certainly a good way to get a drop down with some choices, but I suppose a more refined question would be: since I started exploring other attribute types I was wondering how to get the other types to work at all in a module. Like for example when you select the independent allegiance to BLUFOR/OPFOR in the scenario. Could that be in a module and if so how?

low spear
#

Ohh

simple sorrel
#

Iโ€™ve seen it in other mods but they use hella macros and extremely hard to decipher file pathing when tearing their PBOs apart

low spear
#

Do you mean by synchronization, for example?

simple sorrel
#

At this stage for my test/learning module. It just creates a marker but I learned how to actually create in game modules that function - the next step is to see how many attributes are technically possible to put in one. For future Dec

#

@Nixx maybe? Depends on what you mean by synchronization.

#

Is that some magic SQF I can throw in a config and boom modules are inheriting what I want?

low spear
#

For example, by synchronizing a module with one or more entities (side, unit, etc.)
This can be done simply by setting the variable as an alternative

low spear
#

and potentially retrieve related items

#

But what exactly is the project? Just exploring the engine's limits?

simple sorrel
#

Yeah essentially

#

I have a an example one sec

low spear
simple sorrel
#

Haha sick Iโ€™ll check that out. Ok so The create task module is a perfect example, I prob should have lead with that. Anyway, in there you see the state attribute is a graphically pleasing clickable boxโ€ฆ thing. Iโ€™m trying to get my test module to have all the possible attributes to visualize and then it helps with developing modules later knowing what types of interfaceโ€™s we can have

#

But I donโ€™t know how and where BI gets that into their module

#

Like, if I can find a way to make modules with this that would completely change the way someone might tackle a faction function that flips sides after the player does XYZ or something

low spear
#

We would need to decompile and search through the scripts

simple sorrel
#

Welp. Better role up my sleeves

#

Yeah Scotty good idea will do

low spear
#

this ๐Ÿ‘†

simple sorrel
#

Alright Iโ€™ll start there

low spear
#

It's likely I'll also have to delve into the Bohemia decompilation functions

I don't want to code an artillery function from scratch when there's a module that does it perfectly well (a module whose script is hidden)

warm hedge
#

Eden's attribute/GUI is completely unrelated with this function

low spear
simple sorrel
#

@warm hedge. Yeah I know but I was hoping there was a way

warm hedge
#
class ModuleTaskCreate_F: Module_F
{
    class Arguments
    {
        class State
        {
            displayName = "$STR_A3_CfgVehicles_ModuleTaskSetState_F_Arguments_State_0"; // State
            description = "";
            class Values
            {
                class Created
                {
                    name = "$STR_A3_CfgVehicles_ModuleTaskSetState_F_Arguments_State_Values_Created_0"; // Created
                    value = "CREATED";
                    default = 1;
                };
                class Assigned
                {
                    name = "$STR_A3_CfgVehicles_ModuleTaskSetState_F_Arguments_State_Values_Assigned_0"; // Assigned
                    value = "ASSIGNED";
                };
                class Succeeded
                {
                    name = "$STR_A3_CfgVehicles_ModuleTaskSetState_F_Arguments_State_Values_Succeeded_0"; // Succeeded
                    value = "SUCCEEDED";
                };
                class Failed
                {
                    name = "$STR_A3_CfgVehicles_ModuleTaskSetState_F_Arguments_State_Values_Failed_0"; // Failed
                    value = "FAILED";
                };
                class Canceled
                {
                    name = "$STR_A3_CfgVehicles_ModuleTaskSetState_F_Arguments_State_Values_Canceled_0"; // Canceled
                    value = "CANCELED";
                };
            };
        };
    };
};```
#

And this will be stored into getVariable "State"

low spear
#

I haven't dealt with classes much, but I imagine in this case it returns an array?

warm hedge
#

(TaskCreate is slightly special case IMO tho)

#

Basically every Attributes goes into class Attributes

simple sorrel
#

Yeah this is a great start but how do I get this in my module that has its attributes defined with all the ones provided from the wiki?

#

Also, POLPOX, long time fan of your mods

#

๐Ÿป

warm hedge
#

What is the context

how do I get this in my module that has its attributes defined with all the ones provided from the wiki?

#
class ModuleEditTerrainObject_F: Module_F
{
    class Attributes: AttributesBase
    {
        /*
            some other attributes
        */
        class ObjectState
        {
            property = "#state";
            expression = "_this setVariable [""#state"",_value]";
            control = "ObjectState";    // this defines the GUI elements
            displayName = "$STR_a3_to_editTerrainObject10"; // Object States
            tooltip = "$STR_a3_to_editTerrainObject11"; // Select damage or visibility state of selected terrain object.
            value = 0;
            defaultValue = 0;
        };
        /*
            some other attributes
        */
    };
};```Another vanilla example
#

In Cfg3DEN >> Attributes

class ObjectState: Title
{
    attributeLoad = "['objectState_attributeLoad',[get3DENSelected 'logic' select 0,_this,_value]] call bis_fnc_moduleEditTerrainObject";
    attributeSave = "['objectState_attributeSave',[get3DENSelected 'logic' select 0,_this]] call bis_fnc_moduleEditTerrainObject";
    h = "2 *                                                                     5                         * (pixelH * pixelGrid *     0.50)";
    class Controls: Controls
    {
        class Title: Title
        {
            h = "2 *                                                                     5                         * (pixelH * pixelGrid *     0.50)";
            colorBackground[] = {0,0,0,0};
        };
        class Value: ctrlControlsGroupNoScrollbars
        {
            idc = 100;
            x = "48 * (pixelW * pixelGrid *     0.50)";
            w = "80 * (pixelW * pixelGrid *     0.50)";
            h = "2 *                                                                     5                         * (pixelH * pixelGrid *     0.50)";
            class Controls
            {
                class Checkbox1: ctrlCheckboxBaseline
                {
                /*
                    And more lines
                */
simple sorrel
#

So if I just add a:

Class ObjectState: Title

To my module config it will show up as the same thing from BIโ€™s edit terrain object?

warm hedge
#

No

#

class ObjectState* (the c must be lowercase) in this context only defines the GUI elements in Eden Editor's attribute

warm hedge
#

Whoop wrong reply

simple sorrel
#

Ok. A lot of trial and error in the future. The executive summary of my mission is simply, get a test module in game that displays all possible attribute types, that a module_F can do. That will help inform future design of functions knowing what modules can provide to the player as UI

warm hedge
#

In game rather than Eden Editor you mean?

simple sorrel
#

Yessir

#

So I started chipping away at modules. Made one test module. It works it creates a marker and you can set the size and text and all that jazz. But now I want to see what modules can look like entirely

warm hedge
#

Sure it's possible, just because Eden Editor's attributes are just in-game GUI elements

#

And defined in config in readable state

simple sorrel
#

Thatโ€™s what I was hoping. Cuz boring check boxes and list boxes are limiting creative module dev lol

#

But now, so, I need to dig into the Cfg of those elements and put them as a โ€˜classโ€™ of their own name and they will look like that in the module?

warm hedge
#

You can use scripts like configClasses to dynamically read config attributes

simple sorrel
#

Thatโ€™s nice

old owl
#

Anyone know of any reason why CT_WEBBROWSER wouldn't work on stable but would work on profiling? Haven't done a whole lot of troubleshooting outside of just verifying it no worky but just wanna know if I am doing something dumb, this is a known issue; or something I should investigate more so I can put in a https://discord.com/channels/105462288051380224/108187245529268224 yap

low spear
#

rofl
Yes, a Taru can load a huron (without mass modification)

finite bone
hallow mortar
#

CT_WEBBROWSER was added to stable in 2.20

#

I believe it was still a bit WIP, and there may be differences between stable and prof depending on what specifically you're doing with it.

hushed turtle
#
currentCommand _leader; // Returns "ATTACK"

How do I get rid of that "ATTACK" command? I need them to follow waypoints. "ATTACK" command makes them run away sometimes, when they lost their target. I guess they think their target ran away, so they are following him and leave mission area

#

doMove does nothing for whatever reason

little raptor
#

does joinSilent work?

hushed turtle
#

He is alone it the group

little raptor
#

you can make him join a new group, then delete the old group

hushed turtle
#

Which means I have to re-add all waypoints

little raptor
#

yeah that's the only way I think. you can try ignoreTarget but it's probably not a good idea

granite sky
#

Spam forgetTarget + reset combat mode might work.

#

But what you have is a buggy pile of shitcode in an unknown state. And joinSilent is your best shot at a reset.

hushed turtle
#

Maybe I could spawn some civ in the corner of the map and join him to the group to make sure group is never empty. Delete the civ after that

granite sky
#

Your trouble is that some state is attached to the group. Enemy knowledge, behaviour etc.

hushed turtle
#

I thought commands like ones from command menu are attached to the unit. Only reason why leader has "ATTACK" is because command was given to him by previous leader before he died.

granite sky
#

Is that what happened?

hushed turtle
#

Yes

granite sky
#

I figured they'd give themselves ATTACK anyway. But that's info from an undocumented AI layer.

hushed turtle
#

Usually leader has "MOVE" command when he is following waypoints

granite sky
#

I guess you do see that as a player too. If you get downed in Antistasi it switches the leader to an AI, and then when you wake up again it switches back, but the attack orders can be sticky so you see the red cursor.

hushed turtle
#

joinSilent worked and it didn't remove waypoints

granite sky
#

You rejoined it to the current group?

hushed turtle
#

Yes

[_unit] joinSilent group _unit; // return to formation
granite sky
#

IME waypoints update asynchronously, like there's another layer of code running intermittently that checks whether the waypoint is complete.

#

So an immediate joinSilent would be ok unless it specifically does the clear. Not sure why it would.

#

But what was said is that if you joined the unit to a different group it'd reset the waypoints.

#

Question was whether rejoining the same group would do anything useful.

#

But I guess that still resets the unit state.

hushed turtle
#

I guess unit will no longer be leader after re-joining. When group had more than one unit

little raptor
little raptor
granite sky
#

hmm, it's really quite difficult to intentionally get someone to currentCommand == "ATTACK" state :P

#

I guess it's the enableAI "TARGET" thing where they send units from the group to distant positions?

pallid palm
#

@hushed turtle ```sqf
//what about command Move
units _grp commandMove [(getPosATL ? select 0)+(random 5), (getPosATL ? select 1)+(random 5), 0];

#

or edit as needed

#

i found making enemy move to a marker is way better then waypoints

#

in any case

split ruin
#

the only problem is you don't know how long it will take for them to get to the next marker, so you need to check this constantly ...
waypoints exist for a reason ๐Ÿ™‚

hushed turtle
hushed turtle
#

To be fair, leader running away and chasing lost target is rare. It's just becomes a problem when you need to kill them all to complete objective

granite sky
#

I'd disableAI "TARGET" and allowFleeing 0 generally if you care about such things. But I'm not 100% sure that it's related to your case.

hushed turtle
#

I have allowFleeing 0. I think I will use leader changed EH and re-join him to the group when his command is ATTACK

opal zephyr
#

Quick question, is there a namespace in 3den editor that is preserved when exiting and re-opening the editor? I want to save custom data but missionnamespace doesnt work

#

I could save it to profile namespace with a reference to the mission and get it back that way but that isn't very ideal

granite sky
#

uiNamespace is generally persistent IIRC? Not specific to 3den.

fair drum
#

you can also create custom 3denmissionattributes that you can save and load from

#
    class Mission {
        class Scenario {
            class AttributeCategories {
                class MEH_VersionControl {
                    displayName = "Modules Enhanced Version Control";
                    class Attributes {
                        class MEH_MissionVersion {
                            control = "MEH_MissionVersionReadOnly";
                            defaultValue = """""";
                            displayName = "Modules Enhanced - Mission Version";
                            expression = "true";
                            property = QGVAR(MissionVersion);
                        };
                        class MEH_CurrentVersion {
                            control = "MEH_MissionVersionReadOnly";
                            defaultValue = QUOTE(QUOTE(CURRENT_VERSION));
                            displayName = "Modules Enhanced - Current Version";
                            expression = "true";
                            property = QGVAR(CurrentVersion);
                        };
                    };
                };
            };
        };
    };
private _missionVersion = "Scenario" get3DENMissionAttribute QGVAR(MissionVersion);
"Scenario" set3DENMissionAttribute [QGVAR(MissionVersion), CURRENT_VERSION];

stuff like this

hushed turtle
granite sky
#

..huh

#

Command clears it, internal leader selection doesn't? :P

#

I shouldn't really be surprised.

hushed turtle
#

It's just SQF things you know. ๐Ÿ˜†

granite sky
#

SQF is really the tip of the iceberg for AI.

#

The things you can't see are even worse than the things you can see.

hushed turtle
#

selectLeader removes it, but if I kill myself while I'm leader then other unit(new leader) keeps the command ๐Ÿ˜‚

#

I think in a lot of cases it can be good thing that leader keeps the command. For example medic ordered to heal someone or if unit was order to refill ammo, then they complete the command even after becoming a leader.

#

By the way, do leaders refill ammo for themselves? I know leader orders unit to refill ammo when needed, but do leaders themselves ever refill ammo?

granite sky
#

IME that stuff is busted anyway.

opal zephyr
opal zephyr
#

^ I don't think this is possible, havent come across a function like that before. I think the only way to save data in 3den and then pull it from the mission is to have an object in the scene that has the data saved within it. If anyone else has any suggestions though I'm all ears

winter rose
#

what exactly is your use case here?

#

(reading a file is possible, writing a file is not without an extension.)

old owl
opal zephyr
# winter rose what exactly is your use case here?

I am creating map drawing for the 3den editor (same as map drawing during gameplay pretty much). And I need to save that line data somewhere that will remain with the mission even when its exported, hosted on a server, played locally, etc.

Writing to the mission folder would check these boxes, right now im doing a quick test with creating a module when needed and saving the data to an attribute within it

old owl
opal zephyr
old owl
#

This might be kind of obnoxious but might be able to setup a Github repo with a symlink of your profile folder. Then you could create some sort of automation to commit, push and then pull the profile for whatever other server or whatever you wanna use it for perhaps

granite sky
#

Without extensions, you can't write files when hosting. With the exception of profilenamespace & missionprofilenamespace

opal zephyr
#

My test of using a module that stores it works decently, I think I'll try and go this route

winter rose
granite sky
#

If the writing is only while editing then whatever.

opal zephyr
granite sky
#

While running, a mission can read any file within the mission PBO/folder.

opal zephyr
#

The writing would only be while editing in the 3den editor, the mission just needs to read it

#

It's just the auto creation of the file to read thats the problem

granite sky
#

If you format it as SQF then you can use preprocessFileLineNumbers, execVM or the functions library. If it's any other text (eg JSON) you can use loadFile.

opal zephyr
#

But there's no way to create the file to begin with :(

granite sky
#

We covered that part? Output text to clipboard, copy to file in mission folder.

opal zephyr
#

I want it to be automated, that would require you to create the file in the mission folder yourself. Or use an extension which I don't want to do for the size of this project

granite sky
#

Completely automated isn't an option without extensions. Arma won't write data to arbitrary files.

old owl
#

Not sure if you're intending for it to be used purely in a server environment but you could also just exclusively save the data to the servers profileNamespace if that helps

opal zephyr
#

Yup got that, so that method is a no-go

granite sky
#

I suppose you can write an init expression to an arbitrary object using set3denAttribute

opal zephyr
old owl
#

Oh apologies you said 3den earlier, that's my bad

opal zephyr
granite sky
#

You can't use get3denAttribute when running a mission but the init will run.

#

this setVariable ["my_arbitrary_data", whatever];

#

You can technically store arbitrary mission-accessible data in the SQM like that. Ugly but it works.

opal zephyr
#

I don't even understand that fully, so I think Ill stick with the module approach, its automated and only introduces minor user error possibilities

#

I appreciate your very creative thinking though

unborn prism
#

Does minimalHit apply to Infantry? And if so, can I disable it on an individual unit?

#

I'm trying to set up a Juggernaut unit for players to fight on a mission, I've got him taking reduced damage, but I think it's hitting some kind of threshold, since a full two LIM-85 boxes dumped into his chest armour didn't kill him

hushed turtle
#

We were talking about this not too long ago. Someone wanted increased heath for unit

#

You need to use HandleDamage EH and handle damage from there

#

I don't know what minimalHit is. There is no command like that

sullen marsh
#

Can anyone point me to where I can find the structure of a ParticleArray

#

This contradcits its self at every turn

pallid palm
granite sky
#

On CAManBase they're all set to 0.01

granite sky
#

Not sure whether it's applied before or after HandleDamage.

hushed turtle
#

This looks like modding question rather than scripting one

unborn prism
#

Yeah I was hoping I could script this and not be forced to make a custom unit

warm hedge
#
heli addEventHandler ["HandleDamage",{
    params ["_unit", "_selection", "_damage"];
    _curDam = call {
        if (_selection == "") exitWith {
            damage _unit;
        };
        (_unit getHit _selection)
    };
    ((_damage-_curDam)/2+_curDam)    //Adjust "/2" here
}] ;```Something I've wrote years ago in this server. Not tested today
#

Seems to be working alrighty

hushed turtle
brave mountain
#

does anyone know which artillery shell ammo type causes that kind of explosion?

proven charm
#

that arma 3 screenshot?

brave mountain
#

yes

proven charm
#

well if no one knowns you could put some artillery in the editor and start shooting with them

#

i mean make AI fire

hallow mortar
#

It kind of looks like a 155mm HE, but...there are so many different mods, and some of them use the same effects as each other, and then there are mods that change the explosion effects on top of that... it's a bit of an impossible question

vagrant cedar
hallow mortar
#

If those are black smoke trails off to the right then maybe Blastcore is involved

#

Honestly, are you even sure it's artillery? It could be an aerial bomb. They don't inherently look different.

split ruin
#

@pallid palm well if the enemy have to go to only one place in your mission, then waypoints are not needed

noble comet
#

Hi, does anyone know if and how its possible to execute a script on and player who is close to a position or in a trigger. I want to make a shooting drill where i start it via ace interaction and the "shooter" stand in an square

tulip ridge
noble comet
tulip ridge
#

So just check if the player is in the trigger in the action's condition

#

player inArea triggerVariableName

noble comet
#

And then i can execute my script which is in a mod in the player in the trigger?

tulip ridge
#

Yeah you can just make it a function and call it from the trigger's statement

brave mountain
# hallow mortar It kind of looks like a 155mm HE, but...there are so many different mods, and so...

I was trying to get an artillery barrage goin' using this script : [] spawn {
_delay = 0.5;

{
    private _impactPos = getPosATL _x;

    private _explosion = "R_80mm_HE" createVehicle _impactPos;
    _explosion setPosATL _impactPos;
    _explosion setDamage 1;

    sleep _delay;

} forEach [
    barrel1, barrel2, barrel3, barrel4, barrel5,
    barrel6, barrel7, barrel8, barrel9, barrel10,
    barrel11, barrel12, barrel13, barrel14, barrel15,
    barrel16, barrel17, barrel18, barrel19, barrel20
];

};

#

and it works

#

but only with that ammo type

#

I tried other class names but won't do anything

#

works only with R_80mm_HE

#

I don't know why...

brave mountain
# vagrant cedar it would be easier to tell if there was a video

ARMA3 Machinima Cinematic Movie by Flawless War Gamer
(The battle of Kursk โ–ถ World War 2 Machinima)
A soviet defensive position has been heavily overruned during the first days of the battle of Kursk

Subscribe Link:
(https://www.youtube.com/channel/UCO3rUMBjMZ0Iuo5MfRWIROw?sub_confirmation=1)

Movie chapters:
0:00 The quiet before the storm
1...

โ–ถ Play video
#

for anyone wondering : that scripts lets you simulate artillery strikes in an area, create games logic named barrel1 to barrel 20 in my case but do as wished...can name barrel or any other name...it spawns explosions around based on the ammo type in the script

#

pretty cool

#

but again, It works only with R_80mm_HE and I'm tryin to understand why.. EDIT : Seems like it's working only with plane's ammos. Not with artillery shells. Mmm interesting.

unborn prism
tulip ridge
#

It literally says "Adjust "/2" here" :P

unborn prism
#

Well shit, I need to adjust my screen contrast

unborn prism
#

3 LIM-85 shots to the chest, whether I set it to 0.1 or 100

tulip ridge
#

How are you adding it

hallow mortar
#

If you have other systems running that use handleDamage, like ACE/KAT and BI Revive, you will probably need to do some kind of handling to prevent them conflicting with each other or stacking in weird ways.
HandleDamage EHs are processed in sequence, in the order they were added, each receiving and acting on the results of the previous one in the sequence.

unborn prism
#

Wait okay hang on

#

Can I use "this" instead of requiring a variable name?

#

Yes I can

#

Okay, I think that's about perfect

split ruin
#

if I have varspace set to player, does it get deleted when player respawns or carries over after spawn? ๐Ÿค”

proven charm
#

wdym varspace?

tulip ridge
golden knot
#

Hello, I am working on a script and want to use htmlLoad , but I cannot make it work. Is there a way to figure out why it gets blocked?

 private _url = "http://www.domain.de/tools/arma-news.htm";
 hint ("Loading " + _url);
 _html htmlLoad _url;

in Description.ext

class CfgCommands
{
    // a list of URIs supported by HTMLLoad
    // note that in case of clients connected to dedicated server, restrictions defined in its config have priority.
    allowedHTMLLoadURIs[] += { "http?://*.domain.de/*" };
    allowedHTMLLoadExtensions[] += { "html", "htm", "php" };
};
#

I did also try with the arma3_news.php in the doc, and that works. So it must be related to the filter, but I don't get what I need to change, this looks correct to me. And I get very little (no) Debug Errors.

#

Also, starting the mission from EDEN (both SP and MP) and I dont know where the server.cfg of my machine would be :/

pallid palm
#

i have them set to not flee of course

#

of course: i have many diff kinds of missions: some times the enemy are in houses and some are patrolling: and other missions the enemy patrol random house's in a set radius

#

and sometimes i set some enemy to come out of the houses: if they hear you: ๐Ÿ™‚

#

i made many diff kinds of patrol scripts: for all my needs

#

i don't think a mission would be that good: if the enemy only went to one place: ๐Ÿ™‚ my missions are way more dynamic then that m8

split ruin
#

you just change the position patrol will go before they get there, ok

pallid palm
#

btw did you check out my diver patrol script m8 ๐Ÿ™‚

split ruin
#

its the same with patrol waypoint if you set central position the position of the leader of the group

[_ptrlgrp, position (leader _ptrlgrp), 100] call BIS_fnc_taskPatrol;
pallid palm
#

yes but i like way more control of the enemy then that task patrol script gives

split ruin
#

what u mean by more control ?

pallid palm
#

like changing depth of the patrol

split ruin
#

what u mean by depth of the patrol? ๐Ÿ˜ตโ€๐Ÿ’ซ

pallid palm
#

like in the water depth

split ruin
#

i am using this with land patrols they are present in most missions, not divers ๐Ÿ™‚

pallid palm
#

roger that

#

well in my patrol scripts you can use land or water patrols

#

and you can set the depth if you like for watar

split ruin
#

for land there already a function that do this ... so no needed, maybe if you want group to have different group behavior
aka "stealth patrol" or something like this

pallid palm
#

yes thats all in my patrol scrips as well

#

you have many things to choose from in my patrol scripts

#

like you said there

#

its all for whatever need you have: like if you know what i mean: ๐Ÿ™‚

split ruin
#

I know what u mean, ready script templates for coop missions, which is really useful

pallid palm
#

yesSir in some of my patrol scripts i make the enemy randomly select one of the team members to Attack its funny cool lol

split ruin
#

defend the hvt kind of mission ๐Ÿ™‚

pallid palm
#

well knida: when we are in the field fighting my clients say why are they trying to Attack me lol

#

i say i don't know: i say to them they don't like you: lol hahahaha: and we will protect you lol

#

but then the enemy select a diff random team member and they try to kill only him lol

#

its fun

#

my one friend said why its all the enemy Attacking only me lol i said im not sure ๐Ÿ™‚

#

like maybe if you want the enemy to kill the medic cuz in my missions the medic is the most important guy of all

#

cuz if you get hit in my missions you go into shock and you can hardly do anything and you need medic real bad

#

its so Awsome i love it

#

the medic is the only one who can fully heal you in my missions: well the med tent can also but you must call the extraction chopper to go back to base to go in the med tent if we have no medic

#

or if no one choose's to be medic as it were

#

there's 2 player slots that are medic's

#

so 10 player missions so you can have 2 teams both teams have 5 guys: and one guy can be medic in each team

#

or one team of 10 of course

pallid palm
#

sounds like fun yes ?

drowsy geyser
silent cargo
#

How reliable are triggers in feature rich missions with a lot of other stuff going on?

Like.. if I make a safezone trigger and have it run a protection script when they enter/leave - is there ever a chance of it getting stuck and leaving them invincible when they leave?

thin fox
silent cargo
#

I think I will also add some variable check when they leave the area too just in case

tender fossil
thin fox
hushed turtle
silent cargo
thin fox
pallid palm
#

everything works so good: i'm so happy about Arma 3: Woohoo

#

i Actually have 1 mod now i can't believe it tho: Huey Choppers ๐Ÿ™‚

eternal spruce
#

I have an object that keeps getting destroyed even after using allowDamage false and even in the attributes tab i uncheck the box that enables damage, what can i do to fix this?

pallid palm
#

we need to know more about it like where does the object start at and when does it get destroyed

#

you need to use this allowDamage false; by the way

#

and what object is it what is the object ?

eternal spruce
#

Itโ€™s an airplane and itโ€™s starts on the ground then executes a unitPlay where it takes off. As it moves to the end of the runway it takes too much damage then itโ€™s destroyed

pallid palm
#

is this a moded airplane

granite sky
eternal spruce
pallid palm
#

oh no ๐Ÿ™

#

so when you recorded unitPlay did you use the flaps to take off

eternal spruce
#

Yes I did

pallid palm
#

hmmmm ok im thinking

#

domb ? but was the grar down when you took off ๐Ÿ™‚

#

and is the run way long enough for that plane

eternal spruce
#

Yes it was down, I think the issue is that I used a different airplane in the UnitCapture (kc-135) and unitPlay on (c-17), not sure why itโ€™s getting destroyed because itโ€™s works on another

pallid palm
#

i see

eternal spruce
#

I also noticed when using some aircrafts at max throttle going down the runway if you donโ€™t take off you take damage to the gear then eventually if you keep going you get destroyed

pallid palm
#

hmm interesting

#

yes that make sense

#

just like real life

#

is a c-17 a cargo plane ?

eternal spruce
#

Ok I thought it was a conflicting mod and yes C-17 is a cargo plane

pallid palm
#

ok nice i was in the US Air Force so what you are saying makes sense

#

yes landing gear is some what the weakest part of a plane ๐Ÿ™‚

eternal spruce
#

Iโ€™ll remake the UnitCapture but move slower than I did

pallid palm
#

and in Arma 3 that's really true

#

roger m8

#

try to get off the ground as soon as you can

#

full flaps when you get speed

#

i worked on the C-5A in my day it is now it like C-20G or something like that ๐Ÿ™‚

#

no it must be the C-5G

eternal spruce
#

Ok I was trying to make it a bit cinematic by prolonging the takeoff but thank you Iโ€™ll remake it

pallid palm
#

rgr m8

pallid palm
#

yeah bad ass C-plane yes

#

them wings look so small lol ๐Ÿ™‚

#

how the hell does that thing fly lol

#

you can put 9 gryhound Bus's in the cargo

#

3 across and 3 back

eternal spruce
#

lol I didnโ€™t know itโ€™s that small

pallid palm
#

lol

#

its like a football field in there ๐Ÿ™‚

#

and don't forget to use this allowDamage false;

cobalt path
#

does anyone have an idea how I could have smth like

setPlayerRespawnTime 300;

But only for people who respawn.
Essentially the issue is that I want players to have like a 5min respawn timer, so they couldnt get back into combat immediatly. BUT I dont want that to apply to guys who just joined the server

pallid palm
#

well you could use the onPlayerRespawn.sqf but set the player to what you need here

#

in the description.ext```cpp
// -1 - Dont respawnOnStart Don't Run Respawn Script on Start
// 0 - Dont respawnOnStart Run Respawn Script on start
// 1 - respawnOnStart Run Respawn Script on start
respawnOnStart = 0;

respawnDialog = 0;// 0= disabled 1= enabled
respawnButton = 0;// 0= disabled 1= enabled**

#

you may want to use respawnOnStart = -1;

cobalt path
#

Thx I will look into it didnt know this one existed

#

Wouldnt respawn button just send them to 5min timer tho?

pallid palm
#

no it will respawn them right away

cobalt path
#

Ohhhhhhhhh

#

Hmmmmmmm

pallid palm
#

let me know if you need any more help ok m8

cobalt path
#

I got another idea. Have initplayerlocal. So when player joins the server his respawn is 5 seconds but on respawn it gets increases by 30s every time

pallid palm
#

can do yes

cobalt path
#

Until he relogs so that would solve that isdue

cobalt path
#

I use it all the time. My initplayer is like 2000 lines long

pallid palm
#

yup thats the way Arma 3 works ๐Ÿ™‚

#

2000 lines omg ๐Ÿ™‚

#

well i always try to find the best way and it takes me a long time to do that : but the guys in here help me lots

#

i hope i helped you some im not the best: im still learning

#

no not the initplayerlocal i was thinking the wrond thing

#

i was thinking the initPlayerServer or something like that

cobalt path
#

All good. I will test it tomorrow. I thinking like having a variable like _myplayerrespawntimer = 5;
Playersetrespawntimer _myplayerrespawntimer;

And on respawn would be smth like
_myplayerrespawntimer = _myplayerrespawntimer +30;

#

I dunno smth like that

pallid palm
#

no no what you had befor was ok

#
respawnTime = 300;

setPlayerRespawnTime respawnTime;
#

i use that stuff in my team respawn script

cobalt path
#

do you put it in initplayerlocal?

pallid palm
#

well it should work any where you put it i think

cobalt path
#

I am testing now

pallid palm
#

@cobalt path if you have it in the initplayerlocal then JIP players will have to w8

#

i would put it in the onPlayerRespawn.sqf

#

and set the player not to respawn on start

cobalt path
#

Uhhh, okay I am trying, setrespawntime doesnt seem to work for me when onplayerrespawn sqf

pallid palm
#

did you define the respawn time like i showed up there

#
respawnTime = 300;

setPlayerRespawnTime respawnTime;
cobalt path
#

No, for testing purposes I just did

setPlayerRespawnTime 20;
pallid palm
#

well

#

see the setPlayerRespawnTime is kinda diff from the main respawn time in the respawnDelay = 20; in the description.ext

tough trout
#

Question: is it possible to have a series of Hold-actions set their respective variables as "True" so that when the Nth action down the line is completed the script triggers?

Example: the mission is to destroy a fuel depot but conventional means are unavailable/impractical. So the players have to change the machine state on a couple pumps and trigger some back-pressure. Then, trigger another interaction to have the pumps detonate. But this would only work if all the pumps are set, and the players won't be told in advance how many there are.

pallid palm
#

well i only use 1 hold action: so i think it possiable to do: but i dont know how

tough trout
#

Yeah, I normally don't get this involved but I've decided to start integrating small puzzles into my missions

pallid palm
#

so what i would do is use 1 hold action like in 4 diff flags or something like that

#

to get the thing to expload

golden knot
pallid palm
#

yup could do

#

theres so many ways

#

could put hints in there as well

#

or even tasks can work also

split ruin
#

is there a way to forbid players from loading any loadouts with items that are not present in the arsenal ?

#

only manual blackilisting possible ?

granite sky
#

Scripting solution? I guess you could override the buttons and check yourself against the arsenal contents.

split ruin
#

this is over my knowledge unfortunately, is there a way to export current arsenal classnames ?

split ruin
#

one more thing is there way to remove rain sound from vehicles? I prefer not to disable all ambient sounds but the vehicle ones only ...

opal zephyr
#

weird bug in 3den, things set with set3DENAttribute dont save when saving the scenario just once, you need to save atleast twice before the value is actually retained

pallid palm
#

is that 3DEN Advanced

#

or the mod editor

opal zephyr
#

scenario editor, vanilla mission editor

warm hedge
#

If you believe some vanilla thing is broken, make a ticket in #arma3_feedback_tracker (its description) and be sure to include repro steps

golden mirage
#

anyone got any idea how to fix soldier[O_Soldier_SL_F]:Some of magazines weren't stored in soldier Vest or Uniform?

tulip ridge
tulip ridge
#

Also it's specifically for items/magazines (and their respawn versions), since items in backpack are handled through different backpack classes

ivory lake
#

theres a bunch of vanilla units that get that error and it doesn't actually matter

#

its because the magazine gets loaded into their weapons so they're not 'missing'

#

basically the error pops up for them because the game checks if they have room for the magazines - and they don't - but then their magazines get loaded into their weapons and they end up having room

cosmic lichen
#

Sounds like the engine check for that should get a fix

golden mirage
#

@still forum

#

hi

split ruin
#

how to disable rain ambient sound with vehicles, this doesn't help

enableEnvironment [false, false, 1];
ivory lake
#

don't think you can, they're part of the vehicle sound config and not the environmental sounds

split ruin
#

@ivory lake this terrible immersion breaking thing ๐Ÿ™

ivory lake
#

the snow thing is set in the terrain config

split ruin
#

@ivory lake everything is fine with terrain and terrain objects like buildings, the problem are vehicles, they have rain sounds, not snow/no sound ...
and these are vanilla vehicles ...

ivory lake
#

you don't have to ping me

#

I didn't say anything about the terrain objects or whatever - i said the 'snow' stuff is set in the terrain config

#

so you can't do anything to it with scripting

#

oh actually... setRain got extended

#

see the 3rd example

split ruin
#

thank you a lot, this fixed rain sounds ๐Ÿ‘

split ruin
#

I am playing with the params and I want to simulate heavy snowfall, for now this is the most dense snow I can spawn, I don't know how to change the params

[
        "a3\data_f\snowflake4_ca.paa",    // rainDropTexture - 4 means it has 4 flakes in it. Other available textures: snowflake8_ca.paa, snowflake16_ca.paa
        4,            // texDropCount - 4 because we are using texture with 4 flakes. Change to 8 or 16 in accordance with other textures used
        0.01,            // minRainDensity
        25,                // effectRadius
        0.3,            // windCoef
        2.5,            // dropSpeed
        0.1,            // rndSpeed
        0.5,            // rndDir
        0.07,            // dropWidth
        0.07,            // dropHeight
        [1, 1, 1, 0.5],    // dropColor
        0.0,            // lumSunFront
        0.2,            // lumSunBack
        0.5,            // refractCoef
        0.5,            // refractSaturation
        true,            // snow
        false            // dropColorStrong
    ] call BIS_fnc_setRain;

๐Ÿคทโ€โ™‚๏ธ

#

I tried

0.9 //minRainDensity 

but this stops snowfall completely ...

hallow mortar
#

You'll want to test this, but I think the rainparams array sets the properties of the rain but not its actual strength. The minRainDensity param is the minimum rain strength needed for the rain effect to appear.
The preceding 0 setRain 1 in the example is important; that's what controls the actual strength

#

If you already have rain strength set to 1 then that's it, that's the best you get

split ruin
#
    0 setOvercast 1;
    0 setRain 1;

is exactly what I was looking for, let it snow ๐Ÿง‘โ€๐ŸŽ„

drowsy geyser
proven charm
#

does it need radio channel ("CROSSROAD") or something?

drowsy geyser
#

The Wiki doesn't say anything about the name parameter

hallow mortar
#

The function does check whether subtitles are actually turned on in the game settings, and will not run if subtitles are turned off. So that could be it.

drowsy geyser
#

Oh so if i create a mission and the people have their subtitles off they wont see it?

hallow mortar
#

You might be able to use showSubtitles to force it on, but I'm not sure exactly what that influences

drowsy geyser
#

Thank you i will try this

serene olive
#

How can I set the progress bar of the Rugged Comunications Hub via script command?

hallow mortar
#

Use animateSource with "Progress_source"

#

It looks like the value should be between 0 and 100

serene olive
#

I tried:

cursorObject animateSource ["Progress_source", 80, 1];

This fills the Progress bar up to 80%.

serene olive
hallow mortar
#

rightclick on the object in the Editor, select "Open in Config Viewer", and look in the Attributes or AnimationSources subclass in the left panel

#

(suggest using Advanced Developer Tools to make the Config Viewer more bearable to use)

drowsy geyser
gray thistle
#

I am sorry if its the Wrong Sector it seems to fit either editor or scripting...

I try to understand 2 Issues:
1.

17:36:26  โžฅ Context: E:\Windows Benutzer\User\Dokumente\Arma 3 - Other Profiles\Serga\missions\V3noms Server Mission Files\mission.Altis\stringtable.xml <-     [] L1 ()
    [] L1 ()

17:36:26 mission: string @STR_MISSION_DESC cannot be localized client-side - move to global stringtable```
2.
```17:36:26 Warning: Cannot evaluate ''
17:36:26  โžฅ Context:     [] L1 ()
    [] L1 ()```

These both to relate to issues in the Stringtable.xml.

Funnily enough even though 1. says it can't find the Language it translates it perfectly. This kinda seems like an Arma 3 Issue. Removing the one Localization pointer fixes it though.

For the later it seems like it wants to evaluate something but it can't show me the line or block for that issue. I overtook an old project i just need direction what i have to search for for the second issue .
gray thistle
tawdry pond
#

Hi, I'm trying to use dynamic simulation with mines, so they are only triggered by players at and not bots. When I do: "helipad1 enableDynamicSimulation true", "dynamicSimulationEnabled helipad1" returns true. The same does not seem to work with an APERS bounding mine. Any suggestions?

hushed turtle
#

enableSimulation works on it though, but you would have to handle yourself when it gets enabled/disabled

proven charm
#

cant you set the mines side or something? sorry dont know much about mines

tawdry pond
#

Yes, it works manually, guess i'll have to write a script

hushed turtle
#

Easiest would be to disable simulation when any of the players enters a trigger area

tawdry pond
#

idk, a trigger for each mine is a bit overkill

#

maybe the other way around - a trigger attached to player, but how to disable simulation for mines that exit trigger?

hushed turtle
#

I meant trigger per minefield

tawdry pond
#

i'd like to do it for individual mines

hushed turtle
#

I guess you could use nearObjects to find mines around player

proven charm
#

or loop mines (allMines) like mad in eachFrame EH and activate/deactive them

tawdry pond
#

i'll figure it out, i'm sure, it's a shame it doesnt work with the dynamic simulation, it would have been perfect

#

each frame is also a bit overkill, but i'll do like a 0.5 sec loop

proven charm
#

the only prob with scheduled is that it may actually run slower, than 0.5

hushed turtle
#

If you have mines grouped together in minefields, you could save performance by not checking mines from minefields too far

tawdry pond
#

it's true, but for my purpose i want to trigger individual mines, because bots could be in the same minefield and they are not supposed to trigger mines

hushed turtle
#

I meant checking per mine, but only on minefield where player is

tawdry pond
#

i thought to check on client 5-10m around player or something and use enableSimulationGlobal

hushed turtle
#

It gets more complicated with multiple players, since each player can be close to different mines

tawdry pond
#

and it doesnt really, if it's done on client

hushed turtle
#

I see

tawdry pond
#

each client checks area around the local player

#

i'll figure it out, thanks for the help

hushed turtle
#

Which also means it won't enable simulation for any AI not local to the player

agile pumice
#

I could have swore there was a toLowerCase function or sometihng

#

nvm, its toLower

magic dust
#

Is there any way to disable the "clan name" display after the player name? I think i accidently disabled it on my server and now I cant find how to re-enable

proven charm
#

sounds more like server config than scripting

cosmic lichen
#

Aren't these just part of the player's name?

proven charm
#

he said they were disabled

#

could it be a script that "disables" them after all ๐Ÿค”

hallow mortar
#

If those squad tags were provided by the Arma 3 Units service, rather than by an independently hosted squad.xml, then they won't appear if Arma 3 Units is down. In an interesting coincidence, Arma 3 Units was down last night and may still be down

real tartan
#

is there a way to detect if mine was deactivated and not blow up ? using mineActive, but can't differentiate if mine was exploded or deactivated

using condition like this

private _result = allMines findIf { mineActive _x } isEqualTo -1 };
proven charm
#

try ```sqf
alive _mine && ! mineActive _mine

real tartan
proven charm
#

oh ok

#

alive returns false on null objects tho

granite sky
#

Yeah, alive is correct. Also doesn't make assumptions about whether the object gets deleted on death or not.

#

I imagine mines are always deleted on death so isNull will work, but alive seems safer for a general solution.

jagged mica
#

is there a way to reassign functions to variables? I have a variable which is given a function as a value on init, but I want to overwrite it later. For security reasons I understand it cant be simply done with global variables because publicVariable could easily override it and run malicious code, but it seems to also be blocked in localNamespace, any idea why and how to work around it?

old owl
granite sky
#

If you didn't use compileFinal and the functions library didn't, then the variable can be overridden.

#

I don't think the namespace matters. At last count you can compileFinal into profileNamespace and brick your profile if you want to.

jagged mica
#

let me give some context

#

Ive got a custom config for weapon attachments, and in their config I added onActivate and onDeactivate string properties which are functions

#

now in my scripts, I've got global variables for both activate and deactivate functions, and I want to swap these values as the weapon attachment changes

#

but somehow arma won't let me do it, I am unable to override a value

#

I think I just figured out the answer to my problem

granite sky
#

hmm. I've never heard of onActivate and onDeactivate event handlers.

jagged mica
#

they are custom for my mod, Im trying to load them from the config in my scripts to do stuff

#

also they're irrelevant, the most important bit is that Im trying to dynamically swap out functions assigned to variables

granite sky
#

So how are you assigning them in the first place? That's the relevant part.

sharp grotto
jagged mica
#

// init.sqf
MYMOD_VARIABLE = BettIR_fnc_defaultOnActivate;

then in a different script I try to load it from the config as a string and assign

MYMOD_VARIABLE = (call compile _onActivateFromConfig);
#

tried the same with localNamespace but it refuses to override it

#

however, Ive got another variable for deactivate which initially is just an empty code block {} and Im able to override that

granite sky
#

example 2 on compileFinal:

// duplicate code will be final as well
_myDuplicateCode = _myCode;
jagged mica
#

not sure if I can reassign after assigning it

granite sky
#

So if BettIR_fnc_defaultOnActivate is final then MYMOD_VARIABLE will be as well.

sharp grotto
#

need to make a new function

jagged mica
#

so realistically I should just store the name of the variable

#

and compile every time I call it

#

if I want to have a dynamic code like that

granite sky
#

You could not use compileFinal. Or store other data that tells some code which function to call.

jagged mica
#

Thanks. Ill think about the path forward tomorrow

low spear
#

WIP ๐Ÿ™‚

#

Originally I wanted to reuse the code from BIS's virtual garage, but I ran into a problem with it

#

And most importantly, I want this script to work in vanilla (and without CBA dependencies).

low spear
#

For now, i use a simple pylon display with a generic UI
Is it possible to easily get this one?

granite sky
#

"easily" might be a stretch. But it should be in there somewhere.

warm hedge
#

You can easily recreate similar GUI with some several ctrlCreates, the picture and combo boxes are defined in config and can fetch the data easily

low spear
#

Ok thank you

#

I'm currently looking at the forum topic

torn stream
#

does execVM makes the function/script run on server-side? how can i execute a script on server-side?

sharp grotto
torn stream
#

ty

mortal folio
#

is there a way to check if we're in main menu and not an actual mission? pre-init and post-init seem to run if you dont have the "show static background in menu" and "no land" ticked in the launcher, and i dont want them to

#

i already got the mission name for the background "mission" but in the very edge case that ever changes (esp. due to a mod) i'd want something more robust

winter rose
#

try maybe with worldName too?

mortal folio
#

from what i can tell the background map is just a mission like any other that gets loaded

dusk gust
mortal folio
#

Hm.. ill try that

little raptor
little raptor
mortal folio
#

oh, sweet!

mortal folio
#

yeah @little raptor that worked like a charm, thanks!

jagged mica
#

I'm back with more questions

#

any idea what "GIAR pre stack size violation" means? It occurs in my postInit script

warm hedge
#

Usually a wrong syntax (not too obvious one)

jagged mica
#

at least when Im trying to run it with execVM with a file path. It's also a function in CfgFunctions with postInit=1 flag, but it doesnt seem to run and I assume it's similar

warm hedge
#

Such like arrays with extra comma

jagged mica
#

interesting

#

I'll try

proven charm
#

pls post code

low spear
#

My UI is ugly, poorly positioned, but everything work (a few minor changes to make it perfect or almost perfect)

#

I'm really struggling with the UI design

#

I have just 200 lines of code (all-in-one file, 100% vanilla, no dependencies), and in theory it should work in multiplayer
I'll try to keep this under 300 lines

low spear
#

I'll still need to create the checkbox (if that's actually what 3DEN calls a checkbox) to define which seat will use the weapons. But I think I can manage to do that.

jagged mica
# proven charm pls post code

Figured it out but ngl i don't even know what fixed it. Removed all the code that I commented out earlier, made sure that even all one-liner code statements have semicolons and it worked

little raptor
proven charm
#

is it possible to detect if man has armor on his shoulders/hands etc ? i need to give him armband of proper size

exotic gyro
proven charm
#

what im trying to avoid ๐Ÿ™‚

proven charm
#

i was thinking that maybe the vests for example have some value that shows which body part they protect?

hushed turtle
#

Maybe they just add same armor value for entire torso

proven charm
#

that would be lame

hushed turtle
#

Have you taken a look at config?

#

Of one of the vests?

proven charm
#

not yet

tulip ridge
foggy hedge
#

Hi everyone,
I'm working with KillzoneKid's old server transfer script prototype that uses stacked onEachFrame eventhandlers to exit the player from the current multiplayer mission and then connect to a new server by scripting a serie of interactions with the multiplayer tab GUI. However, it looks like the code now stops after the mission ends. KillzoneKid notes this:

[the server transfer] is possible because of using onEachFrame from within onEachFrame so that you run certain portion of code per 1 frame. onEachFrame also survives exiting procedure from the game but gets reset as soon as new mission is received. This is enough to handle server switching.

My question: did this behavior of onEachFrame get patched out at some point? I saw that there was a mod called "Server Transfer System" that used KillzoneKid's code as a base and was functional from 2017-2023 (ish), but it's been removed from the workshop and of course the armaholic download is gone. Is there a new method thats prefered, cause I remember that cytech was experimenting with it at some point?

I'm using KillzoneKid's original code with some extra debug build in. Here's the relevant snippet with variable references replaced with their actual items for clarity.

diag_log "Closing all open displays";
private _allDisplays = allDisplays select 
[
    allDisplays find findDisplay IDD_MISSION, 
    count allDisplays
];
reverse _allDisplays;
{_x closeDisplay IDC_CANCEL} forEach _allDisplays;

onEachFrame 
{
    diag_log "Leaving mission"; //this is present in the rpt log
    findDisplay IDD_DEBRIEFING closeDisplay IDC_CANCEL;
    findDisplay IDD_MP_SETUP closeDisplay IDC_CANCEL;
        //client is returned to main MP screen
    
    onEachFrame
    {
        diag_log "Opening Direct Connect tab"; //this is not present in the rpt log
        ctrlActivate (findDisplay IDD_MULTIPLAYER displayCtrl IDC_MULTI_TAB_DIRECT_CONNECT);
        ... code continues ...
low spear
#

I tried it on the uiPicture but it places the comboBoxes in the center of the screen

fleet sand
#

Hi, Iโ€™m here asking for help. Iโ€™ve been trying to figure out how to fix this, but with no luck so far.

This is the only shop system that is publicly available for Arma, but it has a bug where it cannot display the facewear category. All other categories works except the faceware. If anybody could take a look in their spare time and help me figure out how to fix this problem, I would really appreciate it.

https://github.com/7erra/VASS-Virtual-Arsenal-Shop-System

The shop system is in the Mission.VR folder

GitHub

Converts the vanilla Arsenal into a shop. Contribute to 7erra/VASS-Virtual-Arsenal-Shop-System development by creating an account on GitHub.

ancient stump
#

QUERY - HOW DO I ADD AMBIENT SOUNDS TO AN AREA?

  • Hello, I am making a mission heavily centered around a city and I am wanting to add ambience of cars and sirens in the area of the city.
  • I have tried to use the "playsound3d" function but the sound's audibly distance is too small to encompass the entire city.
  • I have no idea how to increase the audible distance of the sound so that it is audible throughout the entire city but is inaudible outside a certain range (e.g: in the countryside)
  • If you have any advice, please send ๐Ÿ™
winter rose
ancient stump
winter rose
#

let's have everyone do that then ๐Ÿ˜›

ancient stump
winter rose
#

negative, sorry ๐Ÿ˜ฌ working rn

ancient stump
#

you free sometime later?

exotic gyro
#

Someone will help eventually

#

Way I'd do it is a bunch of sirens with playsound3d loops (pfh's) running on them on the server with an alive check for each one to remove the pfh if the siren gets destroyed

ancient stump
exotic gyro
#

Like it'll add up but you could cover an Arma city with maybe five of em if you set the range to like 2000

ancient stump
#

It's quite a large city so it will probably be quite a lot if the sound's audible distance is low

exotic gyro
#

Check the wiki

#

if you're in a city that big, a few pfh's is gonna be a drop in the bucket in terms of performance

ancient stump
# exotic gyro It'd a playsound3d params

I'm a little confused on how to set the params, I'm quite new to proper eden editor coding and scripting and stuff so I'm a bit slow with this stuff. I've followed the wiki's instructions but it isn't working in game for whatever reason.

exotic gyro
#

Playsound3d is a different thing

#

For this you kinda have to know the basics of scripting

#

People do teach the basics here but that's people other than me

ancient stump
#

You know anyone who can help?

exotic gyro
#

Someone in this channel may decide to

#

The wiki is a good resource

#

Plus cba docs for how to add cba per frame handlers

ancient stump
#

Thank you for the help ๐Ÿ™‚

fair drum
#

I wouldn't bother with a per frame handler at his level. The sounds don't need to be frame time specific. Just do a scheduled loop.

exotic gyro
ancient stump
exotic gyro
fair drum
exotic gyro
little raptor
#

I think what Lou said is the best way to do this. Just use createSoundSource

rotund shoal
#

Hello,
I'm running on a framework derived from Altis Life.
When a player opens a door in a house (modded or not), it is only open for them (on the client side only). Other players see it as closed.
Do you have any idea where this might be coming from?

exotic gyro
rotund shoal
exotic gyro
rotund shoal
#

The houses are placed directly on the map. Is it related to the mission?

#

Where can I change that?

exotic gyro
#

Uhhh someone is being weird then

proven charm
#

do you know if the doors are supposed to be locked?

#

because that might cause desync...

rotund shoal
proven charm
#

ok

rotund shoal
#

But they are closed, and as soon as you open them, they only open for one player.

#

Each player must open it to see it open...

rotund shoal
#

I tried disabling BattlEye, Infistar, changing the difficulty, etc.
I can't find it... If you have any ideas, I'm all ears.

proven charm
#

battleye and those things probably wont affect, but maybe some mod does

rotund shoal
#

Many mods interact with doors to animate them.

#

Like (_this select 0) animate [(_this select 1), 1];

proven charm
old owl
#

Although kind of at a loss, you wouldn't happen to be using animate and animateSource together would you? The wiki says it results in undefined behavior, although no idea what that behavior would look like

rotund shoal
old owl
#

Hmmm. I used animate with a terrain object (local) and a global object (non-local) and didn't experience any issues. I'd definitely look into the mods, but without more details hard to say

old owl
#

Everything about buildings (animations, damage, etc) should all be public and be relayed through JIP. I feel like the house has gotta be local or something.

rotund shoal
#

These are terrain objects. I haven't tried anything yet. But it works on some modded buildings, others don't, and vanilla ones don't seem to.

old owl
#

Okay so I read this:

It is recommended that animateSource command is used instead of animate whenever is possible, as it is more efficient and optimized for MP

And figured I'd regex change all our usage of animate to animateSource just to give it a whirl and see what happens. I immediately had issues with both terrain and global objects. In further reading of the wiki:

If animate uses class name from CfgModels Animations, animateSource uses name defined by the source property. AnimationSources can animate multiple animate Animations. AnimationSource is defined in CfgVehicles' AnimationSources (see Arma 3: createVehicle/vehicles).

My guess would be that perhaps your command usage of animate or animateSource doesn't match with your models source property. I didn't investigate any more myself since I gotta head out but figured I'd document my findings.

Ultimately though, if you're noticing this after newly added mods; ruling them out one by one would probably be your best bet if you're not wanting to dig through each of them.

sharp grotto
# old owl Okay so I read this: > It is recommended that animateSource command is used inst...

I used that back then for some stuff with doors and never had any problems nor complaints (used on multiple MP servers for terrain objects and additionally placed).
If it doesn't work the model/config is badly made.

...
private _AnimationSources = ((configfile >> "cfgVehicles" >> (typeOf _Building) >>  "AnimationSources") call BIS_fnc_getCfgSubClasses);
{_Building animateSource [_x, 1]} foreach _AnimationSources;
rotund shoal
# old owl Okay so I read this: > It is recommended that animateSource command is used inst...

I have some logs :

20:38:02 Object id 8ba27142 (322) not found in slot 78,93
20:38:02 Link cannot be resolved
20:38:11 Object id 8ba27142 (322) not found in slot 78,93
20:38:11 In last 3000 miliseconds was lost another 1 these messages.
20:38:11 Link cannot be resolved
20:38:11 In last 3000 miliseconds was lost another 1 these messages.
20:39:08 Object id 8ba27142 (322) not found in slot 78,93
20:39:08 In last 3000 miliseconds was lost another 1 these messages.
20:39:08 Link cannot be resolved
20:39:08 In last 3000 miliseconds was lost another 1 these messages.

#

But I don't know if it helps you

old owl
#

Unfortunately it does not catNope

rotund shoal
#

๐Ÿ˜ข

#

It is very weird...

#

Because it happens with vanilla buildings

granite sky
#

Hmm. Are you sure server & client aren't running different versions of the same map, or something like that...

sharp grotto
#

^ easy to check if you compare the netID of the building. Should be the same on server and all clients. https://community.bistudio.com/wiki/netId
Also check simulation, maybe some weird script disabling simulation?

rotund shoal
#

My friend doesn't have updated his version....

#

I'm sorry for the disagreement

mortal folio
#

what's the correct way to get the [a, b] area of a module with an editable area while in 3den? BIS_fnc_getArea doesn't work and manually getting the objectArea variable only works while in mission

stable dune
#

if i remember correclty

(yourModule get3DENAttribute "Size3") select 0 params ["_a", "_b"];
mortal folio
#

that worked

#

thanks

granite sky
#

Not sure if there's a way to get module attribute names from the UI. If you don't know one you might need to grind through the config.