#arma3_scripting

1 messages Β· Page 313 of 1

warm gorge
#

Im not sure if the scheduler is the problem, I just know that the low server FPS is causing the inaccuracy

jade abyss
#

i don't think it is. time should also have a difference to diag_TickTime for example

blissful fractal
#

Hi, So im trying to make my own custom playerhHUD. I got a function that is getting called every 1 second. if you have taked damage a blood icon getting showed in a while loop. While damage > 0 bla bla bla. But the only problem is that the function getting called every 1 second and running a new icon and again and again. so I got 60 bliking icons in 1 minut. I only want the while loop run in one instance. Hope you get what I'm trying to say otherwise I can try to exsplain it in another way"private ```
["_skade"];

_skade = damage player;

while {_skade > 0} do {
43001 cutRsc ["DLSBLOEDER","PLAIN"];
uisleep 3;
};```

little eagle
#

Both sleep and uiSleep aren't affected by FPS directly, but if a script is suspended, it will be picked up after a delay that depends on FPS and scheduler load.

#

Both suck if you expect 0.5 s + 0.5s to be 1 second total delay and uiSleep will improve nothing about that.

still forum
#

If you only have 5 fps you can't expect a sleep 0.1 to sleep for 0.1 seconds. Because the next time the script is executed 0.2 seconds already went past.

little eagle
#

If that was the only problem. You also have to convince the scheduler to get back to your loop and that can take forever if enough scripts are in the mission or the mods or enough animals with dumb AI loops spawned (fish....)

#

Point is that uiSleep doesn't help and is not the magical solution to the problem described.

warm gorge
#

What would you reccomend doing then to try and make sleep somewhat accurate?

still forum
#

Optimize your server so you have more fps

little eagle
#

sleep and uiSleep are beyond repair if you want accuracy.

vapid frigate
#

idk if this is the problem, but that loop will go forever because _skade will never update

still forum
#

true

little eagle
#

Yeah. HappyDuckie's loop is never

#

updated

blissful fractal
#

_skade is the damage of the player. So if you 100 % procent HP the while is no longer true

vapid frigate
#

_skade is the damage before the loop starts

little eagle
#

No, you copy the damage of the player once and never change the value

blissful fractal
#

this is the function that is getting called every 1 second in the HUDupdater

vapid frigate
#

not while it's running

little eagle
#

^

blissful fractal
#

spawned*

little eagle
#

_skade will always be the same value even if the player becomes damaged

still forum
#

You can check with scriptDone if your spawned script finished. So that way you can now when you have to execute it again

blissful fractal
#

or I see what you are saying now xD

vapid frigate
#

if it's called once per second u probly have hundreds of loops running

blissful fractal
#

I got it now πŸ˜„

#

Yea that is the problem Lecks. But I think I got it now.

#

thanks πŸ˜„

worthy spade
#

I'm looking for a way to simulate vehicles getting stuck in the snow. Is there some scripted way of applying brakes to vehicles or something?

still forum
#

You could build a speedLimiter.. Like ACE has.

#

Just not controllable by the player

worthy spade
#

Ah, yes, that should work. Thanks.

digital pulsar
#

why are all lamp posts of type "house"?

still forum
#

Because they are buildings

digital pulsar
#

building is a separate class

#

how is that a house though

still forum
#

Next question you're gonna ask is "Why are buildings in CfgVehicles"

digital pulsar
#

also open oil barrel is apparently a house as well but if it has the top, it's not a house anymore

#

no, thats ok

still forum
#

Engine stuff.. Houses are probably immovable. I think the closed oil barrel has physics

digital pulsar
#

gee why not just call it immovable or something

#

could do with a distinction between objects that people can stay in and objects that are clearly not houses

indigo snow
#

theyre clearly defined as houses though, how is that confusing πŸ˜‰

digital pulsar
#
    systemChat str (getPosASL (_buildingsArray select 0) distance _center);
    systemChat str (getPosASL b_6 distance _center);```
first results is 2.9m, the other exactly 0
#

_center is exactly PositonASL of b_6

#

yet its apparently not the closest object

#

instead its a silly lamppost

rugged basalt
#

is it safe to pass array paremeter to function using remoteExec?

#

looks safe for me

jovial ivy
#

Is there any way to get a vehicle to spawn directly infront/behind another vehicle?

boreal edge
#

i think you can spawn it somewhere else ([0,0,0]) and then attach it with offset and instantly release it again. Then it should be behind /infront of the vehicle.

#

Might be better to spawn it directly at the right position, but i think it works

pliant stream
#

Use simple vector math to calculate the new position and spawn there using CAN_COLLIDE

digital hollow
#

Use getPos alternative syntax

#

spawn the new vic at this pos (_anchor getPos [10, getDir _anchor])

jovial ivy
#

@digital hollow Worked like a charm, thanks.

earnest path
#

Hey guys i have a quite a challenging script question which should be simple but its not πŸ˜ƒ Hope anyone can shine some light for me in the end my tunnel.

#

```[["<t color='#00FF00'>Arrest Player</t>", {remoteExect spawn PMCH_fnc_arrestDefendent;},[cursorTarget],1.5,false,true,'','typeOf cursorTarget == "C_scientist_F"'], {player addAction _this}] remoteExec ["call", -2, true];````

#

I have a serverside script that INITS addAction to every player in the mission that needs to remoteExec function PMCH_fnc_arrestDefendent which is serveside only wth parameter cursorTarget

#

Oh and the result of the addAction call has to be spawn of tha funciton

little eagle
#

...and what is the question?

earnest path
#

Well it doesnt work πŸ˜ƒ i cant figure out how to call it properly. the action is added to all players but the remoteExec does not get called propperly on the server from the MP player with the cursorTarget propperl

#

[server] => registers the action to client => client calls server to spawn serverside script with parameter cursorTarget

#

I cant achieve this 😦

little eagle
#

Should run the code on the clients and not use remoteExec

north sail
#

Hello all. I'm returning to scripting after over a year away and am very rusty. Was hoping somebody could help me understand a few things, please.

  1. _ctrl ctrlSetText "test" does not seem to update the UI (even though systemChat str ctrlText _ctrl implies the property has been set). If instead I include onLoad="uiNamespace setVariable [""testCtrl"", _this select 0]"; under the control's config, the following does update the UI: uiNamespace getVariable "testCtrl" ctrlSetText "test". Why the difference? The wiki doesn't imply _ctrl has to be in the uiNamespace for ctrlSetText to work.
pliant stream
#

Log _ctrl to see that it is actually a control and not something else?

north sail
#

Yup, tried that - If I use systemChat str _ctrl I see "Control #xxx" or whatever

#

where xxx is the IDC I am expecting

#

and ctrlText _ctrl confirms

rotund cypress
#

Anyone here who can assist me with how I would center text in middle of a button

#

So center it vertically

north sail
#

@rotund cypress perhaps use style = "0x02+0x0c"; in the button control's config? I'm rusty, I forget exactly the values.

pliant stream
#

Macros are too mainstream?

rotund cypress
#

Does the style have to be within the attributes class for buttons?

#

Okey @north sail that did not work

#

I believe that is the correct style

#

But it's different from buttons and normal styles I believe

#

Attributes class with align = "center" works for a button to center text, but not vertically

jovial ivy
#

@north sail Is the text showing beforehand? As in when you haven't set it.

#

So as in, when you set it via the whatever.hpp

rotund cypress
#
class ButtonReady: GW_RscButtonMenu {
            idc                      = IDC_RscDisplayLoadouts_ButtonReady;
            text                     = "I AM READY";
            x                        = 0.800094 * safezoneW + safezoneX;
            y                        = 0.8476 * safezoneH + safezoneY;
            w                        = 0.113437 * safezoneW;
            h                        = 0.0396 * safezoneH;
            colorBackground[]        = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])","(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"};
            colorBackgroundFocused[] = {0, 0.27, 0.42, 1};
            colorBackground2[]         = {0, 0.27, 0.42, 1};
            colorFocused[]           = {1, 1, 1, 1};
            style                    = "0x02+0x0c";
            class Attributes {
                align                    = "center";
                font                     = "PuristaMedium";
                sizeEx                   = 0.01 * safezoneH;
                style                    = "0x02+0x0c";
            };
        };
jovial ivy
#

Is that showing when you open the GUI?

rotund cypress
#

Yes

jovial ivy
#

Uhm, after setting the text via sqf, using CtrlTExt or whatever that it to confirm it changed. Also make sure you are changing the right dialog thing.

rotund cypress
#

Im not setting it via SQF

#

Im setting text in dialog

jovial ivy
#
_ctrl ctrlSetText "test"
``` -Where are you wanting this to go? In the dialog(.hpp) itself?
rotund cypress
#

Im not using ctrlSetText 🀣

#

I want to center text vertically 🀦

north sail
#

@jovial ivy nope, that's in an sqf loaded later

rotund cypress
#

Oh you were talking to @north sail 🀣

jovial ivy
#
style = ST_CENTER;
#define ST_CENTER         0x02
north sail
#

@rotund cypress what does GW_RscButtonMenu class inherit from?

#

that's horizontal centerered

rotund cypress
#

Shouldn't matter

#

Cause it will overwrite when a new entry is put in the main class

jovial ivy
#

#define ST_VCENTER 0x0c maybe?

north sail
#

I realise that, I am wondering if it supports a vertically centered style

rotund cypress
#

i tried that

#

style = 0x0c;

jovial ivy
#

Hmm

rotund cypress
#

That would work on a RscText ctrl, but not on RscButtonMenu apparently

north sail
#

I'm assuming button text is vertically aligned centered by default

rotund cypress
#

no its not

#

Top left hand side

jovial ivy
#

Are you wanting it straight centered? As in right in the middle of the button.

rotund cypress
#

Yes

jovial ivy
#

Should work for rscText I hope.

rotund cypress
#

Eh, it's not RscText

#

style = "0x02+0x0c";

#

That would work with RscText

#

somehow it does not work with RscButtonMenu

jovial ivy
#

Hm

bleak schooner
#

with which commands can i assign players to a squad (hexagons)?

turbid thunder
#

