#arma3_scripting

1 messages · Page 662 of 1

limber panther
#

Hello! Can someone assist? I just downloaded TFAR mod for the first time and i'm wondering how to add long range radio into vehicle. I want to have that only in certain vehicles that i chose. What's the script to put into vehicle init field that enables LR radio in that vehicle?

past wagon
#

where on the wiki?

past wagon
#

okay, so it is supposed to be an array

#

do I need to create an array variable first or can I just list the triggers?

#
//PLAYER SPAWN RANDOMIZATION
_randomPlayerSpawn = [nil, []] call BIS_fnc_randomPos;
_playerSpawnX = _randomPlayerSpawn select 0;
_playerSpawnY = _randomPlayerSpawn select 1;
player setPos [_playerSpawnX, _playerSpawnY];
spark turret
#

Random pos should exclude any water by default if you give no blacklist

#

According to biki

past wagon
#

oh

#

great

#

@spark turret i figured it out, but it doesnt seem to be excluding water by default lol

spark turret
#

"blacklist (Optional): Array - blacklisted areas. If not given, water is blacklisted. Areas could"

past wagon
#

hmm

#

it spawned me in the middle of the ocean 2/3 times

spark turret
#

Alternative:
_randomPosMapNoWater = [nil, ["water"]] call BIS_fnc_randomPos;

#

Then its either broken or your code is

past wagon
#

ok one sec

#

@spark turret it works when you put "water" in the blacklist

#

i was just leaving it blank

tough abyss
#

Bis_fnc_earthquake needs to be remotly executed dosnt it

limber panther
tough abyss
#
player !(in ( boundingBox "Land_Airport_Tower_F";));```
#

would this work

winter rose
tough abyss
#

@winter rose any way to get it to work

winter rose
tough abyss
#

I want to detect when a player is in any building on the map

#

the airpot was just for theory

tough abyss
#

actualy let rephrase that i want to if the player isnt in a building

winter rose
#

!_inside 😁

tough abyss
#

???

fresh wyvern
#
_veh = "B_CTRG_Heli_Transport_01_tropic_F"createVehicle (player modelToWorld [8,0,0]);  
_veh setUnloadInCombat [true, false];

_veh addMagazineTurret ["2000Rnd_65x39_Belt_Tracer_Red", [-1]];
_veh addWeaponTurret ["LMG_Minigun_Transport", [-1]];

_veh addMagazineTurret ["2000Rnd_65x39_Belt_Tracer_Red", [0]];
_veh addWeaponTurret ["LMG_Minigun_Transport2", [0]];

_veh addEventHandler ["Fired", {
        params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
        _unit fire "LMG_Minigun_Transport2";
}];

Anyone who knows a clever way to limit the co-pilot from emptying his 2000 rounds after the first initial shot?

tough abyss
#

@winter rose got a link to that or.... you know an explanation please google turns up nutin for !_inside

winter rose
tough abyss
#

wait isKindof "house" is a thing that works

limber panther
#

can i get some attention as well? 🥺

winter rose
limber panther
#

ok

#

understood

winter rose
#

…j/k, but IDK TFAR. what did google say?

limber panther
#

haven't found anything usefull on google, that's why i'm asking

#

tfar is a task force arrowhead radio by the way

winter rose
#

yes, I know that (or Task Force Arma Radio as well) but I don't know how to use it I'm afraid

limber panther
#

it's interesting that it's one of the most popular mods for arma but nearly everyone doesn't know anything about it 😄 everyone just tells me "yeah you know i just downloaded it and i use it as it is" 😅

#

i know that what i'm looking for really exists but still haven't found it 😃

#

@winter rose just received a message on another forum, do you think, this will work?
tfar_core\functions\fnc_vehicleLR.sqf

wind hedge
#

Why would anyone do like it says in the wiki example 2? --> SQF [player, "AmovPsitMstpSlowWrflDnon"] remoteExec ["switchMove", 0]; switchMove is already global.

still forum
#

its arg local. So remoteExec would make sense if you want to execute it on a remote object

#

that code isn't doing that though

#

@wind hedge Did you read the description at the top of the page?

limber panther
#

@winter rose so it doesn't let me put it in the init field, i assume i'm on the right way but how to use that script? tfar_core\functions\fnc_vehicleLR.sqf

#

maybe... isn't it supposed to be in some sort of combination with execvm ?

wind hedge
#

ohhh you meant " When the argument is remote, the animation change on the executing PC is only temporary."...

#

But still... isn't the 0 value used in the wiki example 2 just make the animation play twice for every player or at least make the network transfer duplicate data?

past wagon
#

init.sqf and initServer.sqf run at exactly the same time, correct?

willow hound
heady quiver
#
_buildingLocation = [_x] call BIS_fnc_buildingPositions;
_buildingLocation = selectRandom _buildingLocation;

How do i check if _buildingLocation is not null.

winter rose
#

isEqualTo [] @heady quiver

heady quiver
#
if (_buildingLocation isEqualTo []) then {
  // Is null
};
#

Like this 🙂 ?

#

ty

dreamy kestrel
tough abyss
#

Sorry to ask, but would anyone know why when I put this
this addaction ["<t color='#FF0000'>test</t>", {[Player] execVM "scripts\myscript.sqf"}, nil, 10, false, true, "", "", 5];
into an object's init, It works.

But if I use this in initplayerlocal.sqf:

object1 addaction ["<t color='#FF0000'>test</t>", {[Player] execVM "scripts\myscript.sqf"}, nil, 10, false, true, "", "", 5];```

It wouldn't work ? assuming I have add object's variable as object1
spark turret
#

Whats the error

tough abyss
#

oh no error. just nothing happens when I run on dedicated server

#

eden works just fine though

#

weirdly enough

heady quiver
#

Lou, you know what would be the best way to chance something?

spark turret
#

Have you tried logging that it gets added? Put a diag_log into the action

tough abyss
#

good point. let me give it a try

little raptor
heady quiver
#
private _houses = nearestObjects [player, ["house"], 500];

Is there a way to do this for mil objects only?

past wagon
little raptor
little raptor
#

Expressions of Eden Editor scenario attributes are called
Persistent functions are called
Modules are initialised

#

depends how much time it takes for those

#

but they probably run almost exactly at the same time

heady quiver
#

Leopard you know anything about nearestObjects with milli objects like towers?

untold rose
#

Hello my Arma Peeps does anyone know of a vehicle garage Script that is not VVS?

heady quiver
#

Well im trying to spawn certain items ONLY in mill objects.

little raptor
heady quiver
#

damn

little raptor
#

your best bet is looking at their editor subcategory

heady quiver
#
_buildingLocation = [_x] call BIS_fnc_buildingPositions;
_buildingLocation = selectRandom _buildingLocation;

How would i get the name of a house so i can make a list of the buildings i want in (inArray) check

little raptor
#

actually

#

I'm seeing some interesting stuff

#
vehicleClass = "Structures_Military";
editorSubcategory = "EdSubcat_Military";
#

so you can use either of those (or both)

heady quiver
#

wait

#

how 🤔

little raptor
#

config

heady quiver
#

private _houses = nearestObjects [player, ["Structures_Military"], 500];

#

you mean this?

little raptor
#

no

#

they're not classes

#

just properties

heady quiver
#

oh.

little raptor
#
nearestObjects [player, ["House"], 500] select {getText (configOf _x >> "vehicleClass") == "Structures_Military" || getText (configOf _x >> "editorSubcategory") == "EdSubcat_Military"}
heady quiver
#

Yeaa works

#

nice

heady quiver
#

but for some reason i cant call the function anymore.

#

😦

little raptor
heady quiver
#

i dont know whats going on

little raptor
#

you probably made a mistake somewhere

heady quiver
#

i cant seem to call any function any more

little raptor
#

did you put a while without sleep?!

heady quiver
#

nop

little raptor
#

just restart

#

the mission

heady quiver
#

im so confused rn

little raptor
heady quiver
#

Nop

#

The first function

#

lootCrates works but everything after that doesnt work even if i call it first.

#

Mmmm seems something wrong with the function itsself.

little raptor
#

or you put the whole thing in {}

heady quiver
#

Seems its your code

