#arma3_scripting

1 messages Β· Page 102 of 1

rancid lance
#

oh i didnt know that was supported

#

awesome

little raptor
#

isn't your params wrong?

rancid lance
#

i did have it create the object at the projectile's post
and just attach it to the dude but if he lays down then they float

little raptor
#

shouldn't it be _this#0 params like DartRuffian said?

tulip ridge
#

Yeah

#

HitPart gives an array for all of the parts hit

little raptor
#

nope looks like it's correct

little raptor
rancid lance
#

oh you were looking at the other params lol

tulip ridge
#

Oh gotcha

rancid lance
#

but that aside

little raptor
#

why do you add the hitPart EH after the entity is hit tho?

#

you should add it before

rancid lance
#

πŸ€”

little raptor
#

I mean you do _dumbass addEventHandler ["HitPart" in the projectile EH

#

well you don't even need that

#

just use the projectile one

rancid lance
#

but the prokectile one doesnt return part hit does it?

little raptor
#

_component
?

#

also it returns the _pos where it was hit

rancid lance
#

sorry, on the wiki component just has nothing next to it so i didnt know what it meant lol

little raptor
#

it's most likely the selection in hitPoints LOD

#

as for how to attach something there, you can do something like this:

rancid lance
#

would it just be _component#0
pls tell me its
that simple

#

you've been typing for a while, dont do this to me leopard

little raptor
#

I'm typing an example code that does what you needed meowsweats
as an example ofc

rancid lance
#
Marb_Brute_FNC_Spiker = {
    _projectile addEventHandler ["HitPart", {
        params [ "_projectile", "_hitEntity", "_projectileOwner", "_pos", "_velocity", "_normal", "_component", "_radius", "_surfaceType"];
        private _dumbass = _hitEntity;
        private _bruteSpike = createVehicle ["P_Brute_Spike", getPosATL _pos, [], 0, "CAN_COLLIDE"];
        _bruteSpike attachTo [_dumbass, [0, 0, 0], _component#0];
        _bruteSpike setDir getDir _projectile;
        deleteVehicle _Projectile;
    }];
};
little raptor
#

try without the #0

rancid lance
#

aight ill try it without here in a sec

#

in the meantime in the screenshot you can see i added a light source to the projectile, for some reason it wont delete on impact like i wanted it to ; w;

#

tried without and no sauce, gonna try it with

little raptor
#
Marb_Brute_DamagedParts = [];
onEachFrame {
  Marb_Brute_DamagedParts = Marb_Brute_DamagedParts - [0];
  {
    _x params ["_entity", "_obj", "_pos", "_selection", "_time"];
    if (time > _time) then {Marb_Brute_DamagedParts set [_forEachIndex, 0]; continue};
    _entity selectionVectorDirAndUp [_selection, 7e15] params ["_y", "_z"];
    _x = _y vectorCrossProduct _z;
    _m = matrixTranspose [_x, _y, _z];
    _pos = flatten(_m matrixMultiply _pos) vectorAdd (_entity selectionPosition [_selection, 7e15]);
    _obj setPosWorld (_entity modelToWorldVisualWorld _pos);
    _obj setVectorDirAndUp ([_y, _z] apply {_entity vectorModelToWorldVisual _x});
  } forEach Marb_Brute_DamagedParts;
};

Marb_Brute_FNC_Spiker = {
    _projectile addEventHandler ["HitPart", {
        params [ "_projectile", "_entity", "_projectileOwner", "_pos", "_velocity", "_normal", "_components", "_radius", "_surfaceType"];
        {
            if (_x == "") then {continue};
            _selection = _x;
            
            private _bruteSpike = createVehicle ["Sign_Sphere10cm_F", _pos];
            _entity selectionVectorDirAndUp [_selection, 7e15] params ["_y", "_z"];
            _x = _y vectorCrossProduct _z;
            _m = [_x, _y, _z];
            _relpos = _entity worldToModel ASLtoAGL _pos;
            _relpos = _relpos vectorDiff (_entity selectionPosition [_selection, 7e15]) apply {[_x]};
            _relpos = _m matrixMultiply _relpos;
            Marb_Brute_DamagedParts pushBack [_entity, _bruteSpike, _relpos, _selection, time + 10];
        } forEach _components;
    }];
};
rancid lance
#

my god

little raptor
#

didn't test it tho meowsweats

rancid lance
#

ill try it whats the worst that could happen

#

question

#

is there an if then i could do to check if there is a component available then if there is do the thing and if not dont do anything?

little raptor
#

yeah testing it rn

#

ok fixed:

Marb_Brute_DamagedParts = [];
onEachFrame {
  Marb_Brute_DamagedParts = Marb_Brute_DamagedParts - [0];
  {
    _x params ["_entity", "_obj", "_pos", "_selection", "_time"];
    if (time > _time) then { deleteVehicle _obj; Marb_Brute_DamagedParts set [_forEachIndex, 0]; continue};
    _entity selectionVectorDirAndUp [_selection, 7e15] params ["_y", "_z"];
    _x = _y vectorCrossProduct _z;
    _m = matrixTranspose [_x, _y, _z];
    _pos = flatten(_m matrixMultiply _pos) vectorAdd (_entity selectionPosition [_selection, 7e15]);
    _obj setPosWorld (_entity modelToWorldVisualWorld _pos);
    _obj setVectorDirAndUp ([_y, _z] apply {_entity vectorModelToWorldVisual _x});
  } forEach Marb_Brute_DamagedParts;
};

player addEventHandler ["FiredMan", {
    _this#6 addEventHandler ["HitPart", {
        params [ "_projectile", "_entity", "_projectileOwner", "_pos", "_velocity", "_normal", "_components", "_radius", "_surfaceType"];
        {
            _selection = _x;
            if (_selection == "") then {continue;};
            private _bruteSpike = createVehicle ["Sign_Sphere10cm_F", _pos];
            _entity selectionVectorDirAndUp [_selection, 7e15] params ["_y", "_z"];
            _x = _y vectorCrossProduct _z;
            _m = [_x, _y, _z];
            _relpos = _entity worldToModel ASLtoAGL _pos;
            _relpos = _relpos vectorDiff (_entity selectionPosition [_selection, 7e15]) apply {[_x]};
            _relpos = _m matrixMultiply _relpos;
            
            Marb_Brute_DamagedParts pushBack [_entity, _bruteSpike, _relpos, _selection, time + 10];
        } forEach _components;
    }];
}]
#

well I modified a bit during the test

rancid lance
#

the attach to component#0 worked but
if i had an if (_Component returns nothing) exitWith {} else {Do the thing}

little raptor
#

let me modify the original

rancid lance
#

we can build him back stronger

#

faster

#

probably

little raptor
#

this is what happens rn meowsweats
for some reason there seems to be a selection that's not found (hence why sometimes objects end up on the ground)

#

let me check. maybe it uses the FireGeometry lod

#

ah yep

rancid lance
#

thats exactly what was happening with component#0

little raptor
#

anyway, fixed it

rancid lance
little raptor
#

yes that

rancid lance
#

oh god oh fug

rancid lance
#

okay i see i see

sullen sigil
#

more selectionvectordirandup i see meowsweats

little raptor
#

more matrices too πŸ˜›

rancid lance
sullen sigil
#

two of my favourite things

rancid lance
#

so this is getting the nearest available point and sticking the sphere on it?

little raptor
#

it gets the exact position and bone (or should I say, selection) that was hit

rancid lance
#

i see

little raptor
#

then moves the sphere every frame according to how that pos updates relative to the bone

rancid lance
#

i also see you didnt use "CAN_COLLIDE"?

#

is there a reason? ; w; is it not needed here?

little raptor
#

it moves the sphere every frame

#

there's no need for that

rancid lance
#

hmm

#

its putting them in the sky still x-x

little raptor
#

looks fine on my end think_turtle

rancid lance
#

okay

#

just to clear confusion

#

not the Fired man one

#

but this one

little raptor
#

should work now meowsweats

rancid lance
#

fml lol

#

okay okay

#

wish me luck

little raptor
rancid lance
#

huge

#

im so glad i decided to work on the function of this gun first lmao
meowsweats

little raptor
#

btw the wiki info has been updated too

#

based on these findings

rancid lance
#

lets goooo

#

okay so given the context

#

of whats going on here

#

so this function is called on init of the projectile via the config eventhandler

{init = "params ['_projectile'];_projectile call Marb_Brute_FNC_Spiker;";}
#

i probably should have mentioned that firs

little raptor
#

ok

rancid lance
#

im testing again rq

#

okay so

#