@bleak schooner

bleak schooner
#

thx

#

does anyone know a tutorial on how to use rsc combo?

jovial ivy
#

Would arma allow me to sleep for this time (floating point): ```sleep 1.66666666667;

still forum
#

Why wouldn't it? sure it does

#

As long as that number is not getting truncated by floating point precision it's fine

jovial ivy
#

Gotcha.

#

Unless there is a better way to count from 2 to 100 in a 60 second period: ``` _progress = 0.0;
while { !isNull "_dialog" } do {
_progress = _progress + 2;
if(_progress == 100) exitWith {

    };
    sleep 1.66666666667;
};```
still forum
#

Sleep is not so exact

rancid ruin
#

don't think you can rely on that to be on-time

still forum
#

You'll probably get that executed in 62-75 seconds

rancid ruin
#

probably want to check against mission time or something, maybe use onEachFrame + time

jovial ivy
#

Hmm ok.

still forum
#

But precise enough for a human

jovial ivy
#

Yeah its just a simple progress thing like lockpicking a car in any life mod.

rancid ruin
#

BI wrote a function for that, you hold a button for X time to do something

jovial ivy
#

Its not a really a "hold a button". Its more of a, stay within 5 meters of a vehicle while you do something. But you can still shoot and what not

turbid thunder
#

@jovial ivy If you want it to be more precise, use time for that. It takes a bit for your code to get executed so with your sleep, you might end up not getting exactly the time you need

#

I noticed that myself when I did countdowns and because of my noobishness, I made it local for everyone and noticed how much it can make a difference between clients

jovial ivy
#

Hmmm gotcha.

still forum
#
    _progress = 0.0;
    while { !isNull "_dialog" } do {
        _nextExec = diag_tickTime + 1.66666666667;
        _progress = _progress + 2;
        if(_progress == 100) exitWith {
        
        };
        while {_nextExec > diag_tickTime} do {sleep 0.2;};
    };

That's more exact. If you really need it. Though not perfect. You could make a perfect implementation if you really wanted to

turbid thunder
#

That'd depend on how important the correct timing is

#

!isNull "_dialog"

#

What exactly is that?

still forum
#

Wait.. That condition will never change while inside the while loop

#

why not just use while true then

#

Or... Will it? throws sticks at trees It probably will. Forget what I said

peak plover
#

Why don't you use 1+ (2/3) ? wouldn't that be more accurate?

still forum
#

Why not use (5/3) then ^^ That will be fasterβ„’

peak plover
#

Exactly πŸ˜„

#

Float math might be slower 'tho

#

So it might be faster to just use ceil 5/3 instead

turbid thunder
#

Other question: Is it possible to have the players arm point forwards 24/7?

arctic veldt
#

Lol

dusk sage
#

It won't make any difference for perf 🀣

still forum
#

Or.. (60/ wait... You said you want to count from 2 to 100 in 60 seconds. you are adding +2 every 1.6 seconds. After 60 seconds you will be at 72. not 100

#

You want to sleep 1.2 seconds not 1.66666666667 If you want to do what you said you want to do

jovial ivy
#

@still forum How would that be? If you were to do say 1.2 in 60 seconds that would be 72. 1.66666666667 would be 100.

#

@turbid thunder The isNull is used to check if a dialog will still be opened. In my case a modified progress dialog.

still forum
#

There are 36*1.6666 in 60 seconds. You are executing +2 36 times. -> 72 != 100

jovial ivy
#

facepalm - I guess im struggling to use basic math today.

#

So then something like: ```sqf
_progress = 0.0;
while { true } do {
_nextExec = diag_tickTime + 1.2;
_progress = _progress + 0.02;

    if(!(_player inArea DSSV_Area)) exitWith {
        DSSV_MainVehicle addAction ["Secure Vehicle",{_this call DSSV_Secure}];
    };
    if(_progress >= 1.0) exitWith {
        closeDialog 0;
        deleteMarker DSSV_Area;
    };
    bar progressSetPosition _progress;
    while {_nextExec > diag_tickTime} do {sleep 0.2;};
};
```
#

I also changed up the percent so instead of 100 it just goes to 1(to calculate for arma's progress bar). Which I guess is technically the same thing.

bitter bough
#

So, Dylan got this script mostly working for me. But I'm using the NATO classname for the autonomous GMG, but if CSAT walks near it the GMG isn't active. How could I get this working the rest of the way?

_lastDir = -1; 
for "_i" from 1 to 4 do { 
    if(_lastDir == -1) then { 
        _veh = "B_GMG_01_A_F" createVehicle getMarkerPos Format["pos%1", _i]; 
        _veh setDir 360; 
        _lastDir = getDir _veh; 
    } else { 
        _veh = "B_GMG_01_A_F" createVehicle getMarkerPos Format["pos%1", _i]; 
        _lastDir = _lastDir - 90; 
        _veh setDir _lastDir; 
    }; 
};
#

Also, how does one get the colors like that? o.o

jovial ivy
#

The three things sqf, then next line is your code, then next line is your ```

#

Oops lol

#

Soo ```sqf is the first part.

bitter bough
#

Huh, well that solves another mystery. now for the next xD

jovial ivy
#

Haha

jade abyss
#

_lastDir = -1;
+
_veh setDir 360;
_lastDir = getDir _veh;

== Makes no sense at all

#

Vehicle will be created with Dir 0 (360)

bitter bough
#

it works so I'm more worried about getting the autonomous part working Β―_(ツ)_/Β―

jade abyss
#

🀦

bitter bough
#

sorry o.o
I don't mean to sound like a dumbass but, I'm not very picky.

jade abyss
#

Its just: It makes no sense, why execute it at all?

#

It doesn't bring you any benefit

#

like...
how to calculate 1-1?
You can do:
1 - 1 = 0
But your example is:
(1*100) - ((1+9)*10) = 0

jovial ivy
#

Huh? The point is to create 4 turrets which rotate by 90 degrees on each cycle which it does.

jade abyss
#

Yeah, but also doing (in the first one)

_veh setDir 360; 
_lastDir = getDir _veh; ```
instead of a simple
```sqf
_lastDir = 0; //or 360, whatever makes him happy```
#

Β―_(ツ)_/Β―

jovial ivy
#
_lastDir = 360;
for "_i" from 1 to 4 do {
    _turret = "B_GMG_01_A_F" createVehicle getMarkerPos Format["pos%1", _i];
    _turret setDir _lastDir;
    _lastDir = _lastDir - 90;
};
``` Would work I guess a lot better.
jade abyss
#

I would understand that, when setDir would be another Angle, but it isnt^^

#

Thats the other part, i totaly ignored.

jovial ivy
#

Yeah I just realized that, stupid mistake on my part.

jade abyss
#

=}

#

btw.:
dir can also be 720 for example (2x 360 πŸ˜‰ )

jovial ivy
#

True.

bitter bough
#

Well, I guess it's shorter now.
But that doesn't fix the non-autonomous turrets :/

jovial ivy
jade abyss
#

What "non-autonomous" turrets?

#

Do you want a gunner in that thing, or what?

bitter bough
#

It's the autonomous GMG classname

jade abyss
#

You have to say cleary, what you want.

bitter bough
#

However they don't operate at all

#

They just sit there doing nothing

jade abyss
#

Its an ordinary Mk32A GMG 20 mm

#

Maybe they can't turn around so far, maybe there is no enemy in sight, maybe idk

bitter bough
#

Yeah autonomous.
Meaning they target enemies on their own.
But I used the NATO classname and they refuse to shoot at CSAT

jade abyss
#

That makes no sense

jovial ivy
#
_lastDir = 360;
for "_i" from 1 to 4 do {
    _turret = "B_GMG_01_A_F" createVehicle getMarkerPos Format["pos%1", _i];
    _turret setDir _lastDir;
    createVehicleCrew _turret;
    _lastDir = _lastDir - 90;
};
#

Try adding a crew to it.

#

Thats what google shows me

bitter bough
#

How does one add crew to something without a gunner slot?

jovial ivy
#

Just use that code.

bitter bough
#

alrighty

jade abyss
#

whats that for a script you linked before, Dylan

jovial ivy
#

Whats it for? Just spawning a convoy with a front, center, and a back vehicle. And add units to them.

bitter bough
#

Well that worked. Thanks a bunch man!!

jade abyss
#
if(_bVehicle isKindOf "Tank" || _bVehicle in ["O_MRAP_02_hmg_F","O_MRAP_02_gmg_F"]) then {
->
if(_bVehicle isKindOf "Tank" || {_bVehicle in ["O_MRAP_02_hmg_F","O_MRAP_02_gmg_F"]}) then {```
jovial ivy
#

Does it matter @jade abyss?

jade abyss
#

a little.

#

It just exits if its a tank

#

doesn't check for Veh then

jovial ivy
#

Ah

#

Yeah I wouldn't want to have two tanks in my convoy πŸ˜›

crude flame
#

Alright it's really starting to bother so I have to ask about a problem I'm having: I'm trying to make an addaction that makes a radio play a sound once that can be repeated every time the sound is over... but I just can't get it to work... Would anyone have an init snippet he could throw my way for this?

jovial ivy
#
unit addAction ["Play Sound", {_this call Tut_HandleSound}];
Tut_HandleSound = {
    params ["_object", "_player", "_actionId"];
    playSound "AlarmCar";
    _object removeAction _actionId;
    [] spawn {
        _sound = ASLToAGL [0,0,0] nearestObject "#soundonvehicle";
        waitUntil {isNull _sound};
        _object addAction ["Play Sound", {_this call Tut_HandleSound}];
    };
};
#

Simpyly adds the action to whatever unit, and waits until the sound is null/not available and adds the action again.

#

To the object it was added on before.

crude flame
#

I forgot to mention that the radio should be MP compatible and only play in a certain radius with volume fallof-

jovial ivy
#
unit addAction ["Play Sound", {_this call Tut_HandleSound}];
Tut_HandleSound = {
    params ["_object", "_player", "_actionId"];
    playSound3D ["A3\Sounds_F\sfx\blip1.wav", _object, false, getPosASL _object, 1, 1, 20];
    _object removeAction _actionId;
    [] spawn {
        _sound = ASLToAGL [0,0,0] nearestObject "#soundonvehicle";
        waitUntil {isNull _sound};
        _object addAction ["Play Sound", {_this call Tut_HandleSound}];
    };
};
#

