#arma3_scripting

1 messages Β· Page 174 of 1

proven charm
#

thx Eve. i wonder how the arma server browser does it

uneven magnet
#

It's probably hard coded into the game's client in the connection process. You might be able to find some documentation on that code but whether or not thats something the mission file can interact with is another ball game entirely.

proven charm
#

i meant the server list, it shows there if server is locked or not?

uneven magnet
#

Same thing. You'd have to try to find any documentation on the code that the client uses and the mission file may not have access to that code. I'm hunting and I'm not really finding what I'm looking for as an answer to this, but to be honest if Bohemia was posting detailed code on how their clients communicate with and connect with servers I'd be fairly surprised. Strikes me as something that could lead to exploit generation. But you may have better luck

proven charm
#

having script command for this wouldnt probably be a big deal to implement but not many use cases

#

im making my own server browser so i need it there πŸ™‚

still forum
#

It's in the A3S info or steam query

proven charm
#

well steam query works but running that from arma server is like "ask the master server if we are using password"

#

a command to get that info would be much better

tight cloak
#

interpolating between two points, but with a "curve" if you will toward another known point. any idea how i would go about this? constrained by setvelocitytransformation

#

epic diagram provided also

#

curved line is what i want, straight line is regular interpolation (dont want)

hallow mortar
tight cloak
hallow mortar
#

🀷

tight cloak
#

i doubt it based on how the two operate

#

but ill give it a quick go

tight cloak
#

quick turned into a hot minute with steam doing its restart update malarkey

#

okay:
so it works, but im not quite sure how to plug it in so to speak

#
(interval bezierInterpolation [_lastIndexPos,((_lastIndexPos vectorAdd _nextIndexPos) vectorMultiply 0.5) vectorAdd ((vectorDir Obj) vectorMultiply 25),_nextIndexPos])

as i have to define the start and end pos in setvelocitytransformation

#

so after some tinkering, solved the math issue but you kind of phase out of existence upon reaching your destination

#

probably gonna have to rework it

#

even weirder, it seems to work better, the less straight the curve

#

im an idiot, vectorSide instead of Dir

#

i get a lovely debug line drawing the path i wish it to take, however the problem persists with setvelocitytransform, it likes to fall apart the moment you reach the final point

tight cloak
#
Obj setVelocityTransformation [
            interval bezierInterpolation [_lastIndexPos,((_lastIndexPos vectorAdd _nextIndexPos) vectorMultiply 0.5) vectorAdd (vectorside Obj),_nextIndexPos], // From point
            interval bezierInterpolation [_lastIndexPos,((_lastIndexPos vectorAdd _nextIndexPos) vectorMultiply 0.5) vectorAdd (vectorside Obj),_nextIndexPos], // to point
            [0,0,0], // from vel
            [0,0,0],// to vel
            (vectorDir Obj), //fromVectorDir
            (vectorDir Obj), //toVectorDir 
            (vectorUp lastindex), //fromVectorUp
            (vectorUp nextIndex), //toVectorUp
            interval]; //

currently the code, i know it doesnt like it because when it reaches 1 / past 1 its going to throw a fit, if anyone has a fix, it would be appreciated

warm hedge
#

Use setVelocity etc after it reaches to 1

tight cloak
#

setvelocitytransformation after the bezierinterpolation?

#

and use setpos instead?

#

not too sure i follow

warm hedge
#

setVelocity to reset the velocity after setVelocityTransformation loop has ended

tight cloak
#

when it reaches 1, it simply selects the next index and continues running

#

its iterating through an array

#

hence the _nextIndexPos, _lastIndexPos

#

the interval is being modified by ```sqf
interval = interval + thrust;

#

so setvelocity shouldnt have any bearing on it

warm hedge
#

Okay then, I'm sure that I'm not understanding your goal

tight cloak
#

uhhhh. like a train taking a corner rather than direct

warm hedge
#

Then the interval should between 0 and 1?

tight cloak
#

yes

warm hedge
#

Then what it

when it reaches 1, it simply selects the next index and continues running
does mean? Another round of loop should happen?

tight cloak
#

yes

#

i already have that working

#

its just the bezierinterpolation

warm hedge
#

its going to throw a fit
What does this mean

tight cloak
#

the object cant decide where it should go, and starts having unintended behaviour

#

which breaks the current setup

#

let me get back to my pc and ill explain better

tight cloak
#

so:
right now i have a system that does this. it moves between points using setvelocitytransformation.
it moves directly between them. i dont want this.

#

i want something more like this (red line)

#

thats where the bezierinterpolation comes in, putting it into the setvelocitytransformation either completely breaks, or when it reaches 1 it starts moving the object irratically and breaking the simple cycle of resetting the interval and giving the loop a new target

warm hedge
tight cloak
#

quadratic curve seems more in line with what im doing but im not sure anymore

#

so uhh. how do i do it then

warm hedge
#

I wouldn't just use bezierInterpolation and setVelocityTransformation even, if you're doing railway something, but enough amount of setPosASL setVectorDirAndUp

#

And EachFrame too

tight cloak
#

previous iteration of this script showed that running on each frame setposASL and vectors etc floods MP network. it worked and produced the intended mechanic but it heavily restricted what could be done while it was running

#

setvelocitytransformation on the other hand seems to be alot more performance friendly for the server

warm hedge
#

Hm MP desync is a point indeed

#

I see, setVelocityTransformation is optimized for that purpose

tight cloak
#

i wouldnt be using it if i didnt have to

#

it kind of sucks to be honest

#

its great that it exists, just feels clunky to use at times

#

there is an alternative solution to this but it may just make me rip my hair out, i pre calculate alot more smaller points between the original points to simulate a curve between them

#

it would require rewriting most of the function however

#

so i really hope there is a way to create the curve within the setvelocitytransform

#

running my current setup with the bezier creating markers outside of the scope seems to be working fine, just cant figure out why it breaks when inside the loop

warm hedge
#

What break, what loop

tight cloak
#

its okay, i think i fixed it with some tinkering, fired the next index calculation just a tiny bit sooner and it stopped breaking it.

queen cargo
#

WOHOO

#

what a frking joke!

#

createLocation and getVariable have a fancy behaviour

#
GVAR_GVARS_missionContext getVariable [ "MissionReady" , false ]```
#

now lets play some QUIZ

#

which issue will be thrown πŸ˜ƒ

#

A: No issue, No problem
B: No issue, Return valie is messed up
C: <ENTER ISSUE HERE>

#

see the answer here:

night mantle
#

Looking for someone who can update this customized hetman mission to also include jets and planes even in custom factions and make them fly around ingame

Send me a dm for more info

bleak valley
#

Hello