if i type ```sqf
Marb_Brute_DamagedParts = [];
onEachFrame {
Marb_Brute_DamagedParts = Marb_Brute_DamagedParts - [0];
{
_x params ["_entity", "_obj", "_pos", "_selection", "_time"];
if (time > _time) then { deleteVehicle _obj; Marb_Brute_DamagedParts set [_forEachIndex, 0]; continue};
_entity selectionVectorDirAndUp [_selection, 7e15] params ["_y", "_z"];
_x = _y vectorCrossProduct _z;
_m = matrixTranspose [_x, _y, _z];
_pos = flatten(_m matrixMultiply _pos) vectorAdd (_entity selectionPosition [_selection, 7e15]);
_obj setPosWorld (_entity modelToWorldVisualWorld _pos);
_obj setVectorDirAndUp ([_y, _z] apply {_entity vectorModelToWorldVisual _x});
} forEach Marb_Brute_DamagedParts;
};

player addEventHandler ["FiredMan", {
_this#6 addEventHandler ["HitPart", {
params [ "_projectile", "_entity", "_projectileOwner", "_pos", "_velocity", "_normal", "_components", "_radius", "_surfaceType"];
{
_selection = _x;
if (_selection == "") then {continue;};
private _bruteSpike = createVehicle ["Sign_Sphere10cm_F", _pos];
_entity selectionVectorDirAndUp [_selection, 7e15] params ["_y", "_z"];
_x = _y vectorCrossProduct _z;
_m = [_x, _y, _z];
_relpos = _entity worldToModel ASLtoAGL _pos;
_relpos = _relpos vectorDiff (_entity selectionPosition [_selection, 7e15]) apply {[_x]};
_relpos = _m matrixMultiply _relpos;

        Marb_Brute_DamagedParts pushBack [_entity, _bruteSpike, _relpos, _selection, time + 10];
    } forEach _components;
}];

}]

into the debug menu
#

let me rewind

#

okay so i get this error

#

however
if i type whats mentioned above into the debug menu and execute locally

#

then it suddenly starts working and no longer pops that error up, but it spawns double the items, sometimes tripple lol

#

is it because

#

the way the fnc is being called, its excluding the top half of the code?

#

so i should just add this into the fnc?? ```sqf
Marb_Brute_DamagedParts = [];
onEachFrame {
Marb_Brute_DamagedParts = Marb_Brute_DamagedParts - [0];
{
_x params ["_entity", "_obj", "_pos", "_selection", "_time"];
if (time > _time) then { deleteVehicle _obj; Marb_Brute_DamagedParts set [_forEachIndex, 0]; continue};
_entity selectionVectorDirAndUp [_selection, 7e15] params ["_y", "_z"];
_x = _y vectorCrossProduct _z;
_m = matrixTranspose [_x, _y, _z];
_pos = flatten(_m matrixMultiply _pos) vectorAdd (_entity selectionPosition [_selection, 7e15]);
_obj setPosWorld (_entity modelToWorldVisualWorld _pos);
_obj setVectorDirAndUp ([_y, _z] apply {_entity vectorModelToWorldVisual _x});
} forEach Marb_Brute_DamagedParts;
};

#

to call it all at once since it seems its excluding information from the top? ; w;


Marb_Brute_FNC_Spiker = {
    
Marb_Brute_DamagedParts = [];
onEachFrame {
    Marb_Brute_DamagedParts = Marb_Brute_DamagedParts - [0];
    {
        _x params ["_entity", "_obj", "_pos", "_selection", "_time"];
        if (time > _time) then {
            Marb_Brute_DamagedParts set [_forEachIndex, 0];
            continue
        };
        _entity selectionVectorDirAndUp [_selection, 7e15] params ["_y", "_z"];
        _x = _y vectorCrossProduct _z;
        _m = matrixTranspose [_x, _y, _z];
        _pos = flatten(_m matrixMultiply _pos) vectorAdd (_entity modelToWorldWorld [_selection, 7e15]);
        _obj setPosWorld (_entity modelToWorldVisualWorld _pos);
        _obj setVectorDirAndUp ([_y, _z] apply {
            _entity vectorModelToWorldVisual _x
        });
    } forEach Marb_Brute_DamagedParts;
};

    _projectile addEventHandler ["HitPart", {
        params [ "_projectile", "_entity", "_projectileOwner", "_pos", "_velocity", "_normal", "_components", "_radius", "_surfaceType"];
        {
            if (_x == "") then {
                continue
            };
            _selection = _x;

            private _bruteSpike = createVehicle ["P_Brute_Spike", _pos];
            _entity selectionVectorDirAndUp [_selection, 7e15] params ["_y", "_z"];
            _x = _y vectorCrossProduct _z;
            _m = [_x, _y, _z];
            _relpos = _entity worldToModel ASLToAGL _pos;
            _relpos = _relpos vectorDiff (_entity selectionPosition [_selection, 7e15]) apply {
                [_x]
            };
            _relpos = _m matrixMultiply _relpos;
            Marb_Brute_DamagedParts pushBack [_entity, _bruteSpike, _relpos, _selection, time + 10];
        } forEach _components;
    }];
};
#

like this?

little raptor
#

yeah I think it's ok

little raptor
little raptor
#

you're using the outdated code

rancid lance
#

imma kms

little raptor
#

oh wait I hadn't fixed that one in the first code 🀣

rancid lance
#

can you just

#

okay new post it lmao

#

since i cant see time of edit only (edit)

#

but also this appears to only work on people

little raptor
#

let me just test once

rancid lance
little raptor
#

it should work on building windows for example

#

but not on the walls

rancid lance
#

is there an if check on selections?

#

if there is then i can just do the code i had earlier to spawn an object on the bullet's last pos and direction

#

if (is kindOf armaMan) {do the thing} else {spawn on last post and dir};

#

kinda thing?

#

sorry "isKindOf CAmanBase" should work

granite sky
#

_unitOrClass isKindOf "CAManBase"

rancid lance
#

yea thats the one

real tartan
granite sky
#

It's 2.14

little raptor
#

@rancid lance
https://sqfbin.com/evaqobileterozumideq
btw the script adds the object locally, so if you need to see it globally it still needs some modification.
but this is just for testing anyway

kindred tide
#

i have increased my presence in code::blocks

rancid lance
#

weird

jovial aspen
#

hello, any of you guys know how to disable commander seat for bobcat?

rancid lance
#

it wont let me send the thing

jovial aspen
little raptor
#

if not try 0 too

little raptor
rancid lance
#

the new one with the sqfbin link?

little raptor
#

yes

rancid lance
#

i didnt try that one yet and wanted to try it on my own ShyEmoji

#

im trying to impress you father

#

it works but imma try yours now

jovial aspen
little raptor
rancid lance
#

i didnt think about that AAAAAAAAA!!!!!

#

Yours does tho