Should work ig

#

Just plays a sound off of a file name.

#

Incase your wondering, the 20 is the distance(add the end of the playsound)

crude flame
#

I get that because I've been trying to get it to work myself but I feel I'm too retarded for Arma Scripting

jovial ivy
#

I just got it off of the forums. Just gotta learn SQF, its not a fun language lol. Im a fairy good C# coder and using SQF is terrible for me

jade abyss
#

sqf is pretty easy, tbh

#

if you forget ANY other language

jovial ivy
#

I mean its not that its hard. Its the syntax.

#

Im generally used to not having to put then after my if, or not using break in my switch statements.

jade abyss
#

sqs/sqf were the first scripting/Coding Languages i learned, so... ... C# was pretty strange for me, the first time πŸ˜„

jovial ivy
#

Ah. I couldn't tell you a single thing about sqs lol

jade abyss
#

I forgot almost everything (wich is better)

jovial ivy
#

Ah

jade abyss
#

? true do player setPos[0,0,0]

#

or something like that, can't rly remember^^

jovial ivy
#

Interesting lol

jade abyss
#

Not rly ^^

#

"? CONDITION : STATEMENT 1; STATEMENT 2"

#

@
Much like the waitUntil statement in SQF syntax, @ will evaluate a certain condition, and the script will pause until @ returns true.

@ CONDITION

jovial ivy
#

I'll stick to C#, html, css, js, and sqf

#

But barely the middle three

vapid frigate
#

sort of similar to condition ? statement : statment in C#

jovial ivy
#

Actually javascript is pretty simple.

vapid frigate
#

its sort of like the designer for sqf read the contents for sql / c books

jade abyss
#

I heard phyton also, never looked at it, tbh

jovial ivy
#

Oh god python.

vapid frigate
#

but never read what the words/symbols mean

jovial ivy
#

The language that makes you indent everything.

jade abyss
#

indent?

jovial ivy
jade abyss
#

hm

jovial ivy
#

Indeed

jade abyss
#

Nah, not a "bad hm"

#

if
TAB code
TAB if
TAB TAB code
i like

jovial ivy
#

I just like using curly brackets. Helps me read the code a bit better.

jade abyss
#

As long as you are not a filthy oneliner, all fine

#

(waiting for a msg from @little eagle πŸ˜„ )

jovial ivy
#

shivers at the thought of one line code

jade abyss
#

