#arma3_scripting

1 messages ยท Page 378 of 1

little eagle
#

You do need a spawn somewhere in your code. Depends on where you have the suspension commands.

#

E.g.

frank ruin
#

[true] spawn life_fnc_storageBox;(gewijzigd)

#

Should make it work then I assume

little eagle
#
onButtonClick = "[] spawn life_fnc_useItem;";
frank ruin
#

Yes but in that script

#

I call the storagebox script

#

So I can simple spawn that one

#

And keep the call for useitem

little eagle
#

Yes, but I hope you understand what I mean by call having no influence. There is no dichotomy of call vs. spawn and it's a common misconception.

still forum
#

We just love teaching people rather than just giving them the answer too much..

#

People will think we are rude or trolls

frank ruin
#

Yes yes I read some more information now on what about you are talking.

#

And it's more clear to me now.

#

I also fixed another issue with this

#

On another script i had an uisleep running unsheduled

#

Was also erroring didn't understood why.

#

Now I knew and removed the sleep.

little eagle
#

:)
You can use canSuspend to check if suspension commands are allowed.

#

For debugging.

frank ruin
#

Good I finally understand why that other script was also in the rpt log

#

Never understood why it was wrong ...

#

As I used the same sort of code in other script.

#

But those are called.

#

Read some kkk blog info about it now also.

#

Since the biki is still in maintenace mode

cloud thunder
#

help we need the biki back. people are turning to the kkk for help now!

still forum
#

KK? I thought he was gone?
Kappa

frank ruin
#

I meant KK yeh.

#

Well his blog is still up.

tough abyss
#

He said it'll be up until the hosting runs out.

#

Someone here achieved it.

little eagle
#

Read some kkk blog
O_o

tough abyss
#

๐ŸŒœ๐ŸŽน

still forum
#

@little eagle Idea! #dev in Slack
Everything is a Namespace!
15 hashMapSet [key,value]
"helloWorld" hashMapSet [key,value]

#

If the value that is used as a hashMap isn't one. Then it automatically creates one. And everytime it sees the same value it uses the hashMap it created earlier

#

Not really different from just using Variables but....

tough abyss
#

What are hash maps?

little eagle
#

Lgtm. Needs no create command. But on the other hand, it's not very consistent with sqf.

still forum
#

@tough abyss Namespaces

#

basically

#

It's friggin weird yes.. But that's what makes it awesome

tough abyss
#

And not basically?

little eagle
#

Arrays, but you don't use indices, but strings for your items.

still forum
#

Namespaces. But my hashMap can accept any type as key not just strings

#

The awesome thing is you don't have to store it in a variable. Meaning no one can call allVariables on anything and get it

little eagle
#

Yeah, true. Any type.

still forum
#

so you can have a secret key which is a number. And only things that have the secret key can access the map

tough abyss
#

Ooo.

#

I like where this is headed.

little eagle
#

It's what SQF should've added 4 years ago.

still forum
#

The problem is. Garbage collection

barren magnet
#

is what we can hopefully add by ourselves in future enfusion engine based cames, aka dayz and arma 4

still forum
#

How should the hashmap know that it's last reference was deleted if there is no reference to it

tough abyss
#

@barren magnet - 4rm4.

still forum
#

@barren magnet We can already somewhat do it right now in SQF.
I just doesn't make sense because it's so friggin slow

lone glade
#

by adding numbers to the start of the varName you store ascends

still forum
#

Enfusion will only really change the speed and add OOP to it

lone glade
#

higher thonking ๐Ÿ‘

#

wait, better, create an object at 0,0,0 and delete one everytime you remove a ref

barren magnet
#

sure thing, but there are more interfaces that could be opened to us in the engine. Also no matter what you do current arma is not the best when it comes to speed

tough abyss
#

Pretty sure @alganthe#8904 works for BIS.

marsh storm
#

Hey guys, in the absence of the BIWiki, does anyone know offhand what number getDLCs should be putting out for the Orange DLC/

#

*?

still forum
#

SteamID of the DLC

#

go to the shopsite of the DLC

#

it will be in the URL

lone glade
#

I think he means the number used as modID

still forum
#

Not even on Biki btw

#

See?

#

That is the number

lone glade
#

ooh

#

forgot steam showed the number of the DLC and not of the main app

marsh storm
#

@still forum cheers mate, that's exactly what I was after

little eagle
#

CfgMods also has the ids.

marsh storm
#

Appreciate that pal

#

Do you know if it returns the appID array as strings or integers?

frank ruin
#
Arma 3     107410 
Unknown         -1    
Arma 3 Zeus     275700     
Arma 3 Helicopters     304380     
Arma 3 Laws of War     571710    
Arma 3 DLC Bundle 2     612480     
Arma 3 Malden     639600    
Arma 3 Alpha Lite - expires now     228800      
Arma 3 Server     233780    
Arma 3 Soundtrack     249860      
Arma 3 DLC Bundle 1     304400    
Arma 3 Samples     390500    
Arma 3 Apex     395180   
Arma 3 Jets     601670     
Arma 3 Maps     249861      
Arma 3 Tactical Guide     249862 
Arma 3 Tools     233800     
Arma 3 Karts     288520   
Arma 3 Marksmen     332350  
little eagle
#

And they are in the RPT file:

15:39:53 ----------------------------------------- Dlcs -----------------------------------------
15:39:53                                 name      appId   owned  installed  available   isDlc
15:39:53                               Arma 3     107410     yes        yes        yes      no
15:39:53                              Unknown         -1      no         no         no     yes
15:39:53                          Arma 3 Zeus     275700     yes        yes        yes     yes
15:39:53                   Arma 3 Helicopters     304380     yes        yes        yes     yes
15:39:53                   Arma 3 Laws of War     571710     yes        yes        yes     yes
15:39:53                  Arma 3 DLC Bundle 2     612480     yes         no         no     yes
15:39:53                        Arma 3 Malden     639600     yes        yes        yes     yes
15:39:53      Arma 3 Alpha Lite - expires now     228800      no         no         no     yes
15:39:53                        Arma 3 Server     233780     yes        yes         no     yes
15:39:53                    Arma 3 Soundtrack     249860      no         no         no     yes
15:39:53                  Arma 3 DLC Bundle 1     304400     yes        yes        yes     yes
frank ruin
#

I ninjaed you ๐Ÿ˜„

little eagle
#

๐Ÿ˜ƒ

still forum
#

@marsh storm Click the wiki Link I've sent and read up yourself

#

The one before the steam link

marsh storm
#

It says "array of numbers", so I'm gonna assume integers

still forum
#

there are no integers in Arma

#

everything is floating point

marsh storm
#

vomits

still forum
#

^^

#

But it will be a floating point number without decimal point

little eagle
#

Natural number. Dumb hackers.

marsh storm
#

OK I'll give it a go! Cheers @still forum

still forum
#

@little eagle Okey fine then.... Single precision IEEE 754 numbers.

lone glade
#

managed to get to 10 000, didn't knew there was no limit on inventory items number

little eagle
#

That's a lot of lockpicks.

#

Do they really have no mass? Who merged the PR?

lone glade
#

they really don't have any, no idea

little eagle
#

Now use items player

still forum
#

already did in Slack

#

using my code that I put into hasItem

#

the vanilla stuff from that

little eagle
#

So when do we fully integrate Intercept into ACE?

lone glade
#

CBA settings first

little eagle
#

You guys keep adding settings with the ACE framework.

#

ยฏ_(ใƒ„)_/ยฏ

still forum
#

Arsenal only uses CBA

little eagle
#

Alganthe's?

still forum
#

yup

#

You can already integrate Intercept optionally

#

check in PREP if ACE Intercept plugin is there and compile a different function depending on that

little eagle
#

Sounds like a pain.

still forum
#

Then it's just add Intercept and everything get's faster

#

You can also overwrite variables post PREP from inside Intercept

#

