#arma3_scripting

1 messages · Page 63 of 1

cyan dust
#

Yeah, but it returns only one classname. And crew consists of several units, right?

warm hedge
#

Incorrect

#

Crew (Driver, Gunner, Commander) shares them

cyan dust
#

So its always the same unit just in quantity of 1/2/3 ?

meager granite
old radish
#

hideObjectGlobal is the one i use, and with a trigger you would probably only want to use remoteexec (useful if you need to execute on a specific side) if the trigger is evaluated only on server (the tick box)

#

{_x enableSimulationGlobal true; _x hideObjectGlobal false} forEach (allUnits inAreaArray trig1);

shut gate
#

ahh, so if a trigger is activated that has fadeSound in it, I shouldn't have to remoteExec that to affect every player, right?

#

what would be the situations to use a server-evaluated trigger?

old radish
#

i think that does need to be global if the sound is being sent global (any way that executes on ppls machines if they got the sound playing on their end basically)

shut gate
#

the sound in this case is just a vehicle they're in

old radish
#

was your issue that it basically executed the sound so many times it overlapped and got loud?

shut gate
#

yeah

old radish
#

if so, evaluate only on server but use remoteExec and specify (or dont) who will hear it by deciding the targets.

#

it will only do the sound playing once and on the server when the trigger activates the dialogue, but since its broadcast to those players they will all hear it.

meager granite
#

Asking for help again

#

Question ^

#

Unless there is reliable scripted formula to be had

cyan dust
willow hound
#

Try setting things up like this in initPlayerLocal.sqf:

...
private _quarry = selectRandom _competitors;
player setVariable ["DAE_Quarry", _quarry, true];
...
player addEventHandler ["Killed", {
  params ["", "_killer", "_instigator"];
  //ACE stuff here if needed ...
  if ((_killer getVariable ["DAE_Quarry", objNull]) == player) then {
    //_killer killed their quarry.
  } else {
    //_killer killed someone else.
  };
}];
```The EH is added to the player, but it is only added on their own machine, so you do need remote execution in that last if-statement.
old radish
#

perhaps like a huntingYou array on each player that adds or removes units based on who is hunting you or is dead

#

surely its not player setVariable it has to be _quarry setvariable right?

still forum
meager granite
willow hound
# old radish Oo, perhaps. Im confused though, surely this would make everyone on the civ si...

Every object has its own varspace. _obj setVariable ["Varname", _value, true] adds a variable (Varname) with the value _value to the varspace of _obj. Because the last element in the array is true, the variable and its value are also broadcast to other machines in multiplayer.
Every player runs initPlayerLocal.sqf when joining, so every player unit gets a DAE_Quarry variable in the varspace of the unit. Thus, we can use A getVariable ["DAE_Quarry", objNull] (on any machine) to check which unit player A is hunting.

old radish
#

ahh ok ok so its to declare the variable my b, and i didnt notice _quarry in the value section it makes sense to me now

old radish
wind hedge
#

does anyone know how to recreate this via scripting:

#

I need to make vanilla based ghosts 👻

winter rose
#

have you tried setObjectTexture?

little raptor
wind hedge
#

Yeah but I can't get the right combination. I tried a glass material and looked quite ghostly but would became fully invisible when they had the sky behind them

warm hedge
#

"a3\characters_f_bootcamp\Data\VR_Soldier_F.rvmat"

winter rose
#

(and what makes you think that's not the case in this picture?)

little raptor
#

you don't need a mod for that

#

you can place them in mission folder

wind hedge
little raptor
#

they're just configs

#

tho for more advanced stuff you might need a mod. not sure

wind hedge
warm hedge
#

They are not used anymore but the material is still there

little raptor
#

then try them one by one 😬

warm hedge
little raptor
#

but those in screenshot are not VR soldier mats

#

as far as I see

warm hedge
#

Don't you remember the old VR soldiers?

little raptor
#

no meowsweats

#

I mean it depends how old you're talking about 😅
I started playing A3 around end of 2015

warm hedge
#

Like... 2014? 🤔

wind hedge
warm hedge
#

You've already reacted to the post

little raptor
pulsar bluff
little raptor
#

it might work blobdoggoshruggoogly

warm hedge
#

It does

little raptor
#

it does work then 😅

pulsar bluff
#

how well does it work on vehicles?

#

and other props

warm hedge
#

Pretty much the same with VR soldiers

meager granite
pulsar bluff
#

good ol' puristaMedium

meager granite
#

Was there a post announcing switch to RobotoCondensed and reason why?

#

It made UIs look so generic to be honest

warm hedge
#

IIRC one of the dev made a Mod to make the font back

kindred zephyr
#

is there a way to know if a sound is done playing?
Say3D and PlaySound3D doesn't seem to handle sound durations, or is this something that i would have to evaluate on my side with time durations?

Asking since sounds overlapping are incredibly loud sometimes

meager granite
little raptor
#

I guess it deletes automatically when done? think_turtle

warm hedge
#

It should

#

No idea if deleted EH will fire or not tho

kindred zephyr
#

thanks, have to check then

wind hedge
meager granite
#

Old VR uniforms aren't there anymore

#

Which sucks to be honest, I think p3d is still there

kindred zephyr
#

arent the old vr uniforms the ones that look like velcro?

I remember using those classnames recently, arent they just hidden from the arsenal?

snow viper
#

@warm hedge @sick gazelle i'm trying to replace the names visible on the map with different ones. It seems like deleting and re-adding custom ones is the only way, correct?

sick gazelle
#

It's likely the easiest way.

still forum
#

No. Create, then modify

#

Read the wiki page text on the createLocation page

sick gazelle
#

Isn't there a syntax for one of them to hide the config ones?

still forum
#

Yes

sick gazelle
#

So get references to the config ones.
Hide them.
Create new ones.
???
Profit.

still forum
#

No need to hide

#

Just create and set name

snow viper
#

so you use the createLocation to overwrite existing data, or ?

still forum
#

Yes

#

And then you can set the name

hallow mortar
still forum
#

_loc = createLocation old name
_loc setText "Chernogorsk"

grand stratus
#

Does anyone know if the use of an extension can be made to be used exclusively on the server?

The wiki says that all clients must have it installed to use in a mission file, but when using the command it doesn't throw any errors when I 'misspell' the extension for example. It seems like there may not be any 'check' to see if a client has the relavant extensions used within the sqf code before joining a server/blocking them from doing so if they don't.

I am curious if there is a way around this via only having the 'isServer' part of the code ever call the 'callExtension' in the first place.

I do not have a dedicated server to test this out on, and am curious if anyone else has dabbled in it.

meager granite
#

Addons can differ between server and clients

#

Even between clients

#

Just have your extension addon only on server

#

There is also -serverMod= so addon is not listed for clients

still forum
#

There are warnings thrown to RPT on incorrect name or not found

#

isServer check would work just fine

snow viper
#

does it have to be changed before the map is loaded?

meager granite
#

Example 3 has example how to do it

tepid hornet
#

Does anyone have a example mission with acedefaultloadout set up, want players to be able to load a public kit up (save time for newcomers) when they join, and for those kits to always be available . I had it set up in the past but someone did it for me and I have no idea for the life of me how to set it up, tried following the instructions on ace framework but clearly did it wrong as there was no public loadouts

sullen sigil
#

edit unit loadout in 3den and then navigate to default loadouts part and save loadout like any other

tepid hornet
sullen sigil
#

i literally just told you that method

tepid hornet
#

Ah maybe I misunderstood mate

#

You free in an hour to explain?

#

@sullen sigil

sullen sigil
#

no i already explained

tepid hornet
#

Can someone else try explain it who’s actually willing to be of assistance instead of being a stuck up child, TIA

sullen sigil
#

i just told you precisely how you use the feature -- this isn't even a scripting question 🤷

tepid hornet
sullen sigil
#

edit unit loadout in 3den and then navigate to default loadouts part and save loadout like any other

#

quite clearly also written on the ace wiki

tepid hornet
#

Well I don’t understand it, obviously, hence my I’m seeking more thorough help and why I’ve posted in the wrong channel,and your not willing to provide it, so I’ll carry on seeking help until someone has the time to talk me through it, someone will help eventually if your not willing to talk me through it

sullen sigil
#

it is literally a button right next to the public loadouts tab you think they should be in

tepid hornet
#

I know what button your talking about, I have no idea how that makes the loadout available in my mission every time the mission starts up

willow hound
tepid hornet
sullen sigil
#

this is year 2 level reading comprehension

tepid hornet
#

What are you talking about year to, this is to do with arma, not basic English, just stop replying if your gonna start with insults

sullen sigil
#

read the damn docs

tepid hornet
#

I did, just stop because we have established your not being helpful

sullen sigil
#

right, so what is the issue aside from "i dont understand"

tepid hornet
#

When I make a loadout and save it, I know how simple it is to then make it public, but I’m not understanding the steps after that, to make that loadout, available 24/7, even after a server restart, partly because I’m working a 9/5 and can’t really give it my all, Hence why I asked if you were free later

sullen sigil
#

save to default loadouts

#

players access from default loadouts

#

do it in 3den and its available so long as its on the same mission

tepid hornet
#

Ok so I need to always save them to that mission file, every time I make a new mission, I should repeat the process in editor? Am I getting that right?

sullen sigil
#

yes

tepid hornet
#

All it took was a bit of patience, thank you

manic kettle
shut gate
#

@old radish TY for your help earlier. Thankfully most of what I have works rn after applying what you said 🙂

old radish
fleet sand
#

Ty very much.

willow hound
old radish
old radish
#

this will probably not act like a string adding more values to the huntingarray though will it? it will just be replaced... If so thats a problem because multiple people can hunt you

fleet sand
willow hound
old radish
tepid vigil
#

What kind of things (that don't raise errors) could lead to a scalar NaN value meowsweats

little raptor
#

e.g. log -1, sqrt -1, acos 2

tepid vigil
#

I don't think any of the commands I am using have invalid ranges, here's the statement

// _dist is a valid number
// _cPos and _pos are both arrays
// SPEEDOFSOUND is a macro with a value of 343
time + ((_dist + (_cPos vectorDistance _pos)) / SPEEDOFSOUND)
little raptor
#

oh wait do you mean it says "scalar NaN" when you str it?

#

if so it's due to passing nils to those commands

little raptor
tepid vigil
little raptor
#

I meant stringifying it in general

granite sky
#

Is it always returning NaN or just in some cases?

tepid vigil
#

Always. Currently going through the whole call stack to see what's making those variables nil notlikemeow

broken forge
#

I'm having some trouble getting a forEach to work with an array. The forEach will use the last vehicle (i.e. quadbike) class in the array but not both vehicle classes in the array.
Here's what I have for the code:

_unlocks = profileNamespace getVariable ["SOG_Garage_Unlocks", [[],[],[],[],[],[]]];
_cars = _unlocks select 0;

missionNamespace setVariable ["BIS_fnc_garage_data", [
  {[
    getText (configFile >> "CfgVehicles" >> _x >> "model"),
    [
      (configFile >> "CfgVehicles" >> _x)
    ]
  ]} forEach _cars,
  [],
  [],
  [],
  [],
  []
]];

This is what the profileNamespace variable has stored in it: SOG_Garage_Unlocks:```sqf
[["B_VKN_tahoe_UNM_PMC_01","B_Quadbike_01_F"],[],[],[],[],[]]