i meant:
if()then{

instead of
if()then
{

#

disgusting

jovial ivy
#

Oh

#

if(_i < 3) then {

vapid frigate
#

thought it was pretty much standard to have that part on 1 line

jovial ivy
#

if(_bVehicle isKindOf "Tank" || {_bVehicle in ["O_MRAP_02_hmg_F","O_MRAP_02_gmg_F"]}) then { Yeah I have mine on one line, simply for tidiness.

subtle ore
#

One could say we have two different people in this world 🀷

jovial ivy
#

πŸ˜›

subtle ore
#

Precisely

jade abyss
#

πŸ˜‰

jovial ivy
#

Yall ever experiment with lua?

jade abyss
#

I simply prefer the left one, simply because of: You see exactly where a codepart start

jovial ivy
#

I just started going through sololearns courses for fun. SQL and CSS are fun to learn.

warm gorge
#

What would be causing ExtDB 3 queries/database stuff to be extremely slow? Cant figure out these lag issues on my server.

jovial ivy
#

Constantly flooding them with data maybe?

warm gorge
#

Well like I cant really cut out any of the data thats being sent to it. Its a server with 100+ players, a life server where data needs to be constantly sent and received. But the lag issues are becoming unbearable

subtle ore
#

Crappy altis life shit?

#

Ive never seen it be fast as it is

vapid frigate
#

could really be anything.. bad db design, inefficient queries, incapable software/hardware

#

you tried queries without extdb?

warm gorge
#

How do you mean without ExtDB

vapid frigate
#

extdb is just an extension to connect to a db?

warm gorge
#

Yeah so how would it work without it

vapid frigate
#

depends on the db

warm gorge
#

Well its just a general MySQL server. Its just so annoying, trying everything. Updating to ExtDB 3, optimizing scripts, etc

vapid frigate
#

using mysqlworkbench or similar then

#

could be bad settings in mysql too.. for example it uses pretty much no ram by default

#

does everything with the disk

warm gorge
#

Hmm yeah I might give that a go, look into the MySQL db settings

rancid ruin
#

a life server where data needs to be constantly sent and received
does it really though? it should be possible to get away with a pretty small amount of database i/o surely

warm gorge
#

I may have overexaggerated on that statement a bit, when I say constantly, I mean with 100+ players regularly opening their vehicle garages, syncing their data, etc, it ends up being very often that data is sent/received

rancid ruin
#

why can't you just hold most data in memory and read it from there? write it to db periodically or when a player leaves

warm gorge
#

Well a lot of it is held in memory, and it does get saved when a player leaves etc, but they can optionally force sync their data (with a cooldown) and reload their garage

#

Would running the performance binaries of the arma 3 server .exe help at all?

rancid ruin
#

i would not trust players, let alone life players, with the ability to "sync" their data at will and spam my database

#

keep all that shit server side

#

wouldn't expect performance binaries to help much. also they are not "stable", they're experimental

warm gorge
#

Yeah, fair enough

simple fiber
#

Hey guys

#

Does anyone knows why there is so much aliasing on 3D Controls

vapid frigate
#

didn't know there was 3d controls

simple fiber
#

Me neither since yesterday

vapid frigate
#

how do you do it?

vapid frigate
#

oh it's a p3d?

simple fiber
#

It's on a object yes

#

It is not an object itself

#

It's just rendered on one

jade abyss
#

Played around with it earlier, its... meh.
I ended up with createVehicleLocal and attachTo πŸ˜„ (for first Person attached to head)

simple fiber
#

I used it hoping that I could rotate dialogs and stuff

#

Well...

#

That aliasing is just ugly af

vapid frigate
#

never really seen those object controls being used

#

i guess that's why

simple fiber
#

:/

#

I had to create a transparent p3d with the related memories

vapid frigate
#

i assume u have AA turned on? can't really tell in VR

simple fiber
#

I tried on Ultra as well as on Low

#

I am on Ultra btw

vapid frigate
#

configSourceAddonList

simple fiber
#

It does not change anything, I think It does not depends on the object quality because it is in fact rendered as a GUI and not an object

#

Nor AA

vapid frigate
#

yeh makes sense i guess.. none of the other UI is antialiased

simple fiber
#

It sucks

#

I don't want to create a p3d with anims for each interface element

#

Still hoping KK or a BIS dev will see my forum post and clear things out

vapid frigate
#

could just make it 2d? (but 3d looking)

simple fiber
#

Nope

#

You can't rotate / vector 2D

vapid frigate
#

you can rotate some?

simple fiber
#

I could use pictures but I need it to be dynamic and try not to use hacky methods

#

I need 3D because the effect is created with VectorDirAndUp

#

(Health Bar + Status Bar)

vapid frigate
#

would definitely be possible with pictures with the exception of text

#

and the blur effect

simple fiber
#

I need it to be dynamic with text so rip

#

And it would be easier

vapid frigate
#

yeh that wouldn't really be doable with 3d objects even?

simple fiber
#

Why that ?

vapid frigate
#

text on them?

simple fiber
#

You can create whatever control you want

#

Including text

#

Lists

#

Whatever

vapid frigate
#

you can make any control 3d?

simple fiber
#

😒

#

Yes

vapid frigate
#

oh ok.. thought you were using a model or something

simple fiber
#

Well

#

You need a model

#

You "attach" GUIs on the surface of the model

#

In a memory defined space in the p3d

vapid frigate
#

yeh ok.. interesting

#

using attachTo? or is there a command for it?

simple fiber
#

It's only in config classes

#

No external commands

vapid frigate
#

ah ok

#

seems like it's almost useful

simple fiber
#

It's simple when you get it

vapid frigate
#

other than that aliasing

simple fiber
#

It is

#

But it's ugly when GUIs are rendered on a 'non-flat' surface

#

That's sad really

#

I'll try to report it on the tracker but I don't think it will ever change

vapid frigate
#

yeh i wouldn't hold your breath

simple fiber
#

Still, useful to know.

agile pumice
#

so I'm seeing "Engine On/off" under common controls, but I can't seem to find the actionkey

indigo snow
#

keyEngineToggle[]={}; in profile, suggests the action is EngineToggle

agile pumice
#

PROFILE thats where I had to look XD

indigo snow
#

They're all in there, prefixed with key

#

number is a DIK with some extra magic if its doublepress

#

did a thing where it would check if a player had grenade throw bound to 2xG instead of G once

tough abyss
#

I often see fewer, large scripts when disecting other addons/missions. Is arma 3 less effecient when using more script files, and this is why people condense things into a single file? Or is it examples of poor scripting?

bitter bough
#

my guess is that the larger files are a form of framework. something for the smaller files to call from instead of having a load of large scripts with the same lines.
though I could be very wrong

rotund cypress
#

If I wanted to check if _x is a weapon, how would I do that? I could do _x isKindOf ["Rifle", configFile >> "CfgWeapons"];, but I want to check if it's a weapon overall

subtle ore
#

@rotund cypress you got the right idea, same thing applies for pistols and for sniper rifles they each have their own base. You can see these config parents in the config viewer

queen cargo
#

@tough abyss most ppl simply do not script that much
and if there is nothing to script, you might be good with just 2 files providing the functionality
but most of the time it is just lazy stupids being stupid

tough abyss
#

@queen cargo Maybe, but I honestly see it everywhere.

queen cargo
#

check out the larger mods/missions
not the smaller ones

#

those tend to have extensive usage of scripting

rotund cypress
#

I am doing this ```{
hint str (_x);
} forEach nearestObjects [getPos player, ["WeaponHolder", "GroundWeaponHolder", "WeaponHolderSimulated"], 5];

#

I get the weapon model of the weapon, but I want to get the class name.

#

Is there a way?

rancid ruin
#

typeOf?

rotund cypress
#

It just says ground weapon holder then

rancid ruin
#

yeah you need to go through the contents

rotund cypress
#

With like _forEachIndex?

rancid ruin
#

what?

#

i think you can just use weapons/magazines command on the weaponholder

rotund cypress
#

I'm a bit lost πŸ˜„

#
    hint str (typeOf _x); 
} forEach nearestObjects [getPos player, ["WeaponHolder", "GroundWeaponHolder", "WeaponHolderSimulated"], 5]; 
rancid ruin
#

start from step 1: explain what you want to do

rotund cypress
#

Thats what I got

#

I want to basically get all item classnames in those weapon ground holders¨

rancid ruin
#

weaponCargo magazinesAmmoCargo itemCargo

#

that family of commands, on a weaponholder, will tell you what you need to know

rotund cypress
#

ah alright nice, that helped thanks

rancid ruin
#

at least, they're what i used in this old ass script i just dug up

rotund cypress
#

Worked perfectly, thanks @rancid ruin πŸ˜ƒ

rancid ruin
#

no worries

still forum
#

@tough abyss Yes SQF is less efficient if you call into other sqf files instead of just doing it inline. But virtually every Programming language has the Same problem so that's nothing really arma specific. And the performance impact is so small that it doesn't matter in most cases.
And yes. That's probably just poor scripting.

tough abyss
#

@still forum thank you for the informative answer πŸ˜ƒ

little eagle
#

Replace all function calls with #include inlineing.

#

Kappa

wispy kestrel
#

I've been trying for an hour or so to get BIS_fnc_diagAARrecord to work. I can't figure it out. I've looked through the functions via the functions viewer and determined that the recorings are saved to profileNamespace. The wiki page is not very helpful https://community.bistudio.com/wiki/BIS_fnc_diagAARrecord

rancid ruin
#

are you sure it's actually functional? do other people use it?

little eagle
#

wth does it even do?

rancid ruin
#

i think AAR = after action report. like a replay of what happened during the mission

wispy kestrel
rancid ruin
#

are you sure? i'd bet that's custom written for his little crew

#

This is something myself and zx have been working on for ShackTac recently. It's a work-in-progress currently.......

little eagle
#

Sounds definitely like something they cooked up and not at all like BIS_fnc_diagAARrecord

wispy kestrel
#

You see, BIS_fnc_diagAARrecord has a partner function called BIS_fnc_diagAAR which, when called returns error No AAR Recordings found #define PROFILE_AAR_VARNAME "BIS_fnc_diagAAR_data" #define PROFILE_AAR (profilenamespace getvariable [PROFILE_AAR_VARNAME,[]]) because "BIS_fnc_diagAAR_data" is nil, obviously because BIS_fnc_diagAARrecord hasn't been run.

little eagle
#

The whole function looks broken to me.

#

disableserialization;
_mode = _this param [0,"Init",[displaynull,"",0]];
_this = _this param [1,[]];

switch _mode do {


    case "Init": {
        _display = _this select 0;
#

This makes no sense

#

_this select 0 cannot be "init" and a display

rancid ruin
#

googling the function names yields 0 results of it being used in a mission

#

almost certainly broken

wispy kestrel
#

I suspected as much however I thought it couldn't hurt to ask around. sad-face

rancid ruin
#

surely someone must have scripted and released one? it's a pretty common request and shouldn't be hard to do technically

little eagle
#

I think it would be easier to write this from scratch. Doesn't sound that complicated tbh.

#

Like 100 lines. Done in 3 hours I guess.

rancid ruin
#

now you just need to tell Hill your hourly rate and you guys can get this moving πŸ‘

little eagle
#

pff

still forum
#

VBS has AAR Stuff. But I'm very sure that's not implemented in Arma

leaden summit
#

Didn't someone from 3CB release an AAR application?

grand berry
#

Yea its called OCAP

#

Works really nicely.

bitter bough
#

^
The group I'm in has just started using it not too long ago. Its fairly nice.
That or the alive war room. But OCAP is a bit simpler.

#

Note: not optimized for mobile

tough abyss
#

hey guys, does anyone know how to indicate if the mission loading screen has finished?

rancid ruin
#

maybe check if the main mission display is not null?

#

or if player is not null

still forum
#

Can also check if loading screen display is null

tough abyss
#

do you know the idd?^^

still forum
#

RscDisplayLoading 102
RscDisplayLoadMission 101

tough abyss
#

thanks, i will try that out! Also Thank you @rancid ruin for you advice πŸ˜ƒ

warm lintel
#

I have a scripting problem that's driving me slightly mad, how do you get the variablename of a player who activated a trigger into a script?

I'm making an escape & evade type mission where players are spread out all over the place and don't have a map. In the hopes of making it JIP compatible, I want each player to have an individual trigger which fires as soon as the specific unit is present at spawn and immediately strips the map from their inventory then runs setcaptive false after 10-20s to let them safely get their bearings and recover from the surprise of not having a map (I've not removed them from the unit inventory so they can see it before the mission then get surprised on start). I could do it through triggers but to do it in a staged way which also retains the JIP compatibility, it'd be 2 triggers per player and there's over 40 player slots, I'd far sooner call a single script on each trigger that gets the name of the activating player then strips the items, waits a bit then sets the player as non-captive.

This is what I'm trying to make:

PLAYERNAME unassignitem "itemmap";
PLAYERNAME removeitem "itemmap";
Sleep 20;
PLAYERNAME setcaptive false;

I'm sure I'm missing something facepalmingly simple and I could swear that I've even made these kind of things in the past but I can't find any of my older stuff. Can anyone tell me how I go about getting PLAYERNAME?

distant egret
#

@warm lintel just use player?

warm lintel
#

Would player work for a specific unit in a scipt though? Say if a unit with the name B3 tripped the trigger, would "player unsassignitem "itemmap";" work on JUST B3 or on every unit that's driven by a player?

distant egret
#

player is only for player.

#

but what you can do via triggers is get the units that activated the trigger.

#

you might want to look at that as well

#

thisList

tough girder
#

by making trigger condition be player in thisList you'll make trigger local (activation: anybody)

warm lintel
#

So if I used player in thislist as the activation of the trigger, I could then use player setcaptive false in the script since there'd only be one player on the local machine? Can player machines tell the server that they should be made/released from captive?

blazing zodiac
#

Does anyone know how to stop arsenal from breaking r2t? Currently at my mission start I have a UAV with a r2t to a screen showing the live feed but as soon as arsenal is entered the screen goes black, any ways around this?

tame portal
#

@warm lintel player is ALWAYS the local player, there can't be more than one

little eagle
#

Well, player could be null in some scenarios and null is local to no machine.

tame portal
#

commmmmmmmmmmmmyyyyyy

little eagle
#

@blazing zodiac Ist that a picture in picture thing?

tame portal
#

Yeah, it can be null, like on the server or when the game is loading into a mission

blazing zodiac
little eagle
#

That is an old bug then. Every time you create a camera, all render to texture 2d (works fine in models like rear view mirrors) picture in picture textures bug out and become black.

#

You could try to recreate the pip control once the arsenal is closed.

tame portal
#

@warm lintel Right now when I walk into your trigger, it will run it's on activation code on all machines, since on all machines I activated the trigger, however if you use player in thisList as the condition, the trigger will only fire on the machine where player (always yourself) is inside the trigger area, meaning it will only set off the trigger if you ran into the trigger or someone else did and you're already in the trigger zone

blazing zodiac
#

Ahh, makes sense then. The arsenal cam create is breaking it

little eagle
#

Yes.

blazing zodiac
#

I don't suppose there is an event handler tied to closing arsenal?

little eagle
#

The same happens for my picture in picture scopes when opening the arsenal.

#
[missionnamespace, "arsenalClosed", {
    systemChat str _this;
}] call BIS_fnc_addScriptedEventHandler;
#

I think this is how it goes.

blazing zodiac
#

Oh ok, I'll play around with that. Thanks as usual commy.

little eagle
#

Actually the bug isn't triggered by creating the camera, but by using cameraEffect on it, but details...

blazing zodiac
#

Ah ok, so

#

I think I have a solution, good to know about that bug though. Back to testing!

warm lintel
#

@tame portal Hmm, that sounds promising, can I then just use player as the unit variable name in an assoaciated script?

tame portal
#

@warm lintel Since you use that specific condition, it's safe to execute a script and use player in it, it will only run on the machine that entered the trigger

#

So player will always be the person entering the trigger (since it only runs on that players machine)

warm lintel
#

Hmm, that sounds like it might be what I need, cheers mate

warm gorge
#

Is there a way to export a list of all animations?

little eagle
#

define "animation"

warm gorge
#

Unit animations, eg AinjPpneMstpSnonWrflDnon. I think I found a way, just opened up the BIS function for animViewer

little eagle
#

That will be a looong list - not very useful.

#
{
    diag_log text configName _x;
} for<Each ("true" configClasses (configFile >> "CfgMovesMaleSdr" >> "States"));
placid root
#

hey, can someone help me with the remoteExec of "lock"?

#

[_car, 0] remoteExec ["lock", owner _car] does not work o.O

#

putting the command in a function did also not work. (at least this trick worked with playsound3d πŸ˜› )

peak epoch
#

try just _car as target

placid root
#

same thing

#

is this command not supported?

tough girder
#

you need to remoteExec lock globally

placid root
#

lol this is the one thing i did not try πŸ˜›

little eagle
#

owner only works on the server machine

jade abyss
#

☝

little eagle
#

lock has global effects , so you only need to run it on one machine, not all.

tough girder
#

does it?

little eagle
#

I think you just have to remove owner.

jade abyss
tough girder
#

oh, it has local arg

placid root
#

argument local effect global

little eagle
#

Effects: global

tough girder
#

misremembered, sorry!

jade abyss
placid root
#

yeah this one did not work either

jade abyss
#

It does

little eagle
#

Have you tried without owner?

placid root
#

i am trying it now

jade abyss
#

And i am using it

little eagle
#

You'll see that it will work.

jade abyss
#

last time: about 3 Days ago @placid root

placid root
#

[cursortarget, "unlocked"] remoteExec ["setVehicleLock", cursorTarget] worked fine thx

jade abyss
#

Told ya Β―_(ツ)_/Β―

blazing zodiac
#

Is there a way using cameraEffect or something of the sort to look through an optic?

round scroll
#

a request for a code review, I've started to look into the Unsung melee modes, stabbing with knife and bayonet and throwing a knife. I've assembled a small sample mission (can be used with Unsung delta) at: http://tetet.de/arma/arma3/Download/unsung/[sp]melee.VR.7z The code for the init is also available at http://pastebin.ubuntu.com/24446865/ The code should run locally on a client from a module later on, so I have to tie it onto a player, not sure yet how to do that in a good way.

#

my concern with the code is now, that it adds actions for (cursor)targets and never removes them. I don't imagine that there will be dozens or hundreds of such close contacts, but just in case I wonder if there's a limit to using addActions like that

jade abyss
#

I would check for _bayonetClasses as the very first check, tbh.

#

Mostly because of -> If guy has no bayonet -> No need to check for the rest of the scripts (wich saves some cpu/cycletime

round scroll
#

hmm, no, the knife is distinct from the bayonet check. But thanks, it seems I forgot the range check before adding the action when using bayonet

#

but valid point, reverse the logic for the knife check as well

#

check first for knife presence, then for distance to target

jade abyss
#

Yeah, thats more or less what i meant^^

round scroll
#

thanks πŸ˜„

jade abyss
#

+do you rly need the setVariable command?

round scroll
#

is there a better way to check if the action is already present?

jade abyss
#

Don't do it by addAction, tbh

#

keyHandler for example (just an idea)

round scroll
#

hmm, that would be neat and less clumsy

jade abyss
#

like when you click F and you an enemy is your CursorTarget -> STAB Action

#

At the same time you just disable the standard Command button F

#

(Info: I hate the addAction menu πŸ˜„ )

round scroll
#

I admit to have not really looked into keyHandlers yet, so I guess there will be a learning curve?

round scroll
#

I don't like it that much either, but a lot of the legacy code I maintain relies on it

jade abyss
#

More or less ignore Line 12 to 29, just the "call _BD" part would be needed + your code for stabbing in the center

#

mom

#

*updated

round scroll
#

thanks @jade abyss!

warm gorge
#

Any idea why when I call lbClear on a list box and re-populate the list the scroll position is all messed up and like scrolled all the way down and you cant see any items until you scroll back up? Only noticed this since lastr update

jade abyss
#

@torn juniper Invoice! Cmon.

round scroll
#

@jade abyss question: why not set _buttonDisabled = true and use the call instead?

jade abyss
#

When you have multiple Buttons assigned, it would always be a:
_buttonDisabled = true;
its just shorter to type
call _BD;

#

Means: If (in this case Circumflex/the button left of 1, the one above TAB) -> It doesn't execute the standard Command.

#

for example:
If we would change it to switch and you look at an enemy unit -> It would block opening the map

#

(just HL me if you have another Q)

warm gorge
#

Anyone had issues with the canAdd command returning false even know the player has enough space?

#

Actually seems to be related to the bergen backpack for some odd reason

little eagle
#

repro

warm gorge
#

Was reproduced by @tough abyss but no updates since on it

little eagle
#

Hmm. That answers your question then.

warm gorge
#

Ah thats painful, kinda needed that command

little eagle
#
canAddItemToBackpack
#

Or something like this

warm gorge
#

Was about to test that to see if it works actually, gimme a sec

little eagle
#

fixed spelling

warm gorge
#

Tried the other canAddItemTo__ commands and they all seem to be buggy and innacurate

#

I guess ill have to remove my use of it until its fixed

little eagle
#

Should add a warning on the wiki

#

"this command does not work as expected under unknown circumstances"

#

(cur | prev) 23:59, 22 April 2017β€Ž Killzone Kid (Talk | contribs)β€Ž . . (31,776 bytes) (+1,131)β€Ž . . (Undo revision 99557 by Commy2 (talk) Not working properly =/= not implemented. Reverting until the decision about its future is made.) (undo)

torn juniper
#

I was slept @jade abyss rip me

#

I have failed you

jade abyss
#

pff, too late...

warm gorge
#

@little eagle How do I do that exactly?

#

Just by adding a note?

little eagle
#

Edit the wiki? Log in and click "Edit".

warm gorge
#

Aight cheers will do

manic sigil
#

Is it possible to 'reuse' a radio channel? I have a trigger for Radio Alpha, to have a helicopter bring in a supply box - but I want to use as few Radio slots as possible, can I have a trigger that replaces Radio Alpha with another action? Or does using Radio Alpha 'consume' that action for the rest of the map?

warm gorge
#

@little eagle Should I edit all of the related commands that are having issues? With the warning?

little eagle
#

Sure, all of them

warm gorge
#

Does animateSource work in singleplayer?

little eagle
#

Yes

turbid thunder
#

@manic sigil You could either try creating a new trigger with activation condition "Radio Alpha" or, preplace a trigger and set the activation condition to "Radio Alpha" once you did the first Radio Alpha action

little eagle
#

But it does not work when simulation is frozen, e.g. in 3den or until the pause menu is closed.

warm gorge
#

Would it be causing im executing it from the debug console (pause menu open)?

little eagle
#

The animation would happen when you close the pause menu.

warm gorge
#

For some reason its not working. Using this: cursorObject animateSource ["Door_1_source", 1];

#

On a house

jade abyss
#

does work

little eagle
#

Animations don't work when simulation is disabled.

jade abyss
#

But: Some are already updated to
Door_1_sound_source and Door_1_nosound_source names
As long as the Object is active (e.g. Mapobject)

#

Yeah, Commy described the 2nd part better πŸ˜„

little eagle
#

Error could be:

#

cursorObject is null

#

animation name is wrong

warm gorge
#

Yep turns out the animation name is wrong

little eagle
#

or simulation is disabled

warm gorge
#

@jade abyss I think I saw you post a script for this earlier, but how would I make it use the correct animation for opening/closing, considering their not all the same

jade abyss
#

You mean CUP for example?

warm gorge
#

This is for vanilla Arma, no mods. Just changing from using animate to animateSource for opening/closing doors

jade abyss
#

Then it should be that door_1_sound_source thing

#

regarding CUP:
I am currently updating the CUP Buildings, so they have the new Source_names (and also are compatible with my script πŸ˜„ )

#
door_1_sound_source
door_1_nosound_source
door_1_locked_source```
warm gorge
#

Ah I see. How recent are these new source names?

jade abyss
#

1.68

#

last Patch iirc

warm gorge
#

Ah that'll explain it then

#

Cheers for that. Ill update the wiki for animateSource to point this out. Im not im not the only one who would question it

manic sigil
#

@turbid thunder im trying that, but once I use 'send basic supplies', the 0-0-1 action disappears, and I cant seem to get another to take its place even with triggerActivated :/

turbid thunder
#

I guess that cant re-enable a radio trigger that has already been used?

#

If so, Plan B: delete the old trigger BEFORE doing that

jade abyss
#

Trigger 😬

turbid thunder
#

Even worse: Radio activated trigger

manic sigil
#

Yay complication. I could just do it as an addAction, but didnt want that clutter going on. Bluh. Ill test deleting the old trigger (deletevehicle, right?), though ive been having trouble with the radio strings appearing regardless of conditions set, just if they function or not... barring that, addAction it is.

turbid thunder
#

There is no way a trigger that hasnt been set to be radio activated will show up a radio activation thingy

#

But yeah, addAction works too. Just remember that addAction is entirely local

torpid oriole
#

Hey, I am trying to define the altidude of an AI plane but for some reason the "flyInHeight" command is ignored. Any idea why this could happen?

torpid oriole
#

nvm.... my stupiditiy

manic sigil
#

If i have an Addaction run [player setPos [...]] in a multiplayer map, will it teleport all players or just the triggerer? Im afk and cant test but curious.

#

Additionally, is there a way of recording how many times a unit is hit/how much damage they would have recieved from a shot, if they werent immortal?

rancid ruin
#

player is a local thing, so if you ran player setDamage 1 in multiplayer, it would just kill your local player

#

if you wanted to move all players then you would have to iterate over all separate players

#

you can do that on a client or server though, just not using "player" object cos that only refers to the one, local, player

#

think "hit" evh is the one you want, not 100% sure though

digital hollow
#

If you want to record but negate damage, use HandleDamage

manic sigil
#

@rancid ruin thanks! Thats fine, its a simple "climb" script to allow players to mantle a stack of pallets to take a set of sniper positions - its supposed to just be the one local player per spot.

Ill look into event handlers - the idea is a virtual tutorial, and I dont want them getting popped off every five seconds, but a running "you took 5 lethal shots" counter will suffice.

rancid ruin
#

pretty sure you do want handleDamage then

#

i used that one to make a script which reduces damage taken

manic sigil
#

The Hit EH specifically doesnt fire when allowdamage false is applied :c

rancid ruin
#

just read the MP-Effects part of the table on the event handler page

#

use handleDamage, ampersand is correct

manic sigil
#

Yeah, handleDamage looks more like it. Now to learn how to use EHs.

#

This unit, on handleDamage, store damage amount in personal variable (that gets mathed out to ticking up once per 100 damage), set damage to 0.

manic sigil
#

This unit, on hit, say3d "NOOTNOOT.mp3"

blazing zodiac
#

Is there any command to return the current camera?

jovial ivy
#

@blazing zodiac Uhm, as in third or first person? Or like, spect?

blazing zodiac
#

Like return the current camera itself, like say the camera created in arsenal

jovial ivy
#

Oh

blazing zodiac
#

I'd like to terminate it on button click and switchCamera "GUNNER" so you can see the optics in arsenal without leaving it

#

I already was able to add a clickable button and whatnot via the arsenalOpened scripted EH

#

But just switchCamera player; player switchCamera "Gunner" isn't working in there

#

So I figured I need to return the camera they create and then terminate it and then recreate it when I wanna switch back

jovial ivy
#
waitUntil { isnull ( uinamespace getvariable "RSCDisplayArsenal" ) };``` for the arsenal ig? Googled it: https://forums.bistudio.com/forums/topic/174100-detecting-player-exiting-arsenal/
blazing zodiac
#

I already am using the arsenalClosed scripted EH for that by BI to restore my UAV live feed

#

But I suppose I could just make the button leave arsenal switch the camera to gunner and then reopen arsenal itself

#

But my idea before was to add a toggle between aim down the sight and the arsenal camera

high vigil
#

question for vets, if you have all ai running on HC does server not need to have high view distance any more? Does it make sense to set server to 1k and hc to 5k view distance?

snow pecan
#

Anyone ever mess with any spacial - partitioning structures in SQF?

warm gorge
#

@little eagle Those warnings you suggested me adding to the canAdd commands got removed by Killzone as they apparantly werent helpful lol

vague hull
#

@snow pecan depends on what you're referring to with that

thin pine
#

Comrade zooloo75 was messing with that. Apparently he didn't release the scripts so you'll have to contact him. @snow pecan

placid root
#

hi guys, I am facing a strange problem. When I attach an object to another, e.g.

attachedBlock attachTo [block, [1,2,3]]

I can get its "attachTo" coordinates non dependent on hight or rotation by using

block worldToModel [0,0,0]) vectorDiff (attachedBlock worldToModel [0,0,0]

Now I wanted to do the same with the EdenCamera and a selected object to make some intro sceens.

_camera attachTo [_campos, _relCoord];

Unfortunately by using

((get3DENCamera) worldToModel  [0,0,0]) vectorDiff (((get3DENSelected "object") select 0) worldToModel [0,0,0])

I get wrong coordinates.
Can anyone help to fix this?

jade abyss
#

1.:
```sqf
CODE
```

#

This is a frkn nightmare to read

placid root
#

haha didn't know that sorry. it really does look better this way

jade abyss
#

```sqf <-- makes it look shinyyy

placid root
#

bΓ€m πŸ˜›

jade abyss
#

fancy

placid root
#

yup it is but still confused

jade abyss
#

(p.s. No clue regarding your prob)

little eagle
#

worldToModel [0,0,0]
πŸ€”

placid root
#

worldToModel gives the the coordinates no dependent on rotation and hight

little eagle
#

coordinates never depend on rotation and the height is always part of a 3d position. You're not making sense.

placid root
#

with

b attachTo [a, [1,2,3]]

you get:

(b modeltoworld [0,0,0]) vectorDiff (a modeltoworld [0,0,0]) = [2.21045,0.338379,-3]


(a worldToModel [0,0,0]) vectorDiff (b worldToModel [0,0,0]) = [1,2,3]
little eagle
#

tried this?

getPosASL a vectorDiff getPosASL b

Still don't get what you're doing.

placid root
#

this is dependent on the rotation

#
getPosASL a vectorDiff getPosASL b = [2.21045,0.338379,-3]
little eagle
#

But what are you trying to do?

placid root
#

damn, i have to go to work... i will post this again later... sry

jade abyss
#

Quit work

placid root
#

haha i should! arma is better

#

but more frustration πŸ˜›

snow pecan
#

@vague hull Merely improving the spacial lookup of points on the map
@thin pine Thanks, curious if he found one that works best, seems like Limited-Depth, KD-Trees are the answer

thin pine
#

@snow pecan I think he went for octrees or something, I can't remember, it's been like a year. The performance benefit you're going to get out of it is going to be slim though since you're working with the SQF scripting language and not C++ directly (unless you're planning to do some Intercept/Extension voodoo magic)

snow pecan
#

Well, I'm only working with 2 dimensions. I tried quadtreees but seemed like SQF couldn't handle it too well, negligable to negative results. Currently seeing 4x speed improvement with a KD Tree limited to 3 branches though.

tough abyss
#

Hello guys, i have a problem. I'm creating a scenario (arma 3) in eden editor. BUT, i want my players come in taru pod (thats not a problem) and i want this pod paradrop on my base (and i don't know how to do)

little eagle
#

Please elaborate on "come in taru pod"

cedar kindle
#

probably respawn

little eagle
#

Sounds pretty badass.

#
private _pod = "Land_Pod_Heli_Transport_04_bench_F" createVehicle [0,0,0]; 
private _chute = "O_Parachute_02_F" createVehicle [0,0,0]; 
 
_chute setPos (getPosATL player vectorAdd [0,0,100]); 
 
_pod attachTo [_chute, [0,0,1.45]];
tough abyss
#

Found it!!

#
parachute_1 = "B_parachute_02_F" createVehicle [0,0,0]; 
parachute_1 setPosASL (getPosASL this); 
this attachTo [parachute_1, [0, 0, 0]];
analog umbra
#

Does anyone know how to populate a listbox or combobox with filenames from folder?

boreal edge
#

Is your question how to add something to a listbox or how to find all files in a folder?

analog umbra
#

how to find files in folder and add the names to a listbox

#

like dir into listbox

boreal edge
#

I think there is no Script Command to do something like a dir command, i think you need to keep a array of filenames manually.

analog umbra
#

ye i did dome searching earlier but couldnt find something other then manually add

boreal edge
#

if you have a array of filenames you could use forEach for the lbAdd commands

analog umbra
#

yes thats what i thought. Thanks πŸ‘

boreal edge
#

πŸ‘Œ

#

Question: Is a SQS Script unschedueled?

jade abyss
#

what why

grand berry
#

Hasn't SQS been depriciated for years now?

placid root
#

hi guys, I'll try to ask my question here again. I need the vector used in attachTo from the Eden camera in relation to an object.
With two objects this works fine:

(a worldToModel [0,0,0]) vectorDiff (b worldToModel [0,0,0]) = [1,2,3]

-> b was attached to a with ** b attachTo [a, [1,2,3]].**

But if i use this on the Eden camera in the editor the result is wrong.

((get3DENCamera) worldToModel  [0,0,0]) vectorDiff (((get3DENSelected "object") select 0) worldToModel [0,0,0])

Why?
And no modelToWorld does not work. I is dependent on the direction an object is facing and the hight.I hope I made it clearer this time.

queen cargo
onyx geode
#

Hi guys,
i'm trying to create a trigger global with this code

private _trigger = createTrigger["EmptyDetector",getPos _radar,true];
_trigger setTriggerActivation ["ANYPLAYER","PRESENT", true];
_trigger setTriggerArea [10,10,0,false,10];
_trigger setTriggerStatements ["objectParent player in thisList", "systemChat 'trigger on'", "systemChat 'trigger off'"];

Now it should trigger when the player is inside a vehicle, but it only triggers on the client who created the trigger when he is inside a vehicle. When another client should activate the trigger, the trigger doesn't trigger.
How can i fix this or is the createTrigger just simply broken?

manic sigil
#

Does the Scenario Name module not work when triggered mid-mission? I can't seem to get it to run :/

tough abyss
#

what does the 9 in O Alpha 1-2:9 REMOTE

#

mean

plucky beacon
#

Unit 9 in group 1-2?

tough abyss
#

what would cause members of the same group to attack eachother?

plucky beacon
#

Changing their side

tough abyss
#

and what scripting command changes side?

#

i have some setFriend stuff but it seems to break since my AI are on resistance

plucky beacon
#

Grouping AI with a unit that is not on their sode will cause them to be hostile too

#

Especially in multiplayer

tough abyss
#
EAST setFriend[RESISTANCE,0];
RESISTANCE setFriend[WEST,0];
RESISTANCE setFriend[EAST,0];
WEST setFriend[EAST,1];
WEST setFriend[RESISTANCE,0];
BLUFOR setFriend[OPFOR, 1];
OPFOR setFriend[BLUFOR,1];``` Those are my current side relations
still forum
#

changing their rating? Dunno how it's really called

#

if someone does teamkills his rating lowers. and when too low he gets attacked by friendlies

tough abyss
#

interesting. setGroupOwner could this command screw with all of that?

#

if i use it on an HC?

plucky beacon
#

Possibly if the group owner isn't friendly

tough abyss
#

that might be the cause. HC is / might be different

forest jasper
#
_messages = KAPU_messages;
reverse _messages;

my global var get reverse - -

#

anyone ?

dusk sage
#
_messages = +KAPU_messages;
reverse _messages;

@forest jasper

forest jasper
#

ya

dusk sage
#

That's your answer

forest jasper
#

god bless you i got this
_messages = str KAPU_messages;
_messages = call compile _messages;
reverse _messages;

#

shitty code lol

dusk sage
#

lol πŸ˜›

subtle ore
#

Any idea how I would be able to get the position of a memory point or selection name on a character? I have the selection name, but I'm just not sure how to utilize it

rancid ruin
subtle ore
#

Hmmm...I knew about attachTo, I was just hoping there was something other than

rancid ruin
#

oh right

#

maybe you could attach a dummy object then get it's position?

subtle ore
#

Possibly? 🀷

rancid ruin
#

that looks like what you want

subtle ore
#

Wow, thanks. Totally glanced this one over.

rancid ruin
subtle ore
#

Interesting, this'll make use for automation.

blazing zodiac
#

Does anyone have any idea why the EndMission respawn template may not be working?

#
respawnTemplates[] = {"EndMission","Tickets"};
#

That's the template, in the player init I add 2 tickets to them

#
[_unit, 2] call BIS_fnc_respawnTickets;
#

When I go in and kill myself I get the one respawn like expected

#

But the second time I die the mission doesn't end, I just stay stuck in the respawn dialog that pops up when you die

sterile ravine
#

i just try to optimize performance of a mp mission (a3 wasteland fork). if i test with my client as a server and place lots of buildings on the map (from database) (allmissionobjects "all" = ca. 1600) i see a large drop in server fps. if i enable dynamic simulation for loaded objects (is enabled globally and set on all building objects) the fps are not changing at all. so i suppose the dynamic simulation stuff is only helping for client fps - not for server fps. is there any way to optimize server/code/anything else for larger object counts. especially static objects without simulation enabled?

warm gorge
#

Is there an easy way I could parse an animation name and have it determine whether switchMove or playMove needs to be used/would be compatible with the animation?

fast fractal
#

how do you bind an action to a button? if anyone can help me out. or just link me the command on the wiki. i dont know what the name is

vague hull
#

ctrlAddEventHandler -> (on)ButtonClick

fast fractal
#

thanks

subtle ore
#

Its just ButtonClick , onButtonClick does not work

vague hull
#

thats why the brackets

jade abyss
#

iirc onButtonClick was in the config

vague hull
#

exactly

#

but in the list of EH's its named onButtonClick

subtle ore
#

ButtonClick is what you neeed to use though, regardless.

tough abyss
subtle ore
#

---^

placid root
#

hi guys, does anybody see a flaw? it should position the players on various object named des_pos_1, des_pos_2 etc. it is called by the server.

for "_i" from 1 to count (playableUnits + switchableUnits) step 1 do {
    _player = (playableUnits + switchableUnits) select (_i - 1);
    _pos = call compile ("des_pos_" + str _i);
    _player setPos getPos _pos;
    _player setDir getDir _pos;
};
manic sigil
#

Should getPos _pos and getDir _pos be in ()?

placid root
#

nope works fine for dedi hoster

#

and sp

#

maybe i just execute this globaly and rename the objects.

_pos = call compile ("des_pos_" + str (name player));
player setPos getPos _pos;
player setDir getDir _pos;
manic sigil
#

<is amateur coder, that sounds like a plan.

placid root
#

but i am still curious why the other code did not work

onyx geode
bleak schooner
#

How can I check if the Zeus Interface has been closed?
waitUntil {isNull (findDisplay 312)};
doesn't work

still forum
#

Do you have CBA?

bleak schooner
#

no

still forum
#

doesn't work

bleak schooner
#

Is there a way to open the Dynamic Groups Interface via script?

rancid ruin
#

not sure what that is, but it's probably a display or a dialog, so you'd just need to find out the id number then create it in the usual way

bleak schooner
rancid ruin
#

i think there's a command which lists all open dialog/display IDDs. so you could open the groups interface, then run that command

bleak schooner
#

works thx

burnt sand
#

How do i turn props into storages

#

Pls help

subtle ore
#

@burnt sand you dont?

burnt sand
#

So how can I get storage containers

blazing zodiac
#

I answered you in the other thread @burnt sand

burnt sand
#

Oh

blazing zodiac
#

You'll be better off asking in config editing

#

I would assume you need to create a new class

#

And use the model of the prop

burnt sand
#

kk

#

I will have to ask about it tomorrow it is late

blazing zodiac
#

Honestly it's gonna be pretty complicated if you've never messed with configs before

burnt sand
#

I have never

blazing zodiac
#

And to use it you will need everyone to load a clientside mod

burnt sand
#

I am making this for single player

blazing zodiac
#

Oh ok, that simplifies things

burnt sand
#

Yeah lol

blazing zodiac
#

You will still need to load a mod though

burnt sand
#

What kind of mod

blazing zodiac
#

A mod you create

burnt sand
#

πŸ˜•

blazing zodiac
#

Yea, as I said pretty complicated compared to your average sqf stuff.

#

Pennyworth might be willing to walk you through it in there though, not positive

burnt sand
#

Like how do I make a crate like the ones in wasteland

blazing zodiac
#

Not sure, never played wasteland.

#

Is wasteland mission file only?

burnt sand
#

basically it opens your invetory and you put crap in it like a vehicle

blazing zodiac
#

Oh like a scripted inventory

#

That's something else entirely

burnt sand
#

I guess but like the in game one for your guns

#

And uniforms

#

Like a truck

blazing zodiac
#

Not sure, you could potentially recreate the entire default UI and add it as an addAction to get around making a new model. But also very complex for someone that's not experienced and I'm not 100% sure it would work entirely in the mission file

burnt sand
#

Ok 😐

#

I will have to frig around with it more tomorrow

#

Anyhew see ya 'round

blazing zodiac
#

Good luck to you

subtle ore
#

yeah you're gonna have to either A) replace the existing config that already exists in arma 3, which can be overwritten or B) just create a new class all together

young current
#

or put in invisible containers if simple solution is sufficient.

rancid ruin
#

yeah you can fake it with normal ammo boxes

#

no need to make a cfg mod

quasi rover
#

There are many rocks in the islands in Tanoa map.
How do I prevent the AI enemy from being spawned under the rock?

vapid frigate
#

they shouldn't get created under a rock

#

with createvehicle or 'setVehiclePosition'

tulip cloud
#
_veh = cursorTarget;
_arr = getAllHitPointsDamage (_veh);
_targetName = _arr select 0;
_targetDMG = _arr select 2;
{diag_log format ["%1 - %2", _x];} forEach [_targetName,_targetDMG];

Remaking this ->
(https://www.youtube.com/watch?v=7pp4QUOdRT8)

#

its outputting

19:59:46 "[""HitFace"",""HitNeck"",""HitHead"",""HitPelvis"",""HitAbdomen"",""HitDiaphragm"",""HitChest"",""HitBody"",""HitArms"",""HitHands"",""HitLegs"",""Incapacitated""] - "
19:59:46 "[0,0.0122033,0.0122033,0,0,0.359342,0.0163378,0.359342,1,1,0.0166509,1] - "
#

I did
{diag_log format ["%1", _x];} forEach _targetName;
and everything looked correct but I can't figure out how to properly do an forEach with multidimensional arrays.

vapid frigate
#

looks like you really want a for loop, rather than foreach

#
 for "_i" from 0 to (count (_arr select 0)) - 1 do {  
    diag_log format ["%1 - %2", _arr select 0 select _i, _arr select 2 select _i]; 
};```
#

@tulip cloud

#

sorry i put the selects backwards, fixed

tulip cloud
#

thanks! I'll read through that code so I can learn this technique instead of just copy/pasting

warm gorge
#

Is there a way to disable multiplayer custom sounds? But allow custom faces

vapid frigate
#

custom sounds?

warm gorge
#

Yeah you know how you can have custom faces in Arma on servers, you can do the same with sounds, and you press 0 to open the radio menu and select 'Custom Sounds'

#

My only idea is to just disable opening the radio menu. But to avoid people rebinding it, I need to see if theres an actionKey/inputAction name for it

waxen dagger
#

Hey there! Does anyone have any exp with setWeaponReloadingTime? Especially in MP

cedar kindle
#

@warm gorge commandingMenu > RscRadio?

jade abyss
#

@waxen dagger iirc, that only modifies the time between the shots, not the reloading of a magazine.

waxen dagger
#

i know

#

but it's local

#

i was wondering if i can use it on a player A from another player

#

basically i need to sync the weapon animation

warm gorge
#

@cedar kindle I couldnt find any other way other than to do it like this:

    _lastMenu = ""; 

    while{true}do { 
        waitUntil {!(commandingMenu isEqualTo _lastMenu)};
        _lastMenu = commandingMenu;
        if((commandingMenu isEqualTo "#CUSTOM_RADIO")&&{DS_donorLevel < 1})then{showCommandingMenu "";};
    };
};```
#

Unfortunately theres no actionKey option for it

waxen dagger
#

atm i've a script that stops the reloading (bolt animation).
I need to sync it for everyone

warm gorge
#

How do I add code blocks here in sqf language highlighting

spice arch
#

hey guys, i'm trying to write a script to populate military base locations around Altis. However I noticed that many of them are not labeled as Locations and thus can not be found using nearestLocation/s. Anyone how to locate those bases?

#

Also somewhat related to this question, I've possibly identified a solution by placing Location game logics but they don't seem to utilize any of the functions nearestLocation/s and there is little documentation on what they do or how they behave. There's a whole group of them under the Systems > Logic Entities > Locations section of the editor.

little eagle
#

@warm gorge
```sqf
```

#

@waxen dagger
I don't think weapon animations are fully animated in MP.

#

For remote units that is.

simple solstice
#

is there an function for checking if player has enough inventory space to add an item?

#

ok, got it its canAdd

waxen dagger
#

@little eagle my idea is to use the fired eh of the weapon that it's local for every unit, and use something like that:
waitUntil {_unit setWeaponReloadingTime [_unit,_muzzle,1]; (condition)};

little eagle
#

Don't intend to be mean, but it's better if you give up now disappointed rather than later disappointed and frustrated.

#

Because what you're trying to do will not work and has been tried many many times already.

#

Good luck anyway if you still intend to go through with this, but I think this is something only BI can implement

jade abyss
#

Like waiting to reload?

#

IFA got that for the K98 for example

#

shoot -> wait wait wait wait -> click fire again and it reloads -> repeat
(if it's that, he meant @little eagle )

loud python
#

When a soldier is killed and his weapon drops, is there a way to find out that the weapon was his?

#

in other words, when removing dropped items, is there a way to find out if a weapon is lying next to its dead owner?

little eagle
#

Not reliably

loud python
#

any better alternatives than 1. on death remove weapon 2. spawn custom weapon 3. set a variable on it?

jade abyss
#

Delete the Weapon immediately with PUT EH and place your own?

loud python
#

put EH?

#

sure that's the right EH?

jade abyss
#

Yes

shadow sapphire
#

@nimble kindle don't try to populate based on location. Write your script to look for whitelisted buildings around which to populate.

jade abyss
#

For example (incl. Params)

player addEventHandler ["Put",                        {params ["_Unit","_Container","_Item"]; deleteVehicle _Container;}];```
#

Deletes Item, when player drops something (e.g. dies)

loud python
#

that deletes everything though

jade abyss
#

Then put a check in, if player is alive or not, oh my

#

You know what "For example" means? πŸ˜‰

loud python
#

does that EH 100% execute after the player dies?

jade abyss
#

🀦

tough abyss
#

That would be a killed EH.

jade abyss
#

No, i tell you stuff that just works about 10% if the time

loud python
#

sometimes game engines switch things around for optimization

#

stuff that just works about 10% if the time sounds like arma xD

waxen dagger
#

@jade abyss FOW has a bolting sys too

#

the sys already works, just the weapon animation isn't

jade abyss
#

Could be, i just know it from IFA

waxen dagger
#

but as you said, probably it can't be fixed

jade abyss
#

no clue wich animation you mean

waxen dagger
#

lol

#

the weapon animation

#

you know

#

the bolting

cedar kindle
#

what time of init does MEH playerConnected run?

#

im just assuming the player object isn't initialized

#

or rather the var is defined but player is still on loading screen

#

group should be correct since that's in the sqm

loud python
#

does Player Disconnected EH execute on the server or on the client?

#

or on both?

jade abyss
#

Guess^^

loud python
#

It's arma 3

#

33% chance for each option

#

I mean, there's HandleDisconnect

#

and that runs on the server only

#

so I guess maybe PlayerDisconnected runs on the client?

little eagle
#

No. Server only.

jade abyss
#

Mostly because of: I can't think of any reason, why a player needs informations from the previous, when he is disconnected πŸ˜›

waxen dagger
#

good bye messages πŸ˜›

jade abyss
#

🀦

#

^^

waxen dagger
#

πŸ˜„

little eagle
#

There could be hundreds of reasons why a dedicated client would want to know if another client disconnects, but that doesn't mean that HandleDisconnect or PlayerDisconnected fire on no-server machines.

#

does that [killed] EH 100% execute after the player dies?
That is the intend.

jade abyss
#

Tell me 3 Commy πŸ˜„

#

+You are talking about "if another client disconnects"

half inlet
#

quick question, how would I go about looping a sound WITHOUT the use of sleep <sound duration>? I'd love to do this via a CfgVehicle class if possible, but I'd also be happy with something else

#

reason for not wanting to use the sleep method (play a sound, sleep until the sound is over, repeat) is because the sleep duration can get affected by things like desync and timeAcc

#

I remember being able to use objects in the editor such as Sound_Alarm, but they don't show up anymore, and I can't spawn them with createVehicle

#

will heavy lag affect the precision of that sleep command like it does with sleep?

#

because I remember when there's lag, scripts running in scheduled environment can have their execution delayed

jade abyss
#

uisleep = something like systemtime

#

sleep = ingametimestuffthingy

#

uisleep = Not affected by low FPS/CPS on the Server

half inlet
#

ah, perfect

warm gorge
#

Had this convo the other day haha. I ended up switching to uiSleep, a lot less affected by fps lag

jade abyss
#

In the Searchbar:
in: #scripting uisleep

#

gl hf

#

Page 1 of 3.931

half inlet
#

while on the topic of making looping sounds, is it still a thing where if using say3D in rapid succession, the sounds will queue up (on the entity it is being used on) and play one after the other rather than being interrupted?

warm gorge
#

Doesnt show full history for me weird

jade abyss
#

No clue how much History you have.

warm gorge
#

Well I was the one that asked about it the other day and we spoke about it, and my own messages arent even showing up

loud python
#

@little eagle >does that [killed] EH 100% execute after the player dies?

#

I was talking about the put event handler

#

as long as the put of dropping the weapon fires after the player dies it's OK

#

but since I can't find a defined order for it, it might be undefined and decided by internal engine magic

warm gorge
#

What code editors do you guys use? Out of curiousity. I personally use Atom Editor

jade abyss
#

n++

jovial ivy
#

@loud python It should say in the documented EH if it is persistent after death. If not just add it back on respawn.

#

@warm gorge I use N++ or VSC. Even notepad if i'm feeling spicy.

loud python
#

That's not what I mean; if in the put EH I check if the player object is alive, and it triggers before the game actually kills the unit, that might not work

still forum
#

Atom currently for SQF. Otherwise n++. Hoping I can switch to #Arma.Studio soon

jovial ivy
#

When are you wanting the PUT EH to call? Like when the player dies and his weapon drops?

#

Its all about testing πŸ˜‰

jade abyss
#

?? call an EH?

jovial ivy
#

Huh?

jade abyss
#

When are you wanting the PUT EH to call? πŸ‘ˆ Makes no sense

If you wan't to check, when it triggers -> Why don't you do it the simple way, by adding diag_log "EH XYZ Triggered"

#

guys, always so overcomplicated

half monolith
#

I am still having issues with an arsenal script i cobbled together, it works fine except when you switch teams you get the original arsenal, instead of the new teams arsenal

spice arch
#

hey does anyone know a way to locate those unmarked military bases that are all around Altis?

shadow sapphire
#

@spice arch, use a script that finds certain object types, make it find the military prefab buildings.

spice arch
#

@shadow sapphire thanks m8! I was hoping for some sort of location based thing but I guess BI didn't want to label those locations for some reason

shadow sapphire
#

Indeed.

#

For my community, I've gone through and deleted all of the military bases, except the two largest, and we have a script that placed military bases randomly across the map. We replaced most of the deleted bases with villages.

spice arch
#

oh interesting

#

for the randomly placed mil bases

#

are you guys using prebuilt compositions or is the script placing the buildings/walls dynamically?

tough abyss
#

can i get some testers to test new tdm ive created?

shadow sapphire
#

@spice arch We made a slew of pre-built bases from platoon size up to brigade size. The script places one central MOB (Main Operating Base, Brigade Base) per AI faction, then from there places FOBs (Forward Operating Bases, Battalion Base) every so often if it finds a suitable position within a given distance, then around every FOB it place a couple child COPs (Combat Outposts, Company Bases) at set intervals, then each COP has a couple of child PBs (Patrol Bases, Platoon Size).

spice arch
#

ah cool

lapis oyster
#

Speaking of placing military bases, I made a nice one in Zeus, used Ares to generate the contents of an SQF, but when I attempt to execute the SQF on a server side, nothing generates. Now I've concluded the issue is that there is most likely a character limit on the Ares execute function, so I was wondering if there is a way to have a script that automatically executes the SQF on server side when the mission is started. The idea is to have an essence of persistence in the little survival campaign I'm running

#

If I picked the wrong channel, feel free to point me in the right direction

tough abyss
#

Having a brain fart here. I want to place weapons as props on a table and don't want someone to be able to pick them up. How to do that?

rancid ruin
#

you can just createVehicle weapon classnames can't you?

#

or you could get the p3d path and then create a simple object

tough abyss
#

I placed weapons on a table in 3den. When I make them a simple object they dissappear upon loading the mission up.

#

Didn't know if there was some trick I was missing lol

still forum
#

simple objects

#

shouldn't disappear though :/

jade abyss
#

Its not the first time, that i hear about dissapearing stuff

#

Robio from Epoch had the same probs. Everything loaded fine on my PC, on his -> some Stuff was missing/not loaded/dissapeared

tough abyss
#

Oh well. Not totally necessary anyway.

manic sigil
#

Ive noticed that too... buildings as simple objects stuck, but equipment disappeared entirely.

tough abyss
#

apropros simple objects, did anyone notice any difference in performance due to SO? i did a test via BIS_fnc_diagObjectPerformance, but even the normal vehicles were more efficient than the so's in some cases πŸ˜„

agile pumice
#

so I added EpeContactStart and EpeContactEnd eventhandlers to a vehicle and now I can't blow it up with projectiles/missiles

still forum
#

If you look at the vehicles your fps will be no different from SO variant. as you are drawing the model

#

but if you have dozens of that vehicle and don't look at it you will have the perf difference

jovial ivy
#

@steel gale Well, then that means EpeContactEnd isn't being fired. As allowDamage false; is being called. But allowDamage true; is not. Testing with hints or diag_log to confirm whatever is running.

agile pumice
#

good catch Dylan

queen cargo
#

testing with hints or diag_log is so 2016 ......
we IDE now

blazing zodiac
#

How is Arma.Studio coming along by the way?

queen cargo
#

New release candidate is available on the discord and the results currently look pretty good
Expecting release soon
Visually not much will have changed but under the hood there is a whole new system in place for nearly everything
Though that kind of belongs more to #arma3_tools

blazing zodiac
#

True that, looking forward to using it

queen cargo
ivory timber
#

Can someone help me with a problem? So i have a pbo called miazyfun, inside this pbo i have a config.cpp and init.sqf

#

Inside the config.cpp i have class Extended_PostInit_EventHandlers
{
class Miazy
{
clientInit = "call compile preProcessFileLineNumbers '\miazyfun\init.sqf'";
};
};

#

Yet when i load the game it says script \miazyfun\init.sqf not found

jade abyss
#

Name of the .pbo doesn't matter.
Example:
P:\miazyfun\init.sqf

call compile preProcessFileLineNumbers '\miazyfun\init.sqf
Even when you rename your .pbo to xyzrubberduckyBangBang.pbo
It would still be: \miazyfun\init.sqf

#

+do you use pboProject? If not -> Do the Palpatin and "Do it"

ivory timber
#

So if the init.sqf is in the "first" folder thing it should just be \init.sqf

#

Hmm stil not working

#

This is how it looks

jade abyss
#

Use the P Drive

#

+read again what i wrote above and look at the path again.

ivory timber
#

But i dont want to load my addon from the P drive?

jade abyss
#

???

#

You use the P Drive to edit your addons, then selecting it, pack it via pboProject -> Having the .pbo in your addons folder oO

ivory timber
#

Yea i forgot

#

Got no error now (got script errors on too)

#

But the script dosent work

#

But it works if i execute the script localy in editor

#

Like ive put a hint "Its working"; on the first line and it works... But the main script dosent work? Even doe it works if i execute it in the editor

vapid frigate
#

is the prefix on the pbo miazyfun?

ivory timber
#

Lecks it executes the script

#

As the hint displays

#

But the thing i want to execute dosent

half inlet
#

got another question, how can I detect whether the player is looking through an optic? also, same thing with NVGs/TI goggles?

half inlet
#

nevermind, figured it out

warm gorge
#

Surprised the known 'uniforms disappearing'

#

bug hasnt been fixed in arma yet

queen cargo
#

Uniforms disappearing bug?

jade abyss
#

ppl run around naked, but wearing Uniforms on their client, i assume.

copper raven
#

any reason to use respawn handler instead of onPlayerRespawn.sqf?