rancid lance
#
private _lightSource = "#lightpoint" createVehicleLocal [0, 0, 0];
    _lightSource attachTo [_projectile, [0, 0, 1.5]];
    _lightSource setLightColor [1, 0, 0];
    _lightSource setLightAmbient [1, 0, 0];
    _lightSource setLightBrightness 5;
    _projectile addEventHandler ["HitPart", {
        params [ "_projectile", "_entity", "_projectileOwner", "_pos", "_velocity", "_normal", "_components", "_radius", "_surfaceType",];
        deleteVehicle _lightSource;
#

the light wont die ;-;

#

do i need to do a```sqf

[_lightsource] spawn {params ["_lightSource"]; deleteVehicle _lightSource};

#

i want it to get deleted when the bullet hits somethin but for some reason its resisting me

little raptor
rancid lance
#

would i put it in the params of the EH?

little raptor
#

object EHs don't take params

rancid lance
#

oh i see i see okay

#

fug lol

rancid lance
#

oh i had to assign it to a variable first? >->

little raptor
#

or you could just do: attachedObjects _projectile apply {deleteVehicle _x}

rancid lance
#

im so dumb i forgot attachedObjects existed bro kill me

little raptor
#

tho neither of these are correct (I meant where the code runs... meowsweats )

rancid lance
little raptor
#

you should use the deleted EH to remove the light source

#

sometimes a projectile may never hit anything

rancid lance
#

smh

#

literally not hitting the broad side of a barn

little raptor
rancid lance
#

s'all good already wrote it, tho i put the deleted eh at the bottom notlikemeow

little raptor
#

also like I said since the beginning, this is just for testing

#

you shouldn't really use the onEachFrame command

#

preferably use the draw3D event handler

#

also if you want this to work in MP you need to make some adjustments

south swan
#

or "EachFrame" MEH. And get different parts of your ass bitten by physics/render scopes in both cases πŸ™ƒ

little raptor
rancid lance
#

the draw3D mission event handler is what i should use instead of oneachFrame?

little raptor
#

yes

#

or EachFrame but I don't think it'll make much different for your case

#

also make sure you add something to prevent duplication...

rancid lance
#

all the face spikes

#

10fps gaming

little raptor
#

basically something like this:

if (isNil "Marb_Brute_DamagedParts") then { 
  Marb_Brute_DamagedParts = []; 
  addMissionEventHandler ["Draw3D", {
Marb_Brute_DamagedParts = Marb_Brute_DamagedParts - [0];
      {
        _x params ["_entity", "_obj", "_pos", "_vup", "_selection", "_time"];
        if (time > _time) then { deleteVehicle _obj; Marb_Brute_DamagedParts set [_forEachIndex, 0]; continue};
        if (_selection == "") then {
            _obj setPosWorld (_entity modelToWorldVisualWorld _pos);
            _obj setVectorDirAndUp (_vup apply {_entity vectorModelToWorldVisual _x});
            continue;
        };
        _entity selectionVectorDirAndUp [_selection, 7e15] params ["_y", "_z"];
        _x = _y vectorCrossProduct _z;
        _m = matrixTranspose [_x, _y, _z];
        _pos = flatten(_m matrixMultiply _pos) vectorAdd (_entity selectionPosition [_selection, 7e15]);
        _obj setPosWorld (_entity modelToWorldVisualWorld _pos);
        _obj setVectorDirAndUp (_vup apply {_entity vectorModelToWorldVisual flatten(_m matrixMultiply _x)});
      } forEach Marb_Brute_DamagedParts;
  }];
};
rancid lance
#

my baby smooth brain cannot grasp the purpose of isNil

#

it means like is nothing right?

little raptor
#

var doesn't exist

little raptor
rancid lance
#

alright sweet

#

i was reading up on it bc someone asked me some questions about it meowsweats

little raptor
#

basically the whole purpose of that if block is to do that thing once

#

which also prevents duplicating the EH too (previously it just created the var once)

steep rapids
#

Hey im trying to scale objects such that it stays that way in multiplayer
Anyone know what to do?

rancid lance
little raptor
steep rapids
little raptor
#

there is this BIS fnc

#

iirc BIS_fnc_replaceWithSimpleObject

tulip ridge
#

Isn't that not supposed to be used in multiplayer?
Says so on the wiki page for it

little raptor
#

Β―_(ツ)_/Β―

#

personally never used it

#

I just write my own

steep rapids
#

Okay so what do I do to change the objects scale for multiplayer then?

little raptor
#

how many objects?

steep rapids
#

Quite a lot of them

little raptor
#

are they supposed to be interacted with?

#

or are they static?

steep rapids
#

Nope theyre just static

rancid lance
#

wait a second

#

are you using them for like a lil holographic thing and need to scale them down?

little raptor
little raptor
steep rapids
rancid lance
#

they have lil vr bits for cover but, you can attach them to something and then scale them down and that will stick in mp

#

so long as you dont move them via zeus afterwards the size will remain

little raptor
#

(and will ruin FPS)

rancid lance
#

attach to, scale, then remove sim? XD

steep rapids
#

This is what it is in 3den editor

little raptor
#

do you want to scale the whole thing down/up?

steep rapids
#

No so see the little cover peices like the vertical slopes and blocks
Theyve been scaled down from their original size

#

but in multiplayer they revert back to their larger normal size

little raptor
#

ah those. right

steep rapids
#

So any ideas?

little raptor
#

I do but not any good ones πŸ˜…

#

well I guess worth a try at least

sullen sigil
#

hey leopard i never tested addforce + addtorque together for the capital ships stuff

#

guess whos going back down that buggy rabbit hole again later

little raptor
# steep rapids So any ideas?
{
  _pos = getPosWorld _x;
  _o = createSimpleObject [getModelInfo _x#1, _pos];
  _o setVectorDirAndUp [vectorDir _x, vectorUp _x];
  _o setObjectScale getObjectScale _x;
  _o setPosWorld _pos;
  deleteVehicle _x;
} forEach getMissionLayerEntities "myLayer"#0;
#

place those objects into a layer called myLayer, then try that code in initServer.sqf

steep rapids
little raptor
#

well first create a layer in 3den

#

do you know how to do that?

steep rapids
#

nope

little raptor
steep rapids
#

ok

little raptor
#

then rclick on it and rename it

pulsar pewter
little raptor
#

then select the objects in 3den and drop them into the layer

pulsar pewter
#

I remember hearing somewhere that simple objects are not great for MP; is that true or nah?

ornate whale
#

Hi, I donΒ΄t want ot interrupt the flow. But how can I find the current ammo class name? So I can then get some its cfg properties?

little raptor
steep rapids
#

yup

little raptor
#

but rn we're just testing

pulsar pewter
#

So both simple objects and local only?

little raptor
#

then from mag class get the ammo

little raptor
# steep rapids yup

anyway, now go to Documents\Arma 3\missions (or mpmissions, depends where you saved it) and find the mission folder

little raptor
sullen sigil
#

local only objects allowed me to create a completely custom map for mp with 90fps as a baseline on my server

little raptor
# steep rapids yep

then create a new txt file, and rename it to initServer.sqf. make sure file extensions are on in explorer
so that you won't make a .txt file by mistake

pulsar pewter
#

I know some objects have an option in attributes menu to make them local only, but how can I make them local only via script, modifying Leo's script above?

sullen sigil
#

createSimpleObject has local param

little raptor
#

the createSimpleObject command has a local arg

sullen sigil
#

createSimpleObject [shapeName, positionWorld, local]

#

so just throw true] on the end

pulsar pewter
#

Ah. What I get for being lazy and not checking biki

sullen sigil
#

bear in mind you dont want everything to be local only (things that players walk on etc)

little raptor
#

they can be local too, if they're static, or you update all instances at once for everyone

sullen sigil
#

tho you may be able to get away with it

#

just has some issues with setunitfreefallheight when i did it

little raptor
#

no

sullen sigil
#

.sqf not sfq

cosmic lichen
#

sqf

little raptor
#

it's also a txt file

#

like I said you need to enable file extensions

pulsar pewter
sullen sigil
steep rapids
#

yep thanks

sullen sigil
steep rapids
#

How do I make a txt file?

little raptor
#

you already made one it seems

sullen sigil
#

just put .txt on the end

#

but you want .sqf

steep rapids
#

ok

little raptor
#

remove .txt from the name

#

it should say SQF File on the right

#

not Text Document

steep rapids
#

Yep sorry for being completely autistic

little raptor
#

ok now open it with some text editor

#

like notepad (but not something like Word...)

#

or notepad++ if you have that

steep rapids
#

ok

little raptor
#

yes

steep rapids
#

And now I should just launch it in MP?

#

or do I need to do anything else

little raptor
#

well first try in SP just in case

steep rapids
#

Alright

little raptor
#

if it's ok in SP then just test in MP afterwards

little raptor
# steep rapids Alright

also just to make sure you did things right, test this in the debug console: getMissionLayerEntities "myLayer"

steep rapids
#

How do I get to the debug console?

little raptor
#

pause the game meowsweats

#

in 3den preview

steep rapids
#

alright

little raptor
#

well I meant while running the mission

#

but looks like I made a mistake

little raptor
ornate whale
#

Is there any weapon changed or similar event handler?

little raptor
#

no

#

you can use animChanged or animStateChanged tho

ornate whale
# little raptor no

I have looked through the BIKI and have not found any command for extracting the ammo type without usign getText (configfile >> ); command.

little raptor
#

you can get it once then cache it into a hashmap

#

if it's a performance concern

sullen sigil
#

if running cba there is

ornate whale
#

I have an event handler FiredMan that shows _ammo type as a param. So I go and extract some data from the _ammo class. Then I use the number. As long as the ammo is the same, I dont have to go to the config file again. But I have to catch those weapon changes. so maybe check it every time FiredMan event occurs, but only when they are 5 or more secs away from each other or something like that. Maybe the animChanged is a better way.

sullen sigil
little raptor
#

As long as the ammo is the same, I dont have to go to the config file again. But I have to catch those weapon changes.
you can also check those in the FiredMan EH

#

if that's the only place you need them

ornate whale
sullen sigil
#
//in postinit
RC_ammoInfo = createHashmap;

//in eh
private _theammoinfo = if ((RC_ammoInfo getOrDefault [_ammoClass, []]) isEqualTo []) then {
  //get the info out of config
  RC_ammoInfo set [_ammoClass, _ammoInfo];
  _ammoInfo
} else {
  private _ammoInfo = RC_ammoInfo get _ammoClass;
  _ammoInfo
};
ornate whale
sullen sigil
#

think of them like an array where the index is replaced with a key you look up

tulip ridge
#

It's basically a way of mapping a "key" to a value
It's called a dictionary in some other languages

sullen sigil
#
private _hash = createHashmapFromArray [["yourmum",[123456]],[69,420],["wagwan","hi"]];
_hash get "yourmum" //returns [123456]```
#

that may be wrong im taking a shit so i cant tell

tulip ridge
#

No it's right

sullen sigil
#

amazing

tulip ridge
#

Still haven't figured out a fix a for the issue I described here
Tl;dr - If player dies while remote controlling a unit, full control is not returned to the player when they respawn

Not my original script, was given permission to make edits to it

// Controlling Start
// Switch camera
if (cameraOn != (vehicle _unit)) then
{
    (vehicle _unit) switchCamera cameraView;
    _unit enableStamina false;
    _unit forceWalk false;
};

// Give control of the unit to the player
objNull remoteControl driver _controller;
player remoteControl _unit;
// Controlling end (player dies, unit dies, etc.)
// Switch camera
if (cameraOn != (vehicle _controller)) then
{
    // Reset camera view to player
    (vehicle _controller) switchCamera cameraView;
};

objNull remoteControl driver _unit; // Reset control
player remoteControl _controller;
#

There's more to it, but these are the parts relevant to remote controlling

ornate whale
#

Is there any way how to diagnose the performance impact of my scripts apart from the debug console? Or any guides on which types of executions and commands do decrease the performance the most?
I have succesfully replaced all of my cycles by events. But some of those events are fired very often, namely, AnimStateChanged, FiredMan, KnowsAboutChanged (this one gets fired even if AI sees an empty dynamic object, like a lamp).

tulip ridge
#

"Is there any way how to diagnose the performance impact of my scripts apart from the debug console?"
There's diag_codePerformance

"Or any guides on which types of executions and commands do decrease the performance?"
There's the Code Optimisation page

tough abyss
#

Can I put infinite load capacity on a bulletproof vest?

sullen sigil
#

no, and you certainly cant with script

south swan
sullen sigil
#

iirc doesnt work on vestcontainer with inventory

#

tried messing with it so i could do something with two primary weapons weights

tulip ridge
#

Sets maximum load limit for a uniform/vest/backpack containers, vehicle cargo, supply boxes and weapon holders.

#

Sounds like it does?

south swan
sullen sigil
#

this bears all the hallmarks of lou

#

oh wow it was KK actually

tulip ridge
south swan
sullen sigil
#

guh

#

clearly i be bruggin

south swan
#
vestContainer player setMaxLoad 9e25;
vestContainer player addMagazineCargoGlobal [currentmagazine player, 9999];```
sullen sigil
#

what if you setmaxload -1

#

does that return to default or just break it

tulip ridge
south swan
#

breaks. Nothing can fit there.

south swan
tulip ridge
#

Putting it in your backpack so people can easily grab stuff icons_Wrong
Putting it in your vest so people have to pay you with drugs icons_Correct

south swan
#

get paid with tourniquet on the neck β˜‘οΈ

tulip ridge
#

I wonder if there's actually a PR for that on ace

#

There is not
Time to make one, surely it will get included to the ace mod

sullen sigil
#

its in KAM

south swan
#

advanced choking environment

sullen sigil
#

i would do it in my medical expansion if i knew what was happening with ace airways pr

#

if its not merged by next update then more work for me woo

ornate whale
#

Is this statement better with the curly brackets or does it work only with &&? I need just one of the 3 variables to be true to exit.

    if ( _isTargetSpotted or { _isGunshotHeard or { _isFootstepsHeard } } ) exitWith
    {
        //_isDetected = true;
    };
little raptor
#

without is faster
well if the first two are false

granite sky
#

It works but if the conditions are plain bools then it's usually not worth it.

#

The code brackets have a cost.

sullen sigil
#

theres no point doing lazy eval if youre not actually evaluating the condition and just pointing to it

south swan
#

curlies can only get faster when the actual calculation is happening inside them πŸ€·β€β™‚οΈ

ornate whale
#

What about this? This one has some evaluation going on.```sqf
if ( (_distance <= _spotDistance) && (_visibilityHead > 0.65 or _visibilityBody > 0.55) && (_angle <= CFG_spotAngle) ) then

granite sky
#

too simple usually. Depends on the condition probability though.

#

Like if you have one condition that would usually shortcut the rest of the condition then that might be worth some code brackets.

sullen sigil
#

its a simple variable comparison, not much overhead at all

#

but something like

if (_var isNotEqualTo objNull || {allMissionObjects select _var}) then [...]```
#

you would want curly braces there as allmissionobjects is a slow command

#

slower than the braces

#

(probably)

ornate whale
#

Is there any better/more optimized way to do this? Basically to find those three letters in the animationState string? Also how good it is to define functions as a variable regarding performance (it is called only once though).

//Determines the unit's pace from the animation state string
getPace = {
    params ["_anim"];
    
    private _toArray = toArray _anim;
    _toArray deleteRange [0,9];
    _toArray resize 3;
    private _toString = toString _toArray;
    
    if (_toString in ["stp", "tac", "wlk", "run", "eva", "spr"]) exitWith
    {
        _toString;
    };

    "stp"; //Default return value
};
granite sky
#

private _toString = _anim select [9, 3];

ornate whale
granite sky
#

If you're using it a lot then you should pre-declare the array.

#

kinda gross because there isn't any way of doing it except as a global, but it is quite a bit faster.

ornate whale
granite sky
#

I mean the ["stp", "tac"...] array

ornate whale
granite sky
#

Also converting it to a hashmap makes the in a bit faster but I'm not sure it makes much difference for six elements.

ornate whale
granite sky
#

actually const_hm getOrDefault [_toString, "stp"] is quite a bit better here.

#

can reduce your whole function to one line :P

ornate whale
granite sky
#

hashmaps are great

#

I just wish they had an A minus B command.

#

They make complete sense in SQF because the language is so slow that the hashing overhead is irrelevant :P

ornate whale
#

What do you think, is it better to pass an array of same arguments to multiple functions or to define those vars as an array in an object outside, and fetch them inside the functions with getVariable? Pass or getVar?

granite sky
#

array defined once or multiple times?

ornate whale
granite sky
#

no

ornate whale
#

Every instance of the code, there will be a unique array that will be then passed to few functions. It will happen many times.

granite sky
#

I mean are you doing this:

_args = [a, b, c];
_args call fnc1;
_args call fnc2;

or:

[a, b, c] call fnc1;
[a, b, c] call fnc2;
ornate whale
#

So it is basically what has the bigger overhead, passing vars repeatedly;or getVar and selecting repeatedly. And I am not sure what's better.

granite sky
#

Can't answer, requires too much detail.

#

Likely not much difference though.

main bear
#

So can someonr help me . Im trying to make a faction with Alive orbat and i got it into a pbo and even loaded it through local mod and it shows up on downloaded mod but when i open eden editor the unit isnt there /

past palm
#

Hello, new to arma modding so any help would be greatly appreciated. ❀️
My intent is to make a mod that displays some buttons on the map when the player double clicks on it (will be displayed alongside the marker creation menu). I have managed to display the buttons I made using the GUI editor through the debug console (createDialog "ui") but am struggling to make them appear by double clicking the map.

I am currently trying to use this:
https://community.bistudio.com/wiki/onDoubleClick
But I am not finding much documentation.

Here is my current init.sqf code:


if(isDedicated) exitWith {};
if(!hasInterface) exitWith {};

["QuickMapMarker", "onDoubleClick", {
createDialog "ui";
}] call BIS_fnc_addStackedEventHandler;```

I am not even sure that my init.sqf is being execute to be honest, any tips on debugging? I placed a `systemchat` command at the top and it doesn't seem to get executed...
#

*I should specify this is an addon, not mission scripting.

granite sky
#

Marked as "some old editor command"

#

Not listed in addStackedEventHandler anyway.

#

You'd probably need to add a UI event handler to the map display or control.

past palm
#

ah I see, I swapped with OnMapSingleClick (which also didn't work) in the hopes it would be that simple, but alas. I gather i'll need to figure out another way to detect a double click from the player.

granite sky
#

OnMapSingleClick generally does work.

past palm
#

yeah, I assume I've got something else wrong somewhere

#

is systemchat a viable way of debugging if a sqf file is actually being executed from the config?

#

thank you for your help by the way

past palm
#

I have now fixed the issue! (missing preInit in the cfgFunctions) and decided to opt for an easier to code Alt+click for the time being. If I may ask another question. How would I go about getting GUI elements to display next to the cursor, and not in the center of the screen where I created them? I have found getMousePos (https://community.bistudio.com/wiki/getMousePosition) but am unsure how to then create the dialog using it as reference. Hope this makes sense, thanks again.

tulip ridge
tulip ridge
#

Assuming getMousePosition returns it in screen percentages

mystic hawk
#

Can anyone tell me a script that will automatically kill an AI when they activite a trigger?

little raptor
#

in trigger activation

mystic hawk
little raptor
#

the script kills any AI that enters the trigger

mystic hawk
#

could i just make it so that it only kills the ai that i named "target"

#

what would be the script for that?

little raptor
#

you can change the activation condition to this && { target inArea thisTrigger}
and the activation code to: target setDamage 1

mystic hawk
#

Thank you

#

Also one more thing

#

Is there a script that could spawn an ai player when a trigger is activated?

#

and that would also spawn the trigger that comes with the ai player?

little raptor
#

spawn it where?

#

and what's the purpose of the trigger?

mystic hawk
mystic hawk
#

im basically just trying to make it spawn a sniper ai player on a building when bluefor activates a trigger

little raptor
#

well I still need more details. is this supposed to be dynamic? or do the enemies always spawn in specific locations?

mystic hawk
#

well its just one enemy that is spawning

little raptor
#

if it's the former, it's a bit complicated, if the latter, you can just create the trigger and the AI in 3den, and disable their simulation and hide the AI

#

and unhide/enable sim when the first trigger activates

mystic hawk
#

so as soon as a humvee full of bluefor hits the trigger the sniper on top of a roof is supposed to spawn

little raptor
#

like I said, just put the sniper in 3den and hide it and disable its sim

mystic hawk
little raptor
#

which one?

mystic hawk
#

the sniper ai

little raptor
#

I mean hide or unhide?

mystic hawk
#

just one guy

mystic hawk
little raptor
#

you can hide it in object attributes in 3den
as for how to unhide:

sniper hideObject false;
#

and for enabling sim:

sniper enableSimulation true;
mystic hawk
#

would i just put the enable sim command right under the top one?

little raptor
#

yes

#

also this stuff I just said are for SP, not MP

mystic hawk
#

for the object attributes, do i just right click the ai sniper and then click on attributes?

little raptor
#

yes

#

and under special states, uncheck Enable Simulation and Show Model

mystic hawk
#

where is the option to hide it?

#

ah

mystic hawk
little raptor
#

yes

mystic hawk
#

ah thank you it worked

mystic hawk
# little raptor yes

but the trigger that comes with the ai sniper will still work right when the ai appears?

#

and the waypoint too for the ai sniper?

little raptor
#

idk what you mean by "trigger that comes with ai sniper"

#

the waypoints work yes

mystic hawk
#

thank you it worked

#

have a good night man

dusk gust
#

Anyone know why the mission.sqm object position info angles[] is different than vectorUp when used in game?

mission.sqm -    angles[]={0,0,0.017453292};
In-Game(vectorUp) toFixed 9; - [-0.017452406,0.000000000,0.999847710]
little raptor
#

because angles are angles meowsweats

#

in radians

#

it's not a vector

hallow mortar
#

Those look like basically the same numbers though, just in a different order and with a little precision error

#

Like that (-)0.01745... is probably not a coincidence

little raptor
#

that's because at very small angles: sin x ~= x - x^3 / 6 +... and cos _x ~= 1 - x^2 / 2 (iirc)

#

from its taylor expansion

hallow mortar
#

Let's pretend I understood that and move on

little raptor
#

in this case it is a coincidence (the angle happens to appear in the vector, because it was small)

split oxide
#

It may also be something like Euler Angles

The Euler angles are three angles introduced by Leonhard Euler to describe the orientation of a rigid body with respect to a fixed coordinate system.They can also represent the orientation of a mobile frame of reference in physics or the orientation of a general basis in 3-dimensional linear algebra.
Classic Euler angles usually take the inclina...

little raptor
#

here's some stuff from back when I was messing with it

dusk gust
little raptor
#

@dusk gust
if you're trying to convert the mission.sqm angles to vector dir and up use this matrix

#

vectorDir is the 2nd column, and vectorUp is the 3rd column

#

what you read from mission.sqm will be the [a, c, b] angles (in radians tho, you need to convert them to degrees)

torpid quartz
#

Hi I've got this script running on a bunch of containers to add money stacks to them

this addItemCargo ["Money_stack", 3];

Problem is I'm wanting to run this mission on a server and this doesn't work when running on a server.
I could remote execute a script and uniquely name almost 100 containers with money in them (it's for a gamemode), but I wanted to know if there is some way to modify this so this works on a server while still running within an objects init.

still forum
#

addItemCargoGlobal

#

but within an objects init that would be wrong

#

you should only run it once when using the global variant

jade acorn
#

how can I detect if the player is within radius of a light source? I'm trying to implement different apertures for the "lighting" conditions as setApertureNew behaves wild sometimes and brute setAperture may help, but i need some kind of a 0-1 value if player is being lighten up or not

#

I remember there's such value for AI to detect enemy in bright light conditions better but I can't find it on wiki

still forum
#

there is a lighting info command, but its not a simple 0-1

jade acorn
#

getLighting does not work for artificial light sources right?

little raptor
#

no

#

use getLightingAt

drowsy geyser
#

Couldn't solve this issue, i can't figure out where and how to execute it so that the deletion of the objects and creation of new objects are the same for everyone

kindred zephyr
#

can userActions be auto executed upon the condition being met (think of it as trying to emulate events)?

astral bone
kindred zephyr
#

that way you always get the same randomization happening for everyone

#

or randomize on the server and send that as a parameter to your function

astral bone
#

Yea, you're getting different randoms. Random is different each time it's called and for each person who calls it.
I'd go with server randomization, but idk if these are local only objects or what

tender fossil
#

...remoteExec? Or am I missing something

astral bone
#

It's being called on every client

kindred zephyr
#

if such is the case seeding it should be enough, randomize the possible seed in the server and send the whole function with the random seed, guarantees randomization on the broader level while making the "internal randomization" be synced

astral bone
#

RemoteExec would be sending from 1 client, to every other client, but for every client.

tender fossil
#

I mean, generate the random stuff on server to have single source of truth and either publicVariable the results to clients and do the processing on them or just remoteExec the whole thing with the values as a parameter (e.g. in an array)

astral bone
#

oh yea, that could be done. But again, might be weird if the objects are local only. (idk why they would be but πŸ€·β€β™‚οΈ xD)

kindred zephyr
# tender fossil I mean, generate the random stuff on server to have single source of truth and e...

if the deletion and creation of everything is global then performance for this type of scripts is actually worse especially with bigger samples since besides the operations there is a huge bandwidth cost for sync. If you create local versions for everyone including the server with the equal conditions, its actually faster since you avoid sending large data packs over the network and you skip the syncing required both for player and ai interaction if it already exist in all the environments

#

for example, doing that type of scripts with +1mil objects syncing with everyone takes >1 min on my machine, while doing it locally for everyone takes < 15sec

#

you never know when you require barren maps :x

tender fossil
#

I haven't checked RNG in A3 for a good while, so I guess it's possible to send just the seed to clients for consistent results then?

kindred zephyr
#

yes, that is a very good way to do so

tender fossil
#

Ah, well then it's a no-brainer almost

manic flame
#

This is applied to an object in the Eden editor, will the subtitles appear for everyone or just the client that executes the action? Just verifying, my guess is clientside.

granite sky
#

The seed functionality in SQF is bad though.

#

best you can do is use the _seed random [x,y] form and increment one of the values, but then you only get 0-1 results.

sullen sigil
#

i have a weighted seed random function that barely works

#

its really not a very helpful command

granite sky
#

On the other hand, the random N form is bugged anyway so just multiplying the result isn't much worse.

#

that's not fixed in 2.14, right

still forum
#

haven't heard about that

#

_seed random x
works though?

granite sky
#

I'm not sure how that's useful. Normally you want more than one random value from one seed.

sullen sigil
#

i dont

granite sky
sullen sigil
#

i use it for determining blood type based off steam uid

granite sky
#

It's a pain in the arse because you have to do stuff like this:
_randomIndex = (floor random count _array) min (count _array - 1);

still forum
#

Or rather, you do the same as what the engine does

func RandomValue()
_seed = NextRandom(_seed);
return _seed

granite sky
#

but we don't have NextRandom

still forum
#

you do

#

its called random

granite sky
#

wait, it uses the result...

#

christ

still forum
#

Just a normal PRNG

granite sky
#

Not like any PRNG I used :P

still forum
#

But I don't understand why wiki says it needs to be integer

#

Sorry not PRNG but LCG.

#

Ah I see why integer..
Dang we should fix that

granite sky
#

Right, I think the worst LCG I used before had 64 bit state and you only used 32 as output.

still forum
#

yes, and I see why

#

internally seed is stored as integer.
The output result you get is
seed*(1/ ((1U<<31)-1))
which turns the integer, into a float

granite sky
#

right

still forum
#

but it doesn't support to do the conversion back.. I don't see why, would be pretty simple to do.
But it wasn't implemented and I guess whoever added that script command didn't want to spend 10 minutes on implementing it properly

granite sky
#

For random N it's just multiplying that by N, right?

still forum
#

yeah

granite sky
#

hence the bug. Can round up to N with the precision loss.

still forum
#

So its just a wiki bug then

granite sky
#

Well, ideally it wouldn't return N because that's extremely annoying to deal with.

still forum
#

I wonder if we can still fix seed random N without BWC break πŸ€”
Probably not

granite sky
#

wait, did random N get silently fixed in 2.12

still forum
#

Can find no reference to FT ticket, so shouldn't

sullen sigil
#

is the angular velocity thingy likely to be changed at all if i ticket it dedmens

#

i would imagine it wouldnt be changed for bwc

granite sky
#

Ah yeah, hit a bad one after ~20 million calls.

#

average one per 2^24, I guess.

sullen sigil
#

iirc i had the issue quite consistently in my radiation mod

#

but i resolved it somehow and idk how

#

...then rewrote the radiation calculations like 2 days after releasing the mod and didnt have the problem

sullen sigil
#

shall i ticket it or is leopard angular velocity commands ticket enough

still forum
#

I haven't seen dunno

sullen sigil
analog hull
#

SQL _wp0 = group chopper addWaypoint [ getPosATL player, 50]; getting an error type string expected object. Anyone have an Idea why. Was working fine yesterday

hallow mortar
#

Make sure chopper is definitely a living unit (e.g. the helo pilot), and not anything else (e.g. the helo vehicle)

#

Also, A3 scripting is SQF, not SQL :P

kindred zephyr
#

DELETE FROM 3den WHERE chopperDead

analog hull
granite sky
#

group _vehicle does work as long as it does currently have a group.

still forum
sullen sigil
winter rose
#

!remindDedmen 7d do stuff

tender fossil
still forum
#

I wanted to build that. But I didn't want to have to mess with database and making sure it doesn't forget things

sullen sigil
#

i need to do stuff with databases so might as well

#

its on the list

still forum
#

Nu

sullen sigil
#

i thought the font couldnt look any worse

#

its so much better in visual studio code

wind flax
#

How would I make the radius of a light source smaller? Like the actual circle

winter rose
#

less power

wind flax
#

Which function would you use for that?

young current
#

what do you use to create it?

wind flax
#
_light = "#lightpoint" createVehicleLocal (getPosAtl vehicle player);
_light setLightBrightness 0.5;
_light setLightAmbient [0.75,0.53,0.18];
_light setLightColor [0.75,0.53,0.18];
_light setLightFlareSize 1;
south swan
young current
#

brightness would be my first choice to try out

#

that would be good to read too

wind flax
#

Yeah, I tried using brightness it didn't work well

#

Can't get either of those to work

#

I'm basically just trying to create a small, chemlight size light

winter rose
south swan
#

_light setLightAttenuation [0.01,4, 4, 0, 0.5, 1.5]; then meowsweats

hallow mortar
mystic hawk
#

How can I make it so that no matter the ai will only stand up?

hallow mortar
#

_unit setUnitPos "UP";
You might need to make a loop to do it regularly, because sometimes (especially with AI mods) they can decide to change stance again later

mystic hawk
#

thanks

raw vapor
#

Hey I'm definitely doing something wrong. This doesn't work. Throws up an error saying I'm missing a ;

    do {
        this setPylonLoadout {'STA3', 'FIR_GEPOD30_P_330rnd_M',true}; 
        this setPylonLoadout {'STA5', 'FIR_GEPOD30_P_330rnd_M',true};
        }
    }
];```

Maybe someone here can help. For context I want my guns pods to not be limited to 330 rounds of ammo, but I've found other methods of infinite ammo scripts (such as setting ammo to 1) are extremely jank and are not working right for one of various reasons. Repeating the setPylonLoadout script is the only way I know of to do it reliably.

The problem is I can't get the addaction to work right.
south swan
#

do doesn't belong there πŸ€·β€β™‚οΈ

#

just remove it and the second pair of curly brackets {}

raw vapor
#

Oh I see the problem

#
        gatling_plane setPylonLoadout {'STA3','FIR_GEPOD30_P_330rnd_M',true}; 
        gatling_plane setPylonLoadout {'STA5','FIR_GEPOD30_P_330rnd_M',true}
    }
];```
That got rid of the error.
#

Now to see if it works.

#

Okay so progress, but new error. Expecting array?

pulsar pewter
#

Change {} from the "setPylongLoadout to []

raw vapor
#

πŸ‘

#

Will try that.

pulsar pewter
#

{} shows its code, [] is for an array

raw vapor
#

oooh

raw vapor
#

That did the trick, thanks!

balmy fox
#

So I use a modified ITN in my unit. And something we ran into is that IR lasers do not draw like beams, they draw like a normal laser does. Would an equation in the code for adjusting Draw thickness based on humidity from ACE Weather be causing the beams to not draw, when ACE Weather is disabled?

tough abyss
#

today i learnt that coding sqf with comic sans makes the most sense because of how wack the language is with random issues

jade acorn
#

what would be the fastest way of making an array of CfgFaces? There are some mods that mess with the face randomization on units and when you open their attributes the face field is empty - so when you save the custom attributes the unit will always have some single default face instead of what was randomized. I wanted to make my own function to work around this issue but I don't feel like writing them down into array manually

warm hedge
#

Do you mean you want a custom identityType or whatever its called?

jade acorn
#

I need an array of faces I can apply through setFace. I'm using modded identities so their amount is significantly bigger than vanilla so generating it somehow from the cfg would be better than writing them down

cosmic lichen
#

CfgFaces?

#

Check the attribute on how it gets all faces

jade acorn
cosmic lichen
#

Oh wait. This actually doesn't show where it gets the values from.

jade acorn
#

and I thought I just don't understand what's written here meowtrash

cosmic lichen
#

Hey. I have just woken up and only had half a cup of coffee πŸ˜„

warm hedge
#

Stop having a coffee, develop.

jade acorn
#

oh and another thing, can I enable multiplayer chat in a singleplayer mission? Need the possibility to type in it for certain purposes

#

I could just make a multiplayer mission for a single player but I know people appreciate pause when in Esc menu

warm hedge
#

Are you developing a DOS game?

#

Jokes aside I don't think there is a way to do it past and present. You may need to have a GUI

jade acorn
warm hedge
#

GUI is not scary

#

Just annoyoing

cosmic lichen
#

configproperties [configfile >> 'cfgfaces' >> 'Man_A3','isclass _x'];

warm hedge
#

I'd put apply configName there and joinString endl so one line one classname

cosmic lichen
#

if (_displayName == '' || getnumber (_x >> 'disabled') == 1) then {continue};

#

This is the additional condition to filter out the crap

magic sundial
#

Im kinda of super stupid, but i cant hide or delete modules

#

Like show/hide object modifiers arent working nor deleteVehicle

warm hedge
#

WIthout knowing what exactly you've done, nothing can be told

magic sundial
#

Literally like, a module in edan is called x

#

a trigger with deleteVehicle x;

#

or like just 2 show/hide modules, one showing initally and a trigger to hide it

#

can be any module, say like fire module idk

warm hedge
#

Deleting a module does not necessary mean that it will stop its work

magic sundial
#

right, i want it to make it stop working

#

like remove

#

goneskies

warm hedge
#

Really depends on your intention/work/module/want

magic sundial
#

ok so, theres a waypoint module for some zombies in a mod right

#

if theres 2 waypoints, they go to one and not the other, so when they get to one, delete that one and go to the other

#

thats my intention

#

Like otherwise i can do marker positions and set orders to the whole side sure, but the module is supposed to do that for me

warm hedge
#

Uh, I don't see any reason to delete a module here? Is it because I don't know what β€œWaypoint module” you mean?

magic sundial
#

cant use waypoints because dudes will be spawning in continuously

magic sundial
#

thats it

warm hedge
#

It is not a module

magic sundial
#

No

warm hedge
#

And you can after you verify and accept the rules

magic sundial
magic sundial
warm hedge
#

You said it is literally a waypoint but it is not, okay...

magic sundial
#

I said a waypoint module

warm hedge
#

And I had no idea what it was

magic sundial
#

A module that acts like a continous waypoint\

#

Like thats it

#

The waypoint is there because if new zombies spawn in

#

then they'll have directions on where to go

#

Otherwise i wouldve just done move orders and be done with it

#

when theres more than one, they clash

#

So i want there to be one at a time by deleting them when they reach a waypoint

warm hedge
#

Okay so let me clarify

magic sundial
#

its jus this

warm hedge
#
  1. Zombies spawn via a module
  2. And the Zombie Waypoint sets the waypoint automatically
  3. But you want to multiple of it, so those zombies will run two ways
  4. And the module itself is not designed to have multiple of it
magic sundial
#

yes

#

Just one at a time

#

like this

warm hedge
#

Then you should just have a script upon the spawn of zombies, if you can have a β€œinit” for the zombie or something

magic sundial
#

each trigger will delete the module that its on idk why hiding doesnt work, it used to for modules

warm hedge
#

I said you shouldn't rely on the Zombie Waypoint module

#

...As far as I heard. I'm not a user of that Mod

magic sundial
#

Right

#

πŸ˜‚

#

thats better

warm hedge
#

I don't know what was funny, but everything has limitation

magic sundial
#

Yea so im asking, can you delete or hide a module

#

can you have it not function until triggered

warm hedge
#

It really depends on the module

magic sundial
#

and toggle its like simulation

#

a module is a module, they're all the same

warm hedge
#

A module is just a script

#

They're all not the same

magic sundial
#

This wont work for like even a smoke grenade module

warm hedge
#

Then it won't work

#

For that module

magic sundial
#

Ok so why does hiding a module work, and not showing it

#

Show hide works on objects as they should

#

They hide modules

#

but not show

warm hedge
#

Which module you talk about? And as I said, every module has its way to how it works

magic sundial
#

Dont worry about it

warm hedge
#

?

sullen sigil
#

Anyone got any bright ideas on how to check if a unit is wearing a plate carrier? i.e they have protection over their chest
Would ideally like to avoid using armour values but will take what I can get atp

winter rose
#

vest + armour value or uniform + armour value

sullen sigil
#

isnt there not a simple way of getting armour value

#

iirc its super convoluted

#

although i do suppose looking straight at vest >> "ItemInfo" >> "HitpointsProtectionInfo" >> "Chest" >> "armor" would determine if the unit has protection over their chest πŸ˜…

winter rose
#

don't forget uniform (e.g CSAT) also does that

sullen sigil
#

yeah but could give cpr onto that uniform

#

(its to block units from doing cpr straight onto a plate carrier)

winter rose
#

you can only guess
or spawn a vest, trace to see if there is something near the heart, then despawn 😬

sullen sigil
#

running that for a condition probably isn't the best πŸ™ƒ

#

though when have I ever made the best πŸ’€

winter rose
#

you could have a loading at first that would collect all this info in the first seconds of the mission

sullen sigil
#

possibly though imo just easier to have chest armor read off of

#

as doing a trace would only detect there being something

#

so, a hi vis vest

jaunty zephyr
#

@grizzled cliff I like what you're doing with carma2

winter rose
#

trace the thickness

#

anyway yes, just vest + armor should cover 99% cases

south swan
#

Inb4 helmet with pelvis protection notlikemeow

sullen sigil
#

ive got sidetracked and am now writing code to read the biki

deep vessel
#

I'm trying to whitelsit all Air vehicles to pilots within the d_pilot global variable in a modified version of xeno's domination

fn_setupplayer.sqf
d_vec_role_pl = [];
player addEventhandler ["getInMan", {call d_fnc_getinmaneh}];
player addEventhandler ["getOutMan", {call d_fnc_getoutmaneh}];

player addEventhandler ["SeatSwitchedMan", {call d_fnc_seatswitchedmanvs}];
Getinmaneh.sqf

d_player_in_base = false;
d_vec_role_pl = assignedVehicleRole player;
if (d_player_canu) then {
    d_player_in_vec = true;
    if (d_isvdreduced) then {
        d_isvdreduced = false;
    };
    if (d_vec_role_pl isNotEqualTo [] && {d_vec_role_pl # 0 != "cargo"}) then {
        private _vp = _this # 2;
        if (_vp isKindOf "Car" || {_vp isKindOf "Tank" || {_vp isKindOf "Motorcycle" || {_vp isKindOf "Ship"}}}) then {
            if (d_ViewDistanceVec != viewDistance) then {
                setViewDistance d_ViewDistanceVec;
                setObjectViewDistance d_ViewDistanceVec + 100;
            };
        } else {
            if (_vp isKindOf "Helicopter" || {_vp isKindOf "Plane"}) then {
                if (d_ViewDistanceAir != viewDistance) then {
                    setViewDistance d_ViewDistanceAir;
                    setObjectViewDistance d_ViewDistanceAir + 100;
                };
            };
        };
    };
    call d_fnc_vehicleScripts;
} else {
    d_player_in_vec = false;
};

Vehiclescripts.sqf
private _enterer = param [0];
private _position = param [1];
private _vec = _this # 2;
private _turret = param[3];
private _vecnum = _vec getvariable ["d_vec",0];

if (((_position == "driver") || {(_turret select 0 == 0) && {_position == "gunner"}}) && {!([str _enterer,_vec,_vecnum] call d_fnc_isPilotCheck)}) exitWith {                
    //player action ["getOut", _vec];
    moveout player;
    _vec spawn {
        sleep 0.1;
        if (local _this) then {
            _this engineOn false;
        } else {
            [_this, false] remoteExecCall ["engineOn",_this,false];
        };
    };
};
Checkispilot.sqf
private _enterer = param [0];
private _vec = param [1];
private _vecnum =  param [2];
if ((_vec isKindOf "Air") && {!(_enterer in d_pilot)}) exitWith {hint "You need to be a pilot to fly this aircraft";false};```

However i'm getting this error:
13:31:56 "_vec: 1, _vecnum: <null>"
13:31:56 Error in expression < this chopper!";        
false    
};

if ((_vec isKindOf "Air") && {!(_enterer in d_pilo>
13:31:56   Error position: <isKindOf "Air") && {!(_enterer in d_pilo>
13:31:56   Error iskindof: Type Number, expected String,Object
13:31:56 File C:\Users\ezhpo\Documents\Arma 3 - Other Profiles\Wombat\missions\Legandary_Domination.Altis\client\fn_ispilotcheck.sqf..., line 35

Here's the eventhandler debug
"Event handler data: [""d_legend_8"",d_chopper_2,3002]"

It's a string in the array but does have extra quotes. Any ideas?
still forum
#
private _enterer = param [0];
private _vec = param [1];
private _vecnum =  param [2];
``` Do you know that this is equal to (and slower than)  ```sqf
params ["_enterer", "_vec", "_vecnum"];
#

Error iskindof: Type Number, expected String,Object
That error is pretty clear. If you had type checking in your params you would've seen that you call it with wrong arguments

deep vessel
#

Sorry, fairly new. Will correct that thank you o7

still forum
#

You can add diag_log _this; to log the arguments you get in your functions, to be able to follow it through and see where it goes wrong

#

"Here's the eventhandler debug"
Where is that from, where is that logged in your scripts?

#

I'd assume at the top of Getinmaneh.sqf

deep vessel
winter rose
#

no worries
t h i s t i m e
πŸ˜„

astral bone
#

ah- I can't remove variables from objects, can I?

deep vessel
sullen sigil
deep vessel
astral bone
# sullen sigil set to `nil`

To remove a variable, set it to nil (see Example 5) - note that this does not work on Object and scripted Location namespaces (the variable will be set to nil but will remain listed by allVariables).

still forum
sullen sigil
#

ah for allvariables stuff

astral bone
#

wait, if I don't change the value on an object, it doesn't save the eden attribute right?

#

So- how would I remove the attribute from an object- xD

winter rose
#

set it to default?

astral bone
#

Default is false. And that still makes it have the value in the mission file.

winter rose
#

then you're screwed

astral bone
#

darn it-

#

I have 409 objects that I unknowningly was copy+pasting.
6 of those objects are true.

#

Hmm-

#

I wonder-

fleet sand
#

Question is it possible to script a missile to shoot up 200m before going to target ?

analog hull
#

Does anyone know if this is still working? Could any recent updates cause this not to work. I would like to make a You tube video on how easy this is but it doesnt seem to want to work now. https://forums.bohemia.net/forums/topic/172795-release-t8-units-a-less-dynamic-ai-creator/

#

Is there a fix or workaround?

winter rose
#

see distance and triggerAmmo

astral bone
winter rose
#

weeeeee

astral bone
#

although, interestingly, running it seems to always give a false? Unless I'm missing something

#

ah ha! I mean, it's not really much of an improvment, but I went from 8,020 Kb mission file to a 7,897 Kb! :D

#

I was thinking I'd need to go through each object, make a new object, and copy all attributes except the one I wanted to remove. xD
Maybe could still use the code I had started making for it. But instead, see if I could remove any default values?

fleet sand
#

Hi guys quick question how i can get _instegator of a unit who destroyed a object ?
so i am using Killed EH. But for the name i have Error unit not found when i destroy object with C4. How i can get player name ?

    _radio addEventHandler ['Killed',{
        params ['_killed','_killer','_instigator',''];
        [[blufor, "BLU"],format ["Player (%1) has destroyed Radio Tower!",name _instigator]] remoteExec ["sideChat"];
    }];```
granite sky
#

Works here. Are you using ACE or something?

fleet sand
kind sluice
#

hello guys, could any of you help me, I have the following problem when I configure the pylons in the editor, and when I go to the server, the configuration disappears and remains with the one that comes by default, I need a script that helps me force the configuration I want to leave the helicopter. Thank you very much if you can help me. Good day to all.

exotic flame
#

I have a question: When using getObjectID, the game returns a string. But this string is made of a number. Will this number always be of the size of an int or can it be of the size of a long ?

tough abyss
#

How do I have my dialogs and text stay consistent in size across aspect ratios?

cosmic lichen
#

Define "consistent "

granite sky
#

Normally neither is relevant in SQF and it's the maximum int representation in a single-precision float that matters.

hallow mortar
#

I'd hazard a guess it can be at least as long as the maximum number of objects that can be placed in the terrain editor. Not sure how many that is though.

granite sky
#

Altis appears to have about 1.7 million.

simple trout
wise frigate
#

Anyone point me to a place which explains how I can use a number that is passed through a script to dictate the memory point with an attachto command.
For more explanation, I want to lets say be able to pass the number 1,2,3 etc through a script (As a parameter of the call command) then use the passed parameter to assign which memory point the item is attached to (All memory points are essentially Point_1, Point_2 etc and I want to be able to have the number of the mempoint in the attachto command be dictated by the parameter passed when executing the script.

Also as a secondary note I would like that number passed to also set a variable as true, for example I have Variable_1 = False and then if 1 is passed, it'll set the memory point to Point_1 and set Variable_1 to True and so on

hallow mortar
#
// receive passed number
params ["_memPointNumber"];

// generate the mempoint name by inserting the number into the template name
private _memPointName = format ["Point_%1",_memPointNumber];
// generate the variable name by inserting the number into the template name
private _varName = format ["NB_Variable_%1",_memPointNumber];
// set the variable and attach the thing
missionNamespace setVariable [_varName,true,true];
object1 attachTo [object2, [0,0,0], _memPointName, true];```
wise frigate
#

Perfect

south swan
#

just don't forget to fix _memPoint vs _memPointName

wise frigate
#

Yeah I saw that, thanks guys

#

Appreciated

mystic hawk
#

Alright so basically Im using this script "sniper reveal target"

#

And so I watched this video and did everything right but whenever i activate the trigger for the sniper to reveal the target the sniper just gets out his range finder and never shoots at the target

#

What should I do?

analog hull
#

Duck

jade acorn
#

question, CUP vehicles when set to simple objects in editor or with BIS_fnc_replaceWithSimpleObject behave as on the screenshot below - the default insignium is displayed and lights enabled (but they do not produce actual light, just the beam + bright lightbulb texture). I doubt I will ever see this fixed or at least in next 5 years so I wonder if there is any script-wise solution to make them behave as normal vehicles do when set to simple object?

sharp grotto
jade acorn
#

it's more about saving performance than keeping player away πŸ˜„

south swan
jade acorn
#

I tried adjustSimpleObject on them but nothing happend, at first I thought I just do it wrong but now I think that it does not work because the models or their config is borked. Will try creating the simple object instead but I'm fairly certain it might not work at all either

south swan
#

adjustSimpleObject with the data collected with simpleObjectData?

jade acorn
#

I loaded Polpox's mod to get the animation names and values, then started the mission without it and applied them manually

dreamy kestrel
#

Q: I see commands that add inventory, items and such, to vehicle cargo, but there are no remove commands? or do I need to clear and build it back up again in the revised counts?

also, are any of the BIS_fnc_invXYZ functions helpful in this behavior? BIS_fnc_invRemove, for instance?

thanks...

sharp grotto
#

You have to read the inventory, remove the stuff you want and then re-write the inventory

south swan
#

yeah, simpleObjectData only seems to extract data from the config (which is obviously borked), not from the real vehicle meowsweats

jade acorn
#

so nothing to do but wait till they fix it?

#

I wish I knew at least what causes that behavior in the config, but honestly no idea. It's not the only mod doing that, I noticed similar behavior with SOG when applying simple object function in editor would not to anything in preview mode and then loading back to editor would cause the vehicles to go back to the simulated state

sharp grotto
dreamy kestrel
south swan
#

it's the entirety of class SimpleObject in the vehicle config not being populated correctly (or at all), i'm afraid

sharp grotto
dreamy kestrel
#

fair enough, thanks...

south swan
#

some style of collecting all animation/texture states from the real vehicle in editor, storing that data in the mission/script and reapplying onto the freshly created borked simple object can be jury-rigged, i assume

#

like, literally collect with sqf MUH_state = [ animationNames cursorObject apply { [ _x, cursorObject animationPhase _x ] }, getObjectTextures cursorObject ] and set with sqf {cursorObject animate (_x + [true])} forEach MUH_state#0; {cursorObject setObjectTextureGlobal [_forEachIndex, _x]} forEach MUH_state#1; πŸ€·β€β™‚οΈ

main bear
#

Can some one help me . Im trying to make a faction using Alive orbat and i put it into a pbo and even download it as a local mod but when i open up the game the faction dosnt show up (please mention me if you can help)

dreamy kestrel
#

can someone clarify, as far as I could determine, weaponsItemsCargo loaded magazines also appear to be included among getMagazineCargo. maybe there are "reasons" for this, mass or otherwise, I don't know. can anyone clarify? possibly for the same reasons that a weapon, launcher or other, 'loads' when removing it from inventory back into unit possession. in any event, it makes it a bit tricky, or maybe I just take this into account, when connecting the dots during an inventory management UI. thanks...

deep vessel
#

It's your friendly noob again:
https://sqfbin.com/esejogoviveganozazok

Looking for help on why moveout player is not occurring after fn_ispilotcheck.sqf checks the player is not in an global array

winter rose
#

ufff, no syntax highlight because #

#

and, huh, could you perhaps reduce the code to the strict minimum for people to debug plz? (next time)
https://community.bistudio.com/wiki/moveOut aG eG
moveOut @ line 97
well, no idea where you script runs, player might be null, or something else is wrong

tranquil nymph
#

Trying to figure out what COIN stands for...capture of incognito neanderthals :/

#

coop invasion?

tough abyss
ornate whale
#

What is the simplest and fastest way to find if var _weapon contains one of these substrings ["arifle", "hgun", "launch", "srifle"]? I would like to avoid for or foreach cycles to do this. But I have not find a way how to do it with commands like in, findIf and find.

sullen sigil
#

count ([...] select {_x in _weapon}) > 0

#

or something like that

south swan
#

[...] findIf {_x in toLower _weapon} > -1 blobdoggoshruggoogly

sullen sigil
#

thats probably faster

#

you just need to remember findif exists

past wagon
#

Will scripting in Arma 4 be the same as in Reforger? Does Reforger use Enforce script? How does mission making in Reforger work?

nocturne bluff
#

Counter insurgency something

#

counter-insurgency or counterinsurgency[1] (COIN)

tough abyss
#

or a coin flipping simulator

sullen sigil
#

tldr nothing about arma 4 is guaranteed

#

other than it wont be ArmA 4

mystic hawk
#

How long is the distance is the command β€œsniper reveal target” good for?

#

Like how many meters?

crude needle
# jade acorn question, CUP vehicles when set to simple objects in editor or with BIS_fnc_repl...

That stuff is just hidden selections (likely 'light_l', 'light_r', and 'clan' ). BIS_fnc_simpleObjectData and BIS_fnc_adjustSimpleObject combined or creating with BIS_fnc_createSimpleObject would probably take care of it. But they are provided in the return for BIS_fnc_simpleObjectData nonetheless if you are curious.

Alternative approach is to just hide the selections yourself:

['light_l','light_r','clan'] apply { 
  mySimpleCupTruck hideSelection [_x,true]; 
};
deep vessel
thin pine
#

Someone told me that BIS implemented a new command to decrease the knowledge level of AI (reveal only increases it) - is this true?

jaunty zephyr
tender fossil
thin pine
#

Nah I'm literally talking about an inversed version of 'Reveal' - I couldn't believe it when he told me it....i went looking for it on dev branch changelogs, couldn't find it....he said he may've read it on a twitter message -_-

#

It seems too good to be true :p

deep vessel
astral bone
#

Where would I ask questions about extensions.
Main question being, what are the possibilities

tender fossil
tender fossil
astral bone
#

Ohh ok, so it is basically just... uh... well it doesnt expose new things for the game, but things outside the game can be useable

still forum
tender fossil
tender fossil
still forum
#

It comes from a eventhandler which passes a object.
And the diag log also prints non number

tender fossil
#

Indeed, missed that debug log

jaunty zephyr
#

@thin pine cant you just set knowsAbout to 0 ?

#

_foo reveal [_bar, 0]; ?

thin pine
#

reveal description: "The knowledge level can only be increased, not decreased by this command. "

deep vessel
#

Just back at my pc, will do more debugging and let you guys know. Thanks for your eyes and time, much appriciated meowheart

deep vessel
still forum
#

sus

#

Maybe its called twice? once with working correct, and a second time with fail?
But you should notice the second diag log then

tough abyss
#

anyone know how to get if a player is being suppressed? cant see any commands and hoping i dont have to look for some jank workaround like counting if bullets go nearby

sullen sigil
#

firedNear eh

tough abyss
#

thanks

sullen sigil
#

also suppressed eh

#

i think

rancid lance
#

so

#

never mind

#

NooVanish i must not be weak

harsh sphinx
#

As in using X set [Y, "something"] on a variable reflects to all as long as the setVariable has been trued (is public)?

sullen sigil
#

setvariable[.........,true] does not make the variable public for its lifespan, it only updates its value over the network on that one instance

harsh sphinx
#

So it's modified by reference, but the change isn't reflected over the network?

#

So now I have an array that differs?

granite sky
#

If you change the array after the global setVariable, yes.

harsh sphinx
#

That's confusing and annoying, but thanks

granite sky
#

Same with publicVariable. The value at that point is published. Future changes to the variable will not be.

sullen sigil
#

are hashmaps the same case john or are those global regardless

#

i.e do you need to setvariable a hashmap again to make it network update

granite sky
#

Same.

#

It's a rare reason not to use hashmaps in some cases, because they can't be selectively updated. You push the whole thing or nothing.

sullen sigil
#

Wait that's confused me

#

if i getvariable of hashmap and make changes without setvariable again, are those changes network broadcast?

granite sky
#

you mean get?

sullen sigil
#

im so confused

granite sky
#

whatever, there's no automatic broadcast.

sullen sigil
#

ok thank you

#

thats what i had suspected

south swan
sullen sigil
feral epoch
#

Hi! I'm looking for a way to avoid divers to spawn bubbles when using a rebreather system

blazing zodiac
#

Just started using the debug console performance tester and had a quick question. Is the time displayed the average time out of the cycles that ran?

mystic hawk
#

How long is the distance is the command β€œsniper reveal target” good for?

#

How many meters can an ai reveal a target?

granite sky
#

Uh, there's no range limit.

#

reveal just hard-sets the target knowledge.

#

Whether they'll shoot at them is another matter.

jaunty ravine
#

Hello, is there some function for adding a ModuleStrategicMapMission_F during play? I'm trying to set up a "rallypoint" type system where people can teleport from the base to a placed down respawn tent.

granite sky
#

It might work if you do it the same way people create zeus modules live.

jaunty ravine
#

Ideally this would be done purely in the mission, i.e. no additional mods.

granite sky
#

For a zeus it's just:

private _group = createGroup sideLogic;
private _zeus = _group createUnit ["ModuleCurator_F", [0,0,0], [], 0, "NONE"];
#

plus some setVariables if you want non-default params

jaunty ravine
#

Alright, appreciated, thank you.

granite sky
#

allVariables on an editor-spawned one might be helpful there.

pulsar pewter
#

Say, if I wanted an overlay to show up over a UAV feed and display an image, how would I go about doing that?
I really haven't messed around with displays/overlays or anything at all, yet.

drowsy geyser
#

Is it possible to get allVariables with a specific TAG?

granite sky
#

what's a TAG

drowsy geyser
granite sky
#

It just returns an array of (lowercased) strings. You can do what you like with it.

#

If a mod actually tagged all its variables properly then yes, you can isolate those.

winter rose
#

allVariables, toLowerANSI, select, etc

granite sky
#

allVariables _unit select { _x select [0, 3] == "ace" } for example.

drowsy geyser
#

What does [0,3] mean?

granite sky
#

_string select [0, 3] returns a new string containing the first three characters of _string.

#

You can do something like "ace_" in _string instead but that might have false positives.

drowsy geyser
#

Okay thank you for clarifying it

granite sky
#

(select has a lot of different syntaxes)

drowsy geyser
#

Is this correct?
`_playerVariables = allVariables player select { _x select [0, 4] == "para" };

{player setVariable [_x, nil];} forEach _playerVariables;`

winter rose
#

tried it?

drowsy geyser
#

Unfortunately not, i didn't had the opportunity to test it yet

native hemlock
#

@blazing zodiac Yes, the average run time over the number of shown iterations

polar belfry
#

hello I need help I want to make a small trigger that whenever a drone flies in it deletes the AI on the drone

#

I found that I can use the deletevehicle crew command since UAV ai is a unit

#

I thought of modifying the no fly zone script

#

condition

(vehicle player in thisList) && {vehicle player iskindof "Drone"}
#

will write the activation soon

polar belfry
#

Activation

_drone = vehicle player;
deleteVehicleCrew _drone;
}```
winter rose
#

no need to spawn, also thisTrigger is not used

little raptor
#

there's no such thing as "drone" afaik

#

also you can use isUAV iirc

winter rose
#

it's a config entry only… so far

little raptor
#

there was something tho think_turtle

winter rose
#

isAutonomous?

little raptor
#

ah unitIsUAV

sullen sigil
#

omg leopard is green now

tough abyss
#

he got forced into bis basement

little raptor
#

*bisment

polar belfry
#

where do I put the unitisUAV

#

in condition?

winter rose
little raptor
#

because the player is never really in the UAV

sullen sigil
#

simple to do in 2.14 πŸ™‚

polar belfry
#

I just want to simulate a UAV jammer

#
(vehicle player in thisList) && {unitIsUAV vehicle player}```
sullen sigil
#

dont use vehicle player then, just check vehicle crew is uav and delete it if so

winter rose
#

just set fuel of any UAV entering to zero?

polar belfry
#

oh that works

winter rose
#

or yes delete crew so connection is lost

polar belfry
#

so then

{unitIsUAV vehicle player} && {alive jam1}
#

jam1 is the comms mast in the compound

sullen sigil
#

vehicle player will return a vehicle

#

just do something like

private _drones = thisList select {_x isKindOf "dronebaseclass"};
{
deleteVehicleCrew _x;
} forEach _drones;```
#

or just filter thislist in the condition for _x isKindOf "dronebaseclass"

winter rose
#
{ deleteVehicleCrew _x } forEach (thisList select { unitIsUAV _x });
```or something
polar belfry
sullen sigil
#

no

sullen sigil
#

and may not even return uavs either

winter rose
polar belfry
#

I want it to happen only for blufor UAVs

#

I try to help a friend build something

#

so should I add a side check in your line

#

{ deleteVehicleCrew _x } forEach (thisList select { unitIsUAV _x } && {side _x == west});

winter rose
#

yes, but not like this

#
{ deleteVehicleCrew _x } forEach (thisList select { unitIsUAV _x && side _x == west });
```like this
polar belfry
#

I see and this when a blufor UAV goes in the trigger the controls die and the player is ejected from command

winter rose
#

it should

polar belfry
#

will test

#

thank you

#

with a alive jam1 condition so in case they destroy the jammer it flies normal

#

so the UAV didn't cease working

#

didn't use the condition so to check if it will work

sullen sigil
#

uav may not stop working but just lose control

polar belfry
#

it didn't kick me from the uav

#

let me see I didn't set any player

winter rose
#

activation: anything
repeatable

polar belfry
#

just set repeatable ok

winter rose
#

no, not just that

activation: anything

polar belfry
#

there isn't "anything"

#

there is "anybody"

winter rose
#

try and thou shalt see