grand stratus
#

What is your expected output?

little raptor
#

I guess you need apply

broken forge
#

The expected output would be populating the virtual garage list box for BIS_fnc_garage_data with the profileNamespace variable data

little raptor
#

actually you can't store configs anyway

#

why are you storing configs? meowsweats

broken forge
#

I'm trying to work with the BIS_fnc_garage and to set the BIS_fnc_garage_data it needs both the model and config of each vehicle you want to add.

#

It's a pain in the rear end, it seems in order to get BIS_fnc_garge to work with custom BIS_fnc_garage_data you have to use BIS_fnc_addScriptedEventHandler

little raptor
#

and get the config using what you already did

#

and you don't need to store the model either

#

since you can get that one from config

broken forge
#

I don't think I'm storing the config or the model, just the classname in the profileNamespace and then using the classname from the profileNamespace for the script

little raptor
#

you are

#

configFile >> "CfgVehicles" >> _x
returns a config

#

or the model
I mean the model path ofc. you can't store "models" anyway

broken forge
#

the BIS_fnc_garage wiki show that I need to do that for BIS_fnc_garage_data I'm a bit confused, also the wiki states that the function is part of the Broken Functions group

little raptor
#

oh right I thought both were profileNamespace meowsweats

#
_arr = [];
{
  _arr append [getText (configFile >> "CfgVehicles" >> _x >> "model"), [configFile >> "CfgVehicles" >> _x]];
} forEach _cars;
missionNamespace setVariable ["BIS_fnc_garage_data", [_arr, [], [], [], [], []]]
broken forge
#

I'll give that a try, thanks

#

The list box in the virtual garage still has all the vehicles, but when I embed what you sent me with the script I'm working with everything works:```sqf
player addAction ["Open Garage", {
_pos = player getPos [10, getDir player];

BIS_fnc_garage_center = createVehicle ["Land_HelipadEmpty_F", _pos, [], 0, "CAN_COLLIDE"];

[missionNamespace, "garageOpened", {
params ["_display", "_toggleSpace"];
private ["_arr", "_unlocks", "_cars", "_armor", "_helis", "_planes", "_naval", "_static", "_defaultClass"];

_arr = [];
_unlocks = profileNamespace getVariable ["SOG_Garage_Unlocks", [[],[],[],[],[],[]]];

_cars = _unlocks select 0;
_armor = _unlocks select 1;
_helis = _unlocks select 2;
_planes = _unlocks select 3;
_naval = _unlocks select 4;
_static = _unlocks select 5;

_defaultClass = _cars select 1;

{
  _arr append [getText (configFile >> "CfgVehicles" >> _x >> "model"), [configFile >> "CfgVehicles" >> _x]];
} forEach _cars;

missionNamespace setVariable ["BIS_fnc_garage_data", [
  _arr,
  [],
  [],
  [],
  [],
  []
]];

{
  lbClear (_display displayCtrl (960 + _forEachIndex));
} forEach BIS_fnc_garage_data;
    
BIS_fnc_garage_centerType = getText (configFile >> "CfgVehicles" >> _defaultClass >> "model");

["ListAdd", [_display]] call BIS_fnc_garage;

}] call BIS_fnc_addScriptedEventHandler;

["Open", true] call BIS_fnc_garage;
}];

willow hound
#

I'm not sure if you're aware of this, so I'll point it out: With the current setup, player A runs initPlayerLocal.sqf when joining, thus adding a Killed EH to unit A (only on their own client, because it is initPlayerLocal.sqf). Similarly, player B also runs initPlayerLocal.sqf when joining, thus adding a Killed EH to unit B (also only on their own client). However, you never add a Killed EH to unit B on A's client and you never add a Killed EH to unit A on B's client.
Therefore, if player A kills player B, the Killed EH on B's client fires. However, there is no Killed EH on A's client that could fire when B is killed.

little raptor
broken forge
#

Yes, I just posted the source code for anyone to use and edit if they'd like to, thanks again for the help

wind hedge
broken forge
#

@wind hedge Correct because I've setup a default class in my profileNamespace variable array. You'll have to make sure you do the same, otherwise you'll get the error.
Here's what my profileNamespace variable looks like: SOG_Garage_Unlocks:```sqf
[["B_VKN_tahoe_UNM_PMC_01","B_Quadbike_01_F"],[],[],[],[],[]]

wind hedge
# broken forge <@137916926847483904> Correct because I've setup a default class in my `profileN...

Made a version that works without profileNameSpace: ```sqf
BIS_fn_garageAddAction = {
defaultGarageClass = "C_Quadbike_01_F";
BIS_fnc_garage_centerType = getText (configFile >> "CfgVehicles" >> defaultGarageClass >> "model");
player addAction ["Open Garage", {
_pos = player getPos [10, getDir player];
BIS_fnc_garage_center = createVehicle ["Land_HelipadEmpty_F", _pos, [], 0, "CAN_COLLIDE"];
[missionNamespace, "garageOpened", {
params ["_display", "_toggleSpace"];

        private _cars     = ["C_Quadbike_01_F"];
        private _armor     = [];
        private _helis     = [];
        private _naval     = [];
        private _static = [];
        
        private _carsModelsArray     = [];
        private _armorModelsArray     = [];
        private _helisModelsArray     = [];
        private _navalModelsArray     = [];
        private _staticModelsArray     = [];

        if (count _cars > 0) then {defaultGarageClass = _cars select 0;};
        BIS_fnc_garage_centerType = getText (configFile >> "CfgVehicles" >> defaultGarageClass >> "model");

        {
            _carsModelsArray append [getText (configFile >> "CfgVehicles" >> _x >> "model"), [configFile >> "CfgVehicles" >> _x]];
        } forEach _cars;

        missionNamespace setVariable ["BIS_fnc_garage_data", [
          _carsModelsArray,
          [],
          [],
          [],
          [],
          []
        ]];
        {
            lbClear (_display displayCtrl (960 + _forEachIndex));
        } forEach BIS_fnc_garage_data;
        ["ListAdd", [_display]] call BIS_fnc_garage;
    }] call BIS_fnc_addScriptedEventHandler;

    ["Open", true] call BIS_fnc_garage;
}];

}; ```

broken forge
#

@wind hedge Looks good to me, you can create a forEach loop for each of the other arrays like you did with the _cars / _carsModelsArray and replace the empty arrays in setVariable part of the script with the correct array names. (i.e. _armorModelsArray, _helisModelsArray and etc.)

wind hedge
broken forge
#

