#arma3_scripting

1 messages ยท Page 290 of 1

little eagle
#

less than toLower

#

no, I want to be able to read them ...

cedar kindle
#

isn't B_Soldier_LAT_F as readable as b_soldier_lat_f
most of them are already snake cased just some uppercase mixed in

#

or actually there's a lot of mixes nvm

little eagle
#

stringIn
stringFind

#

strIn
strFind

#

idk

finite silo
#

How would you guys rate SQF as a scripting language? Is it better than Lua? Worse?

jade abyss
#

Yes.

tame portal
#

I agree with @jade abyss

still forum
#

I would prefer Lua

halcyon crypt
#

it doesn't matter what one prefers... A3 is SQF, deal with it ๐Ÿ˜›

meager granite
#

SQF is alright

#

mess with commands, random naming, useless commands, lack of essential commands is the problem

jade abyss
#

Yep. It's easy, once you understood the basics.

meager granite
#

That's why you never ever use setPos

#

No issues with setPosATL\ASL

#

\World

#

hm

#

does modelToWorld work on simple object?

#

World indeed uses model center

#

As for ASL I think it uses land contact points

#

We really could use a command to return these

#

Also a command to return surface level, the one setPos\getPos uses

#

Well, I don't think I can influence it much

#

Here is crazy idea, make a library of placing points offsets in profileNamespace

#

if there isn't one, create normal object, then fine offset, save it into profile namespace, create simple object

#

all next simple objects will get it off profile namespace

#

Just parse entire CfgVehicles at start and make model => class table

#

so you can use that for finding offset automaticall if there isn't one saved in profile namespace

#

just do it on start up

#

you wouldn't even notice it

#

Does getModelInfo always return .p3d?

#

I mean in the end of file path

#

Fuck it, gonna script it right now

tame portal
#

Inspector SaMatra is on the case

peak plover
#

Why does my dialogue close after opening only the first time I open it createdialog "mydialog";