so you load it and it replaces stuff by itself

little eagle
#

Does BE greenlight Intercept or do they still hate it?

still forum
#

They didn't say anything yet

#

we didn't ask them about anything yet

#

Overriding compileFinal is only allowed if you have a certificate though. But luckily I am the one creating them ๐Ÿ˜„

little eagle
#

I wasn't there when the ACE dll were in question.

still forum
#

You can just include it. It will do nothing if Intercept doesn't work. And do magic if it does

little eagle
#

Yes, but then it errors when I use my juicy inCI.

still forum
#

and if you only keep it to Intercept CBA like stuff where you just replace small often used helper functions people won't have to argue about duplicate code

little eagle
#

I don't want a function for case insensitive in though. I can already use the BIS function if I wanted that.

lone glade
#

but muh perf

still forum
#

are you using anything like inCI right now that could easilly be replaced?

#

Theoretically Intercept can also turn your script back to string. regex replace stuff and compile it again

tough abyss
#

BIS functions
๐Ÿคข

little eagle
#

Yep.

still forum
#

Or you can just have duplicate code but I know that is one of the reasons not to Intercept soo...

little eagle
#

Oh, that reminds me. I wanted to PS a puke emoji Google blob styl.e

tough abyss
#

Check #random on Slack.

#

Either go full intercept or no

#

I uploaded a bunch.

still forum
#

I think Intercept is far enough to go apply for BE signing. Right now I'm working basically full time on it.. Because I don't have anything else to do at work :D
I have about half a dozen things to add one of these is quite big..
I guess after 1.78 release when we know Intercept will be fine with that we'll try and apply for BE

#

We still don't have our daily dev branch test thingy setup

little eagle
#

Good. Until then you can release TFAR 1.0.

still forum
#

Dorbedo is making the last quality of life changes right now

#

Only fixing that one bug. then release

#

well.. then RC for atleast 2 weeks...

#

But THEN release

little eagle
#

He's also working on TFAR? Nice.

still forum
#

He has a lot of free time currently. unlike me.

lone glade
#

you mean not unlike you ๐Ÿ˜„

still forum
#

confusing

#

Don't confuse me I'm scared

frank ruin
#

Mm

#

I run on the eventhandle handledamge

#

That you don't receive damage when you are run over with a vehicle.

#

The thing is people ignore this cause they switch to passenger seat.

#

So it's the car object that kills them and not them.

#
if (vehicle _unit isEqualTo _unit) then {
            if ( _source isKindOf "Air" OR _source isKindOf "Car" OR _source isKindOf "Boat" OR _source isKindOf "Tank" ) then
            {
            }
            else
            {
                _isVehicle = vehicle _source;
                //if ((_isVehicle isKindOf "Air" OR _isVehicle isKindOf "Car" OR _isVehicle isKindOf "Boat" OR _isVehicle isKindOf "Tank") AND (driver (vehicle _source) isEqualTo _source)) then
                if (_isVehicle isKindOf "Air" OR _isVehicle isKindOf "Car" OR _isVehicle isKindOf "Boat" OR _isVehicle isKindOf "Tank") then
                {
                    _damage = _currdamage;
                    hint "Since you were VDM'ed you received no damage.";
                    player playActionNow "stop";
                } else {
                if (_source isKindOf "Air" OR _source isKindOf "Car" OR _source isKindOf "Boat" OR _source isKindOf "Tank") then {
                    _damage = _currdamage;
                    hint "Since you were VDM'ed you received no damage.";
                    player playActionNow "stop";
                } else {
                
                };
                
                };
            };
};```
little eagle
#

There is 6 { and 7 } ?

frank ruin
#

6 and 7?

little eagle
#

6 opening curly brackets and 7 closing curly brackets.

#

That can't be right.

frank ruin
#

No they close correctly

#

Can see on my syntax last }; closes the first {

little eagle
#

I think I found another one. This is really messy.

frank ruin
#

Well uhm yeh it is ...

#

Cause I'm experimenting with what works for the issue and what not ...

noble pond
#

You are missing brackets.

{
            if ( _source isKindOf "Air" OR _source isKindOf "Car" OR _source isKindOf "Boat" OR _source isKindOf "Tank" ) then
            {
            
            }
            else
            {
                _isVehicle = vehicle _source;
                //if ((_isVehicle isKindOf "Air" OR _isVehicle isKindOf "Car" OR _isVehicle isKindOf "Boat" OR _isVehicle isKindOf "Tank") AND (driver (vehicle _source) isEqualTo _source)) then
                if (_isVehicle isKindOf "Air" OR _isVehicle isKindOf "Car" OR _isVehicle isKindOf "Boat" OR _isVehicle isKindOf "Tank") then
                {
                    _damage = _currdamage;
                    hint "Since you were VDM'ed you received no damage.";
                    player playActionNow "stop";
                } 
                else 
                {
                    if (_source isKindOf "Air" OR _source isKindOf "Car" OR _source isKindOf "Boat" OR _source isKindOf "Tank") then 
                    {
                        _damage = _currdamage;
                        hint "Since you were VDM'ed you received no damage.";
                        player playActionNow "stop";
                } 
                else 
                {
                
                };
                
                };
            };
};```
#

cleaned up your code and its amazingly easy to see.

#

use a program like notepad ++ that does tabs properly and it will be easier to see errors

#

another tip, always put the brackets and 'else' on their own line

#

@frank ruin

frank ruin
#

Didn't miss brackets though

#

I have notepad ++ syntax

noble pond
#

you did miss brackets

#

you missed one after the hint VDM part

halcyon crypt
#

brackets -> [] braces -> {} ๐Ÿ˜ƒ