#
 private _millObjects nearestObjects [player, ["House"], 500] select {getText (configOf _x >> "vehicleClass") == "Structures_Military" || getText (configOf _x >> "editorSubcategory") == "EdSubcat_Military"}`
#

🤔

little raptor
heady quiver
#

i wasnt blaming x)

#

i was figuring out what was wrong

#

forgot where 🤔

little raptor
#

private _millObjects =

heady quiver
#

damn

#

im stupid

#

ty

#

it works

mental galleon
#

hey, Im trying to use animation Viewer and use an Static Dead pose animation for a mission on an AI, How exactly would i do this?

#

if this doesnt belong in this channel, Let me know

dreamy kestrel
#

Tiny bit confused over how the onKeyDown and onKeyUp event handlers work, the args they are passed. Take _ctrl for instance...
key down true meaning the key is down; versus key up true meaning the key was lifted?

#

which if accurate, seems a bit counter intuitive, but whatever, it is what it is...

warm hedge
#

When you press, down, when you stop to press, up

dreamy kestrel
#

yes I understand that eventing... my confusion is _ctrl is true in both instances... semantically true, that is?

warm hedge
#

Also ctrl, alt, shift returns corresponded state regardless which key you're pressing

dreamy kestrel
#

le sigh... also not my question

#

I am focused strictly on the modifers, specifically _ctrl for sake of this question

#

i.e. would like to achieve a modifier+mousewheel gesture

#

so my question is, being true in both instances is a case of the down/up being semantically true?

warm hedge
#

Apologies, I don't really get the part of semantically true. Both down and up return true when is/are pressed, false is/are not, regardless the event is down or up

dreamy kestrel
#

ok, well, empirically, would not agree with that as an assumption. logically, I might expect true is down false is up, but that does not seem to be the case.

#

another question, onMouseButtonClick, _button is left, middle, right, are, 0, 1, 2?

#

hmm is middle mouse button supported as a mouse click?

#

seems like middle mouse button click is not supported at the moment... can anyone confirm?

manic sigil
#

Why can't I doArtilleryFire the AAF MRLS with "rockets_230mm_GAT"? It keeps throwing a 'weapon doesn't exist in CfgWeapons' error :c

#

It seems that it can't determine if anywhere is in range, despite the weapon having rather extreme reach

dreamy kestrel
#

probably a gap. I seem to recall it was some time ago when the ship gun for the liberty, etc, could not operate correctly with the arti computer either. shells would splash in the ocean, never go anywhere.

verbal saddle
#

so _button == 2 would be a middle mouse button click

dreamy kestrel
#

hmm well I tried that, actually I put a general systemChat in for any button click, middle mouse button click was not seen by the event handler

verbal saddle
#

I know it works for mouseDown/Up

dreamy kestrel
#

for middle mouse button?

verbal saddle
#

yes

dreamy kestrel
#

hmm ok, maybe we "emulate it" that way...

verbal saddle
#

Regarding your question about the _ctrl/_shift/_alt IIRC they are only the state of those keys at that specific point in time.
So if you press Ctrl-L you have _key = DIK_L & _ctrl = true, but if you then let go of Ctrl, then let go of L then the key up for L won't have _ctrl as true

dusty dawn
dreamy kestrel
#

@verbal saddle well, again, "at the moment of key up" the indication I am receiving is _ctrl is true, i.e. was "up" at that instant

verbal saddle
#

True in that instant would mean it's pressed IIRC.

#

_ctrl is a true/false for if the ctrl key is pressed in that instant.
So a true for _ctrl in a keyUp event handler would mean that the ctrl key was being pressed when the key was released.

dreamy kestrel
#

no, that's what I'm saying... I got the event, in particular onKeyUp, _ctrl is still true, which I take to mean, true, key was "up"

#

I think we kinda sorta said the same thing there, just wanted to clarify

crimson walrus
#

_wep1 = _WeaponArray deleteAt ((count _WeaponArray) - 1);
_wep2 = _WeaponArray deleteAt ((count _WeaponArray) - 1);
_wep3 = _WeaponArray deleteAt ((count _WeaponArray) - 1);
_magList1 = [_wep1] call BIS_fnc_compatibleMagazines;
_magList2 = [_wep2] call BIS_fnc_compatibleMagazines;
_magList3 = [_wep3] call BIS_fnc_compatibleMagazines;

#

something like that?

#

hold on...

#

you could do selectRandom on _magList1, _magList2, and _magList3

#

to get a single string

#

I don't see _Magazine used? What about it doesn't work?

#

_Magazines = [_randomitem] call BIS_fnc_compatibleMagazines;
_MagazineString = selectRandom _Magazines;

#

I don't have the game open right now, sorry if my suggestions aren't correct.

#

are you using addMagazineCargoGlobal to add the mag?

#

haha, shucks!

#

no prob

dreamy kestrel
#

@verbal saddle to clarify, middle mouse button events are not registered by arma whatsoever. for neither button click, nor down nor up events.

#

perhaps there is a special configuration properly I need to provide in order to allow middle mouse button events, down, up, click, etc. scroll wheel is just fine, just not the click.

thorn saffron
#

Is it possible to use drawIcon on custom dialogs?

verbal saddle
#

@dreamy kestrel
Are you placing the eventhandler on a control or a display?

#

TLDR: MMB only returns if the event handler is added to Display 46

little raptor
#

and why anyway?

#

you can create a picture ctrl

#

and use it as an icon

thorn saffron
#

I want to make a radar with has to display mutliple icons. I didn't want to use the drawIcon3D

little raptor
#

You can only use drawIcon on map ctrls

thorn saffron
#

drawIcon3D it is then

little raptor
#

if you absolutely want it to be 2D you can use a ctrl

thorn saffron
#

I barely got my head around the basics of dialogs

thorn saffron
#

Ok, so maybe I should be using control as I want player to be able to move even with the display on. How would I go around using control to draw icons on my radar?

tough abyss
#

want to make an object play music i have this ```sqf
if (isServer) then
{

while {alive Radio} do
{
    playSound3D ["sounds\Dirge.wav", Radio]; 
    sleep 263;
};

};```
its not throwing any errors but it isnt playing the custom .wav file i have

little raptor
little raptor
thorn saffron
#

^

tough abyss
#

done that

little raptor
#

why do you always ping the wrong people?! meowsweats

tough abyss
#
{
    sounds[] = {};
     class music1
    {
        name = "music1";
        sound[] = {"sounds\Dirge.wav", 300, 1};
        titles[] = {0,""};
    };
};```
little raptor
#

so use music1 now

#

not its path

#

also there are event handlers for music

#

no need to sleep for some time to repeat the music
these event handlers tell you when the music is done

tough abyss
#

ok pretty sure i tried that last night and it didnt work

#

will try again

little raptor
elfin robin
#

good morning guys, just a question, i have been trying to make this work but it seem to me i need some assistance. im building my own base on Malden complete with gates and everything. how do you script it so that if you are within a certain distance from the gate it opens?

devout mural
#

Someone should make a script so you cant get armed

thorn saffron
#

the path seems wrong as it does not contain the mission folder

#

taro_tactical_aids\data\sounds\mortar_start_3.ogg

little raptor
#

is it needed for music?

thorn saffron
#

I would assume so

#

yup: \A3\music_f\Music\LeadTrack01b_F.ogg"

tough abyss
#

@elfin robin give me a sec

#

these bar gates

elfin robin
#

yes sir

little raptor
#

wat?

elfin robin
#

Thank you sir. appreciate your time.

little raptor
tough abyss
#

yeah i messed tht up the important part is animate ["door_1_rot", 1];// 0= close 1=opens

elfin robin
#

Thank you kindly

tough abyss
#

just slap it on a trigger

little raptor
#

I told you

#

it won't work

#

and the problem isn't simply a "0= close 1=opens"

#

code?

#

but regardless, here's probably the best way:

_rand = [];
_rand resize 3;
_rand = _rand apply {selectRandom _someArray};
copper raven
#

put it inside the loop

#

_Weapon = selectRandom _WeaponsArray;

little raptor
#

also round random 1 is either 0 or 1

#

why bother if it's 0?

copper raven
#

then do something like _weaponsArray deleteAt floor random count _weaponsArray instead of selectRandom

#

add ceil random 3 instead of just 3 constant in your for loop then

pure mountain
maiden warren
#

does BIS_fnc_compatibleMagazines work with custom weapons too or?

copper raven
#

that function just looks up magazines array in the weapons config iirc, so it depends on that

#

double check in functions viewer

dreamy kestrel
#

@verbal saddle ah, good to know, was not aware of that. thanks!

strange seal
#

I've been working on an "advanced Helo transportation" script for awhile, should I try to turn it into a mod or is there something people already like using?

quasi rover
#

Is there a way to prevent player from joining the server with the nickname like 'administrator' or 'moderator' or something like that ?

sacred slate
#

how can i make this also for the rest of a tank: this setObjectTexture [0,"#(argb,8,8,3)color(0.1,0.1,0.1,0.1)"];

quasi rover
#

@cosmic lichen in where? initPlayerlocal ? or init.sqf?

quasi rover
#

thx.

little raptor
#

it's more typically used with getObjectTextures in a loop

#

also don't use init fields in MP meowsweats

cosmic lichen
#

and you code @maiden warren ?

#

Is that your script?

#

What's inside the functions

#

nvm

winter rose
#

oh, ANZUS.

cosmic lichen
#

So far I see it, just execute that script for every player, so each player has its own box

heady quiver
#

Hey guys so i get a script that spawns loot in civ and mill buildings but what would the best way to trigger the 'spawnLoot' function so it doesnt duplicate.

cosmic lichen
#

if it has global effect then initServer.sqf

#

and if it only needs to run once

heady quiver
#

but its based on where the player is (spawns loot 300 meters arround player)

#

Can i show you the code i have in a PM ?

little raptor
#

you can remoteExec it on the server

heady quiver
#

But what if there are 2 players

#

^^

little raptor
#

without looking at the script it's hard to tell what you should do

heady quiver
#

Cant show code here too big what was the link again where i can post it.

cosmic lichen
heady quiver
#

What this does is spawn a crate in a random location inside a building.

#

for all buildings 500m from the player.

little raptor
#

the script is client side

heady quiver
#

yes

cosmic lichen
#

you don't need remote exec then

heady quiver
#

But 2 things

cosmic lichen
#

wait. It's client side but creates the crate globally

heady quiver
#

I want to trigger the script at a certain point / time ? and i dont want duplicates.

cosmic lichen
#

so 5 players would spawn 5 crates in a house?

heady quiver
#

Yea so if player A goes to a city loot will spawn (that also is visible for player B) but i dont want to spawn more if there is already crates spawned.

#

So what i think i need to do is check if

_lootContainers = [
                    'Land_PaperBox_01_small_closed_brown_F',
                    'Land_MetalCase_01_small_F',
                    'Land_PlasticCase_01_small_olive_F'
];

Any of these are close to 500 if so then dont spawn more.

#

Unless there is a better way.

#

Also the reason why i want it 500 meter is because if i spawn the crates on server launch that would mean thousands of crates already in game and i think that will cause big FPS problems.

little raptor
#

it's simple
grab one player
grab players within its 500 m radius
call the script once for them (preferably calculate the center position)

do this for every remaining player

the script needs to be modified and called on the server

heady quiver
#

And then they move to another town.

#

Then what ^^

little raptor
#

you can use a grid system then

#

break the map into squares with 500m sides

heady quiver
little raptor
#

it's not as complicated as you think
it doesn't have to be slow either

all you need:

  1. an array to track the positions where you spawned the loots (_gridPos)
  2. calculate the players' positions, divide their x and y by 500m, round them (2D positions). this is a grid position (_gridPos) which you use as the center for loot crate spawns (after it's multiplied by 500) (_worldPos)
  3. if the position already exists in the array, it already has loots
  4. otherwise, create the loot at that position and pushBack the position (_gridPos) to that array
#

you can even use hashmaps for improved search speed blobcloseenjoy

#

(sidenote: server side script)

heady quiver
#

Mmm

#

So step 1

#

How would i change all my code so its serverSide

little raptor
#

the whole script is a loop (such as while {true})

#

you can put it in initServer.sqf

#

the only part of it that needs to change is this:
nearestObjects [player, ["house"], 500];

#

instead of player you should use the grid position

#

also radius shouldn't be 500
or the grid sides has to be 1000m

#

grid side = search diameter