It's surely pretty basic, but I've been stuck on this for the last 3 hours (and I've rarely had that much tabs open)

I'm preparing an op that will run on Dedicated, and I expect that most people will JIP because the dedicated server is usually opened 30 mins before the mission start, to find out any leftover game-breaking bug that slipped through the cracks during testing

After some research, I found that SetVariable has a JIP option

My code in init.sqf is :
private _players = allPlayers; _players setVariable ["blowout_safe", true, true];

The games tells me when I start my mission :
"Error setvariable : Type Array, expected Namespace,Object,Group,Display (dialog),Control,Team member,Task,Location"

I don't understand, as the setVariable wiki page do not say anything about using an array like this, and this script works on trigger.

Can anyone help me please ?

stable dune
bleak valley
# stable dune You need use for each to apply variable for each objects See forEach https://com...

So if I understand correctly, I need to execute my code on every client using forEach
But the two ways I did find to get that list in MP both won't work : allPlayers and BIS_fnc_listPlayers

That becomes something like :
private _players = allPlayers; _players setVariable ["blowout_safe", true, true] forEach BIS_fnc_listPlayers;

maybe I can use setVariable without _players before ? I'm lost, any advice you can give me ?

stable dune
#

Because you can use

//initPlayerLocal.sqf
player setVariable ..

And use true if you want every client get that variable from player object.
But if you use that variable on client only you don't need broadcast that for everyone.
Depends alot where and how do you use that variable

bleak valley
# stable dune You need just ```sqf private _players = allPlayers - entities "HeadlessClient_F"...

right I see thank you
I just want it to be set once and for all when a player joins, and that variable will stay this way during the whole operation, but by default it's set to false
I thought about using InitPlayerServer, and I read it's not ideal, and I was afraid that the variable would need to be executed globally for the server to interact with it (the variable protects you from the lethal effect of a server-wide event)

tulip ridge
#

Variables set on objects are already global, global and synced are different

tulip ridge
faint burrow
#

I think it will be better:

private _players = allPlayers - (entities "VirtualMan_F");
tulip ridge
#

Just change "TAG" to something unique to you, the mission, etc.

primal trench
#

I'm using a slider GUI to rotate a GUI object all the way around one axis using a formula I found in the setVectorDirAndUp biki page, but I'm noticing that despite the fact that there seems to be more of an effect at the beginning and ends of the ranges than in the middle. This is the formula I'm using:

((ctrlParent _ctrl) displayCtrl 1600) ctrlSetModelDirAndUp [
    [sin _yaw * cos _pitch, cos _yaw * cos _pitch, sin _pitch],
    [[sin _roll, -sin _pitch, cos _roll * cos _pitch], -_roll] call BIS_fnc_rotateVector2D
];```

Is there a way to make it so it turns at a constant rate or is that... not possible with the VectorDir system?
flint topaz
#

@primal trench

hallow mortar
#

That's for rotating a picture, not a model

primal trench
#

Yeah

flint topaz
#

You said GUI object

#

My apologies

mental badger
stray kindle
#

hmm ... ^ @lavish ocean

timid oyster
#

Hey guys, I'm trying to achieve something with my very little knowledge of scripting and don't know where to start. I need to figure out how to end my mission when a specified number of players and ai are killed on the bluefor side. Its interesting because I'm using a script to recruit ai to your squad while ingame and these ai would need to be counted in that number. Any help would be great πŸ‘

still forum
#

@snow herald if (idiot) exitWith {"Velocity shifting persons ukulele"}

vapid scarab
#

Are remoteExec and publicVariable commands ordered?
Here is my code. I am saving info from a server onto a client and then remoteExecing a save to missionProfileNamespace.

if (!isMultiplayer) exitWith {};
{
    _curatorUnit = getAssignedCuratorUnit _x;
    if (isNull _curatorUnit) then { continue };
    if (hasInterface and { _curatorUnit isEqualTo player }) then { continue }; // skip self hosted zeus
    // _netId = netId _curatorUnit;
    _netId = owner _curatorUnit;
    _netId publicVariableClient "bax_persist_saveDate";
    _netId publicVariableClient "bax_persist_databasePlayers";
    _netId publicVariableClient "bax_persist_databaseObjects";
    _netId publicVariableClient "bax_persist_databaseVariables";
    _netId publicVariableClient "bax_persist_databaseInventories";
    [] remoteExec ["bax_persist_fnc_zeusSaveDatabase", _netId]; // net id or unit reference would work here
} forEach allCurators;
warm hedge
meager granite
#

There also used to be a bug related with network messages being reversed at some points, not sure if it applies to these messages too or this bug even exists anymore

#

The bug was fixed but I don't know if it fixed it everywhere or only for where it was found - vehicle turrets

#

tl;dr; Yes but better test it

hallow mortar
#

The order is meant to be guaranteed for live execution, but not for the JIP queue.
Which I still think is absolutely horrific, but there it is.

meager granite
#

Is this really so?

hallow mortar
#

I don't think that means remoteExec JIP will definitely or even likely be out of order, but it could be

pallid palm
#

@timid oyster yes this can be done

#

theres many ways to do this but heres a start for you

#
//trigger

//Condition
{alive _x} count units USMC <=10;

//OnActivation
["end1"] remoteExec ["BIS_fnc_endMission"];
#
// then ofcorse in the description.ext
//Debriefing
class CfgDebriefing
{  
    class End1
    {
        title = "MISSION COMPLETE";
        subtitle = "Hostiles Eliminated";
        description = "All Enemy K.I.A";
        backgroundPicture = "";
        picture = "";
        pictureColor[] = {0,0,0,0};
    };
    class End2
    {
        title = "MISSION Failure";
        subtitle = "USMC KIA";
        description = "Failed To kill All Enemy";
        backgroundPicture = "";
        picture = "";
        pictureColor[] = {0,0,0,0};
    };
};
#

many people don't realize there's so much stuff in the default game that is very easy to use, read read read more

junior moat
#

i want to have an action on an object, that when called by a player, it will open their map and wait for them to click on a location before using that location to create a waypoint for a helicopter. i was going to use onMapSingleClick for this but on the biki page for it, it says to use MapSingleClick mission event handler for it instead. how am i meant to do this? its a mission event handler so i cant have it JUST for one person right?

south swan
#

LE = only takes effect on client it's called on

#

just like onMapSingleClick blobdoggoshruggoogly

junior moat
#

oh god locality my worst nightmare

#

i still dont understand it at all (and probably never will properly lmao)

#

agh ill figure it out tomorrow, its too complicated for my pea sized brain 😭

junior moat
#

dude ive read through ALL of this atleast 20 times. im just stupid lol ill never understand it properly no matter how much i read about it

proven charm
#

basically local means which computer is handling the object

hallow mortar
faint burrow
hallow mortar
vapid scarab
#

Im looking at grabbing entities of particular categories. I have done some exploring of the inheritance and think i have got the right ones. Doing testing now, but would anyone have any insights or suggestions here?

Vehicles: ["LandVehicle", "Air", "Ship"] Has to be LandVehicle and not Land because Land includes man
Ground Items: ["WeaponHolder", "WeaponHolderSimulated" The simulated variant inherits from ThingX. Anyone know where the simulated variant is used by the game?
Objects: ["ReammoBox_F", "Static", "ThingX"]

hallow mortar
#

I believe simulated is used for weapons dropped by killed units

vapid scarab
#

So I am using nearObjects but that also picks up buildings from the map/terrain. Is there a way to exclude these or another command that gets only spawned objects (including 3den)?

#

For more context, this is for persisting an area of objects, which might include stuff built using ace fortify or placed by zeus. But NOT from the terrain.

proven charm
#

umm notTerrainObjects = nearObjects - nearestTerrainObjects not sure if that works πŸ˜„

sullen sigil
#

is there a local alternative to animateSource?

little raptor
vapid scarab
#

Im afk so ill test this later, but do you know if vehicles being driven are considered entities?

empty leaf
#

hey guys

I am using live radio beta and want to figure out how to place radios on the ground to play audio

    class LandVehicle;
    class Car: LandVehicle {
        class ACE_SelfActions {
            class GVAR(open) {
                displayName = CSTRING(DisplayName);
                statement = QUOTE(_target call FUNC(open));
                condition = QUOTE(_target call FUNC(canOpen));
            };
        };
    };

    class Items_base_F;
    class Land_FMradio_F: Items_base_F {
        class ACE_Actions {
            class ACE_MainActions {
                selection = "interaction_point";
                distance = 5;
                class GVAR(open) {
                    displayName = CSTRING(DisplayName);
                    statement = QUOTE(_target call FUNC(open));
                };
            };
        };
    };
};```

the mod states here that ``` Items_base_F;
    class Land_FMradio_F: Items_base_F {```

is the object I am looking for. is there a way to search for this in game?
warm hedge
#

Search for what in where?

vapid scarab
#

This module won't show in the zeus menu... Any ideas?
I need it to only show in zeus and not editor

warm hedge
#

CfgPatches, units[]

vapid scarab
#

I forgot about that. thanks

tough abyss
#

I can't use getVariable on locations either (1.55 dev)

#

But I can an error message:

11:46:45 Error in expression <LOC getVariable ["Test", 2]>
11:46:45   Error position: <getVariable ["Test", 2]>
11:46:46   Error Generic error in expression
#

classname LOC
""

#

Probably because that is a streamed location.
Can confirm, with a createLocation'd location only the simple syntax works,

sharp grotto
#

How would i remove data from a hashmap, if the position matches ? meowsweats

[["UID",[["CLASSNAME1",[19325.8,14066.6,-0.0228806]],["CLASSNAME2",[19328.1,14070,-0.0228806]]]]]
faint burrow
sharp grotto
#

I don't want to remove the whole key, only the value array where there position matches.
I bet there is some easy way somewhere hidden xD

faint burrow
#

Have you read the article? deleteAt allows deletion of array elements.

stable dune
sharp grotto
faint burrow
#

And what's the problem?

stable dune
stable dune
#

You need be more specific, you can check does your data exist and delete if that exist

proven charm
#

if( _pos distance _hmapPos < 0.1 ) then { delete };

#

you need a loop..

sharp grotto
# stable dune What you want delete?

The whole "value block" inside the hashmap, so [["CLASSNAME1",[19325.8,14066.6,-0.0228806]] but only if the position is equal.
I tried find but no success, not too much experience with hashmaps yet

faint burrow
#
{
    _uid = _x;
    _objectPositions = _y;

    {
        if (((_x select 1) distance _position) < _delta) then {
            _objectPositions deleteAt _forEachIndex;
        };
    } forEachReversed _objectPositions;

    if ((count _objectPositions) == 0) then {
        _hashMap deleteAt _uid;
    };
} forEach _hashMap;
sharp grotto
sharp grotto
# faint burrow ```sqf { _uid = _x; _objectPositions = _y; { if (((_x selec...

Works β™₯️

{
    _uid = _x;
    _objectPositions = _y;
    _position = [19325.8,14066.6,-0.0228806];
    _delta = 1;

    {
        if (((_x select 1) distance _position) < _delta) then {
            _objectPositions deleteAt _forEachIndex;
        };
    } forEachReversed _objectPositions;

    if ((count _objectPositions) == 0) then {
        TestHash deleteAt _uid;
    };
} forEach TestHash;
faint burrow
#

Move _position and _delta outside the loop. Or even better make them constants using #define macro.

sharp grotto
#

Yea just as a test to see if it works, gonna rework everything.
Thanks again πŸ‘

faint burrow
south swan
#

except in half of my tests distanceSqr ends up slower than distance somehow 🀣

#

methodology: in debug console, prepare 2 arrays of 5000 elements with

MUH_arr1 = [];
MUH_arr2 = [];
for "_i" from 0 to 5000 do {
  MUH_arr1 pushBack [random 1000, random 1000, random 1000];
  MUH_arr2 pushBack [random 1000, random 1000, random 1000];
}

measure the runtime of

_accumulator = 0;
{
  private _v1 = _x;
  {
    //code here
  } forEach MUH_arr2;
} forEach MUH_arr1;```
with the measure button of debug console. Results vary between `distanceSqr` being 70-ish ms faster (with total runtime of 16.5k-ish ms) over those 25M runs when i accumulate the results into accumulator with `_accumulator = _accumulator + (_v1 <instruction> _x);` to it being 170-ish ms slower (out of total 4k-ish ms) when i just run `(_v1 <instruction> _x);` ![blobdoggoshruggoogly](https://cdn.discordapp.com/emojis/748124048025714758.webp?size=128 "blobdoggoshruggoogly")
still forum
#

The main bottleneck is memory due to cache misses.
Not CPU cycles by using a heavy instruction like square root

cyan dust
#

Aren't CPUs like past the point where square rooting was an issue? πŸ€”
I'm pretty sure I've heard that this is optimized now, but don't remeber where

cyan dust
#

So anyway... Good day. Is it possible to disable collision for an NPC? My player object can bounce poor fellas all over the base, which is not good
So far I've tried: disableCollisionWith and setPhysicsCollisionFlag with no luck

granite sky
#

A good rule of thumb with SQF is that perf cost is proportional to command count, although there are some commands that are actually slow (intercepts, sort etc).

fossil smelt
faint burrow
#

Open the example.

fossil smelt
faint burrow
#

Yes.

fossil smelt
#

Would that be the mission.sqm file?

faint burrow
fossil smelt
#

I don't know much about scripting, I'm trying to learn, and I was hoping to use something like this in upcoming missions. Idk where the cfgfunctions are and such

faint burrow
#

Open the link.

fossil smelt
#

OK looking at lines of code.

#

Ah ok. So how do I access the cfgfunctions for the mission?

#

Cause I see the example, and what I need to add

faint burrow
#

As it's written in the description:

edit your description.ext's CfgFunctions class like in the example

fossil smelt
faint burrow
#

What's the difference? The description tells you what to do.

fossil smelt
faint burrow
#

Create it.

fossil smelt
#

Oh

faint burrow
fossil smelt
#
class Header
{
  gameType = Coop;
  minPlayers = 1;
  maxPlayers = 20;
};
disabledAI = 1;

OnLoadName = "Sideline";// Mission name (short)
onLoadMission=""; // Longer description
briefingName = "Asset Procurement";
overviewText = "Early in the morning team 2 went radio silent. Find them and the asset";
// loadScreen = "viking_2.jpg"; // custom load image
author="Laggies;


// Debug (and CBA target debug)
enableDebugConsole = 1;
enableTargetDebug = 1;

class CfgFunctions {
    createShortcuts = 1;
    #include "scripts\acre_custom_signal_calc\funcs.hpp"

#

how's this?

winter rose
fossil smelt
#

class Header
{
  gameType = Coop;
  minPlayers = 1;
  maxPlayers = 20;
};
disabledAI = 1;

OnLoadName = "Sideline";// Mission name (short)
onLoadMission=""; // Longer description
briefingName = "Asset Procurement";
overviewText = "Early in the morning team 2 went radio silent. Find them and the asset";
// loadScreen = "viking_2.jpg"; // custom load image
author="Laggies" ;


// Debug (and CBA target debug)
enableDebugConsol  e = 1;
enableTargetDebug = 1;

// VVVVVV this is the important part! VVVVVV
class CfgFunctions {
    createShortcuts = 1;
    #include "scripts\acre_custom_signal_calc\funcs.hpp"
    }

#

Is this fixed?

winter rose
#
class Header
{
    gameType = "Coop";
    minPlayers = 1;
    maxPlayers = 20;
};

disabledAI = 1;

onLoadName = "Sideline";  // Mission name (short)
briefingName = "Asset Procurement";
overviewText = "Early in the morning team 2 went radio silent. Find them and the asset";
author = "Laggies";

enableDebugConsole = 1;  // debug
enableTargetDebug = 1;   // CBA debug

class CfgFunctions
{
    #include "scripts\acre_custom_signal_calc\funcs.hpp"
};
fossil smelt
tulip ridge
#

Yes

winter rose
#

edited (so you can copy)

fossil smelt
#

Do I need the path for the image or the image name itself?

winter rose
#

both?

fossil smelt
#

I have the image in it's own folder. within the mission folder

winter rose
#

then ImageDir\image.jpg

pallid palm
#

hello brothers: how do i disable the respawn tab, in the game menu, when someone hits the ESC key, and trys to respawn that way

#

i saw it some where but i forget where

tulip ridge
#

You can just do respawnButton = 0 in description.ext

#

Alternatively if you need to script it, you can just disable the control when the game is paused, although I can't check the idc currently

pallid palm
#

yes im about to try that

#

but dont that just disable the respawn in the retrive thingy

#

yeah thats what i want to do is disable the respawn when the game is paused oh btw Dart Thx for all your help that you gave me over the last some Months

stable dune
#

Hello,
How to use "default" value if x vehicle doenst have maxSpeed defined, Just "for sure" case, because all that i tested have, but never knows.

private _max = getNumber (configFile >> "CfgVehicles" >> _type >> "maxSpeed");

and if "maxSpeed" is not defined, i want use lets say 150

proven charm
#

if its not defined then getNumber will return zero

#

you can also do ```sqf
if(!isnull (configFile >> "CfgVehicles" >> _type >> "maxSpeed")) then

stable dune
south swan
#

or check before getting with isNumber <configPath> blobdoggoshruggoogly

warm hedge
#
_max max 50```to optimize it
stable dune
#

just

_max max 50
warm hedge
#
(0 max 50) == 50;
(150 max 50) == 150;```
south swan
#

_max = _max max 50 is equivalent to if (_max < 50) then {_max = 50;};

stable dune
#

Aaawesome!

#

thanks guys.

#

sooo

private _max = (getNumber (configFile >> "CfgVehicles" >> _type >> "maxSpeed")) max 50;

Can this do oneline? XD

warm hedge
#

Yes

blissful scarab
#

How would one make AI infantry fire with small arms upon vehicles?

blissful scarab
#

I'm not sure its possible but I might just be silly

pallid palm
#

my ai fire like hell at my vehicles all the time

#

i guess it depends on how much of a threat the vehicles is to them

blissful scarab
#

Or the circumstance

#

Also I thought you went to bed?

pallid palm
#

i did but i was thinking about Arma 3WooHoo

blissful scarab
pallid palm
#

you want to go in voice ?

blissful scarab
#

sure

pallid palm
#

ok

ivory lake
#

it depends on the vehicle setup

dusk gust
sonic lodge
#

Hi. How make "tank death circle" script? How check actual move bind and it be continued when the crew is sent to 200/300?

tulip ridge
#

Oh you want to hold the key, not check it

wind flax
#

Does anyone know if it's possible to add a picture to the server directory while the server is running, then set a texture selection to that texture?

#

Basically allowing you to "upload" pictures to screens for example

warm hedge
#

No

wind flax
warm hedge
#

Well, if the idea is to allow clients to upload one and share to everyone, no

wind flax
#

I could do like an HTML file, and have ARMA open it, and based on what was passed, it could just show a different image or something.

#

Would require a weird http server in the middle, but it's not the first time we've done that lol

warm hedge
#

And urm... is there anything that Arma is involved?

wind flax
warm hedge
#

So, open an interface through Arma, upload it into somewhere, use it in Arma as a texture?

tulip ridge
#

Brainstorming something while at work, you can't have a "conditional" respawn point correct? You'd have to add/remove the point.

Being able to disable / re-enable a respawn point also works

hallow mortar
torn stream
#
if (currentVisionMode player == 1) then
{
    hint "nightvision active";
};

how would i go about making this for a vehicle flir?

#

currentVisionMode _x == [0] or currentVisionMode _x [0] would work?

warm hedge
#
(currentVisionMode [player])#0 == 2```
#

Or simply

(currentVisionMode player) == 2```
torn stream
#

i'll try

#

we have an forEach on that if

#

it's currently

if ((currentVisionMode _x != 0)) then
{
    Script
}; forEach _Units

to detect if the ai is using any sort of thermal
so would we need to make it

if ((currentVisionMode _x != 0) or ((currentVisionMode _x) == 2)) then
{
    Script
}; forEach _Units```
warm hedge
#

For what purpose? currentVisionMode shouldn't do anything with AI

#

Or at least, that wouldn't do anything you expect

torn stream
#

trying to adjust a script that makes AI see lasers

#

it's only working with infantry currently

#

it gets an array of units within an area near the point the laser is pointing and executes a script that increases the knowledge of the AI of the play using the laser

warm hedge
#

Then check their hmd and fetch its config so you'll know the goggle they use is NV/TI compatible

#

I believe currentVisionMode really do nothing with AIs

torn stream
#

but doesn't that only work with AI that has an helmet with AMD?

torn stream
#

we just need to select the vehicles that either have flir or have the driver using nvg too

warm hedge
#

Okay I stand correct. You're correct but I don't even know if they would use Thermal anyways

torn stream
#

CSAT units in vehicles have they nvg's on

#

i just need to select them when they have that

#

i say "i just" but i know is not that simple

warm hedge
#

Okay, what is your current question?

torn stream
#

how can i add the vehicles that have their Vision mode different than 0 (no vision mode), to that if

warm hedge
#

Do you mean expand the filter to vehicles?

torn stream
#

yes

#

_Units = (_Pos NearEntities [["Man", "Car", "Tank"],20]) select {!isPlayer _x}; where _Pos is the point where the laser hits

#

we can confirm that the _Units array gets the vehicles, we need to include them in the If()then{}forEach

warm hedge
#

Fetch all vehicle and check their config. There are many ways to define them, can't point what parameters do right now

torn stream
#

go the long way, k, i'll see what i can do

warm hedge
#

Also,sqf if () then {} forEach; you say is not the syntax you can use

torn stream
warm hedge
#

Indeed

torn stream
#
Params ["_Speed"];

// Intersecting positions
_BegPosASL = EyePos Player;
_BegPosAGL = ASLTOAGL _BegPosASL;
_EndPos = (_BegPosAGL vectorAdd ((Player weaponDirection (currentWeapon Player)) vectorMultiply 1000)); 
_EndPosASL = AGLTOASL _EndPos;

// Intersecting objects
_ins = lineIntersectsSurfaces [_BegPosASL, _EndPosASL, player, objNull, true, 1, "FIRE", "NONE"];
_ins select 0 params ["_OriginalPos"];
if (isNil "_OriginalPos") exitWith {False};
_Pos = ASLTOATL _OriginalPos;

// Area to scan for units
_Units = (_Pos NearEntities [["Man", "Car", "Tank", "APC", "Air", "Static", "Helicopter"],75]) select {!isPlayer _x};

// Check each unit and reveal if able to see laser.
{
    if ((currentVisionMode _x != 0)) then // If using nightvision or thermal
    {
        if (((_x getRelDir _Pos) > 300) or ((_x getRelDir _Pos) < 60)) then // If looking in the general direction of the laser position
        {
            _Knowledge = _x knowsAbout Player;
            if (_Knowledge < 3.8) then
            {
                _Value = [1, _Knowledge + (4*_Speed)] select ((_Knowledge >= 1) && (_Speed != 0));
                [[_x,_Value,Player],
                {
                    Params ["_Unit","_Value","_Player"];
                    _Unit Reveal [_Player, _Value];
                }] remoteExec ["BIS_FNC_SPAWN",_x];
            };
        };
    };
} forEach _Units;

the script currently

#

and it works

#

oh i see now

warm hedge
#

You saysqf if () then {} forEach;
And your code is sqf {if () then {}} forEach []

#

Totally different

torn stream
#

yeah

#

noticed that now

fleet sand
#

Quick question am I doing something wrong here:

getMissionLayerEntities "EastMarkers" params ["_objectsEast", "_markersEast"];

{
    if(side player != east || side player != civilian) then 
    {
        _x setMarkerAlphaLocal 0;
    };
}foreach _markersEast;

systemChat format ["%1",_markersEast];

I have a layer of east markers with all of the markers that i want only to show to East side players.
This script is located in InitPlayerLocal.sqf.
But when i hop on as a Opfore i cant see the markers.

#

P.S. _markersEast array isnt empy it shows there.

warm hedge
#

Because you are not a civilian either?

fleet sand
warm hedge
#

Being an OPFOR means false || true so true

fleet sand
#

nvm i see where i goofed i am coocked nvm,

south swan
fleet sand
# south swan <:tanking:700311400098299944>

So like this:

//InitServer.sqf
LEG_EastMarkers = getMissionLayerEntities "EastMarkers";

//InitPlayerLocal.sqf
LEG_EastMarkers params ["","_markersEast"];
{
    if(side player == west) then 
    {
        _x setMarkerAlphaLocal 0;
    };
}foreach _markersEast;
``` ?
south swan
#

if you add publicVariable "LEG_EastMarkers"; to your InitServer as well - it may even work blobdoggoshruggoogly

faint burrow
faint burrow
fleet sand
# faint burrow Despite this, the command works on client side, but returns only markers, not ob...

I think this would be correct way for this to execute.

//InitServer.sqf
LEG_EastMarkers = getMissionLayerEntities "EastMarkers";
publicVariable "LEG_EastMarkers"; 

//InitPlayerLocal.sqf
LEG_EastMarkers params ["","_markersEast"];
{
    if(side player == west) then 
    {
        _x setMarkerAlphaLocal 0;
    };
}foreach _markersEast;

You execute the command on server and get the array of all of the markes to a var. Next you share that var with all of the clients and then compare their side and localy hide the markes on their side.
Also Initorder is correct becouse InitServer executes before InitPlayerLocal so its not possible to have LEG_eastMarkers empty if you run it this way.

faint burrow
#

Yes, it mostly will work, but you can avoid sending values over network if you use my code.

fleet sand
faint burrow
#

Read what I wrote.

#

Also, since the order of execution is not guaranteed (initPlayerLocal.sqf may be executed before initServer.sqf), in some cases your code may not work.

faint burrow
#

If you need guaranteed order, use init.sqf.

#

But again, you can avoid sending values over network.

fleet sand
faint burrow
#

Use my solution.

dapper cairn
#

Howdy yall, Does anyone know of a script for the use action teleporting that changes time when you use it? Preferably with a fade to black.

#

or a script that makes a localized area dark when you enter it like a bunker

pallid palm
#

@faint burrow hay m8 thats really awsome thx you m8

#

and hello again @faint burrow your 1 of the good guys in here

#

even tho im not very good i can tell who is good πŸ™‚

granite sky
#

Note that for most of the init scripts, Arma doesn't wait until they complete before running the next one. So some code in initPlayerLocal.sqf might run after code in init.sqf in MP, for example.

#

If you want to guarantee that the whole of one runs before some code in another, then you should enforce that with global vars & waituntils or similar.

pallid palm
#

@dapper cairn what i would do to change the time at any time in game is i would have my parms of time set ofcorse, then as you say black out the view, then call the time to a diff pram in the params

granite sky
#

Also testing that it works may not be sufficient, because mod selection, client vs localhost, linux vs windows may all change timings.

warped hornet
#

Hello is there a simple way to get the ISO time via scripts? I cant seem to find anything

proven charm
warped hornet
#

Sorted all good

zealous solstice
gritty escarp
#

Hello, I'm looking for some help with an issue I'm having which I cannot find solution to...

I am trying to save a variable on a dedicated server, to which this code is running on the dedicated server, my problem is, it's not getting saved on the .vars file, this is the code I'm testing with:

missionProfileNamespace setVariable["my variable",123];
savemissionProfileNamespace;

I DeRap the .vars file and I notice that it didn't get saved, checking bistudio's wiki about setVariable, I am doing everything correct to save my variable, yet it does not do it, what could be causing my issue? am I missing a setting on the server or on the mission file?

this is what I get in the .vars file

#define _ARMA_

version = 2;
class MissionProfileVariables
{
    items = 0;
};

Any help would be appreciated

warm hedge
#

Which vars you read?

gritty escarp
#

ArmA 3 Server > Servers >_"weird numbers and letters" > users >"repeats same weird numbers and letters" in there it creates a file named after the mission file and then .vars

#

MyMission.vars

#

I delete the file, run the setvariable line through the debug console, I get a "true" feedback, the file is generated again, and still without my variable

warm hedge
#
  1. You sure what you read is the correct profile's vars?
  2. You sure you run the code in Dedicated properly?
gritty escarp
#

or am I being dumb and not waiting for the file to finish?

#

current testing I'm using the Server Exec button, I'll add redundancy and run it through

[missionProfileNamespace,["myVar",123]]remoteExec["setVariable",0];
#

ran it as such, it updated the .vars file, still same issue

warm hedge
#

I would make it sure if your Debug Console is actually running your code

gritty escarp
#

it is, as the file gets generated

#

this is frustrating me, and I appreciate helping me out

warm hedge
#

What about more obvious ones, like systemChat or diag_log

gritty escarp
warm hedge
#

Yes

#

Indeed theoretically your code should work. I also would to try if getVariable to see if you can see 123

gritty escarp
#

getVariable returns empty

#

hmmm

#

do I need to have "save" enabled on the mission or set something on the description.ext beforehand?

warm hedge
#

How did you test it? AFAIK just run on server button in Debug Console won't simply transfer the return value to your (local client's) Console

#

And no, description.ext etc is not involved

gritty escarp
#

I believe I could be missing a setting or parameter enabled to allow it to save the variable

#

well, I'm not checking feedback from the debug console itself, although on the bottomline it does return me feedback

#

my feedback is on DeRap'ing the file it generates

#

I'm gonna check my own client's probably it's saving it there

warm hedge
#

Okay... I think I want to start it from very simple checks (again)

  1. What code do you run to set? In what context?
  2. Does the code even run? (Does diag_log return anything/prints properly?)
  3. What code do you run to get? In what context? Can you confirm it is nil or 123, and how?
  4. Just in case, which folder you actually look?
#

I just tried

  1. Launch a Dedicated
  2. Login as a client, run a random mission
  3. Run Server Execsqf missionProfileNamespace setVariable["my variable",123]; savemissionProfileNamespace;
  4. It produces MP_COOP_m01.vars
  5. DeRap returnscpp class MissionProfileVariables { items = 1; slots = 15; class Item0 { name = "my variable"; class data { singleType = "SCALAR"; value = 123.0; }; readOnly = 0; }; };
gritty escarp
#

1.- ```sqf
if(!isServer) exitwith{};
_marker = AllMapMarkers select {markerColor x == "ColorGreen" && "z" in _x};
profileNamespace setvariable ["INS_mission_progress",_marker,true];

basically saving map markers colored green, been running a hint to make sure the markers get selected, it does work

2.- where can I check the diag_log? that seems very helpful, I am unexperienced with it

3.- basically what's on 1, then I locate the location of the .vars file generated and I check to see if it's there

4.- B:\SteamLibrary\steamapps\common\Arma 3 Server\Servers\_242ed36d75bc497699a6938e948daba0\users\_242ed36d75bc497699a6938e948daba0
this is the path to the server and its folder, its the only one I run on my PC for testing
warm hedge
#

I don't know why Discord failed to format it properly... but anyways

gritty escarp
warm hedge
#

Just like Arma

gritty escarp
#

pretty much lol

#

yeah I should be seeing that as well, that's what puzzles me, why is it not generating it? I'll load a random mission see what happens

warm hedge
#
  1. Not sure, I mean, because I see no missionProfileNamespace mention?
  2. diag_log will be printed into your RPT, in this context, your server's RPT
gritty escarp
#

nothing popped up on the rpt file, hmmm

#

I keep getting 22:28:07 Server: Object 2:4349 not found (message Type_114) but I think that's related to triggers

warm hedge
#

Just in case... are you sure your Debug Console is actually enabled?

gritty escarp
#

it is, for admins

#

i'll send a SS in a bit

warm hedge
#

No, I don't mean you see it properly. It sometimes not work

#

I don't reacall what I've done to make it work, but give me a bit

gritty escarp
#

sorry, I don't understand that

#

debug acting funky?

warm hedge
#

Yes

gritty escarp
#

ah

#

well, if I server exec a hint, I shouldn't see it, lemme try that

#

yeah didn't see the hint, so I think it is indeed running it on server

warm hedge
#

I mean, I just recall without this Console work funky

gritty escarp
#

I see that on the image it says "NO CBA" could CBA be causing the issues?

warm hedge
#

It just mean Without CBA it does look like this

gritty escarp
#

ah

#

should I wait some time or is it supposed to generate the file instantly?

warm hedge
#

Instant

gritty escarp
#

ran it globally as well, no difference

#

hmmm, there's gotta be a setting I'm missing

#

gotta test a blank mission see if it works

#

"Enable Saving" shouldn't affect it, right?

warm hedge
#

Indeed not related

gritty escarp
#

binarizing the mission shouldn't affect it either

#

right?

warm hedge
#

Indeed

gritty escarp
#

maybe I should verify my files

#

well POLPOX, I really appreciate your help with this issue, I will post an update here if I find the solution to this issue, I'm going to try and figure out if its my system or the mission file itself

warm hedge
#

Maybe try without Mods (except the console) and try a simple mission like I've done (Stratis' Escape 10)? Otherwise I'm lost as well

gritty escarp
#

good idea

#

maybe a mod is causing the issue

gritty escarp
#

I just tried the console mod you gave me, it worked and saved to missionprofileNamespace

#

it finally worked!

gritty escarp
#

so, seems that what fixed my issue was to run

enableDebugConsole = 2;
#

and then my debug console actually worked

warm hedge
#

Everything was a twist all the time meowsweats

vagrant skiff
#

anyone know if there is a way to use " inside of a typeText command without messing it up?

warm hedge
#

typeText?

vagrant skiff
#

yeah, BIS_fnc_typeText

#

Im trying to to display coordinates but the " from the coordinates creates issues

warm hedge
#

"'" '"' etc

gritty escarp
vagrant skiff
steady minnow
#

Good day to everyone.Please tell me a banal thing.How can I give a public variable of an object of a certain class so that it works in all subsequent scripts that will access it?Thank you in advance.

warm hedge
#

an object of a certain class
What does this mean

fleet sand
warm hedge
#

If it is, it doesn't stand with

give a public variable

steady minnow
warm hedge
#

forEach to iterate with an array, use vehicles, allMissionObjects or allObjects etc to find all objects. typeOf or isKindOf to filter

steady minnow
#

And is it possible to give a public variable to this class?

warm hedge
#

And what it does mean

fleet sand
steady minnow
#

To use it in all subsequent scripts.I want to write it to the object's init file.

fleet sand
#
{
    //apply here what ever you need.
}foreach (nearestObjects [[0,0,0],["MyClassName"],worldSize,true]);
steady minnow
#

In the mod's config file, I use

 class EventHandlers;
``` and from the config, I run an online file for this object
```sqf
class EventHandlers: EventHandlers
        {
            init="Zov = [_this select 0] execVm '\Conteiners\Screepts\CON_ARTTS.sqf'";
        };    

, in which I write the following command:

ATTACH_CONN = player addAction ["ΠŸΡ€ΠΈΠΊΡ€Π΅ΠΏΠΈΡ‚ΡŒ ΠΊΠΎΠ½Ρ‚Π΅ΠΉΠ½Π΅Ρ€ ΠΊ поясу", {(_this # 0) setDir 30;(_this # 0) attachTo [player, [0.17,-0.16,0.02], "pelvis",true];

player execVm "\Conteiners\Screepts\CON_ARTTS2.sqf";

player removeAction ATTACH_CONN;}];

The command runs the following script, but it does not work (_this #0);.
I want to give a public variable to an object in an init script so that the following scripts work with this variable

warm hedge
#

Do you mean _this # 0 in addAction doesn't work?

steady minnow
#

No writes an error

#

#(_this #0)

#

Although everything works in the first file.

#

All the commands I mean

warm hedge
steady minnow
#
detach  (_this # 0);


 (_this # 0) setPos (getPos player);
 
 DETACH_CONN = player addAction ["ΠžΡ‚ΡΠΎΠ΅Π΄Π΅Π½ΠΈΡ‚ΡŒ ΠΊΠΎΠ½Ρ‚Π΅ΠΉΠ½Π΅Ρ€",{player execVm "\Conteiners\Screepts\CON_ARTTS.sqf";player removeAction DETACH_CONN;}];

This is the second script, it doesn't work here.

warm hedge
#

Okay. I'm not going to solve two issues in the same time. Which/what is your primary issue right now?

karmic spade
#

Was curious if anyone has done much work with RHS humvees and making them sturdier in combat. Attempting some eventhandlers but im worried they arent playing nice with RHSs custom damage models. I just want my players to be able to utilize some of the RHS vehicle while giving them a stronger, albeit unrealistic, advantage over the enemy, Im in it to make it more fun for them and not have to constantly get new humvees because a few stray AK rounds cause the engine to start smoking

hallow mortar
steady minnow
warm hedge
#

And what is the problem?

steady minnow
#

I described the problem above.

warm hedge
#

You didn't. You only stated your concept

hallow mortar
#

You've got like 3 different layers of translation difficulties going on here between the two of you. Choose your words carefully, and explain everything as clearly as you can, to make it easier to understand each other.

steady minnow
#

Fucking ЯндСкс translators

warm hedge
#

Better to sort the points.

  • What is the code you want to solve?
  • Is there any error messages?
steady minnow
#

I need a command that gives addactions to Objects of a certain class in the game.

hallow mortar
#

You're almost there actually, but you're adding the actions to player rather than the object.
There are some other problems with the code, but that's the big one.

#

Can you try to translate the titles of the actions for me, so I can clearly see what each one is meant to do? I'll try to write some code that does what you want.

steady minnow
#

1)Attach the container to the player's belt

#

2)detach the container

warm hedge
#

Okay. Thing I want to ask to make it sure is, is that scripts, really have to be a part of a Mod?

steady minnow
hallow mortar
#

Does your mod require CBA? It's OK if not, but if it does, then there's some tech we can use to make this a bit better.

warm hedge
#

The point I wanted to ask was, your initial question actually sounded like a question regarded to a script that is used in a mission. Being a script in a mission and a script in that regard, is actually different concept, so we actually have to sort things up

warm hedge
steady minnow
# hallow mortar Does your mod require CBA? It's OK if not, but if it does, then there's some tec...
class CfgPatches
{
    class Conteiner_Arts
    {
        units[]=
        {
            
            "Box_Bioconteiner"
 
        };
        weapons[]={};
        requiredVersion=0.1;
        requiredAddons[]={};
    };
};

class EventHandlers;

class cfgVehicles
{
class box_east_ammo_f; //ORIGINAL AMMO BOX

class Box_Bioconteiner : box_east_ammo_f
{
scope = 2;//show it on editor
accuracy = 1000;
displayName = "ΠšΠΎΠ½Ρ‚Π΅ΠΉΠ½Π΅Ρ€ для транспортировки Π±ΠΈΠΎΠΌΠ°Ρ‚Π΅Ρ€ΠΈΠ°Π»Π°";
model = "\Conteiners\objects\Bio_Conteiner.p3d";

class TransportMagazines//MAGAZINES IN AMMO BOX
{
class MY9mm_Mags//another classname
{
magazine = "";
count = 2;
};

};


};

class Box_Conteiner_Artefakts : box_east_ammo_f
{
scope = 2;//show it on editor
accuracy = 1000;
scopeCurator=2;
editorsubcategory = "ΠšΠΎΠ½Ρ‚Π΅ΠΉΠ½Π΅Ρ€Ρ‹";
editorCategory =  "Π‘ΠΈΠΎ ΠΈ АртСфакт-ΠšΠΎΠ½Ρ‚Π΅ΠΉΠ½Π΅Ρ€Ρ‹";
displayName = "ΠšΠΎΠ½Ρ‚Π΅ΠΉΠ½Π΅Ρ€ для транспортировки Π°Ρ€Ρ‚Π΅Ρ„Π°ΠΊΡ‚ΠΎΠ²";
model = "\Conteiners\objects\Bio_Conteiner.p3d";

class EventHandlers: EventHandlers
        {
            init="Zov = [_this select 0] execVm '\Conteiners\Screepts\CON_ARTTS.sqf'";
        };    


class TransportMagazines//MAGAZINES IN AMMO BOX
{
class MY9mm_Mags//another classname
{
magazine = "";
count = 2;
};

};


};

};

This is a mod config

hallow mortar
steady minnow
#

ok

warm hedge
steady minnow
warm hedge
#

And sqf player execVm "\Conteiners\Screepts\CON_ARTTS2.sqf"is calling the second script?

hallow mortar
#

Do you want the player to be able to carry more than one container at the same time, or just one at a time?

warm hedge
#

The error itself is becausesqf player execVm "\Conteiners\Screepts\CON_ARTTS2.sqf"which means your second script's _this is player not an array. Which means, player # 0 is invalid, so syntax error

#

I see a lot to optimize your codes, but I may explain later if you want to

hallow mortar
# steady minnow ok

Try this.
Notes:

  • In config.cpp, at the bottom, in CfgFunctions, you MUST replace YOUR_MOD_PBOPREFIX with the actual name or prefix of your mod's PBO.
  • I think I've accounted for everything, but you need to test it. Please report any errors exactly.
hallow mortar
#

Oh, the container probably floats in midair after being detached. Simple fix. In the "put down" function:

_container setPosASL getPosASL _unit;```
You can use `vectorAdd` to adjust the altitude if needed, depending on the container model.
hollow junco
#

Is there a way to make an object render before all other objects in a scene, so that all other objects appear on top of it? I'm trying to make a space sky box/sphere and have asteroids appear that are outside of the sphere position wise.

Currently I've got it moving with the player, but it obscures anything that's more than about 2km away, as that's the radius of the sphere.

steady minnow
steady minnow
faint burrow
#

Provide error message from RPT file.

#

Missed comma most likely.

steady minnow
#

The container is attached, but there is no detaching action.This error occurred while running with the container attached.

faint burrow
#

Negation cannot be before code.

steady minnow
hollow junco
# steady minnow

Replace curly brackets {} with () on the second isNull objectParent part of the statement?

steady minnow
#

My game doesn't crash.

faint burrow
#

Why? It's better to move negation into curly brackets.

hollow junco
faint burrow
#

And it's better from code optimization point of view.

hollow junco
#

Either way it'll fix the latest error I think.

warm hedge
faint burrow
warm hedge
steady minnow
faint burrow
#

By time and code piece causing the error.

steady minnow
faint burrow
#

Well, everything is explained.

steady minnow
faint burrow
#

Error ΠŸΠΎΡ‚Π΅Ρ€ΡΠ½Π° ]
Error !: Π’ΠΈΠΏ code, оТидался Π‘ΡƒΠ»Π΅Π²ΠΎ
What's not clear here? It's written in Russian.

steady minnow
#

Did I understand correctly?

" ",        
        "(_originalTarget == _this) && (isNull objectParent _this)"
faint burrow
#

Yes (about comma).
Don't ask, try it -- your PC won't explode.

steady minnow
#

The second error has not disappeared

faint burrow
#

Because you hasn't fixed them.

steady minnow
#

I understood because it's in the Config.

#

The second error has gone away, a new one has appeared.

stable dune
steady minnow
#

There was no second square bracket

_unit removeEventHandler ["Killed", _unit getVariable ["pronix_var_dropContainerEH",0]      ;
faint burrow
#

Easy with RPT file, yea?

steady minnow
#

It's working now, but only half.The second action appears and works, but is not deleted when activated.And when the first action is activated for the second time, the second inscription of the second action appears in the left corner, and so on.

pallid palm
#

hello all: Could someone show me a script, that would put a solid flag 3D icon, above my flag marker named flag1,

#

i cant seem to get it to work

steady minnow
#

A new error has appeared

#

There is an error in this condition in the config file

condition = "alive this && {isNull (objectParent player) && !(isNull objectParent this)}";
steady minnow
steady minnow
stable dune
#

Special variables passed to the script code are:
_target,
_this,
_originalTarget,
_actionId

Where _target references object where current action is added.
So if you check alive this , should be

alive _target
pallid palm
#

@steady minnow yeah my flag marker is on the ground yes but i would like the 3D icon ofcorse to be up in the air say like 10 hight

#

its not realy a pressing issue but i would like to know how to do it for another mission im making

#

it will be for training mission to help noobs for Arma 3

pallid palm
#

ok cool ill try again

steady minnow
#

The second action from attaching the Container from the belt works and detaches the container, but it does not remove itself, And when the first action is reactivated, a new second action appears.And so on ad infinitum. Can you tell me how to fix it?

faint burrow
steady minnow
#

The issue has been resolved.The creator of the code did not prescribe disabling the second function when it was activated.Fixed it .Everything is working.Thanks to all the panelists and many thanks to NikkoJT for their help.

junior moat
#

im lost on why its saying this, any help?

_vehiclesList = (getPosWorld _objectToLoad) nearEntities [["Car", "Armored", "Air"], _distance];
```^ this is the line its saying is incorrect
faint burrow
#

What's the value of _distance?

junior moat
#

ive been doing some testing and it should be 25 but its reading back as "command" and i have 0 clue why

faint burrow
#

Β―_(ツ)_/Β―

hallow mortar
hallow mortar
junior moat
hallow mortar
# steady minnow The issue has been resolved.The creator of the code did not prescribe disabling ...

Hi, sorry for the bugs and the delay. It's been a rough day :U
Which action is not being removed?
The two actions in CfgVehicles cannot be removed, because they're part of the object. Instead, they use their Condition to decide when they appear.
The other action, on the player who is holding a container, is meant to be removed when they put it down. It includes a system for doing that. I'll double-check it in a minute though.

hallow mortar
faint burrow
junior moat
#

OHHHH

#

that makes alot of sense 😭

#

im stupid, thank you

faint burrow
junior moat
#

fix one issue and another comes out of nowhere, love it

#

this code was working literally yesterday idk what i did 😭

hallow mortar
lime rapids
#

getting a weird error saying that a number is provided but it isnt a number (picture attached) i've checked that _pos1 and _currentpos are both coordinates (_this is a unit amd veh1 is a object) any ideas as to what it could be?

_projectile = "Sign_Sphere25cm_Geometry_F" createvehicle position player;
_projectile setObjectTexture [0, "#(rgb,8,8,3)color(0,0,1,1)"];
_projectile setPos (getPos _this);
_pos1 = veh1 modelToWorld [0,0,20];
_pos1obj = "Sign_Sphere25cm_Geometry_F" createvehicle _pos1;
_currentPos = getpos _projectile;
_projectile setVelocityTransformation
[
    _currentPos,
    _pos1,
    [0,0,0],
    [0,0,0],
    [0,0,0],
    [0,0,0],
    [0,0,0],
    [0,0,0],
    0
];
faint burrow
#

I guess the last 4 arrays cannot be filled with only zeroes.

hallow mortar
# lime rapids getting a weird error saying that a number is provided but it isnt a number (pic...

I dunno what the issue is with setVelocityTransformation, but I can tell you there is another problem with this code:

_projectile setPos (getPos _this);```
Do not do this. `setPos` and `getPos` are slow and do not reliably use the same method of determining altitude, which results in wrong vertical positioning. Use matching pairs of `getPosASL`/`setPosASL` or `getPosATL`/`setPosATL` instead.
```sqf
_currentPos = getpos _projectile;```
Do not do this. `setVelocityTransformation` requires all positions to be in ASL format; `getPos` does not return ASL format. This will result in wrong vertical positioning. Use `getPosASL` instead.
lime rapids
vagrant skiff
#

anyone know how to set a markers parameters before using BIS_fnc_showMarker? Because using setMarkerType before or after BIS_fnc_showMarker causes it to not fade in

#

I also tried using BIS_fnc_hideMarker with the time set to 0 before BIS_fnc_showMarker but that caused it to flash before fading in

pallid palm
#

@faint burrow wooohoo awsome thx m8 looks awsome

faint oasis
#

Hi, i have a question ? Is it possible to update the UI on a texture ? Because when i run the displayupdate command on the UI it's not updating on the screen, is it normal ?

#

I used that code

screen_test setObjectTextureGlobal [0, "#(rgb,1024,1024,1)ui(""RAM_MI_M"",""screen1"")"];
private _display = (findDisplay "screen1");
private _glistbox = (_display displayCtrl 1678);
_glistbox lbAdd "PlayerTest";
_glistbox lbSetCurSel 0;
displayUpdate _display;
south swan
remote cobalt
#

Hey folks, its me again, trying to understand some basic concepts in Arma.

I want to run a script when a unit is killed. What is more efficient and more stable, Eventhandler killed or Trigger on !alive unit?

south swan
#

^literally what "trigger on !alive unit" does

faint oasis
remote cobalt
#

And for the other question: No, I think we will never arrive there πŸ˜„

south swan
#

no. EH is "Do X when we are there". Trigger on !alive is "ask "Are we there yet?!" every frame, do X when the answer is positive"

remote cobalt
#

Just wanted to be sure and not do guesswork. Thanks man, that helped a lot.

faint oasis
wild spade
#

Hello I'm making a composition for a carrier group with props in them. However in this composition I've added teleport points from which you can teleport between the ships.

This teleport script is based on a .sqf in the mission folder.

Is there a way to embedd the .sqf in the composition, so that when one uses this composition they don't have to add textfiles in the mission folder?

An example of one of the teleport points Init:
this addaction ["<t color='#00FFFF'>Move to ATLAS</t>","ATLAS.sqf",[],1,true,true,"","_this distance _target < 8"];
this addaction["<t color='#FFFF00'>Move to LIBERTY</t>","LIBERTY.sqf",[],1,true,true,"","_this distance _target < 8"];

An example of script in the .sqf in the mission folder:

_tele = _this select 0;
_caller = _this select 1;

_caller setPos (getpos (ATLAS));
player setPosASL [
getPos player select 0,
getPos player select 1,
16
];

fleet sand
# wild spade Hello I'm making a composition for a carrier group with props in them. However i...

Yea its easy you just put the code in addaction like so:

//Atlas
this addAction
[
    "Move to ATLAS",
    {
        params ["_target", "_caller", "_actionId", "_arguments"];
        private _pos = getposASL ATLAS;
        _caller setPosASL _pos;
    },
    nil,
    1.5,
    true,
    true,
    "",
    "true",
    8,
    false,
    "",
    ""
];

//Liberty
this addAction
[
    "Move to LIBERTY",
    {
        params ["_target", "_caller", "_actionId", "_arguments"];
        private _pos = getposASL LIBERTY;
        _caller setPosASL _pos;
    },
    nil,
    1.5,
    true,
    true,
    "",
    "true",
    8,
    false,
    "",
    ""
];
wild spade
#

Thank you so very much, appreciate it! πŸ™‚

lime rapids
#

asked this already and didnt get a respons plz let me know if against rules to repost but im getting a weird error saying that a number is provided but it isnt a number (picture attached) i've checked that _pos1 and _currentpos are both coordinates (_this is a unit amd veh1 is a object) any ideas as to what it could be?

_projectile = "Sign_Sphere25cm_Geometry_F" createvehicle position player;
_projectile setObjectTexture [0, "#(rgb,8,8,3)color(0,0,1,1)"];
_projectile setPosASL (getPosASL _this);
_pos1 = veh1 modelToWorld [0,0,20];
_pos1obj = "Sign_Sphere25cm_Geometry_F" createvehicle _pos1;
_currentPos = getposASL _projectile;
_projectile setVelocityTransformation
[
    _currentPos,
    _pos1,
    [0,0,0],
    [0,0,0],
    [0,0,0],
    [0,0,0],
    [0,0,0],
    [0,0,0],
    0
];
dusk gust
lime rapids
tulip ridge
#

modelToWorld returns PositionAGL, not PositionASL, but that wouldn't cause that error

lime rapids
#

yeah pretty sure it isnt the co ordinates but something else in the setvelocity transformation but they seem to all match what can be used in biki and modifying the numbers doesnt seem to fix it

warm hedge
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

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

// your code here
hint "good!";
sweet sleet
#

Hey there!
I'm currently working on a lockpicking system for one of my missions, where specific doors can be unlocked. My issue is that I'm not smart enough to figure out a way to hide the Add Action once the door has been unlocked. Any ideas?

[ 
  this, 
  "Lockpick door", 
  "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
  "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
  " 
    call {   
      private ['_intersects','_select_door']; 
      _intersects = ([cursorObject, 'VIEW'] intersect [ASLToATL eyepos player, (screentoworld [0.5,0.5])]); 
      _select_door = if (count _intersects > 0 && {(_intersects select 0) select 0 in ['door_10','door_6']}) then [{format ['bis_disabled_%1', (_intersects select 0 select 0)]},{''}]; 
      if (_this distance _target < 15 && _select_door in ['bis_disabled_door_10','bis_disabled_door_6']) then { 
        MGI_select_door = _select_door; true 
      } else {false}; 
    }; 
    true", 
  "true", {}, {}, 
  { 
    if (_target getVariable [MGI_select_door,1] !=0) then { 
      _target setVariable[MGI_select_door,0,true] 
    } else { 
      _target setVariable[MGI_select_door,1,true] 
    } 
  }, {}, [], 5, nil, false, false 
] call BIS_fnc_holdActionAdd;
lime rapids
warm hedge
#

Is that your entire code so far?

lime rapids
#

not so far my entire code is this and it is a file in a mission called on an object with sqf t execvm "FlyingBlob_attack.sqf";
where t is the init name of a csat unit

#

it does require cba and will give a error if IMS isnt loaded but should still work

warm hedge
#

Shall try after I eat my dinr

lime rapids
#

thank you enjoy your food

warm hedge
#

Nah, is a boring one

faint burrow
lime rapids
warm hedge
#

...Hold on, can vector being 0,0,0 do anything with it?

lime rapids
warm hedge
#

Before I do anything with it...

_pos2 = [(_vpos#0 + _Ppos#0)/2, (_vpos#1 + _Ppos#1)/2,(__vpos#2 + _Ppos#2)/2];```You sure this is correct?
lime rapids
#

yeah im using it to get the midpoint between the object and the "target" so that i can give weird movement to _projectile as it moves towards the other object though the two underscores is a typo

warm hedge
#

Well

#

The typo could be the reason, since that nil usage won't return an error in that calculation

#

But using it in somewhere else, just like setVelocityTransformation

lime rapids
#

though the error was with the first setvelocity trans which afaik doesnt reverence later pos2 at all (unless im reading it wrong)

warm hedge
#

You are

#

The error is about setVelocityTransformation gets an invalid argument

#

Unless you are talking about something else

#

setVelocityTransformation in line 113 is clearly throwing the error

lime rapids
#

is that the one referencing pos2 and pos3? for me line 113 is blank

warm hedge
#

Well, 114 to be exact

lime rapids
#

ah ok thanks i should be able to make it work from this

still forum
hallow mortar
# lime rapids not so far my entire code is this and it is a file in a mission called on an obj...

POLPOX might have found the source of the script error, but there are some other oddities in this code.

  • line 69-71, this tells other machines to execute...an essentially empty script that doesn't do anything
  • you create _projectile and then immediately do 3 different setVelocityTransformation on it in the same frame. Granted I don't know the command too well, but I'm pretty sure only one of those is actually going to have any effect
  • there are a couple of spelling errors in global variable names (Invicible, Disentegrated). If those variable names really are spelled like that everywhere then OK (cough dammage cough), but if the spelling errors are only in this script, you need to fix them.
  • using proper indentation would make this a lot easier to read. e.g.
_gruntBoy addEventHandler ["Suppressed", {
params ["_unit", "_distance", "_shooter", "_instigator", "_ammoObject", "_ammoClassName", "_ammoConfig"];
if (!(alive _unit)) exitWith {};
if ((_distance < 2) and (currentWeapon _shooter == "WRS_Weapon_ShockGun")) exitWith {
_unit setDamage 1;
};
_unit reveal [_instigator, 4];
}];```
-->
```sqf
_gruntBoy addEventHandler ["Suppressed", {
  params ["_unit", "_distance", "_shooter", "_instigator", "_ammoObject", "_ammoClassName", "_ammoConfig"];
  if (!(alive _unit)) exitWith {};
  if ((_distance < 2) and (currentWeapon _shooter == "WRS_Weapon_ShockGun")) exitWith {
    _unit setDamage 1;
  };
  _unit reveal [_instigator, 4];
}];```
charred monolith
#

Hey, just a thought I had. What's better practice : call/spawn some functions from a file in the mission file inside the init of an object, or directly putting the code inside the object ? I would say the second but I guess it depends on the script itself ?

faint burrow
#

I would say the first.

hallow mortar
#

Using functions is better for longer pieces of code. The code only exists once, meaning it only has to be compiled once (faster), it takes up less file size, and if you need to change it, you only have to change it once to account for everywhere it's used. Plus, you can easily run them on objects created later as well, if you need to.
If we're talking single-line simple pieces of code like just this engineOn true or whatever then it doesn't really matter.

charred monolith
#

Ok, yeah it makes sense now Idk why I thought it was better. Thanks !

steady minnow
# hallow mortar Issue found. It's my mistake. I forgot a piece of the logic. This is the way to ...

I'm back with my container.The problem with deleting the second action was solved , but another one arose .After the first "attach container" action is triggered, it is deleted and the second action appears in the row of actions in the left corner of the screen, but after 5-8 seconds, the row of the first one appears again in the row of actions, and so on. Strange.And every time the player approaches the container at a distance of about 1 meter, this error appears on the screen. :

steady minnow
#

Correction of the message.After the container is attached to the player, if you stand still, the first action does not appear, but if you leave the container from this place for some distance, the first action appears.

sharp parcel
#

Ok, desperate and dumb question for the day. Does anyone know if CBA comes in a script version. I'm trying to run an all script server and some of the scripts require CBA which is a shame, as I don't want any mods (well unless the function comes in a script version i.e. tinter furniture).

warm hedge
#

No. Ask what exactly is required so we actually can help it

fair drum
warm hedge
#

Oh, I don't

tulip ridge
#

Can you change player respawn logic per-vehicle?
I don't want respawning players to spawn in the driver / gunner seats. I could use an EH to move them to a different seat, I'm just wondering if there's a more direct way.

cyan dust
#

Good day. Is there a way to detect if player moves items from main container to secondary via inventory UI? Seems like both 'Take' and 'Put' event handlers do not fire in this scenario notlikemeow

warm hedge
#

InventoryChanged?

#

Or something - relatively new EH

steady minnow
# warm hedge Likely your bracket mismatch

I solved the problem with the Attach and Detach eventhandlers, everything works.Can you tell me if it is possible for the box in the config to limit the number of equipment slots to 3 .?

cyan dust
cyan dust
warm hedge
#

Mmmmmaybe, just try SlotItemChanged. I'm not really certain about it

cyan dust
#

But thanks. So there is none, I think I know how to Π·Π°ΠΊΠΎΡΡ‚Ρ‹Π»ΠΈΡ‚ΡŒ this via polling of items in ground container

tight cloak
#

passing a vehicle into my fn_init which looks like:

params ["_trainobj"];
_trainobj setvariable ["FLCSL_isTrain", true, true];
_trainobj setvariable ["FLCSL_carriages", _carriages, true];
_trainobj setvariable ["FLCSL_interval", 0, true];
_trainobj setvariable ["FLCSL_nextIndex", objNull, true];
_trainobj setvariable ["FLCSL_lastIndex", objNull, true];
[_trainobj] call FLCSL_fnc_trainMove;

and the trainmove function then runs this:

_handler = [{
    params ["_args", "_handle"];
    _args params ["_trainObj"];
    _interval = _trainobj getVariable "FLCSL_interval";
    if (isNil "_interval") exitwith {systemchat "interval isnt set"};
    systemchat str _interval;
},
 0,
[_trainObj]] 
call CBA_fnc_addPerFrameHandler;

lo and behold _interval is throwing its exitwith, any ideas? its completely unset. however i can retrieve the value from debug console

still forum
#

diag_log the _trainObj to make sure its the same one as you expect?

#

if the train object gets deleted, the getVariable would return nil. Maybe its deleted?

steady minnow
#

Can you tell me if it is possible for the box in the config to limit the number of equipment slots to 3 .?

hallow mortar
hallow mortar
tight cloak
tight cloak
stable dune
tight cloak
#

That's incredibly strange

#

I'm gonna have to use waituntilandexecute for the handler though as executing onframe math the next frame would lead to unintended consequences

nocturne canopy
#

Hey fellas, is anyone aware of a way to detect if the player's vehicle is open topped?
Tried stuff like lineIntersect between the players head and 1m above them, but it just detects the box model. Cheers

tight cloak
#

it is never able to fetch the variable within its own scope, object is valid also

#

triple checked that, it always returns the _trainObj

#

just never gets the variable

stable dune
#

Or on server -> client

#

Or do you call x function with your object And in function call another function with object

tight cloak
#

so as its singleplayer as of right now:
me locally
and yes, im calling a function (the init) and then that passes it into the move function

#

actually just narrowed down the problem even further

#

setvariable seems to not be firing at all within the init

#

right, think i just fixed it

#

combination of issues it appears

#
params ["_trainobj"];
if (isNil "_trainObj") exitWith {systemchat "train object is not valid init"};
[{
    _this select 0 setvariable ["FLCSL_isTrain", true, true];
    _this select 0 setVariable ["FLCSL_trainThrust", 0, true];
    _velocity = _this select 0 getVariable "FLCSL_trainThrust";
    if (isNil "_velocity") exitwith {systemchat "thrust isnt set inside init"};
    _this select 0 setvariable ["FLCSL_carriages", _carriages, true];
    _this select 0 setvariable ["FLCSL_interval", 0, true];
    _this select 0 setvariable ["FLCSL_nextIndex", objNull, true];
    _this select 0 setvariable ["FLCSL_lastIndex", objNull, true];
    [_this select 0] call FLCSL_fnc_trainMove;
}, [_trainobj]] call CBA_fnc_execNextFrame;
#

that appears to have fixed it

#

firing it next frame. and also using _this select 0 instead of refering to it as _Trainobj within the execnextframe

#

making trains in arma 3 is actually making me go feral. hard coding is no issue. scaling it is killing me

charred monolith
#

Hi ! I need help regarding CBA Custom Event, I really struggle to understand it and use it.
I've read the GitHub wiki pages but I really struggle to understand how the event is "detected" and how I can make it detect my own event.
Just for exemple, I have a "Sit" Script, with an Ace Action. When the player use the sit action I want the action to be destroyed, but I also want it to go back when the player leave. I don't really want to use a loop for this (Because tbh I'm a bit afraid of tanking performance with it) so I search to use an event handler. There the publicaVariable one, but again it use a publicVariable, my script is local to an object (And I have multiple object to sit so I don't want to bombard the network with this).

The script doesn't use the Sitting functions from ace (I can't use them because the object i'm using is not compatible so I have to make my own)

How would I do that with CBA custom Events ?

nocturne canopy
tulip ridge
#

Just for exemple, I have a "Sit" Script, with an Ace Action. When the player use the sit action I want the action to be destroyed, but I also want it to go back when the player leave.
Don't do this. Just edit the action's condition so that it doesn't appear when someone is sitting on it

#

E.g. you could set a variable on the object like TAG_isOccupied to true and sync it over the network, and then just check that variable in your action's condition.

charred monolith
charred monolith
tulip ridge
#
// Register the event handler
["TAG_someEvent", {
    systemChat str _this;
}] call CBA_fnc_addEventHandler;

// Emit the event
["TAG_someEvent", ["parameters", 1]] call CBA_fnc_localEvent;
// There's also globalEvent, serverEvent, and targetEvent
#

publicVariable isn't really relevant for events. It's how CBA internally does the networking for events, but that's not something you need to be concerned with

charred monolith
#

Ok I guess I need something to trigger the event. I thought just changing the value would triggered it. Thank you for your help Dart !

tulip ridge
#

If you're just setting some "isOccupied" variable, do you need an event at that point?

ornate whale
#

Hey guys, do you know if it is possible to give commands like Flank Left, or Advance which you normally do from Radio Menu, but do it via a script commands? I struggle to find any related commands on BIKI. Thank you

tulip ridge
charred monolith
#

Tbf Right now I didn't use any kind of security, the action didn't disappeared when using it (So technically everyone can sit on the same spot at the same time)

ornate whale
proven charm
ornate whale
thorny tapir
#

does anyone know a way to force an nvg to swap between it's modelOff and uniformModel without actually activating the nvg effect?

tulip ridge
#

Can't, you'd have to use another version of the nvg itself that just uses the other model

charred monolith
# tulip ridge Were you doing something like `publicVariable "TAG_someEvent"`?

it seems I cant use the object with a setVariable, as my object is not passed inside my condition so my condition has no way to know if the object is occupied or not. The condition is set in ace_interact_menu_fnc_createAction which the object is not passed. But I use the object with ace_interact_menu_fnc_addActionToObject to add it to the object

proud dome
#

Quick question regarding simulation types for cfgAmmo, does changing from shotShell to say shotSmokeX change the behaviour of how the init event handler is run? Say using shotSmokeX the init would run on all clients seperately, and on shotShell would it just run on the client that fired the bullet?

Have seen some reports of shotSmokeX causing duplicate submunitions from 8 months ago but not really sure what their solution was..

tulip ridge
#
private _action = [
    "TAG_sit", "Sit", "", {
        _target setVariable ["TAG_isOccupied", true, true];
    }, {
        !(_target getVariable ["TAG_isOccupied", false]);
    }
] call ace_interact_menu_fnc_createAction;

[_object, 0, ["ACE_MainActions"], _action] call ace_interact_menu_fnc_addActionToObject;
charred monolith
raw vapor
#

Is there a way to prevent a vehicle from being one-hit-killed by weapons fire?

I want to prevent a fighter jet from just instantly detonating upon death since I want to force the player to eject before crashing. Like, ensure that no hit can 100% take away all of the aircraft's hitpoints. Always leave like, 1 hit point, or whatever.

If I can get fancy with it, crashing into the ground should still insta-kill the vehicle and the player, but this is not a strictly required feature. I'll accept some jank.

Maybe an onhit event handler to assure damage never drops below a certain threshold?

warm hedge
#

HandleDamage EH may help

tulip ridge
#

Saw someone do a similar thing before, this was their implementation (at the time, it may have changed)

dusk gust
#
                }
                else {

notlikemeowcry

fast glade
#

hey everyone, is there a way to add a language to arma 3 ? chatgpt says it possible but i wanted to ask the experts here first

faint burrow
#

No if you mean completely new lang.

fast glade
#

yeah i meant to add a new lang

faint burrow
#

Which one?

fast glade
#

Hebrew

faint burrow
#

Unfortunately, A3 doesn't support that lang.

fast glade
#

yeah man no worries but thanks brother

warm hedge
#

Theoretically possible. By making a font set, making a translation and overwrite one of a language A3 has to offer and call it a day. But anyways, don't trust ChatGPT in this context

fast glade
fiery gull
#

Heavy on the Theoretically on that one, definitely not worth the work

sonic lodge
#
                class Set_Base_Skin
                {
                    displayName="Default";
                    exceptions[]=
                    {
                        "isNotInside",
                        "isNotSwimming",
                        "isNotSitting"
                    };
                    condition="!(isNull objectParent player)";
                    statement="_target setObjectTextureGlobal [0, 'land\veh\data\base\camo1.paa', 1, 'land\veh\data\base\camo2.paa', 2, 'land\veh\data\base\camo3.paa']";
                    showDisabled=0;
                    runOnHover=0;
                    priority=2.5;
                };

How this not working? AceSelfActions

stable dune
#

to player?
_target = yourVehicle?
Maybe try with

"(objectParent player) setObjectTextureGlobal [0, 'land\veh\data\base\camo1.paa', 1, 'land\veh\data\base\camo2.paa', 2, 'land\veh\data\base\camo3.paa']"

Are you tried via debug that setObjectTextrure works, -> your textures is avaible

tulip ridge
#

Also you should make prefix your actions

south swan
#

That setObjectTextureGlobal call looks mighty strange

tulip ridge
#

Yeah, completely wrong

royal quartz
#

I feel I am going crazy, I want to save data onto the ServerProfile and it be useable across all missions on that server.

An example is a units loadout being saved automatically and loaded to them when they join any mission. I swear this was possible (on the server side) before but I cant only find 2 persistant profiles: ProfileNameSpace (cleint side I need Server Side) or missionProfileNamespace which is mission speicfic and wont work across all missions.

I did think about saving to the profileNameSpace with a unique ServerID as part of the var name, but again the only unique ID for servers I can find is ServerName which the admin of the server could change and break my saves.

Any ideas?

south swan
#

Can't you save them in server's profileNamespace with player id as key?

royal quartz
south swan
#

That, or make server get player's id from within the remoteExec'ced function starting with remoteExecutedOwner blobdoggoshruggoogly

royal quartz
#

ill try that

fleet sand
#

hi guys quick question. How can i add a group of AI to a HighCommand player. Basicly i have Opfor officer who is highcommand and Bluefor players who are hunting him down. Now i would like to add groups of AI via zeus and give control to the Opfor officer. I know i can add groups with HcSetGroup
https://community.bistudio.com/wiki/hcSetGroup
But will this work in Multiplayer and add it to the Opfor highcommand ?

hallow mortar
#

Whether it actually works as intended is another thing and you might need to test it, but that is what it's supposed to do.

analog mulch
#

Hi
Setting up a trigger to end a mission if a particular side is less than 10%

warm hedge
#

What is "100%" in this context

fleet sand
# analog mulch Hi Setting up a trigger to end a mission if a particular side is less than 10%

Myb something like this:
Note _totalNum should be a total number of enemis that you have adjust that number based on how many enemis you have put down.

//Codition:
private _totalNum = 100;
private _currentAliveSide = {alive _x} count units east;
private _num = floor ((_currentAliveSide / _totalNum) * 100);
if(_num < 10) then {
    true;
};


//On Activation:
["END1"] remoteExec ["endMission", 0, true];
analog mulch
#

I'll give this a try, ty

analog mulch
obtuse dust
#

Hey need a hand with this script for randomly creating injured sounds

sqf ``` private _sounds = [
"A3\Missions_F_EPA\data\sounds\WoundedGuyA_03.wss",
"A3\Missions_F_EPA\data\sounds\WoundedGuyA_04.wss",
"A3\Missions_F_EPA\data\sounds\WoundedGuyA_05.wss"
];

_sound = selectRandom _sounds;

[Bloke] spawn {
while {lifestate (_this select 0) == "HEALTHY"} do {
playSound3D [selectRandom _sounds, position _this, 0.3, 1, 10];
sleep 5;
};
}; ```

#

the error is Undefined variable in expression: _sounds

been looking at the wiki and google and cant find a soulution

#

would love a hand

cosmic lichen
#

You need to pass _sounds the same as the bloke variable

#

Also you are playing the sound when healthy

obtuse dust
#

im gonan find the write injured state for it to occur

#

but if its healthy and health 100 then i dont need to worry about that

obtuse dust
#

I would like to learn what I did wrong

fleet sand
hallow mortar
#

spawn creates a new separate script thread. Local variables from the original scope don't exist in the new scope. You need to pass _sounds as an argument and retrieve it from _this using select or params.

obtuse dust
hallow mortar
#
[Bloke, _sound] spawn {
    params ["_unit", "_sound"];
    // now you can use _unit and _sound in the rest of the spawned code
};```
obtuse dust
# hallow mortar ```sqf [Bloke, _sound] spawn { params ["_unit", "_sound"]; // now you ca...

Hey implmented it, and also fixed up some of the coding

however the code is just firing at all. not even a script error
Heres the updated code

    "A3\Missions_F_EPA\data\sounds\WoundedGuyA_03.wss",    
    "A3\Missions_F_EPA\data\sounds\WoundedGuyA_04.wss",   
    "A3\Missions_F_EPA\data\sounds\WoundedGuyA_05.wss"   
];   
   
   
   
[InjuredMan, _sounds] spawn {   
  params ["_unit", "_sounds"];   
      
    while {lifestate (_this select 0) == "HEALTHY"} do {   
        playSound3D [ (selectrandom _sounds), Injuredman, false, GetposASL Injuredman, 0.3, 1, 10];   
        sleep 5;   
    };   
};```
#

I'm kinda stumped lol

fleet sand
hallow mortar
#

That thing you've circled in red is not relevant. That line is showing the return value from the script, not the progress of the script, which in this case is a script handle (internal engine reference to an instance of a running script) which doesn't translate well to a human-readable format. It's just too long for the box.

obtuse dust
obtuse dust
hallow mortar
#

You should replace (_this select 0) with _unit as well. Not the problem, they refer to the same thing, but being able to have a simple variable name like that is half the point of using params.

#

I notice you are still using while {lifestate ... == "HEALTHY"}, which means the script will only run while the unit in question has less than 0.1 damage. If the unit is more injured than that, the script will exit. So if you're starting with an injured unit then nothing will happen.

obtuse dust
#

thats the reason for all this lol

hallow mortar
#

I get it, it's just that the logic is currently backwards. Make sure you switch to != when you make the final version.

hallow mortar
#

To diagnose this, try putting a systemChat into the while loop. That will help show whether the loop is exiting early, or if it's actually running but you just can't hear the sounds.

obtuse dust
#

UUpdated the code to _unit to replace the Injuredman and now a new error has appeared

Error Type Array, expected String
happening at the playsound3d

but I dont understand that, I need that in rder for the code to work?

hallow mortar
#

Btw, you've got the sound radius set to 10 metres, which is actually not that far in Arma, and it will be pretty quiet even when you're fairly close.

hallow mortar
obtuse dust
hallow mortar
#

_sounds -> selectRandom _sounds

hallow mortar
obtuse dust
obtuse dust
hallow mortar
#

Where you have _sounds in your playSound3D. You had it there before, remember.

obtuse dust
#

Hey it works

#

thanks so much

#

gonna now change it so it doesnt play when the guys healthyπŸ’€

faint burrow
#

(damage _unit) > 0

hallow mortar
#

Keep in mind that the while loop exits once the condition stops being true; if he gets injured again later after being healed, it won't automatically start again.

obtuse dust
#
    "A3\Missions_F_EPA\data\sounds\WoundedGuyA_03.wss",    
    "A3\Missions_F_EPA\data\sounds\WoundedGuyA_04.wss",   
    "A3\Missions_F_EPA\data\sounds\WoundedGuyA_05.wss"   
];   
   
  
 
   
[InjuredMan, _sounds] spawn {   
  params ["_unit", "_sounds"];   
      
    while {lifestate (_Unit) != "HEALTHY"} do {   
        playSound3D [   selectRandom _sounds, _unit, false, GetposASL _unit, 10, 1, 10];   
        systemchat "code fired" ; 
        sleep 5;  
         
    };   
}; 
 
 
 
#

Heres the horribly written script if anyone wants it

#

you might wanna delete the systemchat tho

hallow mortar
#

You can still change _this select 0 to _unit to make it a bit cleaner

obtuse dust
#

thanks @hallow mortar and @fleet sand

hallow mortar
#

just edit the message, no one will know

fleet sand
hallow mortar
#

Variable names aren't case sensitive

heady ore
#

I have lost a script that made it possible to export loadouts/inventory from playable characters in Eden editor. Executed from the menu.
Please, anyone who knows what I'm talking about haha, been searching for ages but can't find it

warm hedge
winter rose
heady ore
#

That will work but I'm looking to export loadouts from many playable characters and then import to ace arsenal

fleet sand
# heady ore That will work but I'm looking to export loadouts from many playable characters ...

Did you mean something like this:

AllPlayableUnitsItens = [];
{AllPlayableUnitsItens = AllPlayableUnitsItens + [(headgear _x)] + [(goggles _x)] + (assignedItems _x) + (backpackitems _x)+ [(backpack _x)] + (uniformItems _x) + [(uniform _x)] + (vestItems _x) + [(vest _x)] + (magazines _x) + (weapons _x) + (primaryWeaponItems _x)+ (primaryWeaponMagazine _x) + (handgunMagazine _x) + (handgunItems _x) + (secondaryWeaponItems _x) + (secondaryWeaponMagazine _x)} forEach (playableUnits + switchableUnits);
AllPlayableUnitsItens = AllPlayableUnitsItens select {count _x > 0};
AllPlayableUnitsItens = AllPlayableUnitsItens arrayIntersect AllPlayableUnitsItens;
copyToClipboard str AllPlayableUnitsItens;

Where you execute this in console and just import it to arsenal ?

heady ore
#

Holy shit, this is it!! Haha, thank you, thank you! salute

worldly kite
#

Im creating a mission. This will run on dedi server.

In this mission there are 2 towns: town-a and town-b. In town-a squad-a is garrisoned, in town-b squad-b is garrisone. Everyone are player. If a player dies, ramdomly respawn in either towns and i need a trigger that joins them into the squad where they were respawned. I did some research and it seems joinSilent work only with AI and singleplayer or local server. Is there a solution to my need? Pls help

flint topaz
worldly kite
#

I am not really a script master, so i tried this

[_player] joinSilent Alpha;

Its not working... not working so much, the game does not let me click OK in the trigger window
I says: Type Nothing, expected Bool

flint topaz
#

[player] joinSilent alphaGroup;

#

Make sure to name the variable of the group alphaGroup

#

_player is a private variable, so would have to be defined by you, player is the standard variable for that machines β€œplayer” aka the machine running the code

warm hedge
#

You sure expected Bool error here is relevant with joinString

flint topaz
#

Seemed a strange error yeah, but I did notice that issue at least

warm hedge
#

Undefined variable will NOT throw that error

worldly kite
#

Oh wait

warm hedge
#

You are entering that code into the condition

worldly kite
#

I just relized

flint topaz
#

^

worldly kite
#

Yeah i know πŸ˜„

#

Fuuck

worldly kite
#

Somebody pls help

flint topaz
#

You could be a little less passive aggressive and I’d be more willing to help

winter rose
#

the trigger doesn't know what _player is

worldly kite
hallow mortar
#

Can you post what your latest code is?
In what way does it not work? Is there an error, or does it just not do anything?

worldly kite
#

The latest code

sonic lodge
faint burrow
#

No.

fathom lion
#

why is this popping up?

hallow mortar
#

The code in the error doesn't match the code in your SQF file

#

Make sure you're editing the right file (in the right mission), and you've saved the SQF file since editing it

sweet sleet
#

Hey! Quick beginner question!
I already have a cfgFunction section in my description.ext, looking like this:

class CfgFunctions
{
    class A3_Missions_F_Tacops
    {
        tag = "BIS";
        project = "arma3";

        #include "\A3\Missions_F_Tacops\cfgFunctions.inc"        
    };
};

but I would like o add one more function to it, to be specific, this:

{
    #include "INC_undercover\cfgFunctions.hpp"
};

How would I combine and format the two, so the script doesn't break?

young current
#

depends entirely whats inside the files and where that data needs to go

south swan
proven charm
#

makes sense to me, why?

hallow mortar
proven charm
#

ah ok , i didnt see quote link

drifting portal
#
_MyVariable = 1;
addMissionEventHandler ["EachFrame", {
    _thisArgs params ["_MyVariable"];
        _MyVariable = _MyVariable + 1;
},
[_MyVariable]
];

How do I change the value of _MyVariable isnide of EachFrame (and keep it changed and not revert back to 1)?

still forum
#

_thisArgs set [0, _MyVariable]

drifting portal
#

and if I try to access _MyVariable outside of EH it will have the correct value, not 1, right?

still forum
#

Not sure if that's "officially" supported though, it's a bit weird to do that

hallow mortar
#

maybe just use a global variable

still forum
#

_MyVariable won't get updated.
The "set" is only editing it's copy in the arguments array

drifting portal
# hallow mortar maybe just use a global variable

here is the issue, I'm going to run this "function" multiple times, which means if I make it global, it the variable will keep spasing out because it will keep getting assigned different values due to different instances running at the same time

#

that's why I'm trying to keep it local, if there is another way to go about this, please let me know

#

I want it update inside it's current instance is what am saying, if there is multiple instances, each instance will have it's own var instead of one global var for multiple instances

#

idk if I'm being clear

faint burrow
hallow mortar
#

couple of options:

  • dynamically generate a unique global variable name (use setVariable and + or format to manipulate the name as a string)
  • use a unique object's namespace - if this function is related to an object, you can use that, or you could create a dummy object to use
drifting portal
#

thanks!

drifting portal
#
_vectorDir = [
    (PosOne#0 - PosTwo#0),
    (PosOne#1 - PosTwo#1),
    (PosOne#2 - PosTwo#2)
];
#

is this a proper way to get vector dir from PosOne to PosTwo?

drifting portal
#

it says vector to vector, is it suitable for position to position?

hallow mortar
#

Positions are vectors

drifting portal
#

that's what I thought too, but I was unsure

#

but there is another thing

#

z coordinate is defaulted to 0

#

how do I get Z then?

#

I guess I use Z of the second position?

#

delta of posone Z and posTwo Z?

hallow mortar
#

It's defaulted to 0 if no Z value is provided (2D position).

drifting portal
#

oh alright

#

thanks

#

oh now it's very smooth, thanks a ton

sonic lodge
#

How burn unit from script?

tulip ridge
# sonic lodge

Looks like you're using ACE's fire system, if you are, just use: ["ace_fire_burn", [Unit, Intensity]] call CBA_fnc_globalEvent

#

Unit is the unit you want to set on fire, Intensity is a number from 1-10

wraith leaf
#

Seems like running ace3 disables the hold action icon. Any workaround?

#

The action itself works, but the circular bar/icon is not visible .

tulip ridge
#

It shouldn't, did you try with just CBA / ACE?

river whale
#

Hey guys got a question, i want to increase fuel consumption on all vehicles in my server from mission to mission each week. i was hoping this would be a setting i could change in ace but apparently not and i would need to run a script each operation using https://community.bistudio.com/wiki/setFuelConsumptionCoef

how would i get this to work on all vehicles as i dont want to call it for every single vehicle class?

warm hedge
#

{_x setFuelConsumptionCoef 5} forEach vehicles

river whale
#

would this go in in my init.sqf of each mission?

warm hedge
#

If you want yes

stable dune
river whale
#

thanks guys appreciate it!

tough abyss
#

I have a script that works great but I would like to have one more almost the same script, but with other units to call for
How do I fix that? hopefully you don't declare me stupid, cause I have really bad knowledge in this

warm hedge
#

And where is your issue

faint burrow
#

"Do this for me, for free".

faint burrow
river whale
# warm hedge `{_x setFuelConsumptionCoef 5} forEach vehicles`

So i applied this in my init.sqf and tried it with no luck so i tried upping the value to 1000 which i know is the max value and it didnt make a difference at all either your syntax makes perfect sense but im not quite sure what could be causing it to not work

#

double checked addon settings to see if there is anything that could be overriding it and couldnt find anything there

warm hedge
#

Then either you didn't ran the code, or some Mod is doing that and overwriting

wraith leaf
# tulip ridge It shouldn't, did you try with just CBA / ACE?

Yes, and further testing, for example Zeus enhanced alongside ace and cba, create an Intel item, and that hold action icon is missing. Also tried DRO, dynamic recon ops, and noticed that Intel objects pickup doesn't have the icon, the action itself works, but the icon is missing. These are quick things to test the issue.

tough abyss
warm hedge
#

Your issue here is, you didn't stated the issue you have or what kind of support/assist you need. β€œI need help with it, can you help me?” is not helpful/good way to ask, because nobody knows what you got without you say

tough abyss
faint burrow
cosmic lichen
#

You can copy the class name by right clicking on a unit in the editor. And go to log.

faint burrow
#

Since it is not clear from his question what he wants, I believe that he needs several actions: "Call infantry reinforcements", "Call armored reinforcements", etc. If so, then #arma3_scripting message.

tough abyss
tough abyss
vocal chasm
#

So in zeus i knkw how a concious person can get aceheal with addaction like this:

_This addAction ["Medical Treatment","[player] call ACE_medical_treatment_fnc_fullHealLocal"];

But can somebody help me how to heal an unconcious person, or just whatever person that gets inside the medical vehicle vehicle, in zeus not in the editor?

hallow mortar
#

If you're using ZEN there should be an option to grant a full heal in the ZEN context menu (rightclick or V)

vocal chasm
#

This way i can be focusing on other things

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

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

// your code here
hint "good!";
winter rose
#

How can i delete the RPG? trying detach and delteVehicle didnt work
the event handler does not know what _rpg7 is here

bold rivet
#
this removeWeaponTurret ["Laserdesignator_mounted", [0]];   
this lockTurret [[0], true];   
   
_drone = this;   
   
createKamikazeDrone = {    
    params ["_drone"];    
 
    private _rpg7 = createSimpleObject ["\A3\Weapons_F_Exp\Launchers\RPG7\rocket_rpg7_item.p3d", position _drone];   
    _rpg7 attachTo [_drone, [0, 0.085, -0.12]];   
    _rpg7 setDir 90;   
    _rpg7 enableSimulation false; 
   
    _drone addEventHandler ["Hit", {    
        params ["_drone", "_source", "_damage", "_rpg7"];    
        private _charge = "SatchelCharge_Remote_Ammo" createVehicle (getPos _drone);    
        _charge setDamage 1;
        detach _rpg7;
        deleteVehicle _rpg7;
    }];

};    
   
publicVariable "createKamikazeDrone";    
   
[this] remoteExec ["createKamikazeDrone", 0];  


#

but i used the params thing inside it

#

does that not work?

south swan
#

params is "fill those local variables with contents of _this array". It doesn't magically grab values out of thin air blobdoggoshruggoogly

bold rivet
#

oh

#

whoops

#

You know how i can let the event handler know what _rpg7 is then?

winter rose
#

you could e.g setVariable it on the drone

bold rivet
#

ok, I'll try

#

It works now, thx all

vocal chasm
vocal chasm
#

or could I maybe make the last "false" into a "true" πŸ€”

#

keeping in mind it is a mp server

vocal chasm
#
[_This, ["Medical Treatment",
    {
        if 
            !(isNull objectParent player && myUnit getVariable ["ACE_isUnconscious", false];) 
        then 
            {
                [player] call ACE_medical_treatment_fnc_fullHealLocal; 
            }
    }
    ,nil,6,false,true,"",4] ]
remoteExec 
    ["addAction",0,_This];

Or this, I think this may be a multiplayer fitting one, but im not knowledgable enough

#

^
getting this:

17:04:01 Error in expression <(_this select 0) addaction (_this select 1)>
17:04:01 Error position: <addaction (_this select 1)>
17:04:01 Error Type Number, expected String

still forum
vocal chasm
#

I thought that would be the priority argument 😬

still forum
#

you passed 6 as priority

vocal chasm
still forum
#

maybe

#

I don't want to count again

vocal chasm
#

lmao

vocal chasm
# still forum maybe

It did fix that error but when running it gave a new one:

17:15:51 Error in expression < !(isNull objectParent player && myUnit getVariable ["ACE_isUnconscious",>
17:15:51 Error position: <myUnit getVariable ["ACE_isUnconscious",>
17:15:51 Error Undefined variable in expression: myunit

tender fossil
vocal chasm
#

hmmm, nowhere, found it somewhere to check if any player in vehicle is unconscious, as I do not know what other command to use

tender fossil
vocal chasm
#

hmm

vocal chasm
tender fossil
vocal chasm
tender fossil
#

You need to do deeper refactoring there I'm afraid

#

If you're new to SQF or it's coding paradigm, I recommend reading the SQF tutorials on official wiki

vocal chasm
#

do know some things but searching is sometimes har

#

d

bold rivet
#

I got a problem with my drone. When i fire the first time the rocket disapears but when i then try to reload it, it stays hidden, is that because the Fired event handler keeps it hidden?
I tried using a while loop and the MagazineReloading eventhandler and they all didnt work
https://pastebin.com/arMb8q2a

stable dune
bold rivet
#

ok thx, I'll see if it helps

#

That was it

#

thx mate

terse tinsel
#

hey, have any of you done it or know how to do it and is it even possible for a selected Ai soldier to shoot with dummy ammunition?? (blank cartridges) I know it's funny, but I want to make it look like I'm doing the task with helpers, and in fact, I'm the only one who can kill enemies.
(such an army cod) ;p

tender fossil
terse tinsel
tender fossil
terse tinsel
plush jolt
#

I feel like i saw a script for this kicking around a while back and cant for the life of me find it

im looking for something aimed at armoured vehicle AI that will make them stop and engage when they detect an enemy, if they lose track of the enemy or destroy it then continue their path

figured id ask before trying to write something new

any ideas/suggestions?

south swan
#

ammo1 = unit1 >>ammo1<< _weapon; blobcloseenjoy

tulip ridge
#

Why are you making these all global variables

lime rapids
#

setammo doesnt work to make a launcher infinitely reload KEKWLeave workaround found ```sqf
ammo1 = currentMagazine unit1;
weapon = currentWeapon unit1;
unit1 removeWeapon weapon;
unit1 addWeapon weapon;
unit1 selectWeapon weapon;
unit1 addItemToBackpack ammo1;

lime rapids
tulip ridge
#

That has nothing to do with performance

#

You're just making a bunch of random global variables

lime rapids
#
  • some vars were outside eachframe eh
tulip ridge
#

Then prefix them

south swan
next cove
#

Gang:

Most pragmatic way to script a "Show" module to hide synced layers/units when the player leaves the trigger area?

#

Trying to accomplish this with one persistent trigger that can be reactivated by re-entering the trigger area

proven charm
charred monolith
#

Hi ! I'm trying to play a sound with playSound3D, I've created my sound in the CfgSounds class inside my description.ext.

Using the class name of the sound defined in CfgSound works with PlaySound , but not playSound3D, is this normal behavior ?

narrow pilot
#

So, I want to achieve the same effect as BIS_fnc_cinemaBorder; but I want the player to be able to walk. Is there some way to get around it or is there another way of doing a similar effect?

charred monolith
narrow pilot
#

Yeah tried that, doesnt seem to function.

#

How'd you go with the sounds?

charred monolith
charred monolith
narrow pilot
charred monolith
#

i forgot say3D existed, but I prefer PlaySound3D, it has Global Effect without using remoteExec

proven charm
narrow pilot
proven charm
#

i just run the wiki example : [1, 2, true, true] call BIS_fnc_cinemaBorder;

narrow pilot
#

Yeah same

proven charm
#

must be some other command then that does that

proven charm
#

stuff like ```cam cameraEffect ["internal", "BACK"];

narrow pilot
#

On the wiki it says cinema border will disable input

proven charm
#

humm

#

doesnt matter what i try it doesnt block moving for me

cobalt path
#

Error GIAR stack size violation, Error missing ) ....line 113

private _mgmaction3 = ["Adjust Eyes 1","Adjust Night Sight","",{
    setAperture 2;},{true}] call ace_interact_menu_fnc_createAction;
//one below is line 113
private _mgmaction41 = ["Adjust Eyes 2","Take off Respirator (Black)","",{
    player addEventHandler ["InventoryClosed",
    {
        params ["_unit", "_container"];
        if
        (vest player in
            [
            'EF_V_AAV_Diver_Black',
            'EF_V_AAV_Diver_Coy',
            'EF_V_AAV_Diver_Olive'
            ];
        )
        then
        {
            player addVest "EF_V_AAV_Scout_Black";
        }
        else
        {
        };
    };
},{true}] call ace_interact_menu_fnc_createAction;
proven charm
#

which line is that in pasted code?

cobalt path
#

private _mgmaction41 = ["Adjust Eyes 2","Take off Respirator (Black)","",{

proven charm
#

ok

cobalt path
#

I added an extra } at the end because it was missing, but error is the same

#

maybe I missed or have too many ";" ? if then else have weird way of using them

proven charm
#

well it certainly is missing one ]

stable dune
#

Your are missing ]

proven charm
#

first ;)

cobalt path
#

oh that might be it, where?

stable dune
#

Your aren't closing your addeventhandler

cobalt path
#

uhhh

#

oh

#

I think I see okay

stable dune
#
["InventoryClosed",
    {
        //Your code 
    }];// this one
},{true}] call ace..
#

So ] should be between } and ;

cobalt path
#

I seeee
I got confused and was looking if it was

};
}],{true}] cal....
#

Okay I will test

#

hmm, I am getting same error...

#

but before giving me an error about 113 it also gives me one about missing ) at 123 which is

'EF_V_AAV_Diver_Olive'
]; //this one 123
proven charm
#

you have ; in the if condition

#

yeah that one ^

fleet sand
#

also in if codition it wouldnt be vest player it would be vest _unit

#

But also you are creating EH Inventory Closed witch fires when a player closes the inventory and you are calling this from a ace action witch fires when player interacts.
So its unessery to even have a EH when you can just call the action and in codition you can set when that action would be active.

cobalt path
#

Oh ye, my bad, oversight, I copied my old code that would change stamina settings based off if player has gasmask equiped
edit, everything works now. Except that the vest looses all items on change, but I can easily fix that

next cove
#

Im basically having a syntax problem lol

proven charm
#

dont know about layers, i think there are editor commands for that

raw vapor
#

Hey, I'm stumped here. This script isn't working.
What I want it to do:

  • After circus is killed, anyone who enters this area will be immediately teleported to a new location.
    What actually happens:
  • The script fires but players entering the area do not get teleported.