Same here, lol, not sure how to fix that, but it makes you the driver of the selected vehicle, I've also noticed a small filled in blank box top left corner of the UI as well, not sure what it's for either.

wind hedge
#

Does anyone know if there is a way to get the vehicle out of the garage? So we can apply a custom texture for example _vehicle setObjectTexture ""; etc

meager granite
#

Current vehicle that garage shows?

wind hedge
meager granite
#
_center = _class createVehicleLocal _centerPos;
#
missionnamespace setvariable ["BIS_fnc_arsenal_center",_center];
broken forge
#

@wind hedge when you select close the vehicle should be in front of you, at least that's what my variation of the script does

wind hedge
meager granite
#
    case "Exit": {
        with missionnamespace do {
            BIS_fnc_garage_center = BIS_fnc_arsenal_center;
#

Should be saved in BIS_fnc_garage_center

#
        with missionnamespace do {
            [missionnamespace,"garageClosed",[displaynull,uinamespace getvariable ["BIS_fnc_arsenal_toggleSpace",false]]] call bis_fnc_callscriptedeventhandler;
        };
```also calls this scripted EH
wind hedge
wind hedge
wind hedge
meager granite
#

Well, this it your vehicle

#

Check it on garageClosed SEH

wind hedge
# meager granite Check it on `garageClosed` SEH

Thanks! This is as far I as got: ```sqf
VAL_fn_preGarage = {
// run when the garage is opened
private _nearEntities = [];
_nearEntities = BIS_fnc_garage_center nearEntities [["Car","Tank","Ship","Air"], 10];
if (_nearEntities isNotEqualTo []) then { {deletevehicle _x} forEach _nearEntities; };

};

VAL_fn_postGarage {

private _nearEntities = [];
private _spawnedVeh = objNull;
private _veh = objNull;
_nearEntities = BIS_fnc_garage_center nearEntities [["Car","Tank","Ship","Air"], 1];
call {
    if (_nearEntities isEqualTo []) exitWith {systemChat "No vehicle spawned!";};
    _spawnedVeh = _nearEntities select 0;
    _veh = typeOf _spawnedVeh;
    _spawnedVeh setObjectTextureGlobal [0,"mission\tex\VC\v_SUV_VC_Red.paa"];
};

};

[missionNamespace, "garageClosed",{
[] call VAL_fn_postGarage;
}]call BIS_fnc_addScriptedEventHandler; ```

#

going to test it now

#

is there a command to force the UI to close without adding the car?

meager granite
#

closeDisplay

wind hedge
#

thanks! Instead of deleting the near vehicles I am just going to force the UI to close if there is already a vehicle there, with a systemchat "Move your vehicle!"

#

Worked like a charm! Thank you guys!

fleet sand
#

Quick question if i do something like:

this setPylonLoadout [1, "PylonRack_19Rnd_Rocket_Skyfire",true];
this setPylonLoadout [2, "PylonRack_19Rnd_Rocket_Skyfire",true];
```  In side composition will the pylon be set on the server even if is setPylonLoadout 🇱 🇪  ?
meager granite
#

What is side composition?

fleet sand
meager granite
#

It should be fine

#

If you do setPylonLoadout on a remote vehicle it just reverts on next update

#

You can also add if(local this) then {} check, but you also need to check turret locality (in case players occupy driver and gunner in lobby)

meager granite
#

Why you can't create Logic with createVehicle but can with createVehicleLocal? 🤔

warm hedge
#

Good question 🤔

#

IIRC you can createAgent it

meager granite
#

Yes it works with createAgent too

wanton swallow
#

Why serverCommand can to not work?
Trying to do #kick on the server side

serverCommand "#kick Predator";
#

serverCommandAvailable "#kick"; == TRUE
serverCommandExecutable "#kick"; == FALSE

meager granite
#

Wasn't serverCommand only for dedicated servers or something?

#

IIRC serverCommandAvailable means a client can login with #login and chat execute the command.

wanton swallow
meager granite
#

Oh, you also must call it with the password

wanton swallow
#

Is it reason?

serverCommand can be executed only from User Interface Event Handlers, and this command also checks if that's the case.

meager granite
#

Hmm, perhaps. Sorry for misleading info, I only used it with dedicated server and I remember it being pain in the ass.

#

As for dedicated server, it worked for me when I did it with alt syntax with the password

#

serverCommandPassword in server.cfg

wanton swallow
limber heart
#

Is there a script i could use to allow players, to do a scroll wheel, and spawn enemies, that are garrisoned in an area. Or at certain locations

#

Trying to make a MOUT town with AI that can be spawned in via computer, as well as CQB shoot houses that do the same.

real tartan
#

I am trying to define 2 arrays. And then extend/join them so I don't need to write arrays for each class. What should be the syntax to joining arrays in description.ext ? ( look at list array )

// description.ext
letters[] = {"a", "b", "c"};
numbers[] = {0, 1, 2};

class Random
{
    list[] = letters + numbers;
};
meager granite
#
// description.ext
letters[] = {"a", "b", "c"};
numbers[] = {0, 1, 2};

class Random
{
    list[] = {"letters", "numbers"};
};
private _random_list = [];
{
    _random_list append getArray(missionConfigFile >> _x);
} forEach getArray(missionConfigFile >> "Random" >> "list");
#

--- OR ---

// description.ext
#define MY_LETTERS "a", "b", "c"
#define MY_NUMBERS 0, 1, 2
letters[] = {MY_LETTERS};
numbers[] = {MY_NUMBERS};

class Random
{
    list[] = {MY_LETTERS, MY_NUMBERS};
};
sharp grotto
#

I think remotexec is better, used it extensively with the ExileMod and never had any problem.
For case 2 you would need a "watchdog loop" constantly waiting for variable changes if i understood your idea right.

#

hmhm didn't know that one
interesting question then thonk

#

can't find it on the biwiki

#

ah yea but "This command is deprecated since the introduction of remoteExec and remoteExecCall."

sullen sigil
#

Can just use scripted ehs or cba ehs

hallow mortar
#

Why would that be substantially better than an ordinary remoteExec?

sullen sigil
#

it isnt necessarily, was just pointing out that option 2 is still viable

hallow mortar
#

It was already possible, the command is superseded by remoteExec but not actually removed (backwards compatibility/fringe use cases). There's just no point.

pulsar bluff
#

just use remoteexec

limber heart
#

Is there a script i could use to allow players, to do a scroll wheel, and spawn enemies, that are garrisoned in an area. Or at certain locations

#

Trying to make a MOUT town with AI that can be spawned in via computer, as well as CQB shoot houses that do the same.

round scroll
#

I have a AC-47 spooky gunship circling/loitering around a waypoint, left turn, so the MGs aim downward. I try to tell it to fire at some empty trucks with doSuppressiveFire position, but nothing happens. Code is sqf pos = getPosASL truck; (crew spooky) doSuppressiveFire pos; Any ideas what's wrong with this approach?

#

truck is an empty SOG PF Creators DLC truck, Spooky is the AC-47 Gunship from Unsung Redux

sullen sigil
#

are they all in the same group

tepid vigil
meager granite
#

Scalar NaN means one of your Number operations has nil involved

tepid vigil
#

How can that be if every variable is validated by params

meager granite
meager granite
#

Basically diag_log the hell out of it

#

Each variable each step

tepid vigil
#

Looks like the constant isn't being defined. ArmaScriptCompiler probably isn't doing includes properly but doesn't throw errors notlikemeow

halcyon beacon
#

I've been having an issue with BIS_fnc_spawnGroup on my dedicated server. Everytime I spawn the ai they freeze and do not listen to commands

#

the script is simple, I have a trigger set to server only and when activated it fires this

  
[_grp1, 1000, nil, nil, getmarkerPos "hunt_1"] spawn lambs_wp_fnc_taskRush;
_grp1 setVariable ["acex_headless_blacklist", true];```
#

even stripping it down to bare bones
grp1 = [getMarkerPos "spawn_1", east, ["UK3CB_ION_O_Desert_SL", "UK3CB_ION_O_Desert_TL", "UK3CB_ION_O_Desert_MD", "UK3CB_ION_O_Desert_AA", "UK3CB_ION_O_Desert_AA_ASST", "UK3CB_ION_O_Desert_RIF_2", "UK3CB_ION_O_Desert_AR", "UK3CB_ION_O_Desert_RIF_1"],0] call BIS_fnc_spawnGroup;
it still doesnt allow me to command the units with zeus

#

they just wiggle lol

little raptor
halcyon beacon
#

possibly, its just a small ditch, ill place the marker on an open road

#

the strange thing is it works perfectly fine in lan mp, its just on my dedicated server

little raptor
#

can Zeus even command remote targets? think_turtle

halcyon beacon
#

Ill be totally honest I dont know

hushed tendon
#

Working on a project and I'm trying to make all units of the same arma base faction hostile to each other but the units within their patrol group be friendly. I'm using addRating to make them hostile to each other and I'm thinking to make the group members friendly to each other is to use a local script that runs only for each unit in the group where it sets the others addRating to a friendly number. Kinda failing at the local part tho or my thinking is wrong :/

halcyon beacon
#

ive also tried using exec vm and having an sqf

little raptor
#

neither of those matter

#
[getMarkerPos "spawn_1", east, ["UK3CB_ION_O_Desert_SL", "UK3CB_ION_O_Desert_TL", "UK3CB_ION_O_Desert_MD", "UK3CB_ION_O_Desert_AA", "UK3CB_ION_O_Desert_AA_ASST", "UK3CB_ION_O_Desert_RIF_2", "UK3CB_ION_O_Desert_AR", "UK3CB_ION_O_Desert_RIF_1"],0] remoteExec ["BIS_fnc_spawnGroup", zeusPlayer]
#

try with that. change zeusPlayer to the variable name of the, well, zeus player

halcyon beacon
#

whats the purpose of zeus player?

little raptor
halcyon beacon
#

ahh, yeah might as well try

queen kettle
halcyon beacon
#

the goal is to have them on their own waypoint so I dont have to gm

#

they just dont listen to it, they freeze up. I moved the marker and ill change the code and variable

meager granite
hushed tendon
#

Yeah cause I already have 4 factions in the project and want to make each group like their own faction in a way but kinda sucks how you are limited to only 4 factions

meager granite
#

Well, you can set each faction into each side

#

Though having civilian as enemy prevents you from interacting with empty vehicles because they're civilian side 🤡

hushed tendon
#

Have done that and these guys I'm referencing are their own faction but thought it would be better if they all were their own factions within their patrol groups

hushed tendon
#

that might screw some stuff up...

meager granite
#

Yeah, if you make civilians enemy, you can no longer get into empty vehicles or access their inventories

#

Because Arma

hushed tendon
#

If only we could call up a developer and have them implement a command to create factions...

meager granite
#

Wait, did this change at some point?

#

Just tested, making civilian enemy no longer prevents you from interacting with empty vehicles, they still report their side as civilian though

#

I'm 100% certain it was like this even in Arma 3 at some point

#

Well I guess you can put your 4 factions into 4 sides then\

hushed tendon
#

huh well I guess that works out

meager granite
#

blufor, opfor, independent, civilian

hushed tendon
#

yeah but still would be nice if the groups could be hostile to each other. But then again the chances they will run into each other are slim so I guess it don't really matter

halcyon beacon
#

@little raptor thank you, I didnt know I could remoteexec that function

#

i should be able to reword it to fit my needs

#

thank you again

little raptor
#

but did it work?

halcyon beacon
#

yeah

#

I do have one question

little raptor
#

well...?

halcyon beacon
#

using remoteExec ["BIS_fnc_spawnGroup", zeusPlayer] does that run on the client or on the server?

little raptor
#

client

hallow mortar
#

It runs it wherever whichever unit is referenced in zeusPlayer is local

halcyon beacon
#

okay, could I simply remove zeusplayer and have it run on the server?

#

Ill test it quickly

little raptor
halcyon beacon
#

ahh

little raptor
#

and you were running it on the server already (your trigger was server-only)

halcyon beacon
#

okay

#

fuck it I tank the preformance

hallow mortar
#

Wasn't running it server-only exactly what was causing the previous problem?

halcyon beacon
#

gotcha

#

that does make sense

little raptor
#

actually it doesn't meowsweats
why shouldn't it work on the server?

hallow mortar
#

And running it everywhere will cause as many groups to spawn as there are connected machines

halcyon beacon
#

lol, I couldnt answer

#

I could use a headless client instead of running it on my machine

little raptor
#

is it a linux server?

halcyon beacon
#

I think so

#

yes it is

hallow mortar
#

Granted I was only skimming the previous discussion, but I thought it was that it did "work", but Zeus couldn't give them orders because not local

#

Which also doesn't make a ton of sense, I've been Zeus giving orders to server-spawned units before

#

but that seemed to be the conclusion

halcyon beacon
#

the units were just flat out frozen after spawning until I used lepoards code

little raptor
halcyon beacon
#

yeah

little raptor
little raptor
halcyon beacon
#

most likely

#

fuck it

little raptor
hallow mortar
#

I also operate on a Linux server, and I've had no issues spawning groups with fnc_spawnGroup and giving them LAMBS tasks 🤔

halcyon beacon
#

let me see

fleet sand
#

Hi guys i have a question is there a way to lock side turrets of a ghosthawk. or at least disable them from fireing ?

hallow mortar
#

lockTurret

#

You can also take away all their ammo if you need the seat space

fleet sand
hallow mortar
#

No, it only locks it, which means to prevent units from getting in or out of it

fleet sand
#

Yea well i need a way to disable fireing of a gunner seats with out takeing ammo and readding it.

hallow mortar
#

There isn't one

#

You have to either lock the seat, or remove its ammo. There is no "safety switch" command.
Removing and readding ammo is very easy.

#

Well, I suppose you could also remove the weapon, but that's an either/or with removing the ammo

fleet sand
#

The problem with readding ammo i have is how to save how mutch is fired after the gun was locked.

#

Also i am planing to make this as a composition to play on Public Zeus.

halcyon beacon
#

@little raptor is the game version in a specific file?

#

or would it just be in the server console on start up?

little raptor
#

game version is also mentioned in the rpt

halcyon beacon
#

["Arma 3","Arma3",212,150301,"Stable",true,"Linux","x64"]

little raptor
#

try updating to the latest profiling blobdoggoshruggoogly

halcyon beacon
#

Im guessing thats the latest updateblobcloseenjoy

hallow mortar
little raptor
#

not profiling

halcyon beacon
#

gotcha

little raptor
#

there is a path finding fix too but it's related to amphibious vehicles

sullen sigil
#

should x86 dlls be suffixed with _x86 as with 64 bit?

little raptor
#

no

sullen sigil
#

what's used for 32 bit dll then? thonk

little raptor
#

nothing

sullen sigil
#

oh

little raptor
#

its usual name

sullen sigil
#

what

#

im confused

little raptor
#

I mean no suffix or anything myExt.dll

sullen sigil
#

mydll.dll
mydll_x64.dll
mydll would get used on an x86 machine?

little raptor
#

yes

sullen sigil
#

as well as x32 machine?

little raptor
#

there's no x32 machine

hallow mortar
#

32-bit is x86

sullen sigil
#

oh, right.

hallow mortar
#

It has no suffix because back in the day, there was only 32-bit. 64-bit was added later.

sullen sigil
#

Yeah, I'd figured -- just thought 86 bit was a thing for some reason lmao

#

will probably need a hand in a mo then once i've figured out the issue here as a3 is complaining of x64 dll being x86

#

written in c# using visual studio

#

have got unmanagedexports and dllexport installed too

halcyon beacon
#

@little raptor to be crystal clear, id upload the new server exe and change my launch params to use that one insead, and thats it?

sullen sigil
fleet sand
# hallow mortar It has no suffix because back in the day, there was only 32-bit. 64-bit was adde...

Ty i manage to get it to work here is the code. Now the question i have will this work on multiplayer do i need to remoteExec addaction if its compostion ?:

this addAction ["<t size='1.5'>Lock Left Turret</t>",{
    params ["_target","_caller","_id"];
    private _actMenu = (_target actionParams _id) select 0;
    if(_actMenu isEqualTo "<t size='1.5'>Lock Left Turret</t>") then {
        _actMenu = "<t size='1.5'>Unlock Left Turret</t>";
        _target  removeWeaponTurret ["LMG_Minigun_Transport",[1]];
    }else {
        _actMenu = "<t size='1.5'>Lock Left Turret</t>";
        _target addWeaponTurret ["LMG_Minigun_Transport", [1]];
    };
    _target setUserActionText [_id,_actMenu];
},
nil,0.2,true,true,"","_this == currentPilot vehicle _target",50,false,"",""];
hallow mortar
#

Yes, init code for a Zeus-deployed composition is only executed on the machine that placed it

fleet sand
meager granite
#

If you execute setPylonLoadout where vehicle\turret is local, game will update weapons\magazines state to other clients by itself soon after

#

addActions are fully scripted, engine doesn't broadcast them anywhere, so you have to do it yourself

#

Also

_actMenu isEqualTo "<t size='1.5'>Lock Left Turret</t>"
```![notlikemeowcry](https://cdn.discordapp.com/emojis/724201124369793068.webp?size=128 "notlikemeowcry")
fleet sand
meager granite
#

If your lock state means deleted weapon, check if you have that weapon

#

Also if that turret is occupied by remote player, remove\add weapon turret won't work

thorn saffron
#

Anybody here familiar with ACRE scripting.
I'm looking for a way to set the voice volume to max loudness via script, but I'm having trouble finding the bit that is responsible for the voice volume.

meager granite
# fleet sand I know but how i would make it better ?
this addAction ["<t size='1.5'>Lock Left Turret</t>",{
    params ["_target","_caller","_id"];
    [_target, ["LMG_Minigun_Transport",[1]]] remoteExecCall ["removeWeaponTurret", 0];
},
nil,0.2,true,true,"","_this == currentPilot vehicle _target && ('LMG_Minigun_Transport' in (_target weaponsTurret [1]))",50,false,"",""];

this addAction ["<t size='1.5'>Unlock Left Turret</t>",{
    params ["_target","_caller","_id"];
    [_target, ["LMG_Minigun_Transport",[1]]] remoteExecCall ["addWeaponTurret", 0];
},
nil,0.2,true,true,"","_this == currentPilot vehicle _target && !('LMG_Minigun_Transport' in (_target weaponsTurret [1]))",50,false,"",""];
#

Sure you can modify existing action, but it would be much cleaner to have two that show with opposite conditions

fleet sand
hallow mortar
#

They have a condition so they don't all show at the same time

#

The actions to unlock are only visible when the guns are locked, and vice versa

fleet sand
#

oh yea

tough abyss
#

I really wish that imlemented the JVM in arma3

fleet sand
little raptor
little raptor
little raptor
#

I haven't used .NET 6 for a while tho

sullen sigil
#

tried it with it as any cpu as well, no dice

little raptor
#

you can try with .NET framework too

#

I haven't had problems with that one.

#

I have yet to try .NET 6 with Arma

sullen sigil
little raptor
#

.NET 6 and stuff are ".NET Core" stuff meant for cross platform dev. windows specific is .NET Framework (tho it's much older)

sullen sigil
#

It's targeting .net 6 for specific version of windows

little raptor
#

like I said I haven't used .NET 6 in a while so... blobdoggoshruggoogly

#

try with .NET framework 4.7.x first to see if it even works with that

sullen sigil
#

iirc what I'm trying to use isn't supported in 4.7 meowsweats

#

Even this callback doesn't do anything 😅

little raptor
#

well just build something empty to see if it works at all

sullen sigil
#

oh mb

#

there, made public

halcyon beacon
#

@little raptor I figured it out

halcyon beacon
#

its some mod Im using

#

I have to go through and figure out which one it is 🙂

sullen sigil
#

have to use deprecated version with much worse accuracy

little raptor
#

I don't see anything in that code blobdoggoshruggoogly

halcyon beacon
#

no not lambs

#

I loading vanilla with lambs and 3den zen to test

#

and cba etc

sullen sigil
halcyon beacon
#

only basic basic stuff its all working properly

#

no remote exec needed

#

just a trigger set to server only

little raptor
#

that extension.cs file can compile fine (if you remove Worker)

sullen sigil
#

rgr i'll try a wiki example or something in 4.7

little raptor
#

but I suspect the problem is the RGiesecke stuff

#

iirc I had problems with that too
and used a different thing instead

sullen sigil
#

thats dllexport, copied from wiki

#

Oh, what'd you do instead?

little raptor
#

don't remember meowsweats
let me search

sullen sigil
#

Ah, thanks -- I'll give that a try in a while and see how it goes, will post in #community_wiki to get the example updated if so

little raptor
#

maybe not that? meowsweats

tough abyss
#

I want to make a more flexible radio system with diffrent antennas and radios, handheld and base units it would of been possible with the JVM dont think its possible with SQF is it?

little raptor
#

I don't really remember

sullen sigil
#

Yeah I copied the example lol

#

hence saying example may need updating 😅

little raptor
#

no I mean that library

little raptor
sullen sigil
#

Oh right

little raptor
#

also uses RGiesecke

sullen sigil
#

if it's nothing glaringly obvious in my code I'll assume it's exporting and troubleshoot using wiki example then

#

as callextension on my dll is returning ""

little raptor
#

didn't your dll even print error?

sullen sigil
#

nope

#

if it doesnt give me an x86 from x64 error it gives no errors

#

script or rpt

little raptor
sullen sigil
#

nope

sullen sigil
#

without the platform target it gives it

little raptor
#

then what's the problem? meowsweats

sullen sigil
#

no the other way around

sullen sigil
little raptor
sullen sigil
#

roger -- is there any way of me rectifying that on .NET 6.0?

#

or is it likely a versioning error

little raptor
#

well all I know is that .NET core can be problematic

#

I'd personally start with .NET framework 4.7 first

#

I know 3.5 worked too

#

but that's way too old meowsweats

sullen sigil
#

Yeah this doesn't date back to 4.7 notlikemeowcry

#

wait I'm building for .net but recognizer is for winrt thonk

#

i am a whole lot of confused

tender fossil
sullen sigil
#

You should just be using the build dropdown option right?

tender fossil
#

And yeah

#

Clean first and then rebuild just to make extra sure haha

sullen sigil
#

visual studio yeah

#

I'll try again after a clean and rebuild then -- should be closing the gui it opens right?

halcyon beacon
tender fossil
# sullen sigil visual studio yeah

Here's example of my code: ```csharp
using RGiesecke.DllExport;

public class YourClass
{
[DllExport("_RVExtension@12", CallingConvention = CallingConvention.Winapi)]

    public static void RvExtension(StringBuilder output, int outputSize, [MarshalAs(UnmanagedType.LPStr)] string args)
#

But just as an example

tender fossil
#

Funny coincidence

sullen sigil
#

wait ignore that

#

stupid questoin

halcyon beacon
#

I didnt realize ace has its own rappel 🙂

#

fun times

tender fossil
sullen sigil
#

Yeah I'd forgotten 😅

#

Odd that I'm doing the same thing in that case -- I'll try clean and rebuild and then try remove the if statements and see what that does

tender fossil
#

IIRC I had some issue with finding the correct calling convention but got it to work eventually

sullen sigil
#

should just be "yourdll" callextension "functionstringthing" right

tender fossil
#

About like that yeah, AFAIK the BIKI page is correct

little raptor
tender fossil
sullen sigil
#

so just ignore dllexport's gui?

tender fossil
#

I've just used the code/project dependency via nuget

sullen sigil
#

this thing

tender fossil
#

I guess you're not using nuget then or there has been some misunderstanding

sullen sigil
#

I install it via nuget and that appears meowsweats

tender fossil
#

Can you share a link to the version you've installed via nuget?

sullen sigil
tender fossil
sullen sigil
#

I've got that installed as well 😅

#

...that could be causing problems

tender fossil
#

Most likely yes

sullen sigil
#

that however causes problems with dllexport now being not found thonk

#

oh nvm uninstalled the wrong one ffs

tender fossil
#

I'm not aware of any reason why the interface would have changed (because it's only passing strings back and forth after all) so my guess is that it should work in Arma 3 too, you just need to add the RVExtension entry points stuff differently in Arma 3 vs. Arma 2

sullen sigil
#

wiki has been quite confusing with which to use but i think it should be the other one with this version of .NET

tender fossil
sullen sigil
#

6.0

#

targeting specific windows version

tender fossil
#

Ah, then I don't know since I'm moving to Arma 3 only now 😅

sullen sigil
#

i think i do need to be using that gui but i now cant get it to open again notlikemeowcry

tender fossil
#

Oh boy

sullen sigil
#

biki is confusing me too because it says dllexport but links to unmanagedexports notlikemeowcry

#

but then the sources takes you out to dllexport

cyan kayak
sullen sigil
#

yeah copy pasting biki example is giving same result on .net 6.0 -- but can't build on net48 targetframework thonk

simple mantle
#

hey ! im trying to make a player marker script on altis life to only show the player , its executed in initplayerlocal but its showing the marker for everyone else too

#

i have no ideia what im doing and why is not working

digital hollow
#

If you use a non ...Local marker command, the marker is made global. So if it's supposed to be a local marker, only use the local versions of marker commands on it.

simple mantle
#

ok

#

thanks for the help

simple mantle
#

do you think i may be executing this on the wrong init file ?

digital hollow
simple mantle
#

ohh got it

#

thanks again

grim pasture
#

hi, I got a file containing this

{
    #include "spawnAI\factionConfigs\vanilla\CfgGroupsNATO.cpp"
    #include "spawnAI\factionConfigs\vanilla\CfgGroupsCSAT.cpp"
    #include "spawnAI\factionConfigs\vanilla\CfgGroupsAAF.cpp"
};```it's being loaded after mission start and I want to exchange the files being included based on mission parameters
so if my parameter "IndepFaction" is 1 instead of the default 0 I would want to have this result
```class CfgGroups
{
    #include "spawnAI\factionConfigs\vanilla\CfgGroupsNATO.cpp"
    #include "spawnAI\factionConfigs\vanilla\CfgGroupsCSAT.cpp"
    #include "spawnAI\factionConfigs\vanilla\CfgGroupsLDF.cpp"
};```with a file for LDF instead of AAF
how can I do this or would some workaround be more appropriate?
little raptor
grim pasture
little raptor
grim pasture
#

with loadConfig
works perfectly fine so far

little raptor
#

oh right. you just pass the configs to some function then?

grim pasture
#

yup

little raptor
#

well then there is a solution

#

use __EVAL

grim pasture
simple mantle
#

SetmarkerTextLocal

simple mantle
#

im dumb

#

my bad

little raptor
#

since you don't care how many configs you have anyway

#

even if there are more classes than that you can just #include those parts:

// file1.cpp
#include "otherCommonStuff.hpp"
#include "aafStuffBlabla.hpp"

and similarly one for LDF

grim pasture
#

I intend to add a lot more different files so I only wanted to load what is necessary and I also want the other included files to be changeable by parameters so making different files for every possibly combination would be very inconvenient
I'm trying to make it work with EVAL (to no success so far)
if it really doesn't work I'll try something else
I'm converting the configs into hashmaps anyway so instead of changing the root config file I'll just load the individual files and insert them in the hashmap

little raptor
#

well yeah if you don't need configs why use configs?!

#

I thought you wanted to pass it to some BIS function or something

#

if it's your own function there's no need

grim pasture
#

that is a fair point
ig I just got tunnel vision since I started using configs and ran into more and more problems with them
never got the idea to just use something else tbh

sullen sigil
#

r.e previous issue; currently no dll exports for .NET 6.0 as far as I can find

#

Think UnmanagedCallersOnly may be what I'm looking for but unsure

little raptor
sullen sigil
#

I'm not really familiar with .NET either, this is a learning exercise to me meowsweats

#

UnmanagedCallersOnly doesn't work for BI function I don't think

#

not bi functino

#

the arma dll specific bits

little raptor
sullen sigil
#

because that tends to lead to poor suggestions and even worse results from my experience

little raptor
#

ask chat GPT 😛

#

or new bing

sullen sigil
little raptor
#

that's not what I said to ask...but if it can't tell that one right then meh

sullen sigil
#

I can't even get the dll to work in .NET 4.8 afaik

#

I'll retry but was having issues

little raptor
#

what was the issue?

sullen sigil
#

same as before, nothing happening with no rpt error

little raptor
#

let me try it myself in a minute

sullen sigil
#

introduced in .NET 5.0 but unsure if it's compatible with RVExtensionRegisterCallback bits

#

Ah no, forgot -- it didn't build with this error

#

with targetframework of net48

little raptor
sullen sigil
#

yes, unmanagedexports doesn't support .NET 6.0 so does nothing

#

Just tested BIKI example w/ callback yet again in .NET 6.0 and same issue, added callback mission eh too and it also returned nothing

fair drum
#

For those C#'ers out there. Can I keep using VSC or do I really need to get VS instead?

wintry yoke
#

Would anyone mind helping me modify a template for Antistasi? I'm trying to incorporate modded uniforms into the game for only the player, but I can't seem to get the AI to keep their hands off of them

little raptor
#

VSC is only good for Python and JS

sullen sigil
#

aha. i have progress, it crashes arma 🙂

#

Exception code: E0434352 at 2E6DCD29 but no other useful info produced in rpt

little raptor
sullen sigil
#

which .net version?

little raptor
#

4.7

#

I'll try 6 too

sullen sigil
#

yes please as i think im going insane

sullen sigil
cobalt path
#

question, I used

profileNamespace setVariable ["stalkov_01_8", (getUnitLoadout player)]; 
saveProfileNamespace;

to save everyones loadout. Does this save permanently? As in can I load people loadouts like a week later?

sullen sigil
#

so long as theyre on the same profile

cobalt path
#

where does it save specifically? Can I find the file?

#

nvm its profilenamespace I will look up bohemia forum

sullen sigil
#

profileNamespace getVariable ["stalkov_01_8",[]]

sullen sigil
little raptor
#

might be related to callback

sullen sigil
#

callback is required for what I'm doing but I'll try w/o callback notlikemeowcry

little raptor
#

no still crashes 🥲

sullen sigil
#

ffs, tried googling the error but couldn't find anything useful

little raptor
#

the error means nothing

sullen sigil
#

thats the gist i got

#

and just to confirm i crash without callback too

little raptor
#

meh just try building multiple assemblies targeting different .NET versions then blobdoggoshruggoogly

#

use 4.7 as starting point for Arma

#

6 for your stuff blobdoggoshruggoogly

sullen sigil
#

I'd assume that's just calling the 6.0 dll from a 4.7 dll in arma?

little raptor
#

can't you have both in one dll? think_turtle

#

if not just build separate one

sullen sigil
#

uh
if you can its beyond my knowledge

little raptor
sullen sigil
#

oh, you mean separate thingies in the same solution?

#

idk what they're called

little raptor
#

yeah separate projects

sullen sigil
#

yeah those

#

I can try that I suppose 😅

#

but I need callback here which could probably cause issues, no?

little raptor
#

no

sullen sigil
#

i presume its as simple as something.soomething.callback and im just oblivious to it

little raptor
#

wut?

#

callback is just in the 4.7 assembly

#

same as before

sullen sigil
#

yeah but how would i use that callback from the 6.0 assembly lol

little raptor
#

you just reference the assembly

sullen sigil
#

i think im overcomplicating this then 😅

little raptor
sullen sigil
#

Then I can do that vice versa -- call in 4.7 to 6.0 assembly?

little raptor
#

the callback is defined in the 4.7 one.

sullen sigil
#

oh ive misread what you said yeah

little raptor
sullen sigil
#

6.0 function called in 4.7, 6.0 function does callback

#

🤷 will find out

#

Mind sending your csproj for 4.7? Can't figure it out

#

This bit always confuses me

sullen marsh
#

Extensions m8

little raptor
#

which bit?

sullen sigil
#

the TargetFramework part -- was using net48 before but that was throwing up errors

little raptor
#

when it shows that window, check Enable or whatever it was called

#

then apply

sullen sigil
#

unmanagedexports still works with net 4.8, couldn't figure out how to use dllexport

sullen sigil
little raptor
#

yeah that one is trash just use what I said

little raptor
#

then Apply

sullen sigil
#

Then it's just build tab and regular steps?

little raptor
#

yeah

#

also don't forget to define WIN64

#

once you're done it defines the DllExportAttribute in your namespace

sullen sigil
#

yeah have been doing that -- trying to figure out how on earth you use this gui atm as had renamed the projects

little raptor
#

I actually had to do this with the .NET 6 one

#

I just lazily copied the same stuff from 4.7 and was getting errors with names 😅

sullen sigil
#

It complains of not being able to load the csproj file and the browse just opens file explorer 😂

little raptor
#

just remake stuff then blobdoggoshruggoogly
sometimes it's easier

sullen sigil
#

the 6.0 one I can access fine but that's not the one I need to access

#

DllExport command still throws error after hitting installed and apply

#

I'll just remake this solution from scratch, probably easier

quiet gazelle
#

is there a shorter way of checking if two numbers are more or less the same than this:

(_a + 0.001 > _b && _a - 0.001 < _b)```
sullen sigil
#

(_a - _b) > yournumber?

quiet gazelle
#

needs an abs

#

like this(abs (_a - _b)) < 0.001

sullen sigil
#

same difference

quiet gazelle
#

works for me in being nicer to type

#

thanks

little raptor
little raptor
sullen sigil
#

yes

#

am i supposed to ignore the dllexport errors leopard

little raptor
#

it becomes negative

sullen sigil
little raptor
#

so always true

little raptor
sullen sigil
sullen sigil
little raptor
#

those errors prevent you from building

little raptor
sullen sigil
#

uh
how am i supposed to?

little raptor
#

the Gisecke thing doesn't work anymore

little raptor
sullen sigil
#

not entirely sure what you mean as the gui just means 0 to me

little raptor
#

open the GUI and show it to me again

#

it creates a bat file in your solution folder

#

just click it

#

DllExport.bat

sullen sigil
#

DllTesting is the bit that will be in 4.8

little raptor
#

are the errors still there?

sullen sigil
#

I've restarted VS already with the errors remaining

little raptor
#

well try with using DllTesting; at top

sullen sigil
#

Yeah, that's how it always was

#

errors persist and is unused

little raptor
#

I said using not namespace

sullen sigil
little raptor
sullen sigil
#

yes

#

in the bit beneath the filter by project path right?

little raptor
#

yeah

sullen sigil
#

yep

little raptor
sullen sigil
#

que

#

not sure what that means

little raptor
#

me either. run the DllExport bat again

sullen sigil
#

with it formatted like that?

little raptor
#

yes

sullen sigil
#

pressed apply again for good measure, no difference

little raptor
# sullen sigil

wait why have you put the solution and project in the same dir?

sullen sigil
#

i havent

#

oh it was looking at an old one -- whoops, will apply again

little raptor
#

maybe try with 1 project at a time first

sullen sigil
#

i had the same issue before when doing this

#

aha, restarting has worked

#

cool beans, shouldn't need dllexport for the .NET 6.0 version right?

little raptor
#

no

sullen sigil
#

perfect, sorted then. now it's just a matter of figuring out wtf to do which shouldnt be too hard

#

famous last words

little raptor
sullen sigil
#

that is probably a good idea

little raptor
#

make sure the callback and everything works

#

then add stuff

sullen sigil
#

Still getting the invalid nullable value notlikemeowcry

little raptor
#

wat?

sullen sigil
#

caused by not overriding language version but then get issue with globalusings too, ffs

little raptor
#

wat?

sullen sigil
little raptor
#

that's just from global usings

sullen sigil
#

That's with langVersion 10.0 in the .csproj, without that it gives me this:

sullen sigil
little raptor
#

yeah those are in .NET core I think

#

well anyway...
so you get that error from referencing the Worker assembly?

sullen sigil
#

Nope, literally just building it

little raptor
#

building what?

sullen sigil
#

either the solution of dlltesting assembly

little raptor
#

just start with a fresh project

#

like I said first

#

start with wiki sample

sullen sigil
#

i did notlikemeowcry

#

i'll start again again

little raptor
#

then what's that worker in there?

sullen sigil
#

literally just this

little raptor
#

are you copying your csproj?

sullen sigil
#

i haven't a clue, trying to target .net 4.8 without specifying language version so automatically goes to older one

little raptor
#

4.8 doesn't even support C#10

sullen sigil
#

that would probably be why its throwing the other error but i get later errors after build attempt saying it needs 10 notlikemeowcry

little raptor
#

well don't use global usings

sullen sigil
#

it's auto generated

little raptor
#

that one needs C# 10

#

just start with a .net framework project first

#

nothing else

#

not even another empty project

#

build that

#

test it

#

if it works then do other stuff

sullen sigil
#

so wpf app?

#

im so confused

little raptor
#

console

sullen sigil
#

do dlls not need to be made as a class library thonk

#

i have the stuff working in a console app already

#

im just in the "process" of putting it to dll

little raptor
sullen sigil
#

Oh right its to target 4.7.2 gotchu

sullen sigil
#

yeah got that

#

copy pasted the wiki example back in there w/ namespace now and will do dllexport then build

#

ffs dllexport wont work now i hate this

little raptor
#

what doesn't work?

sullen sigil
#

doing the exact same thing as before, it's just closing without loading the relevant bits and still getting dllexport not found errors

#

have manually reselected the sln file like 3 times too

quiet gazelle
#

is sqf _array = keys (_array createHashMapFromArray []); better or worse than ```sqf
_array2 = [];
{_array2 pushBackUnique _x;} foreach _array;
_array = _array2;

little raptor
#

then run the bat

little raptor
#

well the second is worse that's for sure

#

but you can also try arrayIntersect

sullen sigil
quiet gazelle
sullen sigil
quiet gazelle
#

thanks

little raptor
sullen sigil
#

ah, the wrong one is appearing thonk

#

full gui

little raptor
#

your namespace is incorrect

#

don't you even see? meowsweats

sullen sigil
#

i see its incorrect on the gui but theres no drop down option for DllTesting notlikemeowcry

little raptor
sullen sigil
#

omfg you can type into it

little raptor
sullen sigil
#

fucking hell

#

who'd have thought you could type into a drop down box

#

thats worked fine now

#

now the only problem is visual studio is skipping building the project

#

ffs

#

this is like wack-a-mole with issues

sullen sigil
#

it skips it regardless of which i click

little raptor
#

does it have a target file?

sullen sigil
#

should do but just to make sure how do i check in this version

#

well i flicked some option unrelated and its built now 🤷

#

finally

#

only took an entire day notlikemeowcry

little raptor
#

now try adding the rest

sullen sigil
#

Its half past midnight here and have got in-laws coming tomorrow so will probably call it quits here tonight while I'm ahead

#

should just be a matter of adapting my previous code to get called from here anyways -- which it already was, just in the same project

#

just a matter of making it work across project

#

thanks for all the help leopard, been super useful 🙂

cyan kayak
#

believe so yes

#

if you give it a unit (or list of untis) as a target, it will run on the machine on which that unit(s) is local

burnt nymph
#

does arma 3 framework provide a way to monitor which players have connected to my arma 3 server and how long they have been connected / active. I want to integrate this into a webApp for my server.does arma 3 provide Api for that?

sullen sigil
#

get players local time and send to webapp from your server

quiet geyser
#

Is there any kind of simple-ish way to increase the fuel consumption rate for a vehicle as a multiplier/percentage?

#

Alternatively, a way to reduce the maximum fuel capacity

meager granite
#
    myfuelusagemultiplier = 10;
    myfueleh = addMissionEventHandler ["EachFrame", {
        private _vehicle = vehicle player;
        if(local _vehicle) then {
            private _old_fuel = _vehicle getVariable "old_fuel";
            if(!isNil"_old_fuel") then {
                private _fuel_delta = _old_fuel - fuel _vehicle;
                if(_fuel_delta > 0) then {
                    private _new_fuel = _old_fuel - _fuel_delta * myfuelusagemultiplier;
                    _vehicle setFuel _new_fuel;
                };
            };
        };
        _vehicle setVariable ["old_fuel", fuel _vehicle];
    }]
#

Will only work on current player's vehicle

#

Otherwise have some array with vehicles and forEach through it instead of vehicle player

#

you can also get multiplier off the vehicle _vehicle getVariable ["fuel_multiplier", 1]

#

so you can have different ones per vehicle

drifting sky
#

Can anybody tell me how to write a script that correctly gets the parent class of a weapon's fire mode? I'm trying to modify CUP weapons to adjust the way AI use them, but I keep running into issues where modes I try to modify appear to be inherited incorrectly. So I presume the script I wrote to find their parents must not be correct.

tough abyss
#

hmm okay, i was thinking making a system even more modular but i doubt arma would allow that

meager granite
#

post your script here

sleek galleon
#

Hi, Maybe some people around here could help us elucidate a bug we've got recently on our zeus private server.

This script, for some reason i'm not nearly qualified enough to apprehend, F's up the respawn system :

while {true} do {
this say3D ["musicname",30];
0 spawn {
sleep 1450;
};
};

We started placing one on a civilian weeping on a tomb to add a sound effect, and then decided to create a working radio with it in our base for the players to enjoy between missions (Also, some voice acted easter eggs and references to the players actions, because why not)

The first thing we noticed is that it makes a very noticeable FPS drop when you actually manage to go near the 3D sound.

The second is that the respawn functionality is F'd up, half the people just spawn on the "dev platform" (A platform outside of the map with the playable units and a couple of things) instead of being given the usual spawn point selection.
As the zeus, i've been a victim of that and when i'm there, I cannot enter the Zeus interface nor the ACE menu, and I'm unable to respawn thru the escape menu. Also, weirdly enough, the "save" button above "respawn" is overlapped with a "skip" button that doesn't do anything when clicked.

I've tracked down the issue to the latest mission file of our campaign, wich is precisely the one where we started using this script. Needless to say, if I remove the script from the unit/item's init, the game runs perfectly fine.

Any ideas anyone ? I'm starting to grow bald with all the hair pulling this error triggers in me 🤣

Our description.ext (nothing fancy)

granite sky
#

I don't really understand. The script is obviously going to jam both the game and the scheduler?

sleek galleon
granite sky
#

There's no limit on how often that loop is running.

#

So it's just spamming say3d and spawning the tiny sleep as fast as it can.

sleek galleon
#

Yeah, the idea was to have it play all the songs & voice files, then go back to the start and so on

sleek galleon
granite sky
#

Maybe:

this spawn {
  while {true} do {
    _this say3D ["musicname",30]; 
    sleep 1450;
  }; 
};
shut reef
#

removeWeaponTurret seems to be executed in the editor if you put it in an init field.
I've never heard about that functionality. Is there documentation for that?
The command also has no notes on the wiki page

sleek galleon
molten tree
#

Is there a way to hide the helicopter blades on a helicopter in multiplayer? I found some instructions using hideSelection, but it's not working. I'm using the correct part name that I retrieved using selectionNames.

warm hedge
#

For what purpose?

molten tree
# warm hedge For what purpose?

In aircraft carriers (and in some destroyers) rotor blades are meant to be retractable to save space. I want to simulate that by hiding the rotors, until a player uses an Action added to it that 'reattaches' them.

warm hedge
#

Well, hideSelection, as BIKI told you, is only for Simple Objects

molten tree
#

Damn. 😕 So there's no other trick to do it? Other than ramming it into something and causing the blades to shear. mild_panic

granite sky
#

well, you could just set the damage on the blades...

#

but that may not look how you want it to :P

#

Maybe if you attached a folded-blade object in the right place it'd look passable.

molten tree
#

Hmm...

pulsar bluff
#

@warm hedge is there any logic to applying "Destruct" materials to a vehicle?

#

i can read thru the >> 'mat' array but its not as simple as just doing { _v setobjectmaterialglobal [_foreachindex,_x] } foreach _mat

warm hedge
#

Nnnnnope, unfortunately

opal zephyr
#

Does anyone know how vanilla arma handles an explosive defuse? Like what takes place on the backend to inform the game that its defused. For context im trying to make my ied mod compatible with ALIVE's point system for ied defusal

grand stratus
#

Do bullets inherit the vehicles velocity it was shot out of?

meager granite
#

That "Damage" class defines which textures and materials change into which on 0.5 and iirc 1 damage

#

Or 0.9

opal zephyr
pulsar bluff
#

i guess i could build a conversion table in editor by destroying the asset and checking object materials

meager granite
#

Ah, you mean knowing which selection should materials be applied to

#

I guess there is no way to know what material is original one 🤔

#

GIB

ENTITY selectionMaterials STRING
ENTITY selectionTextures STRING
little raptor
#

If you mean whether it "affects" the velocity, yes

little raptor
#

You can check what happens to it using nearestObjects [player, [], 10] before and after you defuse an explosive

#

As for making it compatible with ALIVE, you probably want to check your configs. Probably your inheritance is incorrect

pulsar bluff
meager granite
#

Should be possible with command in Additional Information

#

Let us get any textures and materials by LOD selections

pulsar bluff
#

yea

meager granite
#

Now we need to nag KK or Dedmen until they implement it

#

Personally I have a need for a command to return default model textures and materials of hidden selections, right now I'm having to find them and define by hand for each class in my config, because there is no way to do it otherwise

pulsar bluff
#

yea i aint doing that lol

#

sandbox + dlc/mod support = helllll no

meager granite
#

Yep, not a reason solution for the issue

#

Just let us use whatever is in the engine already

pulsar bluff
#

its fine for tight outcome with pre defined list of assets

#

i will write a procedure to check at the start of mission whether current list of scope=2 assets are in the stored hashmap... if not, i will blow stuff up at [0,0,0] and read the change in object materials

#

so, first run with a new mod/dlc activated == will be a bit messy at [0,0,0] for a few minutes :d

meager granite
#

How can you read changed materials though?

pulsar bluff
#

i wonder if worth doing the same thing for texture selections

#

i dont know still just thinking about it

meager granite
#

lineIntersectsSurfaces?

pulsar bluff
#

havent done editor tests yet

hearty fox
#

Good morning,
I can't automate the opening of a portal despite the usual lines of code. an idea ?

the portal is:
Sniper entrée regiment

warm hedge
#

Uhh what?

#

You sure you're in the right place?

hearty fox
warm hedge
#

Then explain what it is?

hearty fox
#

the line of code does not open it

warm hedge
#

What line of code? What it supposed to do?

#

...Just in case, you're talking about Arma 3 right?

hearty fox
#

Yes Arma 3

warm hedge
#

Not Reforger? I've looked your log and you posted only in Reforger/Enfusion topics

hearty fox
#

nom animate ["Door_1_move",1]

warm hedge
#

Ah finally it starts to make sense

hearty fox
#

I put the trigger

#

But nothing

#

But with an other, it's ok

warm hedge
#

Are you sure:
You named whatever nom properly?
animate is the correct command to do?
Door_1_move is the animation for it?

hearty fox
#

sliding gates uses this line of code. but this one, impossible

warm hedge
#

I completely have no idea which object it is but try to use animationNames nom to fetch available animations

warm hedge
#

Won't help anyhow

hearty fox
#

Wait, i put it in screen

warm hedge
#

You put what in what?

hearty fox
#

Wait, I put a picture of the portal

winter rose
#
  • use animationNames to get that object's animations list
  • use one of these names to open it
#

that's a mod, so nothing is guaranteed.

pulsar bluff
#

@meager granite this is sorta working for my uses ... not sure if it will work for mods tho (naming conventions etc)

#
0 spawn {
    QS_array = [];
    private _cfgArray = "(
        (getNumber (_x >> 'scope') >= 2) &&
        (
            ((configName _x) isKindOf 'LandVehicle') ||
            ((configName _x) isKindOf 'Air') ||
            ((configName _x) isKindOf 'Ship') ||
            ((configName _x) isKindOf 'Reammobox_F')
        )
    )" configClasses (configFile >> "CfgVehicles");
    _cfgArray = _cfgArray apply {configName _x};
    private _mats = [];
    {
        _mats = getArray (configFile >> 'CfgVehicles' >> _x >> 'Damage' >> 'mat');
        _mats = _mats select {
            (['destruct',_x] call BIS_fnc_inString)
        };
        if (_mats isEqualTo []) then {
            _mats = getArray (configFile >> 'CfgVehicles' >> _x >> 'Damage' >> 'mat');
            _mats = _mats select {
                (['damage',_x] call BIS_fnc_inString)
            };        
        };
        QS_array pushBack [
            _x,
            _mats
        ];
        systemchat str _forEachIndex;
    } forEach _cfgArray;
    copyToClipboard str QS_array;
};```
meager granite
#

What's the use for these textures?

pulsar bluff
#
QS_array_hashmap = createHashmapFromArray QS_array;

_value = QS_array_hashmap get (typeOf cursorObject); 
systemchat str _value;
{ 
    cursorObject setObjectMaterialGlobal [_forEachIndex,_x]; 
} forEach _value;```
meager granite
#

I don't think order of materials in "Damage" >> "mat" matters

#

It can be in any order

#

not the same order as hidden selections

#

Plus that array includes non-hidden-selections materials too

pulsar bluff
#

is for vehicle wrecks ... preventing vehicle total destruction (clamping at 0.89 dmg) and instead forcing players to recover the asset

#

i mean the order does appear to matter

#
mat[] = {
    "A3\soft_f\MRAP_01\Data\MRAP_01_adds.rvmat",
    "A3\soft_f\MRAP_01\Data\MRAP_01_adds_damage.rvmat",
    "A3\soft_f\MRAP_01\Data\MRAP_01_adds_destruct.rvmat",
    "A3\soft_f\MRAP_01\Data\MRAP_01_base.rvmat",
    "A3\soft_f\MRAP_01\Data\MRAP_01_base_damage.rvmat",
    "A3\soft_f\MRAP_01\Data\MRAP_01_base_destruct.rvmat",
    "A3\soft_f\MRAP_01\Data\MRAP_01_int.rvmat",
    "A3\soft_f\MRAP_01\Data\MRAP_01_int_damage.rvmat",
    "A3\soft_f\MRAP_01\Data\MRAP_01_int_destruct.rvmat",
    "A3\Data_F\Glass_veh.rvmat",
    "A3\Data_F\Glass_veh_armored_damage.rvmat",
    "A3\Data_F\Glass_veh_armored_damage.rvmat",
    "A3\Data_F\Glass_veh_int.rvmat",
    "A3\Data_F\Glass_veh_armored_damage.rvmat",
    "A3\Data_F\Glass_veh_armored_damage.rvmat"
};```
#

base, + 1 = dmg, +2 = destruct

meager granite
#

No I mean the order in relation to setObjectMaterial indexes

pulsar bluff
#

no idea i am just tinkering

meager granite
#

If there was a way to get original object material for each selection, then you could've just searched through that array and index+2 would've been your destruction material for example

pulsar bluff
#

ideally yea

meager granite
pulsar bluff
#

already done

hearty fox
#

thank you guys, i find it

hearty fox
#

p1 animateSource["door_1_sound_source",1]

drowsy geyser
#

im trying to disable the inventory of corpses and it works, but is there also a way to hide the gear icon of the corpse?

little raptor
#

gear icon?

drowsy geyser
#

the icon which pops up when you look at the corpse

warm hedge
#

Doesn't lockInventory do?

pulsar bluff
#

he means the "Rearm" icon

#

and no there isnt

#

I think lockInventory was supposed to do it, but it doesnt block the rearm

meager granite
#

Arma moment

little raptor
#

it should be reported then

winter rose
#

and we will purgeban it

warm hedge
#

burgepan lockInventory 0 not being useful

little raptor
#

made a ticket

pulsar bluff
#

do we know if "allowFunctionsRecompile" works at all?

#

I tried years ago and didnt work ... would be handy for me at the moment

meager granite
#

I think it stops CfgFunctions initialization from doing compileFinal?

#

Not sure about other compileFinals

golden fable
#

Anyone know how to work Simplex Support Services mod? The scripting/coding on which player gets what assigned support is doing my head in...

I thought simply syncing each support module to certain players would work but my squad level RTO has access to all supports, including artillery meant for commanding officers.

#

I know there are instructions by the mod dev, but my dumb brain can't make heads or tails of it.

sullen sigil
#

third project that gets referenced by the main dll part and just puts it into the Worker project? thonk

#

make it a triangular dependency instead 😄

winter rose
#

#arma3_tools please… I really can't see all this C#/C++ here

sullen sigil
#

its arma scripting i promise ok

proven charm
#

I wonder why this is sqf count (units civilian) != count (allunits select { side _x == civilian })

#

the left side count in my tests is 16 when the right side is 1