heady quiver
#

tbh i have no idea how grids work x)

little raptor
#

draw one on the paper
you'll see 😛

heady quiver
#

i mean i know what a grid is but no idea how all this would work

little raptor
#

again draw it on the paper

#

and pay attention to this

#

divide their x and y by 500m, round them (2D positions).

#

if you understand how round works, you'll get it

heady quiver
#

_gridPos = mapGridPosition getPos player;

#

This gets the grid ?

little raptor
heady quiver
little raptor
#

no get their position (getPosWorld _unit)

#

you create a manual grid

heady quiver
#

like this dude

little raptor
#

🤷

#

not in the mood to watch a video

heady quiver
#

he has grids and spawns AI and when he is out of it it despawns.

#

its 20 sec

#

x)

#

only the beginning

little raptor
#
_pos = getPosWorld _unit;
_pos resize 2;
_gridPos = _pos apply {round (_x/500)};

that's literally it 🤷

the actual pos is:

_worldPos = _gridPos vectorMultiply 500;
heady quiver
#

🤔

#

This is some magic shit for me

#

So...

#

How would something like that work with the nearestObjects then

little raptor
#

📝

heady quiver
#

Yea im not really good with pos things

#

always confuses the shit outta me

little raptor
heady quiver
#

But it would certainly help

#

x)

little raptor
#

like I said, just draw it on a piece of paper

assume each grid side is 500 m
let's say a player is at [2458, 3612]
when I do that, I get:
_gridPos = [5, 7];
_worldPos = [2500, 3500]
worldPos will only change once you move half side length (250 m) away from that worldpos (in either direction)

heady quiver
#

so lets say i got 1000

#
_pos = getPosWorld _unit;
_pos resize 2;
_gridPos = _pos apply {round (_x/1000)};
_worldPos = _gridPos vectorMultiply 1000;
#

this becomes 1000 yea

little raptor
#

😒

heady quiver
little raptor
#

when you put 1000 what do you expect?! of course yes

heady quiver
#

x)

still forum
still forum
heady quiver
#
    _pos = getPosWorld _unit;
    _pos resize 2;
    _gridPos = _pos apply {round (_x/1000)};
    _worldPos = _gridPos vectorMultiply 1000;

    //
    //private _newPos = setPosASL _worldPos;
    // 


    private _houses = nearestObjects [player, ["house"], 500];

how would this workout in initServer cuz 'player' would not be possible and _unit wouldnt work

little raptor
#

i said use the worldPos instead of player

heady quiver
#

no can do

#

_unit = nothing

little raptor
#

you have to loop (forEach)

#

thru all players

heady quiver
#

ah

little raptor
#

_unit = _x

heady quiver
#
private _headlessClients = entities "HeadlessClient_F";
private _humanPlayers = allPlayers - _headlessClients;

{
 // Code in here x_
} forEach allPlayers;
little raptor
#

also you only spawn the loot if the grid pos hasn't been used yet

heady quiver
#

yea well lets take it step by step x)

#

im still on this loop thingy

little raptor
#
_usedLootPos = createHashmap;
while {true} do {
sleep 5;
{
  _unit = _x;
  _pos = getPosWorld _unit;
  _pos resize 2; //make 2D
  _gridPos = _pos apply {round (_x/1000)}; //convert to grid pos
  if !(_usedLootPos getOrDefault [_gridPos, false]) then { //doesn't exist in hashmap
     _usedLootPos set [_gridPos, true]; //add to hashmap
     _worldPos = _gridPos vectorMultiply 1000;
     //spawn loot at _worldPos
  };
} forEach allPlayers;
};
#

this is the hashmap version of what I said

#

all you need is put it in a while loop

#

WITH sleep

heady quiver
#

Mmm

little raptor
#

also _usedLootPos = createHashmap should be outside the loop

#

(otherwise it keeps getting reset)

heady quiver
#

Dont laugh but i totally butchered it i think

little raptor
#

I guess it's fine

heady quiver
#

Problem is

little raptor
#

but I only took a brief look

heady quiver
#

undefined var _buildingLocation

little raptor
#

use _x buildingPos -1