frank ruin
#

} else {

noble pond
#

but the code was such a mess you couldn't easily see the mistake

#
            {
                _damage = _currdamage;
                hint "Since you were VDM'ed you received no damage.";
                player playActionNow "stop";```
#

you missed the closing brace(for the terminology wizards) on that part

little eagle
#

{} are curly brackets. Don't listen to the lies.

frank ruin
#

I didn't

#

cause I put a whatelse

#

} else {

noble pond
#

lol 'if' has an opening bracket and no closing bracket

#

can you not see the issue with that?

frank ruin
#

player playActionNow "stop";
} else {

halcyon crypt
#

there were 7 opening and 7 closing braces sooo I don't know what you found ๐Ÿ˜›

frank ruin
#

closed in the if

#

^thank you

noble pond
#

lol he corrected his code now

#

when i copied and pasted it it was wrong.

frank ruin
#

Nope

#

Copy paste again

halcyon crypt
#

his post wasn't edited

frank ruin
#

^indeed

little eagle
#

I found the seventh one, but it was well hidden.

noble pond
#
{

    if ( _source isKindOf "Air" OR _source isKindOf "Car" OR _source isKindOf "Boat" OR _source isKindOf "Tank" ) then
    {
            
    }
    else
    {
        _isVehicle = vehicle _source;
        //if ((_isVehicle isKindOf "Air" OR _isVehicle isKindOf "Car" OR _isVehicle isKindOf "Boat" OR _isVehicle isKindOf "Tank") AND (driver (vehicle _source) isEqualTo _source)) then
        if (_isVehicle isKindOf "Air" OR _isVehicle isKindOf "Car" OR _isVehicle isKindOf "Boat" OR _isVehicle isKindOf "Tank") then
        {
            _damage = _currdamage;
            hint "Since you were VDM'ed you received no damage.";
            player playActionNow "stop";
        } 
        else 
        {
            if (_source isKindOf "Air" OR _source isKindOf "Car" OR _source isKindOf "Boat" OR _source isKindOf "Tank") then 
            {
                _damage = _currdamage;
                hint "Since you were VDM'ed you received no damage.";
                player playActionNow "stop";
            };
        } 
        else 
        {
        
        };
        
    };
};``` is correct. run that code and i bet it will work now.
frank ruin
#

I mean I agree it's a mess.

lone glade
#

those brackets

#

fucking nightmare

frank ruin
#

But I do look if all my {} are closed.

halcyon crypt
#

@little eagle :%s/{//n and :%s/}//n ๐Ÿ˜

noble pond
#

not a nightmare if you use notepad++ and put them on their own line.

little eagle
#

I eagle eye this usually, but this mess was too much for me ๐Ÿ˜ฆ

noble pond
#

at that point it becomes very easy to see if there is one missing or not

frank ruin
#

I'm sorry ๐Ÿ˜ฆ

little eagle
#

๐Ÿ˜ฆ

frank ruin
#

Actually I noticed another issue

#

When my friend drives me over

#

in driver seat

#

following logs

#

22:47:44 "Handledamage: unit civ_3 - part arms - damage 0.744614 - source civ_2 - projectile - index 8 "

#

When he drives me over and switches passenger seat:

noble pond
#

i can see where this is going...........

frank ruin
#

22:48:49 "Handledamage: unit civ_3 - part head - damage 6.73285 - source civ_3 - projectile - index 2 "

#

It says I'm killing myself

lone glade
#

yes, because it's collision damage

noble pond
#

arma is fucked in this regard. Instead of driver getting blamed for hitting someone it either blames the civ that got hit or the commander of the vehicle :p

tough abyss
#

๐Ÿ˜ฎ commy had a emoji instead of a point behind a sentens!

little eagle
#

Sentence*

noble pond
#

๐Ÿ’ฉ

tough abyss
#

Am i awake?

#

Woops ๐Ÿ˜›

frank ruin
#

So I have to add

#

OR _unit isequalto _source

#

So if the source is myself it will not deal damage to me.

#

The problem is ... how far does this affect other things?

tough abyss
#

Wouldn't epeContact be more fitting to detect this?

frank ruin
#

It works now

#

But ...

#

You can't drown nor receive fall damage ...

#

So ... it works a bit too much. ๐Ÿ˜„

marsh storm
#

OK so related to my last question:

Any idea why this would work in a local test (both SP and MP) and not on a dedicated?

// Checks for LOW DLC before assigning backpacks
_bagsmall = "VSM_OGA_OD_Backpack_Compact";
_bagmedium = "VSM_OGA_OD_Backpack_Compact";

if (571710 in (getDLCs 1)) then {
_bagsmall = "B_LegStrapBag_olive_F";
_bagmedium = "B_LegStrapBag_olive_F";
};

#

For context, it's in an F3 gearscript assignment

frank ruin
#

Oh that is weird.

#

Drowning does work, fall damage doesn't ...

#

Interesting observations ...ยต

#

So when you eject out of choppers you don't even die ...

#

Yeh that could be an issue lol

subtle ore
#

you forgot to return the damage ๐Ÿคฆ

frank ruin
#

No lolz

#

That was my point

#

People are driving in a car

#

People over which I don't want.

#

So they switch to passenger seat and they can still kill them with the vehicle.

#

Cause arma see's it as you killing yourself.

#

Now I blocked that.

#

And they can't kill you anymore when they drive you over and switch to passenger seat.

#

The only issue is, you don't take damage from jumping of high building at all ...

young current
#

why not just kick the offending player

astral tendon
#

is there a event handle or something that can detect when the player use a save game afther restart?

#

i am having a trouble were the music stop playing after use the save

little eagle
#

Yes.

addMissionEventHandler ["Loaded", {
}];
astral tendon
#

thanks

little eagle
#

yw

astral tendon
#

does triggers also have a tendency to fire again once the game is loaded?

hollow lantern
#

params ["_posize"];

_soldiaG = createGroup resistance;
_soldia  = _soldiaG createUnit ["rhssaf_army_m93_oakleaf_summer_engineer", _posize , [], 0, "NONE"];
_soldia allowDamage false;
removeAllWeapons _soldia;    
_soldia setUnitPos "UP";

_fridge = createVehicle ["Fridge_01_closed_F", position _soldia, [], 0, "CAN_COLLIDE"];
_fridge attachTo [_soldia ,[0.0869141,0.219727,0.679982]];


_light = "#lightpoint" createVehicle (getpos _soldia);
_light setLightBrightness 0.8;
_light setLightAmbient [0,0,0];
_light setLightColor [0.5,0,0.5];
_light lightAttachObject [_soldia, [0,0,1]];
_soldia setSpeaker "NoVoice";

_fridge setVariable ["KI_unitToKill", _soldia, true];
_fridge setVariable ["KI_vehToRemove", _light, true];


[_fridge, ["HitPart", {
    _object = _this select 0 select 0;
    _hits = _object getVariable "hitTimes";
    _unit = _object getVariable ["KI_unitToKill", objNull];
    _light = _object getVariable ["KI_vehToRemove", objNull];
    if(isNil "_hits") exitWith { _object setVariable ["hitTimes", 1]; };
    if(_hits == 1 && alive _object) exitWith {
        for "_i" from 1 to 2 do {
            createVehicle ["Bo_GBU12_LGB",[(getPos _object select 0)+ (_i*cos (_i*17.5)),(getPos _object select 1)+ (_i*sin (_i*17.5)),0],[],0,"CAN_COLLIDE"];
            _object setDamage 1;
            _unit setDamage 1;
            deleteVehicle _light;
        };
        _object setVariable ["hitTimes", 0];
    };
    _object setVariable ["hitTimes", (_hits + 1)];
}]] remoteExecCall ["addEventHandler", 0, _obj];``` someone can tell me why my EH is not firing? this is one script I executed so the EH is within it
hollow raft
#

not sure if this is the right place, but I am trying to script a demand for a specific facewear item. Wiki is currently down - does anyone know what the facewear 'class' is called?
if (facewearclass = "specificfacewear) then
etc

lone glade
#

config parent for facewear is CfgGlasses

hollow raft
#

thank you very much

astral tendon
#

how do i get a value of allowDamage if is true or false?

#

how do i make a bug report about the editor?

austere granite
#

whats the bug?

astral tendon
#

the enable damage check mark does not work if the player load a save, the unit will have damage enable

#

but if you put allowDamage false on the unit init it keeps

astral tendon
#

actually, nevermind. this seens to be a problem only with the explosive satchel, even if you put allowDamage on it init

#

scracth that, this seens to be a problem to all props.

halcyon crypt
#

hmmmmmmm

#

what would cause a function not being "available" in the editor

#

but it is during mission play

#

when returning to the editor the function is gone again

#

๐Ÿค”

#

or, in other words, how do I get my function to work in the editor?

tough abyss
#

hi, can this work?

{ 
    _x setCaptive true 
} forEach thisList;
#

if I want everyone in the trigger show as a civilian?

plush cargo
#

i think this list only shows units in the trigger that can activate the trigger

#

so if your trig activation is set to opfor then only opfor in the trigger will show up

#

i think

little eagle
#

@halcyon crypt Do you use CfgFunctions / preInit = 1 to define your functions? If so then it's absolutely broken. The 3D editor is essentially incompatible with the CfgFunctions framework.
https://github.com/CBATeam/CBA_A3/issues/349
https://github.com/CBATeam/CBA_A3/pull/350
https://github.com/CBATeam/CBA_A3/pull/563
https://github.com/CBATeam/CBA_A3/pull/624

halcyon crypt
#

we use CfgFunctions and not preInit

little eagle
#

CfgFunctions has preInit.

#

It's just happens to have the same name as XEH preInit.

#

Don't mix them up.

halcyon crypt
#

yeah but it's not set to 1 is what I meant ๐Ÿ˜ƒ

little oxide
#

@little eagle Why cfgfunctions is incompatible with 3D Editor simple question ?

little eagle
#

Read the links.

#

Why? Because it is. It doesn't work. They way the programmed it makes it incompatible and it's basically random if your functions are defined or not.

#

Not really random. It depends on how you open the 3den interface. All explained in these issues/pull request.

halcyon crypt
#

we never used preInit and it worked just fine before like a year ago

little eagle
#

Yes, but not always in 3den. Read the issues.

#

Anyway. ACE3 uses CBA's preInit XEH and that solves all the problems.

#

No.

#

we never used preInit and it worked just fine before like a year ago
We've been checking this since 3den came out every patch and it never worked. It only appears to work, because it strongly depends on how you enter the 3den display.

#

It never worked in all circumstances.

#

Although there have been random changes in patches without them appearing in the changelog.

hollow raft
#

I realise there's another topic going on but I may as well ask - with the wiki still under maintenance I'm at my wit's end.
I am trying to run a constant check within a trigger area if the players are wearing a specific item. If they do not, the specific player that isn't wearing that item is punished (e.g. setdamage 1;). I really don't know enough about scripting to make it work, so I'd appreciate some help.

little eagle
#

What item?

hollow raft
#

Facewear, it is meant to be a gas mask.

halcyon crypt
#

@little eagle 3den enhanced seems to be working and just uses CfgFunctions (without preInit = 1), no 3DEN EHs either

little eagle
#

Yes and those are wiped if you switch the terrain or return from a preview.

#
0 spawn {
    if (player inArea "MARKER" && {goggles player != "GASMASK"}) then {
        player setDamage 1;
   };
};
#

Something like this ^ @hollow raft

#

?

#

"googles". Damn muscle memory

hollow raft
#

something like that, my problem is that this is a script that needs to be run for several players, so using a thislist I imagine

little eagle
#

No. Just do this in init.sqf or something.

#

Oh and a while loop. Sorry.

hollow raft
#

player will count all players?

little eagle
#
//รฌnit.sqf
0 spawn {
    while {
        sleep 1;

        if (player inArea "MARKER" && {goggles player != "GASMASK"}) then {
            player setDamage 1;
        };

        true
    } do {};
};
#

You don't need allPlayers if you execute this on every machine.

#

There is only ever one player on any machine.

#

Let each client handle their local player.

hollow raft
#

oh yeah, this is true.

#

thanks, this is very helpful

halcyon crypt
#

@little eagle just checked 3den enhanced and the functions persist when changing terrain and after previewing etc

#

weird stuff

little eagle
#

What build are you on?

halcyon crypt
#

the linux port

little eagle
#

Oh, that's a few versions back.

halcyon crypt
#

1.70

little eagle
#

I think opening the functions viewer makes the editor recompile all CfgFunctions defined functions.

halcyon crypt
#

didn't open the function viewer, just a diag_log of the function

#

anyway, I guess I'll just have to find out what 3den enhanced does differently

#

or switch to CBA's function system thingy

little eagle
#

I don't remember old versions, but try to figure out when they're undefined and if the same repro still works for 1.76

#

Switching terrain, returning from preview, entering the first time from main menu etc. Those are all different scenarios that can lead to different results.

halcyon crypt
#

well for 1.70 3den enhanced works on first editor entry, after preview and after switching terrain. ALiVE functions don't exist in all cases. ๐Ÿ˜›

little eagle
#

Not in any of them?

#

Or not in some of them?

#

"all" is ambiguous. : /

halcyon crypt
#

in any of them

#

a full functions recompile doesn't make them appear either

little eagle
#

What function for example?

halcyon crypt
#

3den enhanced: Enh_fnc_logFactions
ALiVE: ALiVE_fnc_copyFactionClasses

#

but it's the same for ALL functions in ALiVE

little eagle
#

๐Ÿค”

#

Comment out the RECOMPILE entry?

#

I have no idea tbh. That is not what I encountered.

hollow raft
#

So I've tested this and it does not appear to work.
I tested with changing so that it would look for a specific variable, to run a hint if {goggles player != "avon_FM12"}, etc. I'm not sure what's not functional

little eagle
#

That's not how you use if.

hollow raft
#

No, as in I tested a trigger with the condition that "{goggles player != "avon_FM12"}", not with if in it

little eagle
#

Scrap the trigger and use a marker.

#

I named it "MARKER" in my example, but you probably have to chose a different name.

hollow raft
#

i'll try that and see if there's a difference

little eagle
#

You did place that code in init.sqf though?

hollow raft
#

yeah, in the init.sqf

little eagle
#

A condition {goggles player != "avon_FM12"} will never report true, because it's just a CODE block that is never evaluated.

hollow raft
#

Putting it as a marker worked, you're a hero.

little eagle
#

call {goggles player != "avon_FM12"} <<< this could report true, but then you might as well delete the call {} part.

hollow raft
#

in theory, would putting a "sleep" in give them the possibility to stop the script? or since it has already evaluated it as true keep running? so for example:

0 spawn {
while {
sleep 1;

    if (player inArea "MARKER" && {goggles player != "avon_FM12"}) then 

hint "You're not wearing a Gas Mask!";
sleep 3;
{
player setDamage 1;
};

    true
} do {};

};

i guess I could run that same twice, e.g. check, then hint, sleep 4-5, then run that check again and if still no gas mask, it kills them?

little eagle
#

Doesn't look right to me. The hint comes immediately after the then without the curly bracket for the CODE block.

hollow raft
#

well, the principle behind it?

little eagle
#

The player would die regardless if he left the area or put on a mask, because after those 3 seconds, that is never checked again.

hollow raft
#

Yeah, that makes sense - thanks again

halcyon crypt
#

@little eagle yep.. removing the RECOMPILE macro thingy fixes it

#

weird

little eagle
#

Wow, that was just a weird guess.

halcyon crypt
#

no it's a question of why the hell that's causing a problem

little eagle
#

I don't know. CfgFunctions internals are really strange.

#

It looks like someone amended the code until it appeared to work. Over and over again in the past.

#

Maybe it was fixed in the last year. 1.70 is pretty old.

halcyon crypt
#

well it also happens in 1.76 or whatever the latest version is

#

as in, the reports are that the function doesn't work

little eagle
#

I guess you have to remove the recompile flag then.

halcyon crypt
#

yeah oh well, not a big deal

#

I guess it kinda makes sense since it's supposed to recompile on mission start but I don't get why they would not compile it before and after

little eagle
#

It makes no sense. It's just broken like so many other things when you look at them long enough.

still forum
#

Did anyone ever observe the types TARGET SUBGROUP or NetObject in SQF?

little eagle
#

No, no and there is a command that is supposed to report NET_OBJECT, but just reports a number instead.

#
netObjNull
#

There it is. netObjNull. Reports 0 or -1 or something like that instead of the proper type.

#

false! It was false.

still forum
#

This is fun.... NOT

#

How would I hash a NaN ? ๐Ÿ˜„

little eagle
#

log -1 hashCreate ["key", 123]
?

still forum
#

Working on Intercept backend

#

As workaround for the types that I don't know I just call str and hash the string

#

but I'm sure that str will just return "NaN"

little eagle
#

What do you mean by types you don't know?

#

typeName log -1 // "NaN"

still forum
#

Types that Intercept doesn't know

#

I know the typename

#

but I don't know the underlying structure

little eagle
#

Can't you make the SQF data type (right name for typeName?) part of the hash?

still forum
#

sure

#

But..

#

Can you theoretically have 2 different NaN's

#

because in that case they should have different hashes

little eagle
#

No one should ever use NaN as container.

#

That's just silly.

still forum
#

No. But could appear as key

little eagle
#

And? Just define all NaN to be the same key.

still forum
#

Do you know of a way to create NaN's that wouldn't be the same?

little eagle
#
  • log -1
    vs
    log -1
still forum
#

In C++ if you get a NaN or inf for example you can still calculate with them although they are out of spec

little eagle
#

Both are == equal, but stringified they are different.

#

So even SQF is not as rigorous.

still forum
#

hmpf... I guess I'll just use str then if that works somewhat

little eagle
#

That causes even more issues though.

#

str configNull // ""

still forum
#

I only use that for types I don't know the structure of

#

These are NaN, TASK and DIARY_RECORD

#

I already know the last 2 produce different strings based on value

little eagle
#

No one will ever use those as keys^^

still forum
#

ยฏ_(ใƒ„)_/ยฏ

#

I'm building the backend here. That has to support everything anyone might ever do

little eagle
#

Try to make it like find would.

#

And:
[- log -1] find log -1 // 0

#

Even though one is QNAN and the other is INF

still forum
#

find calls isEqualTo on each member. Iterating lineraly.
I can't do that with a hashmap

#

And if idiots use those as keys it's their fault ยฏ_(ใƒ„)_/ยฏ

little eagle
#

Sure. I didn't say reuse it. But try to find a way that emulates the same results.

serene basin
#

has the wiki been down for the past few days ?

little eagle
#

Yes.

serene basin
#

:(

#

for a scripted salute, playAction correct ?

subtle ore
#

Sure.

serene basin
#

how do you stop that one ?

little eagle
#
unit action ["salute", unit];

Doesn't work on AI.

serene basin
#

This is for AI though

little eagle
#

Causes a person to salute. AI controlled units will only make a momentary salute, unless the AI is in safe or careless behaviour mode.

#

Put them in safe or careless apparently.

serene basin
#

ok

#

and to stop it give an empty string like with switchmove ?

little eagle
#
unit setBehaviour "SAFE";
unit action ["salute", unit];
#

Something like that I guess.

#

Never tried this myself, but I'm sure that playMove wouldn't do it.

serene basin
#

thanks btw, trying

marsh storm
#

Anyone know how to set the supply drop module to use a different crate? I want it to drop the IDAP orange crate or the food bags and currently I can't get it to use anything but the NATO one.

#

And I also can't get it to work as CIV side

#

if I sync to a BLU unit it works fine and I can call a crate

#

but no dice with the CIV faction.

#

I can set the crate loadout etc, that's A-OK

#

but no idea how to set the model

serene basin
#

doesn't it just have a different object name ?

marsh storm
#

There's no option to set that in the module unfortunately

#

Or I'd just change it

serene basin
#

oh the module, i dont think you can change that

#

but im probably wrong >.>

#

you'd have to alter the class perhaps, but thats way beyond me

meager heart
serene basin
#

why would if (_State == "open") { _Gate animate ["Door_1_rot", 1]; }; cause a missing ; error ..

still forum
#

Because you have a syntax error

serene basin
#

D:

still forum
#

Which would be fixed by putting a ; in there

serene basin
#

where did i goof up, im not used to arma scripting

still forum
#

That's not the fix that you would want. But seen from engine that is a fix

#

right in the middle between ) and {

serene basin
#

whats the fix that i would want

still forum
#

put a then in there

serene basin
#

ah derp

#

if () then

#

thanks

#

so used to php that those differences get me all the time

brazen sparrow
#

im sure others have asked it but any eta on the BIS wiki?

still forum
#

nope

little eagle
#

It's dead, get used to it.

halcyon crypt
#

any way to pass around an object to setTriggerStatements?

still forum
#

global variable

halcyon crypt
#

boooo

still forum
#

why?

halcyon crypt
#

needs to be unique

still forum
#

global array that you only push to and never delete.
Then hardcode the array index into the string using format

#

That's unique enough

halcyon crypt
#

ah I guess that would work well enough ๐Ÿ˜ƒ

#

thanks

#

could also just setVariable on the trigger object

#

I guess it's "cleaner" than polluting the global scope

subtle ore
#

Doesn't necessarily mean it's the best

halcyon crypt
#

well it is the best since only the trigger needs to know about the object IMO

little eagle
#

setVar on the trigger object?

queen cargo
#

Isn't a trigger also just a game logic?
Not got my type list of sqf rdy right now

halcyon crypt
#

hey biki is back ๐Ÿ˜ƒ

#

finally

#

@little eagle yes?

little eagle
#

Game logics are objects and so are triggers. With both you can use setVariable.

#

So you can store the object on the trigger and have the same statement for multiple triggers that pull an object from the triggers namespace and check for that. No globals unless you consider object namespace variables as globals.

halcyon crypt
#

[5:45 PM] marceldev89: could also just setVariable on the trigger object

#

๐Ÿ˜›

little eagle
#

Agreed.

#

With triggers you already waste computation time on an network synched object. Might as well use the namespace from it.

queen cargo
#

@Dedmen simple in area command comparing current position with two positions provided could also be useful

#

2d and 3d should be supported

#

Could save time

#

@still forum gah.. Bloody app

little eagle
#

Isn't this what inAreaArray does?

queen cargo
#

Not sure

#

Tbh never used that command

little eagle
#

allPlayers inAreaArray "marker_1"

#

-> all players in that marker

jade abyss
#

inArea too

#

inAreaArray = checking multiple positions

queen cargo
#

Not doing what I was talking about

little eagle
#

Example then.

queen cargo
#

But close to it

jade abyss
#

@Dedmen simple in area command comparing current position with two positions provided could also be useful
Thats what it sounds like ยฏ_(ใƒ„)_/ยฏ

queen cargo
#

Player isincommand [[1,1,1],[50,50,50]]

#

Alternatively with only two scalar per array for non height related

jade abyss
#

So checking from [0,0,0] to [50,50,50]?

#

Thats inArea

cedar kindle
#

๐Ÿค”

queen cargo
#

Though.. Was not aware of the command you gave

little eagle
#

Yeah, I don't think a point can be inside another point.

#

But I think I get it.

#
player inArea "marker_1" || player inArea "marker_2"
#

This?

queen cargo
#

You give two points as area

jade abyss
#

inAreaArray for that

queen cargo
#

Those give bounding box in which you check if another point is in there

jade abyss
#

They just give 2D-Coords, no BB

little eagle
#

So not my example?

queen cargo
#

Tbh... Was not aware of inareaarray which would cover the use case I had in mind
But would not be useful for simple bounding box expansion checks

little eagle
#
player inAreaAny [trigger1, "marker1", [center1, a1, b1, angle1, isRectangle1, c1]];

A command like this maybe?

jade abyss
#

If course oO

#

InArea can check for markers (of any shape) or Coords

#

+what Commy wrote: isRectangle1 <-

#

So BB Checking is possible

little eagle
#

Yes. By any I mean that you provide multiple positions as shortcut for having to use multiple inArea commands. How would you write my example with inAreaArray? I don't see it.

jade abyss
#

lemme try to find something, not sure if i still have it

little eagle
#

Thx.

queen cargo
#

Currently on mobile that is why I cannot really explain enough ๐Ÿ™ˆ

#

Gonna try to get something together later

little eagle
#

Just write a wall of text later.

#

+1

queen cargo
#

Not Rly needed though...
The use case I wanted covered to replace triggers is already covered by inareaarray

still forum
#

Dedmen is currently working on ACE Intercept stuff. And Dedmen has to go to bed early today. Dedmen no time for stuff

queen cargo
#

Poor Dedmen

jade abyss
#

mimimi

queen cargo
#

Got headaches today preventing me from doing anything..

jade abyss
#

@little eagle Can't find anything here anymore, only inArea commands -.-

#

Hey, Wiki is back up

#
player inArea "marker_1" || player inArea "marker_2"```
was correct.
```sqf
allPlayers inAreaArray location_1;```
was the correct one for checking if multiple Units are in an Area. No clue what i did back then, prolly just adding a forEach Loop for each Location/Marker. Can't remember
queen cargo
#

Yup
Would be the closest to resemble what I was talking about

little eagle
#

Probably not with scripting alone and without configs / mods.

little eagle
#

What do you think?

old glade
#

Quick question I'm pretty sure I already know the anwser to:

little eagle
#

"Yes".

old glade
#

Is it more efficent to cache config values as variables or cache the paths

#

or just avoid caching anything

#

because varaible pollution is annoying

#

I would run a test but I'm on my laptop >.>

little eagle
#

Depends on how you do it I guess.

old glade
#

getNumber (configfile >> stuff)

#

every time a script executes

#

Or: globalCacheVar = getNumber (configfile >> stuff);

little eagle
#

Vanilla?

old glade
#

Vanilla or modded

#

Doesn't really matter in this case

#

It's for a loot spawn script I've been making/messing around with

little eagle
#
if (isNil QGVAR(namespace)) then {
    GVAR(namespace) = call CBA_fnc_createNamespace;
};

private _compatibleItems = GVAR(namespace) getVariable _weapon;

if (isNil "_compatibleItems") then {
    _compatibleItems = [];

    // do lots of config look ups and evaluations

    GVAR(namespace) setVariable [_weapon, _compatibleItems]; //save entry in cache
};

_compatibleItems // return
#

This is the principle. GVAR(something) is just a global variable.

old glade
#

Yeah...

#

I was wondering based on code execution time

#

pretty sure globalvar < config

#

in speed

little eagle
#

This makes it like a thousand times faster after the first run. But it all depends on how much stuff you do.

old glade
#

figured

#

It's the actual config lookup that takes time then?

sour saffron
#

can you use ropecreate without the Helo Dlc ?

old glade
#

Yes

sour saffron
#

i keep getting those Shift + P

subtle ore
#

Yes?

sour saffron
#

dlc advert when i enter roprecreate

subtle ore
#

Why wouldn't you be able to?

old glade
#

lol

#

idk

#

never had that happen

#

But I also own all the dlc ๐Ÿ˜›

little eagle
#

Probably because you have a weapon you don't own or are sitting in a heli you don't own.

old glade
#

something something bishill

little eagle
#

Some mission you don't own.

#

idk

old glade
#

yeah

sour saffron
#

im on Dev im in a civilian unit no weapons or anything

old glade
#

Are you using the slingloading ui?

little eagle
#

Items too. Like uniforms.

sour saffron
#

in VR as a civ

old glade
#

or just the command?

subtle ore
#

no, there should be no restrictions on slingloading

old glade
#

There aren't

subtle ore
#

Like I said

sour saffron
#

just the command in a line of code ropeccreate and then screen full of handshkaes

old glade
#

lolwut

subtle ore
#

ropecreate is just a command just like anything else

old glade
#

welp

subtle ore
#

has nothing to do with dlc ownership

sour saffron
#

yeah but the rope is a model

old glade
#

I guess I'm going to cache all them variables

#

.>

#

Acutally

#

fuck it

#

multi-dim array

sour saffron
#

the created model is maybe DLC ?

old glade
#

because I can't be assed to make like a gazzilion variables

subtle ore
#

doesn't matter

sour saffron
#

anyway thanks for the definiet answer as always , great pool of knowl;edge ๐Ÿ˜ƒ

old glade
#

lol

subtle ore
#

Yeah sure lol ๐Ÿ‘

old glade
#

Yesterday the wiki was down

#

It was terribe

#

I had to use the cached page... So all the links didn't work

subtle ore
#

Wasn't just yesterday lol

old glade
#

Ikr lol

#

"24 hours"

subtle ore
#

It was more like 4 days

old glade
#

inb4 someone accidentally deleted it

#

and they had to restore backups

sour saffron
#

goto OFPEC or use the comref

old glade
#

Wouldn't suprise me, shit happens lol

subtle ore
#

No one "acidentally deletes" forum / wiki software lol

#

pretty sure they are using a form of media wiki correct?

old glade
#

You would be suprised

#

There is a story of a new hire accidentally deleting a company's production database

#

Shit can happen

#

Or my personal favorite

subtle ore
#

that is why you don't let people have power to everything

old glade
#

In vancouver we have a light rail system called the skytrain

#

It's completely automated

subtle ore
#

divy it up between all employees, so if all else fails they will have to work together

old glade
#

One time

#

The were doing maintainence

#

so they moved everything on to the backup server and ran that

#

a tech accidentally unplugged the wrong thing

#

and hardcrashed the entire system

#

All the trains just stopped

subtle ore
#

๐Ÿคฆ

#

jesus christ

old glade
#

yeah lol

#

shit happens

#

Config values are retreived from disk?

#

right?

#

Or are they cached in memory?

subtle ore
#

iirc though they are from disk, not sure though.

old glade
#

I'm asking for the sake of script performance

#

Yeah

#

i'm 90% sure it's disk

#

because monitoring disk usage shows that when you do things on a server it reads certain pbos at certain times

subtle ore
#

or when loading the game yeah

old glade
#

Well

#

It loads and compiles everything

#

scripts and such

#

then I guess it refers back to the configs when needed

#

I honestly have no idea lol

subtle ore
old glade
#

Yep

#

Oh, script related question and sometimes makes me stay awake a night...

#

Is there a performance hit if you use a multi-dim array to store lots of values instead of dedicated variables?

#

I don't think there would be, but it's sqf ๐Ÿคท

subtle ore
#

well if you need to do a multi dimensional array, then I would say it's better than just trying to spread it out with multiple variables.

old glade
#

ofc

subtle ore
#

especially if you are going to be getting that data later on

old glade
#

I always try to abuse arrays to their full potential

subtle ore
#

Alright, so what's the confusion?

old glade
#

No confusion

#

I'm just wondering if everything I've ever done is a lie

#

and if it's actually more performance heavy

#

I don't think it is, but in sqf you can overide nil with a value soo

subtle ore
#

well if you are setting that variable constantly, maybe.

old glade
#

yeah...

#

I wish sqf had hash tables

#

that would make me very happy

#

(ik there are ways to implement them)

#

but native hash tables would be nice...

#

enforcescript pls

subtle ore
#

iirc kk has something like tha in an extension format

little eagle
#

Only 3 more years and Dedmen releases Intercept.

old glade
#

lol

little eagle
#

Then you have your hashes.

old glade
#

Enforce is pretty much C++ anyways

#

So i've heard from sources

subtle ore
#

3 years? jeesh man

old glade
#

it even has classes apparently

subtle ore
#

no it's actually more like C# and Java

old glade
#

properly classes

#

ah right

#

It was C#

#

not C++, morning... Tired....

#

anyway

#

actual OOP

#

yayyyy

#

_myArray = [[],[]];
(_myArray select 0) pushback "stuff";

#

will that horribly break?

subtle ore
#

Ehhh..I would recommend you store your data before nesting it in that array

old glade
#

but I'm using the array to store the data

little eagle
#

Works just fine.

subtle ore
#

Make Array - > Store Data - > Insert Array

old glade
#

k

#

No point in storing data

subtle ore
#

Eehh

old glade
#

It just adds execution time

#

also

#

Not really relevent for the function

#

I'm compressing an array

subtle ore
#

ยฏ_(ใƒ„)_/ยฏ

#

well there is your answer

old glade
#

[["class1",0.15],["class2",0.12],["class3",0.15]] >>> Turning that to >>> [[0.15,0.12] , [["class1","class3"],["class2"]]

#

basically compression

#

the select pushback makes my life easier

little eagle
#

Why don't you just create a LOCATION as container and use setVariable / getVariable at that point?

old glade
#

Does that increase network traffic?

#

This is running serverside only

#

no need to broadcast

little eagle
#

LOCATIONS only exist on the machine they're created on.

#

No network stuff in that simulation.

old glade
#

hmm

little eagle
#

If you need to broadcast then you can use simple objects. Type "Building" for example.

old glade
#

Yeah... Using a location is a good idea

little eagle
#

That is what CBA_fnc_createNamespace does.

old glade
#

what type of location?

little eagle
#

Optimized version of "Name"

#

But doesn't matter for a dedi, because that never opens the map anyway. No interface.

old glade
#

myNamespace = createLocation [ "NameLocal" , [0,0,0], 0, 0]; ?

little eagle
#

lgtm

#

Just "Name". Don't know if "NameLocal" exists.

old glade
#

"name" is a valid location?

#

name local was introduced in a3

#

idk

still forum
#

@old glade Config is in Ram. But config lookups are VERY slow compared to Global var lookups.
Namespace is a hashmap. Array is fine if you don't search for stuff.
We have hashtables. CBA can create Namespaces. But they only support STRING as keytype. Which is what Commy already told you

#

If you are running serverside only you might aswell just use Intercept CBA's hashMap

old glade
#

k

frank ruin
#

Is there a command to get the specific rangefinder slot item?

#

As it's seen as a weapon by Arma 3.

little eagle
#
binocular
frank ruin
#

Ah there is ๐Ÿ˜ฎ

#

Cheers!

#

Was filtering on weapon but didn't find it. ๐Ÿ˜„

#

But no addbinocular

#

that's still weapon lolz

#

sense ...

subtle ore
#

assignITem

#

woops

frank ruin
#

Oh yes thanks I was aware of that command.

subtle ore
frank ruin
#

Just had some issue figuring out how to get the class of the rangefinder and such

#

cause you have the entire primary,secondary, handgun commands for the rest ๐Ÿ˜‰

subtle ore
#

Err..yeah, well you also have hmd for head mounted displays / goggles / nvg type equipment

little eagle
#

The only thing that's missing is removing or adding a magazine to a binocular/rangefinder.

#

The batteries.

subtle ore
#

Wouldn't you technically be able to just reload it ?

little eagle
#

Yeah, but what if you're naked or all containers are full?

subtle ore
#

ยฏ_(ใƒ„)_/ยฏ

digital hollow
#

Need mouth inv slot.

#

Hold flashlight, battery...

subtle ore
#

You mean like a virtual weapon holder?

digital hollow
#

Like how they added underbarrel, extra inventory slot for small items.

subtle ore
#

Right, but do you seriously want another item slot just so you can reload something without a holder present?

digital hollow
#

More of a joke suggestion, but why not?

subtle ore
#

ยฏ_(ใƒ„)_/ยฏ

little eagle
#

The current system is way too rigid. For A4: Ctrl+A , DEL

digital hollow
#

I was inspired by remembering Receiver, which let you put your flashlight in your mouth while manipulating your stuff.

old glade
#

does this actually execute? selectrandom ["item"]

#

Or does it just give you the string

#

i want to know whether it's worth my time to not create single element arrays in a loop

#

it would mean putting in another check

#

well 2 checks

#

anyone?

#

is there a big deference performance by doing selectrandom ["item"] over just "item"?

subtle ore
#

code performance it /shrug

old glade
#

like 60% or so of the executions of a function will have arrays with lengths greater than 1 but is it worth making an exception for the rest?

#

I'm on a phone lol

#

also I was on my laptop earlier

#

I'm probably going to do it when I get hone,but I thought I would ask

frank ruin
#

this disableTIEquipment false;

#

Doesn't disable thermal on the 50cal BMG turret

old glade
#

it's a vehicle?

frank ruin
#

Well it's a turret?

old glade
#

turrets are vehicles

frank ruin
#

Well doesn't disable it though ...

old glade
#

does that command normally work on vehicles?

frank ruin
#

Yes it does

little eagle
#
selectRandom ["item"]

is always "item".
Knowing sqf it's probably still faster than

["item"] select 0
old glade
#

lol

#

yeah I figured it was always "item", I was wondering if it was worth putting in a check but it's probably nor

#

not*

little eagle
#

Definitely not.

#

Try to put as much load into C++ internals as possible. The less SQF commands you use, the better.

old glade
#

yep

#

it's what I do lol

#

sqf is slooow

little eagle
#

There is gigantic overhead for every command used no matter which one it is. Most of it is type validation I believe.

old glade
#

yuck

#

I guess you need to make things idiot proof

frank ruin
#

Nope doesn't wanna remove thermal on the turret fml ...

little eagle
#

Yeah, but you'd do that when compiling the code. Not during runtime. But I guess you'd need ...

old glade
#

wait...

#

it does type checking at runtime?

little eagle
#

Yes.

old glade
#

why.

#

lol

little eagle
#

Otherwise it wouldn't be so slow.

old glade
#

ik why

little eagle
#

It's all fixable. You need to put a lot of time into it though.

old glade
#

yeah

#

technical debt sucks

little eagle
#

This is why I'm not very optimistic about EnScript. It's the same people making it that made SQF and developing it takes away time that could be spent fixing the actual issues.

#

So it's probably the same mistakes all over again.

old glade
#

eh idk

#

I'm a bit optimistic

#

although. intercept will be awesome... When it gets done lol

little eagle
#

First step would be identifying the issues. But no one really names them ever. Just a general "it's bad". But if you don't know why, you won't be able to solve them.

old glade
#

yeah i hate that

#

When people use "Its arma" as a reason something fixable is broken

#

although there are some things that works as an explanation for lpl

little eagle
#

"It's Arma" most of the time comes from people that didn't understand what they were doing. But it's partly Arma itself that is to blame. Many things don't do what their names imply. I have no idea how it is in programming in other places. I hate computers. But people are way to quick in believing what a name says.

old glade
#

Or my favorite thing: ___ map kills servers

#

Or ___ mod is lagging the server

#

-.-

#

it's the least descriptive thing you could say

#

honestly it's just a lack of understanding

#

people don't understand that the client and server are separate

little eagle
#

That the users are dumb is a given.

astral tendon
#

All that script help was for this.

subtle ore
#

Again with the insane amount of mods

lone glade
#

"insane"

old glade
#

meh that ain't bad

subtle ore
#

15 mods? That is too many

barren magnet
#

More mods = more fps or did i get something wrong ?

#

so 15 seems like a great number to me

#

But really, 15 mods is not too much, considering that some of them belong together ....

old glade
#

That's the thing... Mod count doesn't mean Jack shit... Except for breaking the server browser :p

#

It's not about how many mods you have but about how well they're made and how well they run

jade abyss
#

erm, iirc there was a Limit on how many you can load

queen cargo
#

Rly @jade abyss?

jade abyss
#

Yeah, but not related to Arma itself iirc

queen cargo
#

Cannot imagine due to bi also just providing pbos

jade abyss
#

I think the -mod Path had a limit of how many sign can be added

queen cargo
#

You mean the 256 windows buffer problem

jade abyss
#

No clue how it's called

#

There was a guy in here, wich Path was too long and it didn't load all the Mods properly

queen cargo
#

Not related to the parameter but to how Windows stores links

jade abyss
#

No clue. Is there a workaround doable?

queen cargo
#

Using command line it will work

old glade
#

lol

#

meanwhile: at bethesda

jade abyss
#

He used .bat File

old glade
#

let's use a byte to store mod ids

austere granite
#

you can use parameter file to get around that

queen cargo
#

Could be that there is also a limit on that buffer for cmd line

jade abyss
#

Yep, i guess so

queen cargo
#

@old glade no game limitations we talk about here

austere granite
#

If you use full paths it quickly adds up, so just use a parameter file, put the mod paths in there and all good

jade abyss
#

He removed some/shortened the links -> Worked

old glade
#

why on earth would you load 256 mods tho

jade abyss
#

Signs, Jmaster

austere granite
#

PBO limits that's why there's the special thing for 'sub configs'

queen cargo
#

Not 256 mods
Characters

digital pulsar
#

init.sqf

    MYT_spectatorGroup = createGroup [sideLogic, false];
    MYT_spectatorGroup setGroupIdGlobal ["Spectators"];
    publicVariable "MYT_spectatorGroup";
};```
onPlayerKilled.sqf

params ["_oldUnit", "_killer", "_respawn", "_respawnDelay"];
waitUntil {!isNil "MYT_spectatorGroup"};
[_oldUnit] joinSilent MYT_spectatorGroup;

In some playthroughs, `MYT_spectatorGroup` evaluates to grpNull and everyone joins different group upon death. Any idea why would that be?
austere granite
#

where it's parentmod thingie

#

that's what BIS uses in just about everything

old glade
#

@queen cargo what do you mean about that

jade abyss
#

a = 1 Char
aa = 2 Char ๐Ÿ˜„

queen cargo
#

@digital pulsar groups get cleaned up automatically
You have to explicitly disable that behavior

#

Probably your group was empty at some point

tough abyss
#

No they dont ๐Ÿ˜›

queen cargo
#

And thus got garbage collected

digital pulsar
#

i do, i specified false in createGroup

old glade
#

I was making a joke about bethesda

queen cargo
#

You cannot do that without them being wrong

digital pulsar
#

Syntax: createGroup [side, deleteWhenEmpty] (since Arma 3 v1.67)

#

deleteWhenEmptyButOccasionallyIgnoreThisFlagAnyway

tough abyss
#

You prob have some code deleting groups somewhere using any particular addos / missions

digital pulsar
#

no mods

#

and i dont think i referenced that var anywhere else in the mission

old glade
#

garbage collector?

lone glade
#

inb4 the garbage collector had groups re-added to it

old glade
#

lol

lone glade
#

after all, they were removed from it for no reasons cough, because of a bug actually

old glade
#

wait that option was removed?

#

-.-

lone glade
#

yes, since 1.47 or somethng

old glade
#

probably because it gained sentience and killed the cat or something

#

wouldn't surprise me

lone glade
#

nah, afaik a bug caused it to not delete groups anymore and somehow it was considered a feature

#

I want copilot FFV in the hummy back T.T

#

that 1 day was glorious

old glade
#

"No garbage collector stop! that's not garbage it's mittens!

#

wait what

#

ffv from the copilot seat?!

lone glade
#

yes, you could fire your pistol from the copilot seat

old glade
#

why is this not a thing

#

I've seen a video of a cop doing that

lone glade
#

because it isn't, it stayed for a day and got removed

old glade
#

then jumping out and tackling someone

#

damn

#

it would be awesome to have it as an option...

lone glade
#

let's see how bad the search is on the BIS forums

old glade
#

lol

agile pumice
old glade
#

someone needs to make a mod where you can fire from a quads driverseat

#

Or at the very least the backseat

agile pumice
#

I thought you could already do it from the back seat

old glade
#

can you?

#

I've never been able to

agile pumice
#

not entirely sure

#

you should be able to modify the config to allow it

halcyon crypt
#

anyone that happens to know how getPylonMagazines behaves on vehicles without pylon support?

#

returns and empty array

#

thanks anyway ๐Ÿ˜ƒ

agile pumice
#

can anyone tell me why the loop continues despite the exitwith?

lone glade
#

what loop?

agile pumice
#

from the pastebin I linked

lone glade
#

you're using while true, ohgod

agile pumice
#

well my exit conditions aren't very simple so

lone glade
#

they are

agile pumice
#

not to me, sorry, correction XD

#

don't I need an exit to break the scope and terminate the code?

lone glade
#

you do, exitWith exit the current scope

#

so either the local var you're using isn't defined or it's not a bool

agile pumice
#

if I put all my conditions in the while {}, what do I have left to breakout with?

lone glade
#

eh, there isn't that many options in vanilla

jade abyss
#

didn't he said he get the "exit 2" hint?

agile pumice
#

I do

jade abyss
#

So everything should be fine, unless you got a 2nd loop running

agile pumice
#

It doesn't sound like I do

#

I can double check

jade abyss
#

+Use systemchat instead

#

hint overwrites the older one

agile pumice
#

I am right now ๐Ÿ˜ƒ

jade abyss
#

๐Ÿ˜‰

agile pumice
#

right before the while true

#

systemChat "lets start!";

jade abyss
#

No, inside the Loop

agile pumice
#

if I see two of these, then there are two loops

jade abyss
#

with

systemchat str diag_TickTime;
lone glade
#

it might trigger spam protection if his sleep timer is under 1s

jade abyss
#

What?

lone glade
#

oh wait, that only apply to the RPT

jade abyss
#

what is "spam protection"?

agile pumice
#

it could be

lone glade
#

you can log a limited amount of messages per second, otherwise they won't get logged

jade abyss
#

hm, never heard of it

#

+systemchat/hint isn't blocked anyway^^

#

I used them so often for debuging in perFrameEH

agile pumice
#

okay so, only one loop running at a time

lone glade
#

what's the issue? sound keep playing?

agile pumice
#

got my exit 2 hint and it still keeps on truckin along

jade abyss
#

exit 2 as systemchat appears only one time? +how do you know it's still running?

agile pumice
#

yes

lone glade
#

ooooh I know why

#

it queues the sounds

jade abyss
#

Yeah

agile pumice
#

because the sound keeps playinmg

#

do I need say3d?

jade abyss
#

What Alganthe wrote

lone glade
#

nope, say3D has the same issue

#

make your sleep the same length as the audio clip

agile pumice
#

for anoter script, I attached a say3d to an object

jade abyss
#

erm... i am pretty sure there was a command that instantly played it (no queue)

agile pumice
#

and deleted it to kill the sound

#

I do

#

the sleeps are the same length

jade abyss
#
  1. better do uisleep
  2. Are you sure, it's the exact time? (even *1ms diff can make a diff ๐Ÿ˜„ )
agile pumice
#

0.291

#

thats an example of one of the sleep times

lone glade
#

say3D might work, I know directSay has the same issue

agile pumice
#

I narrowed that sleep down quite a bit XD

lone glade
#

wiki's back btw

agile pumice
#

thankfully

#

what's the real difference between UI sleep and regular sleep

#

I figured UI sleep was best done for UI stuff

jade abyss
#

sleep = can be delayed by low FPS

#

UIsleep = nope, i don't care. I wait for exactly 0.1ms, then doing it, no matter how much your PC is loaded

#

(simplified)

agile pumice
#

roger

tame portal
#

Do what most people do

#

Write sleep everyone out of habit

jade abyss
#

quit?

#

Oh, that

tame portal
#

And when everything is done replace across the whole project

#

10/10 clean solution

jade abyss
#

Yeah. idk why sleep should be used anyway

tame portal
#

To spice things up ๐Ÿ†

jade abyss
#

๐Ÿฆ‹ - erfly

tame portal
#

๐Ÿ

agile pumice
#

no work ๐Ÿ˜ฆ

jade abyss
#

add another systemchat "I am running"; after the exitWith{} part

agile pumice
#

too late, I'm making that damned helipad to attach the sound to

#

I want this sound utterly annihileated

jade abyss
#

ยฏ_(ใƒ„)_/ยฏ

tame portal
#

Can your script even suspend?

#

Not that its throwing an error, skipping sleep and going wild with playSound3D

jade abyss
#

Good point

#

Do you start your game with ShowScriptErrors?

lone glade
#

@agile pumice try to use the say command instead

agile pumice
#

I will end up using say3d and rewriting my sound configs if this doesn't work, At that point I won't be needing assistance

tame portal
#

Did you know that if you do playSound, you can stop the sound again by deleting the object it creates for itself?

#
private _existingSound = ASLToAGL [0,0,0] nearestObject "#soundonvehicle";
#

Quite silly if you ask me that the command itself does not return this object

agile pumice
#

very silly

#

I'll give that a try instead

tame portal
#

Thats for playSound though ๐Ÿ˜›

agile pumice
#

i do believe I have showscripterrors

jade abyss
#

"do believe" != "know" ๐Ÿ˜„

agile pumice
#

well I get script errors at the top of my screen

#

but I havn't checked my shortcut params to verify

#

OPTIX, just playSound, not playSound 3d? I can't return a #soundonvehicle

#

nearestObjects [vehicle player, [], 10]; does not return one