meager granite
#
prepareModelPath = {
    _this = toLower _this;
    if(_this select [0,1] == "\") then {_this = _this select [1, 1e6];};
    if(_this find ".p3d" != count _this - 4) exitWith {_this + ".p3d"};
    _this;
};

initLookupTable = {
    lookupTableModels = [];
    lookupTableClasses = [];

    {
        _model = getText(_x >> "model") call prepareModelPath;
        if!(_model in lookupTableModels) then {
            lookupTableModels pushBack _model;
            lookupTableClasses pushBack configName _x;
        };
    } forEach ("getNumber(_x >> 'scope') > 0" configClasses (configFile >> "CfgVehicles"));
};

placingOffsetTableModels = profileNamespace getVariable ["placingOffsetTableModels", []];
placingOffsetTableVectors = profileNamespace getVariable ["placingOffsetTableVectors", []];

createSimpleObjectASL = {
    params ["_model", "_pos"];
    _model = _model call prepareModelPath;

    private _index = placingOffsetTableModels find _model;
    if(_index < 0) then {
        private _class_index = lookupTableModels find _model;
        if(_class_index < 0) exitWith {};

        private _object = (lookupTableClasses select _class_index) createVehicleLocal [0,0,0];
        _object setDir 0;

        _index = placingOffsetTableModels pushBack _model;
        placingOffsetTableVectors pushBack (getPosWorld _object vectorDiff getPosASL _object);

        deleteVehicle _object;
    };

    if(_index >= 0) then {
        _pos = _pos vectorAdd (placingOffsetTableVectors select _index);
    };
    
    createSimpleObject [_model, _pos]
};
#

here you go

#

had some issues with \ in the beginning of model path

#

saveProfileNamespace whenever you like

queen cargo
meager granite
#
deleteVehicle test; test = ["a3\armor_f_gamma\mbt_02\mbt_02_arty_f.p3d", ATLtoASL(player modelToWorld [0, 10, 0])] call createSimpleObjectASL; test

for quick tests

queen cargo
#

got no arma on this computer and that wont change till next week sadly :/

meager granite
#

Yes it works

still forum
#

If you have 5 min @queen cargo Ahh me too late

queen cargo
#

ty @meager granite

#

still thx @still forum ๐Ÿ˜›

meager granite
#

It works fine, I just tested it

#

Call initLookupTable on start up, then createSimpleObjectASL when needed.

#

Feel free to post it on forums, I am too lazy.

#

During the session, it does the first time you create new model path

#

otherwise it pulls it from profile namespace array

#

All you need is to call initLookupTable during init somewhere

#

and then just use the createVehicleLocalASL whenever you want

#

there is setDir 0 for this reason

#

for maps that have slope in [0,0,0]

#

Or they can like you know add scripting command for it

#

instead of this trickery

#

<array> = placingPoint <entity>

peak plover
#

My dialog says that it's missing the CT_TREE.colorPicture

#

Why?

#

colorPicture is not defined anywhere, and in the template it does not give me that error

jade abyss
#

add

colorPicture[] = {1,1,1,1};```
to it
#

(ListBox, right?)

peak plover
#

ohh, okay there we go thanks.

#

Dialogs are fun, but they are difficult. Just like math

plucky beacon
#

5*7="directory mission/rscText.font not found"

jade abyss
#

font= "RobotoCondensed";

peak plover
#

How can I use the treeview to select some data?

#

apparently setValue can only be a intriger

rotund cypress
#

Hey guys, I have this sqf evh = (findDisplay 46) displayAddEventHandler [ "KeyDown", "if ( _this select 1 in ( actionKeys 'Fire' ) ) then { hint 'yes'; }"]; to show a hint every time I fire, unfortunately its not doing anything. Any thoughts on why it wouldn't`?

young current
#

its supposed to pick whatever key is bound to the fire action, not necessarily mouse button?

austere granite
#
[6:19 PM] nigel: How can I use the treeview to select some data?
[6:19 PM] nigel: apparently setValue can only be a intriger

@peak plover the most common way is creating an array, then using setValue / setData as an index in that array

young current
#

though it probalby does not pick mouse button with keydown so add another to check the mouse button

rotund cypress
#

But it should be checking any key connceted to that action

#

which can be defined in normal settings

#

So there shouldn't really be any problem in my eyes

young current
#

yes but its for keyboard keys. mouse button has different event than the keydown

peak plover
#

Thanks. This seems to be a good solution

rotund cypress
#

ah so you mean add onMouseButtonClick evh?

young current
#

yes

#

or the buttondown one probably works too

#

and might be better if your firing on full auto

#

you cant overwrite the fire action though

#

it will still do that

jade abyss
#

afaik there is no Mouse EH

tough abyss
#

Where can i get the Bis Variables? Is there a list? Thank you

young current
jade abyss
#

Are you sure, this works with Mouse Input?

young current
#

i've tied remote turret firing on mouse with this

jade abyss
#

Do you have a quick example?

young current
#

I had to scrap it though as it does not overwrite the default action (fire)

jade abyss
#

Ah! Doesn't overwrite! That was the Prob.

young current
#

yes

jade abyss
#

Yeah, i remember again

young current
#

๐Ÿ˜ญ

rotund cypress
#

So there is no way you can overwrite a mouse button action?

#

To return that it's been handled

#

and not let you fire

young current
#

as far as I got no.

#

Im happy to be proven wrong

tough abyss
#

Take on Mars have 16 square kilometers maps! How could Arma 3 run on it?

young current
#

?

rotund cypress
#

I'm doing this, don't even getting a hint sqf VAR_onMouseButtonClick_EVH = ( findDisplay 46 ) displayAddEventHandler [ "MouseButtonClick", { hint "no"; }];

jade abyss
#

on

little eagle
#

@rotund cypress actionKeys and all related commands are unusable, because the id system BI uses exceeds the precission of the floats SQF uses as NUMBER type.
If you want to show a hint every time you fire, you have to use a fired eventhandler

rotund cypress
#

The problem is this: I want to remove the projectile, did that wit onFired eventhandler

#

Although

#

For some reason, when I shoot someone really close

#

It doesnt remove the bullet

#

When I shoot longer ranges

#

it deletes the bullet

little eagle
#

What was the code?

rotund cypress
#

Onfired?

little eagle
#

yeah

jade abyss
#

SimZor, that commands must be executed on ClientSide

#

Means -> The one who fires needs to have the onFired EH attached to him

#

Then it gets deleted properly

little eagle
#

It won't solve your issue either. Someone could just rebind firing to a keyboard key

jade abyss
#

Thats the other thing

little eagle
#

What do you really want to achieve? Stop people from firing?

rotund cypress
#

Yes

#

When a variable is set

jade abyss
#

safezone?

rotund cypress
#

No it's not for a safezone

austere granite
#

you can do defaultAction

#

which i bet commy is typing out now

little eagle
#

There is a way. Wait.

#

lol yeah

rotund cypress
#
player addEventHandler [ "Fired", { 

    private _projectile = _this select 6;

    if ( ZOR_Weapons_DisableFire ) then {
        deleteVehicle _projectile;
    };
    
}];```
#

Doesnt delete the projectile fast enough

rotund cypress
#

Ah nice

little eagle
#
Mytag_allowShooting = false;

player addAction ["", {hint "hi"}, [], -99, false, false, "DefaultAction", "!Mytag_allowShooting"];
young current
#

Oh that could be useful

little eagle
#

You still have to delete grenades I think tho. It used to work with "Throw", but BI broke it.

rotund cypress
#

So

#

What does the -99 do?

little eagle
#

put it very low on the list of actions, so it doesn't interfere with the action menu.

rotund cypress
#

Ah ok

little eagle
#

You'd think they made actual API for that and not just have a dirty way around. Oh well.

jade abyss
#
player addEventHandler ["Fired",                    {call MyTag_fnc_Handle_Fired;} ];
MyTag_fnc_Handle_Fired =
{
    _Player = _this select 0;
    _Projectile = _this select 6;

    if( VarABC )then
    {
        deleteVehicle _Projectile;
    };

Worked flawlessly

rotund cypress
#

If you stand right next to a wall aswell?

jade abyss
#

Yes

little eagle
#

The fired eh executes one frame after you shoot. Maybe they already did some projectile traveling simulation and hit detection at that point.

#

Never heard of that though.

jade abyss
#

I was standing with a buddy, right next to eachother, Guns inside our heads (mk200) -> emptied our Clips -> Both still alive

little eagle
#

MP?

jade abyss
#

My BUDDY and me were in SP, simulating our movements in the Editor

#

ffs, Commy... cmon

#

Of course MP ^^

little eagle
#

Buddy could refer to an AI, dude

jade abyss
#

Then i would have said AI ๐Ÿ˜„

#

I wouldn't call an AI a buddy.

little eagle
#

I don't live in your mind.

jade abyss
#

Be glad

sly mortar
#

How lonely would you need to be to start calling the AI "my buddy".

little eagle
#

Just put him on your side and not on opfor

grand berry
#

Anyone heard/ seen anymore about this?

still forum
#

yes

grand berry
#

Thanks haha ๐Ÿ˜ƒ

#

No but it's still interesting to see stuff going on in BIS

peak plover
#

Variable does not support serialization and should not be stored in missionnamespace

#

what??

rancid ruin
#

sounds like you're doing stuff with UI

#

if you want to refer to a display/dialog/ctrl using a variable then use uinamespace

jade abyss
#

disableSerialization;
Do UI stuff

rancid ruin
#

or that yea

peak plover
#

I want to onTreeSelChanged = "_this call fnc_selectSpawn; false";

#

But it does not #work

rancid ruin
#

maybe post the whole script and not a tiny fragment

peak plover
#

okay

jade abyss
#

Answer was already given oO

Dscha - Today at 7:27 PM
disableSerialization;
Do UI stuff```
Translated:
Add ` disableSerialization; ` to the first lines of your ` fnc_selectSpawn `
peak plover
#

Thanks this seems to work.

peak plover
#

'''SQF

#
_CT_INS_TREE tvSetValue [[_teammates],0];
_debugval1 = _CT_INS_TREE tvValue [_teammates];
#

Later on it returns 28

#
params ["_idc","_path"];
_value = _idc tvValue _path;
systemChat (str _value + str _path);
#

28

#

wtf

#

well 28[1]

#

Feels like tvSetValue is reset?

dusk sage
#

What is the value of _teammates?

peak plover
#

1

dusk sage
#

hm, are you sure?

peak plover
#

yup. The dialog displays fine

#

Just the value for the selections is not working

dusk sage
#

And _idc is?

jade abyss
#

a local Var.

#

Your welcome. afk again.

peak plover
#

AAaaah

#

'lemme just give this a go

dusk sage
#

D:

peak plover
#

_idc is 450

#

wait

#

systemChat (str _idc); //#control 450

#
onTreeSelChanged = "_this call {
params ["_idc","_path"];
systemChat (str _idc);
_value = _idc tvValue _path;
systemChat (str _value + str _path);
_spawnUnit = insurgency_respawn_spawnList select _value;
mapAnimAdd [1, 0.1,(getpos _spawnUnit)];
mapAnimCommit;
}; false";
#

This is what it is. the IDC is same

#

but

dusk sage
#

escape your quotations

peak plover
#

That's just copy so you can see. It's actually onTreeSelChanged = "_this call BRM_insurgency_respawn_fnc_selectSpawn; false"

dusk sage
#

ah

jade abyss
#

onTreeSelChanged = "_this call {
params ["_idc","_path"];

==
Error

#

Change the " to ' inside the " "

#

e.g.
["_idc" -> ['_idc'

dusk sage
#

You tired today @jade abyss :D?

jade abyss
#

?

#

(not tired, but hungry, waiting for food -.- )

dusk sage
#

Read what I first said, then he said ๐Ÿ˜„

jade abyss
#

didn't scrolled down^^

#

Bad habbit

dusk sage
#

๐Ÿ˜›

peak plover
#

Hmm, maybe it's something to do with where I define the tvValues

#
private ["_groups"];
#include "defines.hpp"
_display = _this select 0;
_CT_STATIC = _display displayctrl 420;
_CT_BUTTON = _display displayctrl 421;
_CT_BUTTON2 = _display displayctrl 422;
_CT_INS_TREE = _display displayctrl 450;
_CT_MAP = _display displayctrl 470;


//insurgency_respawn_spawnList
insurgency_respawn_spawnList = [player];
_bases = _CT_INS_TREE tvAdd [[],"BASES"];
_CT_INS_TREE tvSetValue [[_bases],0];
_bases_main = _CT_INS_TREE tvAdd [[_bases],"MAIN BASE"];
_CT_INS_TREE tvSetValue [[_bases_main],(count insurgency_respawn_spawnList)];
insurgency_respawn_spawnList pushBack main_base;
if (!isNil 'fob') then {
    _bases_fob = _CT_INS_TREE tvAdd [[_bases],"FOB"];
    _CT_INS_TREE tvSetValue [[_bases_fob],(count insurgency_respawn_spawnList)];
    insurgency_respawn_spawnList pushBack fob_base;
};
_teammates = _CT_INS_TREE tvAdd [[],"TEAMMATES"];
_CT_INS_TREE tvSetValue [[_teammates],0];
_debugval1 = _CT_INS_TREE tvValue [_teammates];
systemChat ("create = " + str _CT_INS_TREE);
_groups = [];
{
    if (side _x == side player && (count units _x) > 0 && !((count units _x isEqualTo 1) && (player in units _x))) then {
        _groups pushBackUnique _x;
    };
    true
}count allGroups;

{
    _addGroup = _CT_INS_TREE tvAdd [[_teammates],groupId _x];
    _CT_INS_TREE tvSetValue [[_addGroup],0];
    {
        if (alive _x && !(_x isEqualTo player)) then {
            _unit = _CT_INS_TREE tvAdd [[_teammates,_addGroup],name _x];
            _CT_INS_TREE tvSetValue [[_unit],(count insurgency_respawn_spawnList)];
            insurgency_respawn_spawnList pushBack _x;
            true
        };
    }count units _x;
    true
}count _groups;
jade abyss
#

Try:

systemChat (str _this);``` first.
#

Before your call for your script, btw.

peak plover
#

systemChat (str _this); // [Control #450,[1]]

jade abyss
#

executed in onTreeSelChanged or inside the Script?

peak plover
#

both

jade abyss
#

Gesundheit

peak plover
#

I'm currently wondering, if maybe, just maybe, my use of tvSetValue is wrong, but it seems to return the correct value inside the script. but when called later by the dialog, it won't get the correct value

shadow sapphire
#

I can't find the damn command to spawn vehicles. Isn't there a spawnvehicle command? I am not looking for createvehicle. I'm looking for the other one, if it exists and I'm not confused.

tough abyss
shadow sapphire
#

@tough abyss, that's it! Thanks!

peak plover
#

ohh, figured out my problem

#
_CT_INS_TREE tvSetValue [[_teammates,_addGroup],0];

instead of

_CT_INS_TREE tvSetValue [[_addGroup],0];
#

It was not working correctly and overwriting the original values

#

_addGroup = _CT_INS_TREE tvAdd [[_teammates],groupId _x]; does not have the full destnation

little eagle
#

count is so ugly

pulsar fog
#

hmm what would be an effective way to remove holdaction from other clients while one is in the "progress" phase?

little eagle
#

from other clients??

peak plover
#

have a variable that you check for having that holdaction availabe

pulsar fog
#

hmm

little eagle
#

Yeah. Ideally every client is responsible for it's own holdaction thing

#

Sounds to me like another one of these cases, where you rather should simply set the condition to false instead of removing the action.

pulsar fog
#

the holdactions are tied to AI units that are spawned dynamically so i always have trouble figuring out how to refer to things, it'd be simple if it was a specific named unit

#

but is there a way to use remoteexec so that i runs on all players except the specific one?

#

*it

peak plover
#

Aah

#

check it out

tender fossil
#

Is it possible to create clickable hyperlink in game?

peak plover
#

check

_canHold = _unit getVariable ["my_unitHeld",false];

When holding beginns

_unit setVariable ["my_unitHeld",true,true];
dusk sage
#

Yep

pulsar fog
#

thanks

#

I've never used set/getVariable so these things are kinda new to me

peak plover
#

They are AWESOME

tender fossil
#

@dusk sage Did you reply to me?

dusk sage
#

@tender fossil href it

tender fossil
#

Aight, thanks

little eagle
#

setVariable \ getVariable really is the bread and butter of anything more advanced in SQF

#

Too bad it's such a clumsy syntax.

dusk sage
#

And the default is always evaluated

#

That is incredibly annoying

little eagle
#

Yeah. Better off using the getVar STRING syntax and then if isNil

#

It's alright though.

dusk sage
#

To be fair, only seen it cause an issue once

little eagle
#

It's not THAT often that you have an expression as default value instead of simly objNull or -1 or ""

dusk sage
#

Only time I've seen is having name _x as the default, where _x at the time was some map object

#

Likes to spam the RPT

little eagle
#

That fucking command is so annoying

#

It even spams the RPT if you use it on a unit that was just created a few frames before.

dusk sage
#

or a dead one

spring ravine
#
  1. RPT output
15:56:29 "[Display #6600]"
15:56:29 "<spawn>"```

2) RscDispayMain onLoad code
```disableSerialization;
params["_display"];
['onLoad',_this,'RscDisplayMain','GUI'] call (uinamespace getvariable 'BIS_fnc_initDisplay');
{
    _x ctrlShow false;
    true;
} count allControls _display;
createDialog "DS_MainMenu";```

3) DS_MainMenu onLoad code
```//new thread needed for animation sleeps
diag_log "What the flappery Fuck";
diag_log str(_this);
_var = _this spawn {
    diag_log "DS_MainMenu init";
    disableserialization;
    params["_display"];
    private _btn1 = _display displayCtrl 5;
    private _btn2 = _display displayCtrl 6;
    private _btn3 = _display displayCtrl 7;
    private _btn4 = _display displayCtrl 8;
    private _btn5 = _display displayCtrl 9;
    private _txtHeader = _display displayCtrl 10;
    private _txtSubtitle = _display displayCtrl 11;
    // -- Animate buttons
    {
        private _oldPos = ctrlPosition _x;
        _x ctrlShow false;
        _x ctrlSetFade 1;
        _x ctrlSetPosition [(_oldPos select 0) - 0.2, _oldPos select 1, _oldPos select 2, _oldPos select 3];
        _x ctrlCommit 0;
        _x ctrlShow true;

        _x ctrlSetPosition _oldPos;
        _x ctrlSetFade 0;
        _x ctrlCommit 0.3;
        sleep 0.05;
    } forEach [_btn1, _btn2, _btn3, _btn4, _btn5, _txtHeader, _txtSubtitle];
};
diag_log str(_var);```
Problem: The code within _this spawn in DS_MainMenu onLoad code is not running
Proof of problem: 
1) There is no reason diag_log "DS_MainMenu init"; would not output unless there was an error
2) There is no error in the rpt
3) the rpt output of str(_var) proves that the thread is started                                                                     P.S. This code is meant to override the arma 3 main menu if you couldn't tell.
dusk sage
#

oh lord

little eagle
#

What the flappery Fuck

#

xD

#

Is this for the main menu as in the games main menu?

dusk sage
#

The fact it's diag_logging str(_this) but not the first line of your spawn, is odd

spring ravine
#

yes

little eagle
#

I had this problem too. You cannot spawn any threads onLoad in the main menu

dusk sage
#

zzz

little eagle
#

Probably too soon for the game to recognize that.

#

I don't know any workaround either.

spring ravine
#

๐Ÿ˜ฉ

#

Thanks for the tip

little eagle
#

ffff

#

flappery

#

giggle

rotund cypress
#

Hey guys, does anyone know what addons PBO HPP's are stored in? For the example RscDisplayDebugPublic?

still forum
#

Can you please ask that again. Don't understand

little eagle
#

That sentence is missing a verb.

rotund cypress
#

There? ^

native hemlock
#

It's not in any HPP

still forum
#

I don't know what you mean by addons PBO HPP. In every PBO there can be a HPP. And what is the reference to RscDisplayDebugPublic? That is a config class

rotund cypress
#

No, but that class needs to be somewhere. Do you know where it is?

native hemlock
#

News flash, dialogs don't need to be in HPPs

rotund cypress
#

I know

#

But

native hemlock
#

a3\ui_f\config.cpp

ionic orchid
#

Maybe just wants to know where to put a display class definition

#

in which case, in the mission (in my case)

rotund cypress
#

Hhaah

ionic orchid
#

specifically description.ext

#

I have an #include there that points to a file that I have the classes defined in

rotund cypress
#

All I wanted to know, is where the ArmA dialogs are, that are not community made

ionic orchid
#

ahh, yeah I wondered that too

#

but in the end didn't need them so never found out

jade abyss
#

@rotund cypress You should write down, what you want. Mindreading is (probably) not invented yet.

rotund cypress
#

Sorry for not explaining good enough bois

jade abyss
#

Bow down and praise us. At the same time: Beg for forgivness.

rotund cypress
#

๐Ÿคฃ

jade abyss
#

YOU THINK I AM MOTHERHUGGING JOKING???

ionic orchid
#

there's some stuff in this folder you might find useful (or your equivalent)...
C:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\Binarize\bin

jade abyss
#

๐Ÿ˜„

native hemlock
#

What I would recommend is extracting everything onto your P drive, and then searching through it with notepad++ or another capable text editor

jade abyss
#

grepWin

ionic orchid
#

^--

#

that man is wise

jade abyss
#

I know. I am the best.

jade abyss
#

@tough abyss Stop posting that in every motherhugging Channel...

#

If someone has an answer, he will answer you. Stop trying to force it, just have patience and wait.

#

OR: GOOGLE

halcyon crypt
#

and what might "anti nss" be?

still forum
#

NSS Admin console. Who doesn't have time to formulate a real request also doesn't have time to read an answer. So why bother

halcyon crypt
#

not even sure how NSS could be a problem that requires some "anti" thing ยฏ_(ใƒ„)_/ยฏ

still forum
#

It can execute scripts. So can any other Mod put together in 5 minutes

delicate lotus
#

Is there a way to change the mission name in the mp mission selector?

still forum
#

Yes. But I don't know how

halcyon crypt
#

yeah but isn't that what signatures are for? ๐Ÿ˜›

still forum
#

exactly. But some people apparently don't know a dime about what they are doing

#

I think in the mission attributes you can define a displayName. I'm not a mission maker.. #arma3_scenario @delicate lotus

delicate lotus
#

Already tried that

#

still shows the file name

halcyon crypt
#

there is a menu for that in the eden editor

delicate lotus
#

lolz

still forum
#

Else description.ext But that is also integrated into eden now

plush cargo
#

๐Ÿ˜ƒ just figured out you can stream live cam to a gui using r2t and rscVideo

plush cargo
#

yeah, not sure how the live video from an outside source works, a bit beyond me. I did see a vid on that life mod though. Think a problem was they had to wait until the video buffered for everyone on the server so it took a minutes before the vid would start.

#

Also just saw url = ""; in RscActivePicture not sure how that works yet gonna try rn

#

Quality is kind of shit. Canging pip quality does nothing, this is as big as I can make it while still being able to see http://i.imgur.com/MTjsc5C.png

rancid ruin
#

it's possible to get the quality higher, i managed it before, playing with FOV or something

#

problem is, disabling pip in your options menu makes all your work pointless

#

so i never used pip to ctrl in the end

plush cargo
#

yeah, I'm gonna use isPipEnabled to let the player know to turn it on. Only good if I can get it to look better though, will try messing with fov

spark phoenix
#

@little eagle So i did a workaround for the mainscreen ui.

instead of using a thread i changed the ctrlCommit timer based on the sleep timer.

so i was using something like this

{
    _x ctrlCommit 0.2;
    uiSleep 0.05;
} forEach _ctrlList;

and now use

{
    _x ctrlCommit (0.2 + (0.05 * _forEachIndex));
} forEach _ctrlList;
#

You could attempt something like onEachFrame with a ticker, but idk how accurate it would be or if it would even work

old basin
#

Is there any way to enable BI revive by script? I can't find any commands or functions that affect it in the BIki. I would like to primarily use ACE Medical, falling back on BI Revive if the mod is not present

tough abyss
old basin
#

I didn't know you could make mission config settings conditional on a mod being present, how would I do that?

pulsar fog
#

in multiplayer, does it work if grouping/animation commands for AI units are run by some client or should the commands always be run on the machine that handles the AI units (i.e. usually the server) ?

little eagle
#

Probably on the machine that owns the AI.

proven crystal
#

when i call a script through a unit init, that script will be executed server sided is it?

#

if not, how would i make sure of that?

rancid ruin
#

i believe commy's last answer also applies to you to...it'd be executed on whichever machine owns the unit

cedar kindle
#

@proven crystal if (!isServer) exitWith {}; at the top of the script

proven crystal
#

ok so what im trying to do is call a script from the unit ini. its a custom respawn for ai, that stores a bit of data, so id like to keep that on the server rather than players

#
nul = [this] remoteExec ["fez\fez_ai_respawn.sqf", 2];```
cedar kindle
#

that would remoteExec for every machine that joins

#

not very good

proven crystal
#

crap

cedar kindle
#

just do a normal execvm and put what i posted above in it

#

unit init runs for everyone

proven crystal
#

ah so it would run for everyone but just exit when its not the server

#

alright

tough abyss
#

how to start running a trigger only if all opfor in trigger radius is dead?

civic maple
#
{
    side _x == EAST && alive _x;
} count thisList == 0;
tough abyss
#

thanks!

peak plover
#

I've got an array of units. I want to find the nearest unit to the player

#

Any "clean" way of doing so?

#

I've only got some dirty ideas

arctic igloo
#

foreach and distance?

#

i mean you can use nearestobject unless you really want to use that array

peak plover
#

Okay, but it feels dirty

{
    _distance = _x distance player;
    if (_distance < _closestDistance) then {
        _closest = _x;
        _closestDistance = _distance;
    };
    true
} count _spawnableList;
arctic igloo
#

i mean of course there are many ways to do it

#

just get one that works

peak plover
#

Aah, I have a list of units that might be different every time

#

I want the bes

arctic igloo
#

i mean thats fine for what you want to do

#

nearestobjects could be really fast if the range is small

indigo snow
#

using CBA?
_nearestVeh = [player, vehicles] call CBA_fnc_getNearest

#

but yea their implementation is basicallty that

arctic igloo
#

i mean the way you have it is perfectly fine so id just stick with that

peak plover
#

Ohh, dude this CBA function rocks!

#

Sweeeeet

#

praise be

tough abyss
#

is there a way to add modules from a SQF?

little eagle
#

createVehicle?

#

call BIS_fnc_whateverTheModuleFunctionIs ?

arctic igloo
#

@indigo snow IIRC the cba function finds all within a circle right?

#

or am i thinking of something else

peak plover
#

A function used to find out the nearest entity parsed in an array to a position. Compares the distance between entityโ€™s in the parsed array.

little eagle
#
commy_fnc_nearest = {
    params ["_origin", "_objects"];

    private _distances = _objects apply {_x distanceSqr _origin};

    _objects select (_distances find selectMin _distances)
};
#

If you need it to be fast, this is the fastest you can get with SQF.

peak plover
#

Are you a wizard?

little eagle
#

You don't like it? ๐Ÿ˜ฆ

peak plover
#

On the contrary.

oblique spoke
#

๐Ÿ˜†

arctic igloo
#

oh yeah i was thinking of a different one

#

cba is so great

tough abyss
#

@little eagle createVehicle? call BIS_fnc_whateverTheModuleFunctionIs ?
means
createVehicle call BIS_fnc_modulefucntion

#

?

little eagle
#

If you don't look too closely into some parts.

#

No, adir. It depends on what module you're talking about.

arctic igloo
#

well of course it wont be perfect but its helpful

little eagle
#

What you wrote makes no sense.

tough abyss
#

then you probably should explain yourself abit better because there's a reason why I asked

little eagle
#

It's impossible to say more without knowing what module.

#

You can create it via createVehicle or just call the modules functions

#

Which one exactly... you never said.

tough abyss
#

it's the sling load module

polar folio
#

worth a read. i think the module UI settings are saved on the module via setvariable. not sure if you need to do that manually

little eagle
#

ModuleSlingload_F

#

bis_fnc_moduleSlingload

#

damn DLC

#

sllingloading was heli DLC?

jade abyss
#

Yep

little eagle
#

no results for fnc_moduleSlingload.sqf ๐Ÿ˜ฆ

#

oops

jade abyss
#

Maybe they defined it as a Var again
moduleSlingload = {};

little eagle
#

fn_moduleSlingload.sqf

#

found it

jade abyss
#

Yeah, FN ^^

little eagle
#

Yeah, it iterates over synchronizedobjects of the module

jade abyss
#

folder?

little eagle
#

modules_f_heli

#

in Heli

jade abyss
#

got it, thx

#

in misc, not Heli ๐Ÿ˜‰

little eagle
#

So I guess one would use this?

private _module = "ModuleSlingload_F" createVehicle [0,0,0];
_module synchronizeObjectsAdd [unit1, unit2, unit3];
#

Never tried that.

#

Or do you have to use createUnit on modules. Can't remember

jade abyss
#

Erm, maybe?

little eagle
#

idk

still forum
#

Would you guys consider it a bug if a function call without arguments for ex safezoneW is the same as a variable lookup?
Let's visualize a script run of call myVariable in the engine

//call
this is a call instruction. I know that. This was already evaluated at compiletime
//myVariable
This may be a variable or a function
if it starts with _ it is a local variable -> return the variable
To prevent variables from overriding functions check if this is a Variable
if getVariable myVariable == Nil then
  Check if myVariable is a function. and call and return the function result
return getVariable myVariable 

So actually because of a old bug that Commy informed me about getVariable is called twice. So this is what the game does when myVariable is a variable

it's not a local Variable so check for global
getVariable myVariable //It is not Nil so we don't check if it's a function
getVariable myVariable and return that.

Let's see what it does when we call safeZoneW

Does it start with _ ? no it doesn't.
getVariable safeZoneW -> Nil //It's not a variable so let's check if it's a function
checkIfFunction safeZoneW //Yes it is a function
call safeZoneW and return result.

So actually for every nular or Variable in script the game call's getVariable twice. If it would evaluate at compile time if it was a function it wouldn't need to do all that at every execution. I think this could be a moderate boost to script performance

This perf problem can be circumvented by using local variables where possible.
https://feedback.bistudio.com/T123419

chilly hull
#

Is there any way to tell if arma detects an extension? I have a mod that's calling an extension, but the extension doesn't seem to respond.

still forum
#

Attach a debugger and see if the dll is loaded.

tough abyss
#

Have the extension return a string ?
Newer rc/dev builds have rpt output if the extension wasn't loaded / found

rotund cypress
#

Hey guys, if I had a listbox with all players in it, and I wanted to make a search function, would I have to make a RscEdit and then make a function for filtering the listbox?

still forum
#

The Rpt logs the extension name when it's loaded. With something like "can't get version"

hot crypt
#

is there a way to apply a texture to for instance a sign whilst being in a multiplayer server and I have admin rights and using ARES? ( code excecute thingy)

tough abyss
#

@still forum rc builds now complain it can't find extension

#

i assume it occurs when it can't load extension. but i never bothered to test it

still forum
#

dedem? wow ๐Ÿ˜„

tough abyss
#

blah ๐Ÿ˜›

steep matrix
#

does createVehicle not work for backpacks?

jade abyss
#

Yep

#

Its an Item

steep matrix
#

what to do? its been some years i was into sqf ..

jade abyss
#

create GWH, then add it via addItem (or Weapon, not sure)

#
_a = "GroundWeaponHolder" createVehicle [0,0,0];
_a addItem "BackPackClassName"; //OR AddWeapon 
steep matrix
#

tx

plucky beacon
#

is there a way to get an Rsc layer above a diolag?

jade abyss
#

iirc they are always in the BG

plucky beacon
#

pbtbtbtbtb

#

so do I have to make a new diolag for a text notification?

#

I could add a text box to each interface and change the text in it. Just was wondering if there was a better way :P

#

I'll think it over lunch

round scroll
#

anyone got an idea why playSound3D might have stopped working? playSound3D ["\JDG_carrier\sounds\elevator.ogg", _elevator, false, getPosASL _elevator, 20, 1, 300];

#

I called it with player instead of _elevator from the debug console, no joy. Though the elevator sound plays back with say3D.

delicate lotus
#

Im trying to create a moving respawn point but It is not moving.
What am I doing wrong?

respawn_west_move setMarkerPos getpos (leader pgroup);
hintSilent "test";
sleep 3;
};

(code is excuted in a script which is called from a trigger by using execVM)
There is also always a error message which says that there is no marker named respawn_west_move but I placed one and gave it the exact name.

round scroll
#

maybe put quotes around "respawn_west_move"

plucky beacon
#

all markers have to be referenced as a string

delicate lotus
#

oh...

plucky beacon
#

common mistake

jade abyss
#

โ˜ yep

delicate lotus
#

yes its working now

#

thanks ^^

plucky beacon
#

notification after entering something from another diolag

    disableSerialization;
    closeDialog 0;
    _handle=createdialog "info";
    _string= format ["Time limit set to %1 seconds",Timer_Length];
        ctrlSetText [9009,(parseText format ["%1",_string])];
class info
{
    idd=115;
    movingenable=false;
    
    class controls
    {
        class info_frame: RlcFrame
        {
            idc = 9006;
            x = 0.314375 * safezoneW + safezoneX;
            y = 0.115 * safezoneH + safezoneY;
            w = 0.37125 * safezoneW;
            h = 0.088 * safezoneH;
        };
        class info_back: IGUIBack
        {
            idc = 9007;
            x = 0.314375 * safezoneW + safezoneX;
            y = 0.115 * safezoneH + safezoneY;
            w = 0.37125 * safezoneW;
            h = 0.088 * safezoneH;
        };
        class info_button: RlcButton
        {
            idc = 9008;
            text = "OK"; //--- ToDo: Localize;
            x = 0.649531 * safezoneW + safezoneX;
            y = 0.137 * safezoneH + safezoneY;
            w = 0.0257812 * safezoneW;
            h = 0.044 * safezoneH;
            action = "closeDialog 0;";
        };
        class info_text: RscText
        {
            idc = 9009;
            text = "test"; //--- ToDo: Localize;
            x = 0.319531 * safezoneW + safezoneX;
            y = 0.126 * safezoneH + safezoneY;
            w = 0.319688 * safezoneW;
            h = 0.066 * safezoneH;
            sizeEx = 1 * GUI_GRID_H;
        };
    };
};
#

the diolag shows up but the settext isn't working

#

also that diplay thing and waituntil are just old

#

the timer_length and stuff happens from the button

jade abyss
#
waitUntil {!(isNull (findDisplay  115))};

-->>

   disableSerialization;
    closeDialog 0;
    _handle=createdialog "info";
waitUntil {!(isNull (findDisplay  115))};
//____
    _string= format ["Time limit set to %1 seconds",Timer_Length];
        ctrlSetText [9009, _string];
//OR
        ctrlSetText [9009, format ["Time limit set to %1 seconds",Timer_Length]];
ionic orchid
#

doesn't parseText return a StructuredText string

#

at least I need to do parseText "blah" before passing it to ctrlSetStructuredText

jade abyss
#

edited code above

plucky beacon
#

hmm okay

ionic orchid
#

โค double teamed

jade abyss
#

๐Ÿ˜‰

#

+You don't have to format format format everything ๐Ÿ˜„

#

I simplified it also

tough abyss
#

bbut but format...

#

๐Ÿ˜‹

plucky beacon
#

format the formatted formatting

jade abyss
#

formated format again

plucky beacon
#

reformat the formatting

jade abyss
#

edited the formated format before mat

plucky beacon
#

mat before for expect after parse

jade abyss
#

check the formated format again

#

Yes, Banana.

tough abyss
#

Anyone have a good example of sql_custom

#

Ini for extdb3

#

Also will help to know sql

#

yeah i have enough knowledge of it but have been having issues with exile and extdb3

plucky beacon
#

I can't figure out why this diolag is showing up no text at all

#

at first I thought ctrlSetText was justing messing with it, but not that I tested it, it doesn't even show the default text

jade abyss
#

check your .rpt

tough abyss
#

Converting exile from extDB2->extDB3 is relatively simple. Just the queries regarding inserting NULL Values are abit different.
Due to NULL Support in extDB3 i.e no need for inserting CUSTOM strings into the query.

jade abyss
#

@plucky beacon Try:

((findDisplay  115) displayCtrl 9009) ctrlSetText (format ["Time limit set to %1 seconds",Timer_Length]);

instead of
ctrlSetText [9009, "Text"];

plucky beacon
#
15:45:20 Sound: Error: File: ca\ui\data\sound\onover.wss not found !!!
15:45:20 Sound: Error: File: ca\ui\data\sound\new1.wss not found !!!
15:45:20 Sound: Error: File: ca\ui\data\sound\onclick.wss not found !!!
jade abyss
#

๐Ÿ˜‰ fix it

plucky beacon
#

ye

#
16:03:50 Error loading control R:\... ...\Permadeath.VR\description.ext/info/controls/info_text/
#

but wheeeereeee

#
        class info_text: RlcText
        {
            idc = 9009;
            text = "";
            x = 0.319531 * safezoneW + safezoneX;
            y = 0.126 * safezoneH + safezoneY;
            w = 0.319688 * safezoneW;
            h = 0.066 * safezoneH;
            sizeEx = 1 * GUI_GRID_H;
        };
#

do you need quotations for position?

#

I've seen it dont multiple ways

jade abyss
#

RlcText

#

RlcFrame, RlcButton

plucky beacon
#

the rest of the diolag is up there

#

but ya it's rlc because Rsc is taken by another diolag

#

but ya it's rlc because Rsc is taken by another diolag

jade abyss
#

iuignf9ughtn ??????

plucky beacon
#

lol

#

wat

#

I defined a diffrent set of diolags

jade abyss
#

^^
Tag_RscText <- the usual way, but yours also works ๐Ÿ˜„

ebon nymph
#

Anyone experienced with DrawIcon3D and compensating for distance and zoom? Doing some gamey stuff http://i.imgur.com/el7dSxA.png . I figured how to compensate offsets for the icon, but not able to get it done for the Text. Arma does some weird zooming and positioning based on distance and zoom.
The text wanders down the further away i get.

jade abyss
#

You mean reducing the text Size ?

ebon nymph
#

No, i can do that, but the text goes all the way "down". It's positioned at the soldiers head, but at 100m, ARMA seems to think the head is at it's ass.

#

I figured out a "formula" so the icon stays where its supposed to. But the Text gets handled different i think.

jade abyss
#

2.25 should be enough with variable Fontsize

ebon nymph
#

Thanks. Tried to compensate with textSize, but i think the only way is to adjust pos somehow. My guess is that worldToScreen (tried it with a control instead of drawIcon3D) is not very accurate. A head at 10 meters is accurate. At 100m the coordinates are way off.

jade abyss
#

I did it that way, and it worked like a charm. But try for yourself, maybe you find some other way =}

ebon nymph
#

Will play around again with that in mind. Thanks!

rancid ruin
#

@ebon nymph check killzone kid's website, i think he's got an example of exactly what you're trying to do

ebon nymph
#

I saw a video of him with a name tag thing.

chilly hull
#

Does anyone know when arma loads extensions? at server start, mission start or call time?

#

And I can call any extension file (I'm running linux so a .so file) in any @mod folder that is loaded?

rancid ruin
#

as soon as you run the game i'd guess

#

and yeah, at least with .dll it doesn't matter what @ folder it's in

little eagle
#

They're loaded at game start. You can use them at any time.

deft zealot
#

layerName cutText [text, type, speed, showOnMap]

can anyone confirm that showOnMap has no effect if this alternative syntax is used or do i have to specify a specific name?
if this is true then either the wiki is wrong or its a bug

example (use in debug console):

"test" cutText ["","BLACK", 1, false];
little eagle
#

Try entering a text?

#

This does nothing.

deft zealot
#

should fade to black (at least it does for me)
same with text...
but still makes the map black too regardless of the showOnMap value

little eagle
#

Did you use "test" as layer before?

deft zealot
#

nope

little eagle
#

weird

#

("testC" cutFadeOut 0) cutText ["This should not be visible on map screen", "PLAIN", 1, false];

deft zealot
#

yep got this... works

thick ridge
#

Anyone know how to get preloadCamera to work on a dedicated server?

#

In SP the preload command takes about 3 seconds to run. On a dedicated it returns true immediately

#

and doesn't appear to do anything

still forum
#

Does anyone know when arma loads extensions? at server start, mission start or call time? -> They're loaded at game start. You can use them at any time.
No they are loaded at first call.

lunar mountain
#

Greetings, Help me out here please.
I'm trying to look at the Arma 3 revive system, but I cannot really set it up. It's set in 3DEN, I even tried description ext, and all this with dedicated server.
If I die, I just respawn. So what's the deal? Does it only work if there are at least 2 players in the game?

turbid thunder
#

@lunar mountain You need to enable it and make sure it is enabled for ALL PLAYERS. Did you check the unit attributes to see if it is also enabled on the playable units?

lunar mountain
#

enabled for all players, but unit attribute "revive enabled" is disabled (makes sense)

plucky beacon
lunar mountain
#

kind of... not all ๐Ÿ˜„

plucky beacon
#
respawn = "BASE";
respawnDelay = 5;
respawnTemplates[] = {"Revive"};
respawnOnStart = -1;
reviveDelay = 10;
reviveForceRespawnDelay = 5;
reviveBleedOutDelay = 180;

is this in your description.ext?

lunar mountain
#

trying it ๐Ÿ˜„

plucky beacon
#

granted this is an older version so don't get your hopes up

lunar mountain
#

Respawn template "revive" not found

#

anyways

#

either I'm dumb (but 3den scenario attributes are easy, so) or it needs some workaround nobody documented ๐Ÿ˜„

#

anyways, @ me if anyone knows anything about this ๐Ÿ˜„

tough abyss
#

@chilly hull Arma extensions are loaded on first time you do callExtension

delicate lotus
#

is there a way to access tasks in a script which are created by the task modules?

frosty wyvern
#

hi, i come back to arma after two years, what's the best script editors for now? heard about some webstorm integration?

little eagle
#

Sublime Text 3

pulsar fog
#

i use notepad++ with some community made syntax highlighting that's probably a bit old

#

sublime text was payware?

frosty wyvern
#

used sublime in the past as well as np++

little eagle
#

They have a popup like every 20 times you save a file that can be clicked away.

#

ST is better with large files.

frosty wyvern
#

what's with webstorm?

little eagle
#

integrated development environment I think

#

debugger

#

The only debugger for SQF is the game ...

plucky beacon
#

I use VS Code

rancid ruin
#

notepad++, it's good and fast

#

used to use atom and vs code but they aren't very responsive and can't handle big files

little eagle
#

I found that n++ is bad when opening files like the allInOne config.

tough abyss
#

Does anyone know how to create a new main menu? Like BreakingPoint? How can i do that

little eagle
#

Edit the current one. It's also pretty pointless.

rancid ruin
#

depends on what it's for...if it's a total conversion then it can be a nice touch

little eagle
#

No one plays the game to look at the main menu. It's a waste of time that will only lead to unnecessary incompatibilities with other mods and future patches.

rancid ruin
#

first impressions are quite important actually imo

#

BI didn't change vanilla a3 main menu for nothing

#

the old one looked like it was from the 90's

little eagle
#

Funny. I thought it was easier to use.

#

Definitely faster to enter VR after game start.

#

Now it looks like something you see on a console. Yikes.

rancid ruin
#

you are right in a lot of ways, but you're not the full target audience for this game bro

#

most people want things to look pretty

little eagle
#

True, most people are stupid.

tough abyss
#

Lol

#

G1 @little eagle

rancid ruin
#

would you still play arma 3 if it had N64 level visuals though?

tough abyss
#

@rancid ruin obviously, it's arma

little eagle
#

You don't know who you're asking this, bro.

rancid ruin
#

arma 3: terminal

#

it's like arma 3 except you play it through cmd prompt

plucky beacon
#

Worlds greatest text adventure

#

you take fire from the west what do you do? uhhh ... M.. move nor- dead

#

@rancid ruin I don't know what other ide's have git built in but it helps

#

VS code is great for me

rancid ruin
#

think everything's got a git plugin by now

#

i really liked VS code, nicer than atom imo, just a bit slow

#

electron apps will always be slower than native

dusk sage
#

Atom & VSc are only slow if you start opening massive things ๐Ÿ˜›

plucky beacon
#

I guess I haven't reached the large files sizes yet so it still working really well for me

scarlet spoke
#

I still prefer eclipse for doing all programming related stuff

dusk sage
#

๐Ÿค

scarlet spoke
#

Where's all the hate towards eclipse coming from?

plucky beacon
#

Heck if i know. I just know the interface is a bit too cluttered for me. Vs code has a minimal interface

dusk sage
#

Have you tried any other IDEs?

scarlet spoke
#

No I started with eclipse and sticked to it

plucky beacon
#

I've only ever used eclipse in Java

dusk sage
#

Maybe have a branch, Eclipse is just

#

bad

#

From memory usage, to even productivity

scarlet spoke
#

Yeah thats what I started with and now I have written my plugin (Editor + Syntax check) for SQF for it...

dusk sage
#

Working well?

scarlet spoke
#

Never noticed anything like that

plucky beacon
#

productivity that was my kicker

dusk sage
#

๐Ÿ˜„

scarlet spoke
#

Well it doesn't detect everything but I would say it's pretty decent

#

The new update will improve parser speed in certain situations and after that it should be a really handy feature

plucky beacon
#

@dusk sage I always thought the memory was a java thing

#

The only thing not working on Vs code sqf is switch case

dusk sage
#

Sure, but do you want your IDE bloating that aswell ๐Ÿ˜„

plucky beacon
#

I didn't know it was eclipse too :p

still forum
#

The only debugger for SQF is the game ... Not much longer ๐Ÿ˜‰

jade abyss
#

pic or didn't happend

still forum
#

No screenshot. It's currently only working inside the debugger as there is no way to input commands yet ^^
This is debug console output that I have right now.
https://github.com/CBATeam/CBA_A3/blob/master/addons/help/fnc_setVersionLine.sqf#L79

instruction L2 O1 new command
instruction L2 O9 const "_display"
instruction L2 O8 array (1 items)
instruction L2 O1 function params
instruction L4 O23 new command
instruction L4 O40 var uinamespace
instruction L4 O65 const "cba_help_VerScript"
instruction L4 O87 var scriptnull
instruction L4 O64 array (2 items)
instruction L4 O52 operator getvariable
instruction L4 O28 function scriptdone
instruction L4 O27 function !
instruction L4 O23 function if
instruction L4 O110 const {}
instruction L4 O101 operator exitwith
instruction L6 O115 new command
instruction L6 O137 var _display
instruction L6 O136 array (1 items)
instruction L6 O153 const { 
uiSleep 3;
"_this call compile preProcessFileLineNumbers '\x\cba\addons\help\fnc_setVersionLine.sqf'" configClasses (configFile >> "CBA_DirectCall");
}
instruction L6 O147 operator spawn
Load  
uiSleep 3;
"_this call compile preProcessFileLineNumbers '\x\cba\addons\help\fnc_setVersionLine.sqf'" configClasses (configFile >> "CBA_DirectCall");
instruction L6 O134 _verscript = ... (local)
instruction L11 O310 new command
instruction L11 O310 var uinamespace
instruction L11 O335 const "cba_help_VerScript"
instruction L11 O357 var _verscript
instruction L11 O334 array (2 items)
instruction L11 O322 operator setvariable

Could set a breakpoint at each of these steps and read all local variables of current and higher scopes. Modify variables, Inject code at that place. Works for scheduled and unscheduled. Only started on that 2 days ago so it's very messy right now.
UI will probably be made by X39 later or I'll try to build something remotely usable

jade abyss
#

soooo, never a UI ๐Ÿ˜„

still forum
#

X39 is probably too busy to build some UI the next few months yeah ^^. But I planned on building some Profiling UI as profiling scripts was my main target. we'll see. I will make the debugger backend stuff open-source after I polished the code a bit

jade abyss
#

"busy" ๐Ÿ˜„

#

gl with that.

plucky beacon
#

Gg no re

#

I hope it does work out because I edit code on computers not with arma. Hard to check what works and doesn't

still forum
#

The debugger requires Arma. It's a debugger not a Emulator. It hooks into the running engine

plush cargo
quasi thicket
#

Can anyone tell me why this respawn script doesn't work for everyone in a group?

//initPlayerLocal.sqf

player addEventHandler ["Respawn", {
    params ["_unit"];
    if (group _unit == sqd1) then {
        _unit setPos (getPos AlphaSpawn);
    }
    else {
        if (group _unit == sqd2) then {
            _unit setPos (getPos BravoSpawn);
        }
    }
}];```
#

on a dedicated server...

jade abyss
#

wasn't it OnRespawn?

tough abyss
#

Hay Guys, i try to delete some houses and stuff. I got this code, how can i say that it doesnt go from the CapitalCity, i want him to go from the marker "mack" _pos = position (nearestLocation[[0,0,0], "NameCityCapital"]); {_x hideObjectGlobal true} foreach nearestTerrainObjects [_pos,[],600];

dusk sage
#

_pos = getMarkerPos "mack"

tough abyss
#

So this?: _pos = getMarkerPos "mack"; {_x hideObjectGlobal true} foreach nearestTerrainObjects [_pos,[],600];

jade abyss
#

@quasi thicket Try it with the corpse ( params ["_unit","_corpse"]; ). But i am not entirely sure, if the Corps stays in the group

tough abyss
#

@dusk sage doesnt work ๐Ÿ˜ฆ

quasi thicket
#

@jade abyss - Some people spawned correctly on the boat marker, but some people in the group spawned on their corpse location

jade abyss
#

uhm, okay

dusk sage
#

What do you mean, 'doesn't work'

tough abyss
#

When i go in Eden Editor, and type that in debug =_pos = getMarkerPos "mack"; {_x hideObjectGlobal true} foreach nearestTerrainObjects [_pos,[],600]; it doesnt clear

jade abyss
#

I guess he didn't executed it on the Server

#

Does the Marker "mack" even exists?

tough abyss
#

yes o.o its a Warning Marker : variable: mack

dusk sage
#

This will be one of the few times I say -> work it out for yourself

#

You literally have the code there

tough abyss
#

Or is it this? _pos = getMarkerPos (nearestLocation[[0,0,0], "Mack"]); {_x hideObjectGlobal true} foreach nearestTerrainObjects [_pos,[],600];

dusk sage
#

no

jade abyss
#

That reminds me of the daughter of a friend. Wildy guessing until its right^^ (just guessing, no trying to solve it, just guessing)

tough abyss
#

Okay, i think i got it^^

dusk sage
#

๐Ÿ‘

tough abyss
#

The Thing is i got the code but it fucking doesnt clear the stuff

#

-.-

jade abyss
#

๐Ÿคฆ

tough abyss
#

i now its not the right above there

#

but even when i try to fix the code and search in wiki it doesnt work

plush cargo
#

you're trying to hide all the buildings within 600m of the marker "Mack"?

tough abyss
#

Yes

#

But it doesnt work

#

I know it works but only with the CityCapital

#

i want it with a marker

plush cargo
#

the code you're using doesnt work*

#

no need for location commands at all if using a marker

tough abyss
#

This works but not with a marker :/ _pos = position (nearestLocation[[0,0,0], "NameCityCapital"]); {_x hideObjectGlobal true} foreach nearestTerrainObjects [_pos,[],600];

plush cargo
#

_pos = getMarkerPos "Mack";

plucky beacon
#
if (player == z1) then {
    null=execVM "GUI\spawn_menu.sqf";    
};

shouldn't this only run if the player is variable name z1?
in the init.sqf

tough abyss
#

@plush cargo _pos = getMarkerPos "Mack";{_x hideObjectGlobal true} foreach nearestTerrainObjects [_pos,[],600];?

plush cargo
#

_nearest = nearestTerrainObjects [_pos,[],600];

#

{_x hideObjectGlobal true}forEach _nearest;

#

you should be using the simplest syntax(shown on wiki) and get it working before trying to combine multiple commands

tough abyss
#

_pos = getMarkerPos "Mack";{_x hideObjectGlobal true}forEach _nearest; _nearest = nearestTerrainObjects [_pos,[],600];

#

o.O i think im too dumb. i gonna uninstall sqf in my brain i swear

plush cargo
#

you have the hide object (which contains the variable _nearest) before the line that defines _nearest

#

cant do foreach nearest wo knowing what it is

tough abyss
#

doesnt work either xD

#

_pos = getMarkerPos "Mack"; _nearest = nearestTerrainObjects [_pos,[],600];{_x hideObjectGlobal true}forEach _nearest;

jade abyss
#

@plush cargo He is just copy and pasting it. Don't expect anything further ๐Ÿ˜„

tough abyss
#

Im asking for help, im not here to battle whos the best in scripting. I know im not good

#

Why cant you help me? is this so hard?

#

I dont understand that for real^^

jade abyss
#

Its not about "who is the best" its about: Read the Wiki and at least try to fix it for yourself.

tough abyss
#

yes and im trying. But i cant get it to work

plucky beacon
#

oh boy everybody get in the bunker

jade abyss
#

What did you try?

plush cargo
#

do you have -showscripterrors enabled?

#

have you tried using hint or systemchat to see whats going on?

tough abyss
#

or diag_log

#

personally my favorite

jade abyss
#

Answers will be "No", i bet.

plucky beacon
#

use logs or hints or something in between each command so you can find where it breaks

tough abyss
#

_pos = getMarkerPos "Mack"; hint "a"; _nearest = nearestTerrainObjects [_pos,[],600];{_x hideObjectGlobal true}forEach _nearest; doesnt show a hint ๐Ÿค”

plucky beacon
#

then you can narrow down where your supposed to look for fixing things

jade abyss
#

systemchat str _pos; for example. (Like: Is he even getting the position??)

plush cargo
#

there you go, now you know its not making it that far in the code

#

do you have showscripterrors on?

#

it is absolutely neccessary

tough abyss
#

I turn it on

jade abyss
#

Did you checked your .rtp files?

#

I bet the half of the life mission you use if broken^^

plush cargo
#

half the life missions up rn are broken

jade abyss
#

Life is broken.

#

๐Ÿ˜„

tough abyss
#

3/4 of Arma is Life ๐Ÿ˜ƒ

plucky beacon
#
_pos = getMarkerPos "Mack"; 
diag_log format ["Marker position is %1",_pos];  
_nearest = nearestTerrainObjects [_pos,[],600];
diag_log format ["nearest terrain objects %1",_nearest];  
{
    _x hideObjectGlobal true;
    diag_log format ["%1 hidden",_x];      
}forEach _nearest;
#

I would debug like this

jade abyss
#

imho, that is nothing to be proud of, Miller.

tough abyss
#

But you should ๐Ÿ˜ƒ

#

Because without us Arma would be nothing ^^

jade abyss
#

I should go to the toilet, but thats it

#

lmfao

#

bs

plucky beacon
#

Dscha!

plush cargo
#

pls miller, dont do that

tough abyss
#

@plucky beacon there is an ; missing in your script

jade abyss
#

lmfao

plucky beacon
#

crucify me

plush cargo
#

lmao get ur shit together nitro

tough abyss
#

btw @plush cargo in my code there is no error.

plucky beacon
#

I've been a bad scripter, there's only one way to correct mistakes like this

plush cargo
#

1 hr in a life server

plucky beacon
#

NOOOOOO

plush cargo
#

and you gotta sit in their ts

jade abyss
#

And doing hardcore RP!

plucky beacon
#

Oh god please anything but that!

#

AAAGH

#

The nightmare!

jade abyss
#

even worse:

#

You have to be in the police, with a 14Year old Chief!!!111oneoneoneeleven

plush cargo
#

lol

plucky beacon
#

dies

jade abyss
#

Okay, enough spamming in here ๐Ÿ˜„

plucky beacon
#
if (player == z1) then {
    null=execVM "GUI\spawn_menu.sqf";    
};

between this and

if (player == z1) then {
    null=execVM "GUI\spawn_menu.sqf";    
};

do either of them do what I think they do?

#

locally run the script on z1

jade abyss
#

Should, yeah

#

As long as z1 is known

plucky beacon
#

does it just not work for single player?

#

z1 is required so ya

jade abyss
#

could be, yeah

plucky beacon
#

hm

#

although...

#

don't want it to run for every player

#

or.. I mean really just the top one works anyway

#

lol I just boiled it down to the exact same thing

#

shit

plush cargo
#

Anyone know what all the unitTraits do? cant find any solid documentation on it

#

audibleCoef (scalar)
camouflageCoef (scalar)
engineer (bool)
explosiveSpecialist (bool)
loadCoef (scalar)
medic (bool)
UAVHacker (bool)

#

i know medic can heal and engineer can fix cars

#

load changes stamina

plucky beacon
#

camo is how far ai can see you?

#

UAV hacker is just a uav operators boolean

plush cargo
#

thought maybe hacker could use enemy uavs

plucky beacon
#

they can use an action on uavs

#

make it their own

plush cargo
#

thats cool

#

im sure audible has something to do with the sound you make when moving?

plucky beacon
#

ya so when they turn around

#

more gear makes more noise

plush cargo
#

that works with what other players hear? or just ai

plucky beacon
#

ai

#

I'm pretty sure

#

try putting it in and see if you're a ninja

plush cargo
#

what about explosive specialist?

civic maple
#

can use defusal kit and plant explosives maybe?

plucky beacon
#

can defuse things

#

and see mines

plush cargo
#

truuu

#

says you can make custom traits. know anything about that?

plucky beacon
#

nah

civic maple
#

nup

plucky beacon
#

might be a config thing

jade abyss
#

explosive specialist = Specialist in Explosives.
Job done, praise me now.
*DropsMic*

plush cargo
#

hmmm

jade abyss
#

(weren't ExpSpecs the guys who carry the ammo for the LauncherGuys?)

plush cargo
#

this setUnitTrait ["audibleCoef",0];

#

ai cant hear anything, full sprint up to their back and no response

#

this setUnitTrait ["camouflageCoef",0];

#

ai cant see shit

#

knows your their when standing right in front of them but cant target you

#

there*

#

this is setting the player's traits not the ai , to be clear

plucky beacon
#

ya

#

that's actually pretty neat, you could make some cool ghille missions

#

with the audible thing that could be pretty cool for sneaky missions

plush cargo
#

yeah deff, would have to test and find the threshold when they hear if you're standing but not when crouched

plucky beacon
#

Also camo is increased during night I'm pretty sure

#

Or maybe it's a diffrent value

plush cargo
#

player setUnitTrait ["audibleCoef",0.25]; they can hear you if crouched and walking reg but not with slow walking speed

#

ffs im too into something else rn, already building a whole stealth scenario in my head

plucky beacon
#

HAHA

#

this opens up so many things doesn't it?

plush cargo
#

deff does

#

custom traits are set with setUnitTrait, bool only. player setUnitTrait ["isaNoob",0,true];

#

why do that instead of setVariable is my question

plucky beacon
#

legability?

#

I dunno

#

probably less legible honestly

plush cargo
#

I made a mini game ๐Ÿ˜ƒ

#

disableSerialization;
_rscProgressBar = ((findDisplay 850000) displayCtrl (850401));
_diff = 0.025;
while {ctrlShown _rscProgressBar} do
{
sleep 0.01;
_pos = progressPosition _rscProgressBar;
switch (_pos) do
{
case 0: {_diff = 0.025;};
case 1: {_diff = - 0.025;};
default {_diff = _diff};
};
_rscProgressBar progressSetPosition (_pos + _diff);
};

#

fucking mindblowing gameplay!

peak plover
#

Haha, it's like bashing doors in Dead Island

#

A minigame mod would be nice

plush cargo
#

the basic idea for this was to operate mining equipment this way to get resources to bring to a "weapon factory" to craft weapons/ items etc. I did however have an idea for a server that was basically an open world lobby full of stupid shit to do, and get other server info/ join games. But i couldnt find a way to go straight from one server to the next so i gave up on that.

jade abyss
#

Doesn't exist

#

There WAS a command, but was never implemented/usable

plush cargo
#

too bad ๐Ÿ˜ฆ

plush cargo
#

this was never implemented or it was and failed?

jade abyss
#

never implemented

still forum
#

Part's of it were implemented once. But not sure if it ever worked. The function parsing the ConnectTo message and initiating a Server connect is still in the latest binary

jade abyss
#

I can't remember having anything added oO Do you know what was added?

still forum
#

Edited my last msg

jade abyss
#

Are you sure, you don't mix it with sendUDPMessage?

still forum
#

yes

#

The script function is functional and tells the network manager to send the message. And the receiving end also looks intact to me. Either they disabled it on purpose in some location I don't see right now. Or it's working

jade abyss
#

I never managed to make it working (not connected/reacted/nuttin)

still forum
#

I also don't think that's a very good idea. People could redirect players to maybe malicious servers or something

jade abyss
#

Whats a malicious Server? Life? ๐Ÿ˜„

#

But on the other hand -> It would open alot of possibilitys for several Gamemodes (e.g.: "Dungenons" for the Survival Players)

peak plover
#

That would be pretty cool

#

Altis > Go to airport > Select a destination > loading screen > Tanoa

rancid ruin
#

i made a ghetto travel system of sorts in a mission before

#

like, you'd get a plane on altis for example, fly 5km south off the map border, server would kick you and set your status to "travelling to stratis" in the database

#

then when you connect to the stratis server you're spawned 5km north of the border in your aircraft

still forum
plush cargo
#

wtf

#

fuel cargo numbers come out to a trillion units of fuel fit in a fuel truck

plucky beacon
#

@still forum There could be some user verification like "you are heading to IP address server named server name are you sure you want to leave?"

#

but then again people still fall for the "free ipad" popups so whatever

#

maybe if it changes the port but no the IP, constrict it to a single server

#

have multiple servers running and one as teh hub or main port, that people walk around going to the other ports on the server

rancid ruin
#

i don't really see how you could do anything malicious with it anyway

little eagle
#

@plush cargo
Fun fact. The numbers are so high, that the isNumber command would actually return false.

plush cargo
#

lol

#

had to use toFixed to get it.

#

to be fair it's not a trillion but 999,999,999,654 or some shit

#

quads have 30 fuel capacity for some reference

little eagle
#

Yeah, the value is way too high for the single floats SQF uses

#

Cannot be accurately represented.

plush cargo
#

too high for any logistics involving oil mining to make sense as well.

plucky beacon
#

Why is it so high anyway?

plush cargo
#

๐Ÿคท

#

maybe it's the best balance they could achieve with jets using the same fuel as atvs

#

just gonna have to define my own values for how much mined fuel will fill the refuel trucks/fuel containers

little eagle
#

So it's infinite.

#

Fuel truck never runs dry. It's a game design decision.

plush cargo
#

repair and ammo are exactly the same

little eagle
#

Repair, refuel and rearm trucks ARE incredibly bugged and dodgy to use though.

#

Massive locality problems and the zones where to place the vehicles are weird.

little eagle
#

You have to do really weird shit to get it to work.

#

You have to be alone in the refuel truck

#

And there has to be only one non driver in the vehicle to refuel or something like that

#

It's just as bugged as the commanders smoke launcher is in tanks.

civic maple
#

wtf

little eagle
#

Try it. It was a science the last time we used it.

#

But yeah. Tanks carry around so much fuel in vanilla that you can drive for like a week straight before the they're empty.

#

Vehicles in general. The fuel consumption thing only really works for helicopters.

#

Which are also the only vehicles that lose fuel when the HitFuel hitpoint is damaged.

#

Effectively all the fuel simulation does in vanilla is waste frames.

civic maple
#

Very rarely use vanilla vehicles :/

dusk sage
#

I find the vanilla vehicles drop in time

#

Slowly, but they do

little eagle
#

It takes forever

civic maple
#

is the fuel consumption realistic, if you refer to the ranges of the real life counterparts?

plush cargo
#

Id imagine a tank irl lasts a good long while on fuel

little eagle
#

The fuelConsumption config entry is bugged for once and does not work for non helis (not sure about planes)

dusk sage
#

I guess it's somewhat realistic, loosely

#

Takes quite a few hours to drain in game

civic maple
#

I know RHS planes lose fuel, dunno about vanilla

dusk sage
#

yeh planes lol

#

๐Ÿคฃ

little eagle
#

Our missions last about 2.5 to 3 hours and the fuel bar on the tanks does move like one pixel.

#

Engine running all the time. Specifically to test if fuel matters.

civic maple
#

yeah, we've never ran out of fuel in a land vehicle in my community

little eagle
#

For a game I'd say you would scale it down to not last as long as it would irl.

#

Sorta like how you scale down artillery ranges.

civic maple
#

yup

little eagle
#

I mean, you are driving on fucking Islands that are like 30 sqkms

#

With tanks and artillery guns lol

plush cargo
#

We drove all the way across Europe with those things

scarlet spoke
#

Does anyone have an idea why a RscListbox created via ctrlCreate is showing scrollbars although it doesn't actually has the need to do it as all entries fit in the size of the box?
And even weirder: I can't select the lower entries of the listbox (like the last 3 or so). In order to select them I have to scroll them up first

plush cargo
#

I've had that problem before, iirc changing the sizing fixed it

#

or maybe using safezones

#

_backX = 0.74 * safezoneW + safezoneX;
_backY = 0.69 * safezoneH + safezoneY;
_backW = 0.25 * safezoneW;
_backH = 0.29 * safezoneH;
_background ctrlSetPosition [_backX, _backY, _backW, _backH];
_background ctrlCommit 0;

scarlet spoke
#

But shouldn't the size be correct if the actual control has the correct size on screen?

turbid thunder
#

I guess fuel is only really important when the mission maker gives you only a few minuted worth of fuel to drive

quasi thicket
#

Can anyone explain why this code works on a hosted server, but not on a dedicated?


END_TIME = 300; // 5 Minutes
ACTIVE = true;
publicvariable "ACTIVE";

if (isServer) then 
{
    [] spawn
        {
            ELAPSED_TIME = 0;
            START_TIME = diag_tickTime;
            while {(ELAPSED_TIME < END_TIME) && (ACTIVE)} do
                    {
                        ELAPSED_TIME = diag_tickTime - START_TIME;
                        publicVariable "ELAPSED_TIME";
                        sleep 1;
                    };
        };
}; 


if !(isDedicated) then 
{ 
    [] spawn
        {
            while {(ELAPSED_TIME < END_TIME) && (ACTIVE)} do
                {
                    _time = END_TIME - ELAPSED_TIME;
                    _finish_time_minutes = floor(_time / 60);
                    _finish_time_seconds = floor(_time) - (60 * _finish_time_minutes);
                    if (_finish_time_seconds < 10) then
                        {
                            _finish_time_seconds = format ["0%1", _finish_time_seconds];
                        };
                    if (_finish_time_minutes < 10) then
                        {
                            _finish_time_minutes = format ["0%1", _finish_time_minutes];
                        };
                    _formatted_time = format ["%1:%2", _finish_time_minutes, _finish_time_seconds];
                    hintSilent format ["Time left:\n%1", _formatted_time];
                    sleep 1;
                };
        };
};```
#

it should start a countdown and display a hint with the remaining time

turbid thunder
#

How do you launch the script?

quasi thicket
#

i activated it with a trigger which has onActivation="count1 = [] execVM ""startCountdown.sqf"";

#

count1 is used to stop the timer if the another objective is complete

turbid thunder
#

And hows that trigger triggered?

quasi thicket
#
                onActivation="titleText [""The missile has self-destructed"", ""PLAIN"", 3] ; deleteVehicle CountLose; ACTIVE = False; publicvariable 'ACTIVE'; hintSilent """";";```
#

uhm

#

well, seems i don't use count1 anywhere ๐Ÿ˜›

#

damn, why did i put count1 = there ๐Ÿ˜ฆ

turbid thunder
#

Dunno but I'd prefer if you wouldnt quote the mission.sqm plz

#

Uhm

#

....

#

Wrong trigger?

#

I wanted the one that execVM's the countdown :D

quasi thicket
#

ohhhhh

#

right

#

triggered by "Blufor present"

#

condition: this

turbid thunder
#

Hmmmmm I dont see why it shouldnt work then either :S

#

Not at home right now so unfortunatly I cant investigate it on my own dedicated server

quasi thicket
#

same here ๐Ÿ˜›

#

just got the sqm files on my dropbox

#

i have a mission failed trigger if the players do not complete the objective in time, i wonder if that one works if the time runs out

#

luckily, during testing the players DID complete the objective, and still played for 10 more minutes to extract

surreal kettle
#

you aren't initializing ELAPSED_TIME in the second if

quasi thicket
#

shouldn't a dedicated server go through the first If?

#

and on !(isDedicated), the script worked fine

surreal kettle
#

Yep, the first if is alright

#

but the second the script is executed on the client only

quasi thicket
#

my problem is that it doesn't work on dedicated though... it works fine in singleplayer and hosted MP

surreal kettle
#

indeed

quasi thicket
#

man.... arma scripting to hard

surreal kettle
#

not at all, let me think about an explanation

turbid thunder
#

Its scripting in general. Sometimes during late night scripting, it appears fine but you oversee one subtle mistake

quasi thicket
#

I got if !(isDedicated) then and the wiki has if (!isDedicated) then {

surreal kettle
#

that doesn't change anything, lol

quasi thicket
#

okay :p

#

most of the script is ripped from a BI forum post so, i didn't write it. I just modified it to my needs (i.e. strings and start time)

surreal kettle
#

So, the first block gets executed if: you're the host of the game, doesn't matter if it is dedicated or not . Second if: gets executed if you're any kind of player (host or not).

#

if you aren't hosting the game then you don't know about ELAPSED_TIME that's initialized in the first if

turbid thunder
#

Have you tested it with two clients? Mayby thats more insightful

surreal kettle
#

that's why it seems to be working in singleplayer and hosted MP, you meet the condition that satisfies both ifs

#

get another player, the second if shouldn't be working for him either

quasi thicket
#

so only the host sees the actual countdown hint

turbid thunder
#

"Another player" just hit "Launch Arma" twice :D

surreal kettle
#

yes, because ELAPSED_TIME is undefined for other players

turbid thunder
#

Or does it take too long to do?

#

But he public variables it though?

surreal kettle
#

oh shit, you're right

turbid thunder
#

Idea

#

Put a small sleep right before the second if

quasi thicket
#

sleep 1; if !(isDedicated) then ?

turbid thunder
#

WaitUntil {!isNil "ELAPSED_TIME"};

surreal kettle
#

^ yeah, like that

turbid thunder
#

^

quasi thicket
#

WaitUntil {!isNil "ELAPSED_TIME"};

if !(isDedicated) then 
{ ```
turbid thunder
#

AFTER the If, or before doesnt really matter

#

Jup

quasi thicket
#

ok, i'm gonna try that this evening ๐Ÿ˜›

turbid thunder
#

Now it has to wait until the variable is defined

quasi thicket
#

It's my first real mission, i'm pretty proud at what i managed to do so far

#

but i had a lot of help from here ๐Ÿ˜›

turbid thunder
#

I hope I got that syntax right

surreal kettle
#

it's waitUntil not WaitUntil

quasi thicket
#

anyway, i'm gonna lunch.... thanks for the help @turbid thunder & @surreal kettle

surreal kettle
#

good appetite ๐Ÿ‘Œ

turbid thunder
#

I tend to capitalize a lot for readability

#

In my past bullshit scripting I never capitalized anything xD somehow still worked despite all its flaws

surreal kettle
#

do as you please, I was joking ๐Ÿ˜›

turbid thunder
#

Mobile connection is cloning my messages D:

surreal kettle
#

I prefer over-capitalized things over thisunreadablemess

turbid thunder
#

There is a programm with SQF syntax that literally bitches about wrong capitalization

#

deleteVehicle = command. deletevehicle = detected as global variable by the tool xD

surreal kettle
#

what.

#

I don't wanna know its name, thank you very much

turbid thunder
#

I dont know it myself xD

#

It costs yearly though

#

Ok gotta go now back to doing ny exam :(

surreal kettle
#

lol, good luck

pulsar fog
#

"Using publicVariable too frequently in a given period of time can cause other parts of the game to experience bandwidth problems."

#

i assume "too frequently" means "quite damn lot of times" ?

scarlet spoke
#

Yeah... Like in a loop or something like that

turbid thunder
#

@pulsar fog everything you do super frequently will eat your bandwidth and performance. Nyte is only updating one var every second. Easy to handle. But imagine a while loop with no pauses and a lot of different variables = kill

#

ForEach is a pretty good performance killer too

jade abyss
#

Everything is a performance killer oO

turbid thunder
#

Try nearRoads or smth with a big radius

#

Your game will briefly freeze

#

Used to use that to spawn cars on roads but it has the ability to put your game in arma3.exe is not responding mode

shadow sapphire
#

Does anyone know how to do a foreach for several groups at once?

peak plover
#

Yes

shadow sapphire
#
{_x execVM "Gear.sqf";} forEach units _G2,_G1,_G5;```

How do I do that kind of thing appropriately?
little eagle
#
{
    {
    } forEach units _x;
} forEach [<groups>];
#

???

shadow sapphire
#

Oh!

peak plover
#

DelJ

shadow sapphire
#

Thanks! @little eagle!

peak plover
#

You are missing []

little eagle
#

DEL-J is missing [ ]

#

But it wouldn't work anyway.