heady quiver
#
            if !(_buildingLocation isEqualTo []) then {
#

its this

little raptor
#

just use what I said

#

instead of that function

#

you have to change it to:

_buildingLocation = _x buildingPos -1;
if !(_buildingLocation isEqualTo []) then {
  _buildingLocation = selectRandom _buildingLocation;
  ...
}
heady quiver
#

what does the -1 exactly?

#

Just to understand.

winter rose
#

gets all positions, iirc

winter rose
heady quiver
#

ah oke

#

so i got it working now without a sleep (got it while looped)

#

Where should i sleep it?

little raptor
heady quiver
#

only 5 seconds?

little raptor
#

no

#

you can make it more

#

that was the minimum I'd recommend

heady quiver
#

cool cool

little raptor
#

they don't have it

heady quiver
#

How could i make it possibile?

little raptor
#

define it for everyone

heady quiver
#

So just put it in the init 😄

#

seems to work

wispy lynx
#

How do I reference a trigger from script running inside the trigger?

_mapStructures = Map_Center nearObjects ["Building",(worldName call BIS_fnc_mapSize)];

{
_bldCenter = boundingCenter _x;

_realBldCenter = _x modelToWorld [(_bldCenter select 0),(_bldCenter select 1),(_bldCenter select 2)];

_mapBldTrig = createTrigger ["EmptyDetector",_realBldCenter];

_mapBldTrig setTriggerArea [1000,1000,0,false,1000];

_mapBldTrig setTriggerActivation ["ANYPLAYER","PRESENT",true];

_mapBldTrig setTriggerTimeout [0,0,0,true];

_mapBldTrigName = format ["MapBldTrig%1",_realBldCenter];

missionNamespace setVariable [str _mapBldTrigName,_mapBldTrig];

_mapBldTrigAct = format ["
    
    Null = [%1] execVM 'Map_Ai_Spawning.sqf';
    
    Null = [] spawn {
        
        sleep 7200;
        
        👉 ?WHAT GOES HERE? setVariable ["delay",true];
        
    };
    
    👉 ?WHAT GOES HERE? setVariable ["delay",false];
    
",str _mapBldTrigName];

_mapBldTrigDeact = format ["",str _mapBldTrigName];

_mapBldTrig setTriggerStatements ["this && (thisTrigger getVariable ["delay",true])",_mapBldTrigAct,_mapBldTrigDeact];

} forEach _mapStructures;

Thanks!

warm hedge
#

Check the pinned post please

#

thisTrigger is the magic variable to get the trigger itself in a trigger, though

wispy lynx
#

yes, but it doesn't seem to work outside of the setTriggerStatements. Then found statement about it not working in the scripting commands wiki

warm hedge
#

Not sure how do you do that

wispy lynx
#

k

#

did a bunch searching but have only found one example, which is what I've copied here.

warm hedge
#

script running inside the trigger?
Rephrase it: How do you run it?

wispy lynx
#

?

warm hedge
#

execVM or call or whatever, do you use any of them?

wispy lynx
#

Null = [] spawn {

warm hedge
#

Then put thisTrigger in the argument so you can use the trigger as a variable

little raptor
# wispy lynx Null = [] spawn {

this is completely wrong:

_mapBldTrigAct = format ["

        Null = [%1] execVM 'Map_Ai_Spawning.sqf';

        Null = [] spawn {

            sleep 7200;

            :point_right: ?WHAT GOES HERE? setVariable ["delay",true];

        };

        :point_right: ?WHAT GOES HERE? setVariable ["delay",false];

    ",str _mapBldTrigName];

warm hedge
#

I didn't even read the code ¯_(ツ)_/¯

little raptor
#

normally I wouldn't read it either (not without syntax highlighting)
but this was so obvious meowsweats

wispy lynx
#

okay, could you elaborate on what I'm doing wrong?

little raptor
#

_mapBldTrigName = format ["MapBldTrig%1",_realBldCenter];
is one
the second is #arma3_scripting message
and the quotes (the syntax highlighting already tells you what's wrong)
and I'm not sure what you're trying to do

wispy lynx
#

okay, yeah, forgot to change the quotes for being inside the statement. What am I doing wrong with "_mapBldTrigName = format ["MapBldTrig%1",_realBldCenter];"?

little raptor
#

does it sound like a name?!

#

_realBldCenter = _x modelToWorld [(_bldCenter select 0),(_bldCenter select 1),(_bldCenter select 2)];

#

that is wrong too

#

why didn't you just use _realBldCenter = _x modelToWorld _bldCenter?

wispy lynx
#

I was trying to get the center of the building (x,y, and Z), does modelToWorld do that automaticaly?

little raptor
#

center is simply getPosWorld (ASL)

warm hedge
#

[_bldCenter select 0,_bldCenter select 1,_bldCenter select 2] is literally the same with _bldCenter

wispy lynx
#

as for the name, I was trying to use it's position to create a unique name, so each trigger is identifiable?

little raptor
#

it would give something like:
MapBldTrig[3212.3213,9878,65.464]meowsweats

wispy lynx
#

"center is simply getPosWorld (ASL)" doesn't that return the "center" in x & y, but not z? I was trying to get height center as well with bounding center.

little raptor
#

I was trying to use it's position to create a unique name

#

you don't need a name

#

"this && (thisTrigger getVariable ["delay",true])
never works

wispy lynx
#

how would I reference the trigger's position for the script it runs? "Null = [%1] execVM 'Map_Ai_Spawning.sqf';"

warm hedge
#

%1 is something only for format

wispy lynx
#

that script is using the trigger as a location to setPos created unit

little raptor
#

and your solution was to create thousands of triggers?!

#

do you even know how badly it affects the performance?

wispy lynx
#

when I run "Null = [%1] execVM 'Map_Ai_Spawning.sqf';" without the %1, the script doesn't know where to place the unit.

#

the list of buildings is actually a list of only specific buildings, just didn't post that part here.

little raptor
#

why do you even use triggers?

wispy lynx
#

but yes, I have multiple triggers on the map

#

as you can tell by my scripting, I don't know how to do it differently, I'm trying to learn tho?

little raptor
#

so if I understand correctly, you want to spawn AI near some positions?

#

when the player gets close to those positions

wispy lynx
#

I have triggers that are placed on buildings at the begining of mission, when player enters area, ai units spawn and loot is created in the buildings. I'm trying to figure out how to "cooldown" the triggers for a time, so player doesn't keep activating the trigger for a period of time.

#

this is the script that runs at begining of mission.

little raptor
#

cool down is implemented like this:

something setVariable ["cooldowntime", time + _cooldownTime];
if (time > something getVariable ["cooldowntime", 0])
wispy lynx
#

okay, so how do I get the trigger to recognize "itself" as the "something" in the script it's running?

little raptor
#

thisTrigger

wispy lynx
#

Null = [] spawn {

        sleep 7200;

        👉 ?WHAT GOES HERE? setVariable ['delay',true];

    };

    👉 ?WHAT GOES HERE? setVariable ['delay',false];
little raptor
#

you don't need that anymore

wispy lynx
#

so use what you've shown in the conditions?

little raptor
#
_trigger setTriggerStatements ["this && {time > thisTrigger getVariable ['coolDownTime',0]}","thisTrigger setVariable ['coolDownTime',time + 7200];",""];
#

it probably won't check the condition every time (afaik only checks the moment you step onto the trigger)

#

so that is not a good idea anyway

#

(I mean triggers)

wispy lynx
#

okay, thank you very much, I'll test this out, and review my mangled code for better improvements! Again, thanks! 😀

#

btw, how do you post your code in that "square background" here?

little raptor
#

see the pinned messages

wispy lynx
#

k

#

ah, okay! not trying to spam the thread with gibberish.

#

and thanks for the getPosWorld reference. Just looked it up, and it's what I was trying to do.

little raptor
#

which may not be compatible with what you did before

wispy lynx
#

thanks, I'll read that.

night sundial
#

is it possible to change weapon textures using setObjectTexture, i've tried to no avail, but apparently it works on backpacks

night sundial
#

sorry i should have also added, is there ANY way to change a weapon texture

winter rose
#

yes, a mod - with the weapon author's permission

heady quiver
#

Hi, how do i spawn 1 NPC instead of a group (BIS_fnc_spawnGroup) ?

winter rose
leaden scaffold
#
[box, true] call ace_arsenal_fnc_initBox;
["ace_arsenal_displayClosed", {
  ["rearm", "SUCCEEDED"] call BIS_fnc_taskSetState;
}] call CBA_fnc_addEventHandler;

what i have doing wrong? i cant figure it out how CBA_fnc_addEventHandler is not calling

little raptor
leaden scaffold
little raptor
#

it's not that kind of event handler meowsweats

#

I think it's a scripted event handler

leaden scaffold
#

i was going search wrong thing for whole night seen to be cant solve

slow urchin
#

hey, I've borrowed the script from this page, but it's telling me that I'm not authorized even though I added myself to the IDs txt file. anyone able to help me out?

#

allowedIDs.txt```
//Fill the ARRAY with allowed UIDs - steam IDs
//Look something like "76566179256348507"
["76561198113700383", "76561198255862719"];

#

(Me and a friend, team-leader and zeus respectively)

leaden scaffold
little raptor
#

[QGVAR(displayClosed), []] call CBA_fnc_localEvent;

leaden scaffold
#

ok, let me try

little raptor
#

what I meant is that you're probably right

little raptor
leaden scaffold
#

still no luck, guess i will continue use my old trigger for stand close

slow urchin
#
//Look something like "76566179256348507"
[76561198113700383, 76561198255862719];
#

still kicks me out of the mission when I try to pick my zeus char

little raptor
#

it's hard to tell how this thing even works

#

that doesn't tell me anything

slow urchin
#

oh, I forgot to link the script lul

slow urchin
little raptor
#

allowedIDs.txt << this file gets placed in the folder where your servers Arma3.exe is

slow urchin
#


    Directory: C:\Users\maxma\Documents\Arma 3 - Other Profiles\[WO1]%20Max\mpmissions\Campaign-Training.hebontes


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         3/12/2021  10:34 AM            133 allowedIDs.txt
-a----         3/12/2021   9:48 AM            271 Description.ext
-a----         3/12/2021   9:48 AM            299 initPlayerLocal.sqf
-a----         3/12/2021   9:48 AM            196 initPlayerServer.sqf
-a----         3/12/2021   9:48 AM             67 initServer.sqf
-a----         3/12/2021  10:29 AM          18913 mission.sqm
slow urchin
little raptor
#

try running the game as admin

#

altho what you did should work too

#

allowed = call compile preprocessFileLineNumbers "allowedIDs.txt";

#

are you sure your uids are correct?

slow urchin
#

considering I copy/pasted it from my steam account page url, 99%

little raptor
#

try this in the game (MP game):
getPlayerUID player

slow urchin
slow urchin
#

DXGI error, interestingly.

little raptor
slow urchin
#

the debug console?

little raptor
#

why would it crash your game then?

#

did you launch an MP scenario?

#

go to eden, create an MP game, then try it

slow urchin
#

I locally executed it, I'm the only person in the Lan game

leaden scaffold
#

i know why, i need close the eden editor then save init.sqf, problem solved XDDD

slow urchin
little raptor
#

it shouldn't have crashed then

#

create an empty mission

#

with just a player

slow urchin
#

all I want is a live fire training ground that I can zeus in arma, is that so much to ask?

little raptor
slow urchin
#

finally

#

"76561198255862719"

#

yes, it's the correct ID.

smoky rune
#

Is there any SQF command to get current server player capacity while being in game?

still forum
#

capacity?

leaden scaffold
#

now this will work, finally solved it```sqf
[box, true] call ace_arsenal_fnc_initBox;

ARSENAL_DISPLAY_ID = ["ace_arsenal_displayClosed", {
["rearm", "SUCCEEDED"] call BIS_fnc_taskSetState;
["ace_arsenal_displayClosed", ARSENAL_DISPLAY_ID] call CBA_fnc_removeEventHandler;
}] call CBA_fnc_addEventHandler;

still forum
#

you mean how many empty slots the server has?

slow urchin
#

I think he means slots in total

smoky rune
#

I mean how many players are on server right now and maximum amount of players

#

something like (16/32) etc

still forum
#

how many players on right now
count players
maximum amount, no SQF command

little raptor
#

@slow urchin change initPlayerServer to this:

_player = _this select 0;
_uid = getPlayerUID _player;
diag_log str allowed;
diag_log str _player;
diag_log str (_player getVariable [ "reserved", false ]);
if ( _player getVariable [ "reserved", false ] && { !( _uid in allowed ) } ) then {
[ [], "fnc_reservedSlot", _player ] call BIS_fnc_MP;
};

check the rpt on the server, see what it gives you

smoky rune
#

yeah, it was quite obvious, didn't thought about that 😅
count players will count headless clients too?

still forum
#

headless clients are players too

little raptor
#

is there a players command?! meowfacepalm

smoky rune
#

BIS_fnc_listPlayers

slow urchin
#

oh, wonderful, it actually works

#

now, is there a way to make it so players spawn where I place them instead of respawning when the mission starts?

#

it's kind of annoying

smoky rune
#

i think it is some kind of wrapper around playableUnits

little raptor
little raptor
slow urchin
little raptor
#

I didn't change anything

#

I only added some diag_logs

#

for logging

#

which you should remove

slow urchin
#

well, it doesn't kick me out of the locked slots anymore

little raptor
#

you probably didn't copy the script correctly then

heady quiver
#

How do i make a spanwedGroup walk slow instead of running

little raptor
slow urchin
#
_player = _this select 0;
_uid = getPlayerUID _player;

if ( _player getVariable [ "reserved", false ] && { !( _uid in allowed ) } ) then {
[ [], "fnc_reservedSlot", _player ] call BIS_fnc_MP;
};
#

that's the content of initPlayerServer.sqf.bak

little raptor
#

@slow urchin if you don't believe me, use this:

_player = _this select 0;
_uid = getPlayerUID _player;

if ( _player getVariable [ "reserved", false ] && { !( _uid in allowed ) } ) then {
[ [], "fnc_reservedSlot", _player ] call BIS_fnc_MP;
};
tough abyss
#

I still cant get this to work any ideas ive tried every permutation of inticating the source file, its not throwing any errors its just not playing

if (isServer) then
{
    
    while {true} do
    {
        playSound3D ["Music1", Radio]; //i've tried "sounds\filename.wav" // "missionfolder\sounds\filename.wav" // yes i have a description.ext with a cfg sounds containig the relevent information
    };    

};```

description.ext
```sqf
class CfgSounds
{
    sounds[] = {};
     class music1
    {
        name = "music1";
        sound[] = {"sounds\Dirge .wav", 300, 1};
        titles[] = {0,""};
    };
};```
little raptor
slow urchin
#

I found the change

#

I accidentally duplicated the array in the IDs, so it was defined twice, and that worked for some reason?

little raptor
# slow urchin I found the change

Did you close the mission when you edited the IDs? I bet you didn't
you did it now and it worked

I accidentally duplicated the array in the IDs
that's fine
duplicating won't have any effect (except for making the code run slower)

heady quiver
#

Hey guys does anyone know how i can make the AI go into a patrol stance.

little raptor
#

patrol stance
?

heady quiver
#
// Spawn groupm
random_group_spawn = [_patrolStartPos, east, _list, [], [], [0.3, 0.5]] call BIS_fnc_spawnGroup;
random_group_spawn setBehaviour "AWARE";
random_group_spawn setCombatMode "WHITE";
random_group_spawn move (getPos _house);
#

Where they walk slow with the weapons down

#

towards X location.

little raptor
#

speed mode has to be LIMITED
behavior safe

heady quiver
#

ty

tough abyss
#

ok is is confused now sqf if (isServer) then { Radio #say3D ["music1",100]; };

error type : script expect array, object

winter rose
#

is radio defined?

tough abyss
#

yes radio is defined

little raptor
#

there is no type script

#

what is the full error?

#

also cfgMusic doesn't work with say3D

#

for that you need cfgSounds

tough abyss
#

its CFG sounds

#
class CfgSounds
{
    sounds[] = {};
     class music1
    {
        name = "music1";
        sound[] = {"sounds\Dirge.wav", 300, 1};
        titles[] = {0,""};
    };
};```
heady quiver
#
[_grp, 2] setWaypointLoiterRadius 200;
little raptor
#

that's not what's causing the error

heady quiver
#

Does this expect the spawned group or the marker 🤔 ?

little raptor
#

loiter is for helicopters and planes

#

and I'm not sure what you mean

tough abyss
#

error say3D: type script, expected array, object

little raptor
#

have you placed something like this in your codes?

radio = [] spawn ...
```or 
```sqf
radio = [] execVM ...
```?
tough abyss
#

where exactly? Radio is a radio i have placed in the editor Called aptly enough Radio

the script causing the error is being run from my init on mission start

little raptor
tough abyss
#

and this is the line in my init sqf radio = execVM "Radio.sqf"

little raptor
#

you're changing radio

#

it's no longer an object

#

it's a script handle

tough abyss
#

the only despite it being a different case

little raptor
#

sqf variables are not case sensitive

#

Radio = radio = RaDIO

tough abyss
#
radio1 = execVM "Radio.sqf"```
#

has fixed it

little raptor
#

there's no need for that anyway

#

unless you need the handle

tough abyss
#

[] = execVM will not work

little raptor
#

why do you think you have to put anything before execVM?

#
execVM "Radio.sqf"
#

a simple 0 = will work too

#

0 = execVM "Radio.sqf"

tough abyss
#

eh either way it works now finally

#

ok question its probably stupid but if i use the 'BIS_fnc_ambientAnimCombat' in a units init field will it be ok for multiplayer

#

or does it need to be run for each client ?

tough abyss
#

anyone

winter rose
#

anytwo

tough abyss
#

haha @winter rose but seriously

winter rose
#

animations are global, but don't use init fields in MP if you don't know what you are doing!

tough abyss
#

wasnt planing to use the init fields just wanted to know if they were global thanks

past wagon
still forum
#

Only one script can run at once

#

a script thats sleeping isn't running, its paused

past wagon
#

oh

#

that makes sense

spark turret
#

Thats why i need multi thread access, so i can run multiple scripts parallel and cause runtime issues instead of improving my scripts performance 👀

winter rose
#

Arma 3 + multithreading = Arma 4 😋 oh the perf gain

hot kernel
#
"C_van_02_transport_f" createVehicle position player

For some reason, starting today, this creates a boxy, low mip version of this vehicle. Only this vehicle. Placing the same vehicle in the editor the model is fine. Any ideas?

hallow mortar
#

tbh this doesn't really sound like a script issue, more of a "verify your game files" issue

winter rose
#

I second this opinion - game data or computer performance @hot kernel

hot kernel
#

@hallow mortar , @winter rose
Game files validated with no issue. Since I was in STEAM I launched the game using the launcher instead of the shortcut I usually use. It's fixed. Profile settings desynched or something, I dunno. Not a script issue for sure.

Thanks!

astral tendon
#

does anyone knows if there is a way to check when in task force radio some one changes the frequency? so far I had no luck and I am avoiding doing a check each frame.

spark turret
#

ping dedmen, he wrote TFAR

#

or ask on the TFAR discord

#

are there specific things i should know about data littering?
like, can i cause a RAM overflow by looping a script which creates a new variable which is created but never deleted?

#

or anything else i can do to improve performance and not spam obsolete data

astral tendon
#

none of they do what I need

winter rose
crimson walrus
spark turret
#

thanks guys

#
_i = 0;
while {true} do {
    _i = _i + 1;
    missionnameSpace setVariable ["varname" + str _i,"uwu",true];
};
crimson walrus
#

I assume your game crashed?

#

also, scheduled or unscheduled environment?

spark turret
#

i dont dare to test it out 😄

crimson walrus
#

haha, I'll try it.

spark turret
#

dont think scheduled allows while afaik

crimson walrus
#

there's a max loop limit in unscheduled environments, I think

#

scheduled and 'while' are fine

spark turret
#

iteration or time taken?

#

i think i once heard a 3ms think but idk

#

might have been unrelated

fickle quiver
#

hello, how could i do: if something is not in your inventory, then ...

spark turret
#

you can get specific items with special commands or just pull their whole inventory and search that.

fickle quiver
#

yeah, i want to check if a player has an specific item

spark turret
#

like something in his backpack?

fickle quiver
#

yep

#

could i say

#

_mags = magazines player;
if !("item" is in _mags) exitWith { ...

spark turret
#

yeah that works, assuming you have the items classname and compare it to the class of the entrys in the _mags array

winter rose
spark turret
#

good to know

fickle quiver
#

thats awesome !

#

tysm

spark turret
#

np

#

back from the bluescreen kevin?

crimson walrus
spark turret
#

ah how boring

#

have you spawned it in unscheduled?

winter rose
#

would schedule it

spark turret
#

then we obviously need to make the size of the var far bigger

#

save the whole logfile or something lol

crimson walrus
#

yeah, let it run to 1 million

winter rose
#

two whiles can do

little raptor
#

What are you trying to achieve? meowsweats

crimson walrus
#

That's a great question

spark turret
#

fried eggs on kevins computer

winter rose
#

arma bitcoin mining I guess

spark turret
#

or a housefire 🤷‍♂️

crimson walrus
#

no issues here.

little raptor
#

It probably crashes because the call stack grows so huge meowsweats

crimson walrus
#

Is recursion supported?

little raptor
#

Yes

dreamy kestrel
#

Can anyone clarify, attachTo recently received a followBoneRotation parameter, default is not indicated, but I assume, and "build mode" repositioning of objects would seem to indicate, default is true. Thanks...
https://community.bistudio.com/wiki/attachTo

little raptor
#

Default is false

dreamy kestrel
#

What would happen when that is false?

#

Contrasted with true.

little raptor
#

It won't follow the bone

dreamy kestrel
#

Right, but what is "follow the bone".

hallow mortar
#

animation bone

#

like an arm or a turret

dreamy kestrel
#

I'm a dummy concerning the question. The attached objects would just "stay there" ?

little raptor
#

E.g. if you attach it to the head, it won't rotate when the head turns (but it still changes its position and goes where the head goes)

dreamy kestrel
#

hmm okay. or "crates" attached to a spill bund, for instance.

little raptor
#

What's a spill bund?!

dreamy kestrel
#

ContainmentArea_02_sand_F or ContainmentArea_01_sand_F

winter rose
dreamy kestrel
#

right thank you @winter rose

hallow mortar
#

When things are attached without bone following, they're only attached to the "root" of an object, its "main body"

#

Bone following lets you attach things directly to an animated sub-part of the object

dreamy kestrel
#

hmm so the assumption is false. the default seems to behave like it was true, however.

little raptor
hallow mortar
#

Oh, that's right

dreamy kestrel
#

hmm I see.

#

so we're probably okay as long as we're attaching objects to the parent object

jagged relic
#

Hey, I'm fairly new at scripting things because I mainly just use Zeus and improvise things on the fly, but I think that this will execute setTarget.sqf globally, right?
' mazeLaptop addAction ["Set targets", {execVM "setTarget.sqf"}]; '

#

ah the code block isnt working

hushed tendon
#

Anyone able to give me an example script on changing the ammo of a gun? Like a turret firing autocannon rounds.

heady quiver
#

Hi guys how can i change the map icon for the task:

[west, ["task2"], ["Good luck finding this cookie", "Find Cookie", "cookiemarker2"], _housePosition, 1, 3, true] call BIS_fnc_taskCreate;
heady quiver
#

AH

#

ty ty

oblique mason
#

hey, I need some help I have 0 know how on how scripts work, basically I want a squad of AI troops to do endless push ups

#

I have this script I found

if ( isServer ) then{ [this, "AmovPercMstpSnonWnonDnon_exercisePushup"] remoteExecCall ["playMove", this, true];this addEventHandler ["AnimDone",{ params ["_unit", "_anim"];if ( _anim == "AmovPercMstpSnonWnonDnon_exercisePushup" ) then{ [_unit, " AmovPercMstpSnonWnonDnon_exercisePushup"] remoteExecCall ["playMove", _unit, true]; };}];};

#

which makes them do push ups, but not endlessly

distant oyster
# oblique mason I have this script I found `` if ( isServer ) then{ [this, "AmovPercMstpSnonW...

you have one extra space in your animation name and when checking for the animation name maybe compare the lower case version:

if ( isServer ) then{
     [this, "AmovPercMstpSnonWnonDnon_exercisePushup"] remoteExecCall ["playMove", this, true];
     this addEventHandler ["AnimDone",{
        params ["_unit", "_anim"];
        if ( toLower _anim == toLower "amovpercmstpsnonwnondnon_exercisepushup" ) then{
            [_unit, "AmovPercMstpSnonWnonDnon_exercisePushup"] remoteExecCall ["playMove", _unit, true];
        };
    }];
};
heady quiver
#

Guys, loiter with a radius means that the AI will 'LOITER' in that area right?

#
    // Spawn commander
    _commanderPos = [_housePosition, 15, 20, 0, 0, 20, 0] call BIS_fnc_findSafePos;
    randomCommanderSpawn = [_commanderPos, east, ['CUP_O_TK_INS_Commander'], [], [], [0.6, 0.9]] call BIS_fnc_spawnGroup;

    // Waypoints
    _wpCommander = randomCommanderSpawn addWaypoint [_housePosition, 0];
    _wpCommander setWaypointType "LOITER";
    [randomCommanderSpawn, 2] setWaypointLoiterType "CIRCLE";
    [randomCommanderSpawn, 2] setWaypointLoiterRadius 50;
    randomCommanderSpawn setSpeedMode "LIMITED";
    randomCommanderSpawn setBehaviour "SAFE";

This commander goes to the position and just stands there.

oblique mason
heady quiver
#

Anyone knows how these 3d markers (arrows pointing downwards) are called?

outer fjord
heady quiver
#

oh

#

Then no wonder it didnt work

#

x)

#

You know how to let hem like roam arround a certain pos ?

outer fjord
#

I know Seek and destroy sorta does it, but they will be in combat mode. I swear there was a BIS_Function some were that does it...

#

I could be wrong about SnD though, might be worth a try.

heady quiver
#

🤔

#

well i could use get 2 random pos between the main poss and cycle them

hallow mortar
distant oyster
#

hm maybe resetting their pos each time:

if ( isServer ) then{
     [this, "AmovPercMstpSnonWnonDnon_exercisePushup"] remoteExecCall ["playMove", this, true];
     this setVariable ["TAG_originalPosition", getPos this];
     this addEventHandler ["AnimDone",{
        params ["_unit", "_anim"];
        if ( toLower _anim == toLower "amovpercmstpsnonwnondnon_exercisepushup" ) then{
            [_unit, "AmovPercMstpSnonWnonDnon_exercisePushup"] remoteExecCall ["playMove", _unit, true];
            _unit setPos (_unit getVariable ["TAG_originalPosition", getPos _unit]);
        };
    }];
};
stable wedge
#

What are the steps needed to have a document (ace intel folder) be picked up by a player, which triggers a set task state, which completes the task and runs some code (make ind and west friendly to each other?)

#

I have all the parts, I'm having trouble connecting it all together

#

Intel folder > sync to set task > sync to task > sync to a game logic?

oblique mason
heady quiver
#

Anyone still awake to help me 😄 ?

#

I wanna use this:

addMissionEventHandler ["EntityKilled", {
    params ["_unit", "_killer", "_instigator", "_useEffects"];
}];

To check if this vehicle is destroyed

_objective = createVehicle ['O_Truck_02_Ammo_F', _markerPosition, [], 0, "CAN_COLLIDE"];

🤔

hallow mortar
#

Why not add a regular Killed EH to the vehicle when you create it?

heady quiver
#

How would i do that?

hallow mortar
#
[_objective,["Killed", {
    params ["_unit", "_killer", "_instigator", "_useEffects"];
    // code to execute when thing is killed
  }]] remoteExec ["addEventHandler",0,_objective];```
heady quiver
#

is it Killed or EntityKilled

hallow mortar
#

I said what I meant

heady quiver
#

ah so whats the difference between Killed and KilledEntity ?

#

EnityKilled*

#

AY is works tho.

hallow mortar
#

EntityKilled is a Mission Event Handler, as you might guess from the command addMissionEventHandler. It's added to the entire mission and fires whenever any entity is killed.

#

Killed is a specific event handler and only triggers when the specific objects you add it to are killed.

heady quiver
#

ah

#

Thanks man

quasi sedge
#

full client.sqf https://pastebin.com/XuFz4DGR

        if (  GVAR(CMarkerTagChannelVisibility) == MTAG_ALWAYS_ON ||
            ( !GVAR(CMarkerTagNameVisibilityTemporaryOn) && GVAR(CMarkerTagChannelVisibility) == MTAG_ON ) ||
            ( GVAR(CMarkerTagNameVisibilityTemporaryOn) && GVAR(CMarkerTagChannelVisibility) == MTAG_OFF )
             ) then
        {
            
            if (d_restr_enable_freeze) then {
                if (_mar select 12 == 1) then {
                    _text = (GVAR(CMarkerChannelToChar) select MAR_CHAN(_mar)) + " " + _text;
                } else
                {
                    _text = ((_mar select 11) select 0) + " " + _text;
                };
            } else {
                _text = (GVAR(CMarkerChannelToChar) select MAR_CHAN(_mar)) + " " + _text;
            };
        };
#

This error spamming .rpt
over 9000 times of this:

22:24:42 Error position: <select 12 == 1) then {
_text = (amm_CMar>
22:24:42 Error Zero divisor
22:24:42 File xx\addons\d_map_adv_markers\client.sqf..., line 135
22:24:42 Error in expression <(d_restr_enable_freeze) then {
if (_mar select 12 == 1) then {
_text = (amm_CMar>
heady quiver
#

@hallow mortar

// Objective Event Handler (check if alive)
[_objective,["Killed", { params ["_unit", "_killer", "_instigator", "_useEffects"];
    [_taskName, "SUCCEEDED"] call BIS_fnc_taskSetState;
}]] remoteExec ["addEventHandler",0,_objective];

How can i make _taskName accessible?

#

Its a empty string now cuz its not in the EH

hallow mortar
#

When you set up the task to begin with, you gave it a string name. Use that string, not _taskName

heady quiver
#
_taskName = format['task_%1', round(random 9999)];
toxic flare
#

Hello, i dont understand my error, it's possible to help me ?

_varName = ;
_array pushBack [_varName,];
} forEach ("true" configClasses (miss>
 0:57:33   Error position: <];
} forEach ("true" configClasses (miss>
 0:57:33   Error Missing [
 0:57:33 File \AFL_Client\AFL_Base\AFL_Session\fn_updatePartial.sqf [SOCK_fnc_updatePartial]..., line 79```
hallow mortar
heady quiver
#

Yea i know..

#

But thats the problem atm

#

x)

#

i was still looking for a better way.

hallow mortar
#

I don't really have time to redesign this for you. But for the moment, the stopgap fix is to make _taskName a global variable (with a unique name) so that it's accessible by the EH. Any variable starting with _ is a local variable only accessible in the current scope.

heady quiver
#

ty

#

that fixed it.

hallow mortar
# toxic flare https://pastebin.com/fJHBQYXC

It's hard to troubleshoot this because it's part of a larger framework of interconnected files and mission elements. The error seems to indicate a problem with the config retrieval part, but without knowing what the script is actually looking for or what is in missionConfigFile >> "Licenses" it's impossible to say what the problem really is.

#

You're probably best off trying to get in contact with the original author.

heady quiver
#

Nikko you know anything about limiting a forEach loop to 5 times?

still forum
#

if (_forEachIndex bigger than 4) then {break;} ?

heady quiver
#

ty

stable wedge
#

What are the steps needed to have a document (ace intel folder) be picked up by a player, which triggers a set task state, which completes the task and runs some code (make ind and west friendly to each other?)
I have all the parts, I'm having trouble connecting it all together
Intel folder > sync to set task > sync to task > sync to a game logic?

worn obsidian
#

Need a script to turn an RHS MI-8s MGs into M134s from RHS blackhawks

#

Rlly simple

#

Just don't know the Cfgs

#

Preferably the MI-8 with 4 MGs

#

MI-8 SA or SH model, whatever it's called again

worn obsidian
stable wedge
#

Thank you, I've been looking but everyone names it something differently

worn obsidian
#

There u go

#

Np

#

There are better ways to do it

stable wedge
#

LOL that first frame of the video

worn obsidian
#

But that way works

#

Yeah xD

past wagon
#
private _weaponArray = [["hgun_ACPC2_F", "9Rnd_45ACP_Mag", ["hgun_ACPC2_F", "9Rnd_45ACP_Mag"], ["hgun_ACPC2_F", "9Rnd_45ACP_Mag"], ["SMG_03C_TR_black", "50Rnd_570x28_SMG_03"], ["SMG_03C_TR_black", "50Rnd_570x28_SMG_03"], ["arifle_AK12_F", "30Rnd_762x39_AK12_Mag_F"], ["arifle_AKM_F", "30Rnd_762x39_Mag_F"], ["    arifle_AKS_F", "30Rnd_545x39_Mag_F"], ["arifle_AKS_F", "30Rnd_545x39_Mag_F"], ["arifle_Katiba_F", "30Rnd_65x39_caseless_green"], ["sgun_HunterShotgun_01_F", "2Rnd_12Gauge_Slug"], ["srifle_DMR_03_F", "20Rnd_762x51_Mag"], ["srifle_EBR_F", "20Rnd_762x51_Mag"], ["arifle_Mk20_F", "30Rnd_556x45_Stanag"], ["arifle_Mk20_F", "30Rnd_556x45_Stanag"], ["arifle_MX_Black_F", "30Rnd_65x39_caseless_black_mag"], ["arifle_MXM_Black_F", "30Rnd_65x39_caseless_black_mag"], ["hgun_P07_blk_F", "16Rnd_9x21_Mag"], ["hgun_P07_blk_F", "16Rnd_9x21_Mag"], ["hgun_P07_blk_F", "16Rnd_9x21_Mag"], ["hgun_PDW2000_F", "30Rnd_9x21_Mag"], ["hgun_PDW2000_F", "30Rnd_9x21_Mag"], ["hgun_Pistol_01_F", "10Rnd_9x21_Mag"], ["hgun_Pistol_01_F", "10Rnd_9x21_Mag"], ["hgun_Pistol_01_F", "10Rnd_9x21_Mag"], ["SMG_05_F", "30Rnd_9x21_Mag_SMG_02"], ["SMG_05_F", "30Rnd_9x21_Mag_SMG_02"], ["hgun_Rook40_F", "16Rnd_9x21_Mag"], ["hgun_Rook40_F", "16Rnd_9x21_Mag"], ["hgun_Rook40_F", "16Rnd_9x21_Mag"], ["arifle_SDAR_F", "20Rnd_556x45_UW_mag"], ["arifle_SDAR_F", "20Rnd_556x45_UW_mag"], ["arifle_SPAR_01_blk_F", "30Rnd_556x45_Stanag"], ["arifle_SPAR_01_blk_F", "30Rnd_556x45_Stanag"], ["arifle_SPAR_03_blk_F", "20Rnd_762x51_Mag"], ["SMG_02_F", "30Rnd_9x21_Mag_SMG_02"], ["SMG_02_F", "30Rnd_9x21_Mag_SMG_02"], ["arifle_TRG21_F", "30Rnd_556x45_Stanag"], ["arifle_TRG21_F", "30Rnd_556x45_Stanag"], ["SMG_01_F", "30Rnd_45ACP_Mag_SMG_01"], ["SMG_01_F", "30Rnd_45ACP_Mag_SMG_01"], ["hgun_Pistol_heavy_02_F", "6Rnd_45ACP_Cylinder"], ["hgun_Pistol_heavy_02_F", "6Rnd_45ACP_Cylinder"], ["hgun_Pistol_heavy_02_F", "6Rnd_45ACP_Cylinder"]];
#
private _itemArray = ["30Rnd_45ACP_Mag_SMG_01", "30Rnd_45ACP_Mag_SMG_01", "6Rnd_45ACP_Cylinder", "6Rnd_45ACP_Cylinder", "6Rnd_45ACP_Cylinder", "9Rnd_45ACP_Mag", "9Rnd_45ACP_Mag", "9Rnd_45ACP_Mag", "2Rnd_12Gauge_Slug", "30Rnd_545x39_Mag_F", "30Rnd_545x39_Mag_F", "20Rnd_556x45_UW_mag", "20Rnd_556x45_UW_mag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "50Rnd_570x28_SMG_03", "50Rnd_570x28_SMG_03", "30Rnd_65x39_caseless_black_mag", "30Rnd_65x39_caseless_black_mag", "30Rnd_65x39_caseless_green", "20Rnd_762x51_Mag", "20Rnd_762x51_Mag", "20Rnd_762x51_Mag", "30Rnd_762x39_Mag_F", "30Rnd_762x39_AK12_Mag_F", "16Rnd_9x21_Mag", "16Rnd_9x21_Mag", "16Rnd_9x21_Mag", "16Rnd_9x21_Mag", "16Rnd_9x21_Mag", "16Rnd_9x21_Mag", "30Rnd_9x21_Mag", "30Rnd_9x21_Mag", "30Rnd_9x21_Mag_SMG_02", "30Rnd_9x21_Mag_SMG_02", "30Rnd_9x21_Mag_SMG_02", "30Rnd_9x21_Mag_SMG_02", "optic_Aco", "optic_ACO_grn", "optic_Arco_blk_F", "Binocular", "Binocular", "Binocular", "FirstAidKit", "FirstAidKit", "FirstAidKit", "FirstAidKit", "FirstAidKit", "FirstAidKit", "FirstAidKit", "optic_Hamr", "optic_MRCO", "optic_Holosight_blk_F", "HandGrenade", "HandGrenade", "HandGrenade", "HandGrenade", "SmokeShell", "SmokeShell", "SmokeShell", "SmokeShell", "muzzle_snds_H", "muzzle_snds_L", "muzzle_snds_M", "muzzle_snds_B", "muzzle_snds_acp", "B_CivilianBackpack_01_Everyday_Black_F", "B_CivilianBackpack_01_Everyday_Black_F", "B_CivilianBackpack_01_Everyday_Black_F", "B_CivilianBackpack_01_Everyday_Black_F", "V_PlateCarrier1_blk", "V_PlateCarrier1_blk", "V_PlateCarrier1_blk", "V_PlateCarrierSpec_blk", "B_ViperHarness_blk_f", "B_ViperHarness_blk_f", "U_B_FullGhillie_ard", "U_B_FullGhillie_sard"];
#

I get an error somewhere in there

#

missing ]

#

it says line 21

#

but it also says private _itemArray = ["30Rnd_45ACP_Ma...

wide prairie
#

Looks like you are missing one there

past wagon
#

oh

#

thanks

#

i was just confused because it seemed like it was telling me 2 different places

warm hedge
#

You better to break line for every each elements not to do such a simple issue

past wagon
#

yeah

warm hedge
#
_a = [
  [0,1],
  [2,3],
  [4,5,
  [6,7]
];

Spot the issue! 😉

past wagon
#

yeah

#

according to arma 3, arifle_AKS_F does not exist

#

its giving me an error message at the start of the game, and the boxes that are supposed to contain them just contain this weird blank space thingy

crude vigil
#

well, I would say this: " arifle_AKS_F" doesnt exist as well...

crude vigil
#

yep, I dont see 3 or 4 spaces there

#

check your weaponarray

past wagon
#

oh shit

crude vigil
#

¯_(ツ)_/¯

past wagon
#

ohhh

#

i didnt see it because the way i had it in my code, the " was on the end of a line and the arifle_aks_f was on the next line

toxic dirge
#

is it possible to setPos without it affecting vertical?

little raptor
little raptor
little raptor
wind hedge
#
player nearEntities [["CAManBase", "Dog_Base_F", "Goat_Base_F", "Sheep_random_F", "LandVehicle", "Helicopter", "Boat_F"], 120] select {((getPosWorld vehicle _x) select 2 < 50) && (abs speed _x < 50)}; ``` gives me an "type any, expected number error"
little raptor
#

nothing in here gives you that error

#

what did you just change?

#

one of those variables was giving the error

wind hedge
#

You are right, Just fixed it, thanks!

wind hedge
#
[] spawn { _closestTarget = objNull;
 [player] call vZombieSense; _closestTarget};
 ``` the result of this spawn is always objNull even then the fnc vZombieSense gives a clear unit.
#

How can I make use that the spawn gets the result of the fnc being called in the middle, because currently it seems not to wait for the end result

little raptor
#

spawn doesn't return anything (it returns script handle to the spawn)

little raptor
wind hedge
#

Well I tried to explain it without posting the whole nine yards but here:

#

The spawn is because I need to have sleeps in there

#
vZombieSense = {
    params ["_zombie"];
    if (isNil "sunLight") then {
        [] spawn vZombieSunLight;
    };
    private _nearTargets = [];
    private _selectedTargets = [];
    private _closestTarget = objNull;
    _zCheckRangeMult = vZombieRangeMult;
    _zCheckRange = ((60 + sunLight) min 120) * _zCheckRangeMult;
    _nearTargets = _zombie nearEntities [["CAManBase", "Dog_Base_F", "Goat_Base_F", "Sheep_random_F", "LandVehicle", "Helicopter", "Boat_F"], _zCheckRange] select {((getPosWorld vehicle _x) select 2 < 50) && (abs speed _x < 50) && (_x != _zombie)};
    if (_nearTargets isNotEqualTo []) then {
        {
            _nT = _x;
            if ((isNil {_x getVariable "vIsZombie"}) && {!((crew _nT) findif {alive _x && !(isObjectHidden _x)} isEqualTo -1)}) then {
                if ([_zombie, _x, -3] call BIS_fnc_isInFrontOf) then {
                    _visibility = ( [[objNull, "IFIRE"] checkVisibility [eyePos _zombie, getposASL _x],2] select (_x isFlashlightOn (currentWeapon _x) || isLightOn _x) ) * _zCheckRangeMult;
                    if (_visibility > 0) then {
                        _chance = (_visibility + abs(velocity _x # 0) + abs(velocity _x # 1) + (((eyepos _x) # 2) - ((getposASL _x) # 2)) + (((100 - (_zombie distance _x)) max 0)*0.1)) * ((sunLight*0.01) max 0.1);
                        if (random _chance > 1) then {
                            0 = _selectedTargets pushBack _x;
                        };                    
                    };
                };
            };
        } count _nearTargets;
    };
    
    if (_selectedTargets isNotEqualTo []) then {
        private _sortedTargets = [];
        _sortedTargets = [_selectedTargets,[],{_x distance _zombie},"ASCEND"] call BIS_fnc_sortBy;
        _closestTarget = _sortedTargets select 0;        
    };
    _closestTarget
};
little raptor
#

if you need return from something, it makes no sense to spawn it

#

even if it has sleep in it

wind hedge
#

nooo, wait

#

vZombieSense returns the _closestTarget just fine... it is AGENT XXX

#

then I need to bring that result to the vZombieBrain spawn

little raptor
#

again, you don't need spawn

wind hedge
#
vZombieBrain = {
    params ["_zombie"];
    
    if (isNil "sunLight") then {
        [] spawn vZombieSunLight;
    };
    
    while {alive _zombie} do {
        if (diag_fps > 15) then {
            if (vZombieBrainActive) then {
                _closestTarget = objNull;
                [_zombie] call vZombieSense;
                systemChat format ["Closest Target %1", _closestTarget];
                if !(isNull _closestTarget) then {
                    if !(simulationEnabled _zombie) then {[_zombie] call vZombieEnableMovement;};
                    if !(isPlayer _closestTarget) then {_nTarget reveal [_zombie, 2];};
#

That is the first half of the spawn

#

see where I call vZombieSense;

#

the systemchat debug in the vZombieBrain Spawn returns objNull

#

it should return the result of the vZombieSense fnc which was AGENT XXX

#

I hope you get my question now... The spawn that is the "brain" of my zombie units that loops inside that while {alive _zombie}

#

requires the result of the vZombieSense fnc

little raptor
#

@wind hedge

currently it seems not to wait for the end result
if you want to wait for something, you have to call it

wind hedge
#

I am calling it!

dreamy kestrel
#

hello Q: working with CBA to create and manage namespaces, which are LOCATION in SQF terms.
can I treat them as objNull types, i.e. params [["_target", objNull. [objNull]]]?
or allow for different _target types? something like params [["_target", objNull. [locationNull, objNull]]]

little raptor
# wind hedge I am calling it!

then the problem is here:

if (_selectedTargets isNotEqualTo []) then {
private _sortedTargets = [];
_sortedTargets = [_selectedTargets,[],{_x distance _zombie},"ASCEND"] call BIS_fnc_sortBy;
_closestTarget = _sortedTargets select 0;
};

#

you never select a closest target

wind hedge
#

Yes, the select 0 is the closest target

little raptor
#

both support setVariable with the same features

little raptor
dreamy kestrel
#

@little raptor yes, of course. notwithstanding the argument constraint.

little raptor
#

the argument can now be either a location or an object

dreamy kestrel
#

great perfect. thanks for the clarification. 👍

quasi rover
#

Is there a script command that which Server's OS is running, Linux or Windows?

little raptor
#

no

#

@quasi rover but you can check commands that are not available on Linux

#

if it doesn't exist -> Linux server

#

I think rotorLib commands were not available on Linux

#

@quasi rover try this:

_isLinux = supportInfo "i:getRotorBrakeRTD" isEqualTo [];
_isWindows = !_isLinux;
solemn gorge
#

Hello everyone. Curious if anyone has fixed Jezzurro's "Warlords Redux" ammo reload issues. Before I dive in and look for the issue, I figured I'd ask because it's likely someone has already fixed it. Thanks for any tips! (plz @ me for attention)

little raptor
solemn gorge
#

It's a mission not a mod

little raptor
#

same difference

#

it's their intellectual property

solemn gorge
#

That's news to me, where does it say we can't fix mission bugs?

little raptor
solemn gorge
#

Jezuro is a BIS employee and stopped working on the mission.

quasi rover
#

thanks Leopard20, I checked it.

little raptor
wind hedge
#

The image shows both the FNC and the Spawn results as systemchats

quasi rover
#

yeap, on linux server, the return value, _isLinux is `false'.

wind hedge
#

The FNC is working great and the zombies get my player as the closestTarget...

#

but the spawn that calls the FNC doesn't get the FNC return for some reason

little raptor
quasi rover
#

it doesn't work? anyway the return value of _isLinux is false on Linux server.

little raptor
#

it should be true

solemn gorge
#

I search the #ip_rights_violations channel and the warlords topic was brought up...the answer was that it's not an IP Violation but rather an "OTHER" category. I then searched #other_ip_topics and references to Warlords edits were approved.

little raptor
solemn gorge
#

I need to know if anyone has scripted a fix for Warlords Redux

#

Jezuro left it broke, nothing rearms

little raptor
solemn gorge
#

It's superior to Warlords in many ways but the ammo thing is game breaking, hence why I'm asking here

wind hedge
#

I am such an idiot!

#

this was the final fix: _closestTarget = [_zombie] call vZombieSense;

wind hedge
#

😅

solemn gorge
#

alright, I'll poke else where....I'll dig around the mission and if I find the rearm code I'll post it here

#

Thanks

solemn gorge
#
if ((_asset getVariable "BIS_WL_nextRearm") <= WL_SYNCED_TIME) then {
                                    _curWeapon = currentWeapon _asset;
                                    {
                                        private _turret = _x;
                                        private _mags = (_asset getVariable "BIS_WL_defaultMagazines") # _forEachIndex;
                                        {
                                            _asset removeMagazineTurret [_x, _turret];
                                            _asset addMagazineTurret [_x, _turret];
                                        } forEach _mags;
                                    } forEach allTurrets _asset;
                                    _asset selectWeapon _curWeapon;
                                    _asset setVariable ["BIS_WL_nextRearm", WL_SYNCED_TIME + WL_MAINTENANCE_COOLDOWN_REARM];
                                    playSound3D ["A3\Sounds_F\sfx\UI\vehicles\Vehicle_Rearm.wss", _asset, FALSE, getPosASL _asset, 2, 1, 75];
                                    [toUpper localize "STR_A3_WL_popup_asset_rearmed"] spawn BIS_fnc_WL2_smoothText;
                                } else {
                                    playSound "AddItemFailed";
                                };

#

The issue has to be in there somewhere....players reported missing ammo/smoke/etc but no rearm after the timer hit 0

#

Anyone have an idea?

smoky rune
#

is there any way to return Engilsh, non-localized string from getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName")?

nimble hatch
#

good morning all i am from Germany whe hav a Altis Life Server 4.4r3 and whe have Problem with he weapons equipment
this is no longer active after the game update (2.02) our main admin is no longer so active because of real life but we have access rights to the main server (sorry for my bad english)

little raptor
smoky rune
#

it will return something like $STR_?

little raptor
#

yes

warm hedge
#

I don't think there's any direct “STR_brabra to specific language”, although some stupid and indirect workaround could achieve that IMO

smoky rune
#

maybe dedmen could answer if it is even possible to add something like localize ["STR_blabla", "English"] into the next a3 patch 🙏

smoky rune
#

thank you for raising this request 😅

spark turret
#

i got a bunch of local variables in my function, which i want to initialize as privates through my params command, but i dont want them to be accessible by the caller, (they re pure helper vars). can i do that by giving an empty array as expected datatypes <=> no input allowed?

little raptor
#
_a = 1;
call {
  private _a = 2;
};
_a //returns 1
spark turret
#

no i meant, i want to initialize them in the same params command as my input variables, without having them accessible

#

params["input1",input2,local1,local2]

#

and lock local1 and local2 from outside

little raptor
#

I'm not sure if I understand

#

can you show an example?

spark turret
#
params [
    ["_crate",objNull,[objNull]],  //input 1
    ["_clone",objNull,[objNull]],  //input 2
    ["myLocalVariable",objNull,[]] //shouldnt be overwritten by a third, unwanted input given, just be initialized as null.
];
little raptor
tough abyss
#

is there any way to enable the squad AI radio messages in multiplayer

spark turret
little raptor
#

@spark turret you can also "skip" parameters:

params ["_var1", "", "_var3"];
little raptor
spark turret
#

oh that i like

#

ill do that thanks

little raptor
spark turret
#

yeah thats fine, i dont have any functions running on a loop where it would matter

little raptor
#

@spark turret also you can just skip putting private behind every variable if you just define an array of privates:

private ["_var1", "_var2", "_var3"];
spark turret
#

yeah that is good too

little raptor
#

(still not sure what you want to do) notlikemeow

spark turret
#

exactly what you wrote on the last line

#

initialize as bunch of privates as null or nil, i just thought the shortest way is to put it in params

little raptor
#

they already talk in MP!

tough abyss
#

yeah but i mean like the readable verison that happens in multiplayer

#

man 200 meters left

little raptor
#

It's already enabled by default 🤷
Or do you mean you want to reenable it? (like when it's disabled by a mod, mission, etc.)

tough abyss
#

no in MP the ai will say the radio protocol but it will not display a text version in botom left like sp this isnt a problem for Us forces cause the speak english but trying to understand what spetznass foces say in mp is harld less you speak russian

spark turret
#

they do if you are in the same squad, at least for me

#

dont know about same side

tough abyss
#

they dont for me mabey its a playable units thing idk

little raptor
#

some mods can turn those off

#

are you using mods?

#

like ACE?

tough abyss
#

but my 4 man fire team all playable, will say their lines but dont show a text response at all, makes it hard to understand the callouts when their in freaking russian

only a map and drongo simple factions

#

and i checked the callouts work in sp

#

i will get the text version of what was said in bottom left

little raptor
#

it could be a bug
I know there were some changes to the group chat messages in v2.02

#

Maybe that's responsible

tough abyss
#

im a try turning them off playable and check

#

see if thats causing it

little raptor
#

could be

tough abyss
#

cause it be nice to know if my russian buddy is telling me "man 200 meters left" or "TANK 200 meters left"

ivory lake
#

the subtitles rely on the radio item

#

so if you dont have itemradio or some mod is messing with it, it could be causing the issue

tough abyss
#

they have a radio they are literaly straight from the editor

little raptor
#

so it could be a different issue

ivory lake
#

Yeah I was thinking maybe something like tfar which turns the radio into another item might do it but I can't remember if it has a dummy itemradio like acre

tough abyss
#

hmmmm okkkkkay its working now in mp same mods loaded

#

strange wasnt working last night

#

oh well thanks for the help

spark turret
#

The golden rule is: as soon as you ask for help, the problem vanishes

cosmic lichen
spark turret
#

is there a fast and easy way to define a bunch of respawn inventories availalbe to the player?
ideally i would like to collect all loadouts of the playable units and make them availalbe to the player on respawn.

cosmic lichen
#

Either use the script provided on the Arma 3: Respawn page

#

or use 3den Enhanced and export the loadout of the selected unit

spark turret
#

sorry, i dont see the function, can you point me to it?

cosmic lichen
spark turret
#

ah thats what i wanted thanks revo

cosmic lichen
#

That one @little raptor

cosmic lichen
spark turret
#

❤️

tough abyss
#

wish the vanilla flash lights were a bit more powerful NVG's are ok but a good night mission with just flash lights and moonlight are fun

#

want the contact DLC lighting in base arma 3

little raptor
#

you just play the mission when the moon is the brightest

#

try utils 3

#

in debug console

tough abyss
#

, nah pretty sure ive messed around in the editor with contact only the nights are significantly brighter compared to a3, especialy on nights that arnt full moon. base unless its full moon you dont see jack, contact you can still see ok even at half moon

spark turret
#

okay so i have CfgRespawnInventories defined with 4 classes, respawnTemplates is set to MenuInventory and now i have to make all defined loadouts available to side west ?

#

in the initServer or where do i do that?

spark turret
#

yeah that worke

copper narwhal
#

Apologies if in the wrong channel, but could someone kindly explain how to do what is in the following forum post link : https://native-network.net/forum/thread/11738-loading-screen-script/ ```c++
class RscStandardDisplay;
class RscDisplayStart: RscStandardDisplay
{
class controls
{
class LoadingStart: RscControlsGroup
{
class controls
{
class Logo: RscPictureKeepAspect
{
text="\mv_data\ui\logo.paa";
onLoad="";
};
};
};
};
};

It is as simple as creating a config.cpp file with that code inside (creating a random logo.paa picture) then converting it with the addon builder, Adding it to a folder like @Mod then running it on my client?
tough abyss
#

is there a way to make a script not select the same value in an array when using selectRandom

sleek token
#

Remove value from array

tough abyss
#

how do i do that

crimson walrus
#

_randomItem = _myArray deleteAt (floor (random (count _myArray)))?

worn obsidian
#

Need a script to change RHS MI-8AMT's Machine-guns to GAU-8s (vanilla or rhs any is fine)

tough abyss
#

soo would this work ```sqf
if (isServer) then
{
_allpositions = nearestBuilding _gGroup buildingPos -1;
_randomItem = _allpositions deleteAt (floor (random (count _allpositions)));

_gGroup = [getPos aPosition, east, 5] call BIS_fnc_spawnGroup;


{_x setPos (selectRandom _allpositions); disableAI "MOVE"; _ramdomItem} forEach units _gGroup;

};```

winter rose
crimson walrus
#

{_x setPos (selectRandom _allpositions); disableAI "MOVE"; } forEach units _gGroup;
Should be
{_x setPos _ramdomItem; disableAI "MOVE";} forEach units _gGroup;

tough abyss
#

ah cool so it pulls the position from the array and then removes it from the array so the next time it runs through for each that position wont be there anymore

crimson walrus
#

oh

#

hold on a moment, I assume you want all the units in different positions

tough abyss
#

yeah i dont want to spawn 2 units on the same position

crimson walrus
#

One more thing to worry about is what happens if there are more units in the group than positions in the building

tough abyss
#

true

#

thanks for the help kevin

heady quiver
#

Hi guys, if i put this: playSound "cp_mission_accomplished_1"; in the initServer.sqf does that mean it will play for everyone?

tough abyss
#

hmm getting an error ```sqf
if (isServer) then
{
_allpositions = nearestBuilding _gGroup buildingPos -1;
_gGroup = [getPos aPosition, independent, 5] call BIS_fnc_spawnGroup;

{
     _randomPos = _allpositions deleteAt (floor (random (count _allpositions)));
    _x setPos _randomPos; disableAI #"MOVE";
}; forEach units _gGroup;

};```
missing ;

copper narwhal
#

Maybe after , 5] ?

#

Maybe it should be Independent, 5]; call?

tough abyss
#

just tried nope

#

the # mark is where arma says the error is

heady quiver
#

whats #