#arma3_scripting

1 messages Β· Page 423 of 1

still forum
#

Didn't you ask that question like.. half a dozen times already?

lone glade
#

there are none

manic sigil
#

Solved my own problem. Forgot one of my favorite loops; Check = time, then run the loop when check < time, and at the end check=time+1.

lone glade
#

because literally all of them are either outdated or contain wrong info

manic sigil
#

Turned a bogged down script into three lines in two triggers.

lusty canyon
#

i think gui editor in debug console can export UI templates?

queen cargo
#

@tender fossil yes
or better: you use tools as for most UI related stuff you do not need specialized UI elements anyways

tender fossil
#

@still forum I asked it once before and got no answer, that's why I'm asking again

#

So I should learn the basics from VBS wiki and then just start building stuff with GUI editor?

queen cargo
#

no, you should learn to use the tools you get provided by the community first
and only if you need to dive in deep, you shall utilize vbs wiki and biki

tender fossil
#

Alright

#

Thanks for the info πŸ˜ƒ

#

So I shouldn't use the default A3 GUI editor but community tools instead?

queen cargo
#

yes

tender fossil
#

Oh, I see

queen cargo
#

the default ui editor is community made too btw

tender fossil
#

...it is?

#

Interesting

meager heart
#

Also check Karel Moricky Template: UI Controls... in workshop

tender fossil
#

Thanks for the tip @meager heart πŸ˜ƒ

peak plover
#

Is there a way to force the player to zoom in or out

indigo snow
#

Go to his house amd press his mouse buttons

peak plover
#

You know what?

#

That's so crazy it might actually work

#

thanks

sour saffron
#

maybe you can get distance from 2 points and if its not in the right range then do something to make him zoom

#

i recall long ago a served did camera distance player to if mission was being played in 3rd person , if so then the mission closed lol

subtle ore
#

3rd person can be changed, not 1st

#

i think the zoom is reffering to the mouse zoom

sour saffron
#

well this case was if admins allowed 3rd πŸ˜ƒ

subtle ore
#

Ah

peak plover
#

I can check the fov

#

But I can't find a way to change

meager heart
#

inputAction "zoomOut" (zoomIn) ? don't know what are you doing... but maybe you can use it

#

also if that for your zeus thing there is curatorCamera

peak plover
#

Nah

#

I wish I coulddo inputAction or sth

meager heart
#

yep, that would be nice

peak plover
#

could do so much more

meager heart
#

sad_face.paa

west grove
#

ah, for fucks sake. thought i was being smart, but my idea doesnt work. damn, i'm pissy now.

#

the new keyframe animation system is great, but it could be even better..

subtle ore
#

Well don't be pissy

west grove
#

i spend lots of work on this

subtle ore
#

Breathe in, out, in. Five laps around your house

#

and bam

west grove
#

wanted to record a helicopter flight, but i am a really crappy pilot. so what do i do? i use the new keyframe system to plot the helicopter path. it looks really good. but now the problem: i can't just use that for what i need. the helicopter doesn't seem to be "a real object" or something. particle effects don't travel with it, attached objects remain at the original position, etc..... So then i tried being smart and wanted to record the path of the keyframed object.... but instead of recording the objects movement, it just recorded its original position. e.g. as if it doesn't move at all.

#

now the question is, how do i get this data.

subtle ore
#

traditionally it's always been BIS_fnc_unitCapture

west grove
#

yes of course, but like i said, it doesn't work in this case

#

apparently from a mechanic kind of view, the helicopter never moves.

west grove
#

i know unitcapture and i used it more than once already

west grove
#

please read again, i know this.

indigo snow
#

I dont think those work at all with the new keyframe system

subtle ore
#

I read what you said

#

i am not being ignorant

#

i just think you should use it

west grove
#

using unitCapture means i'll have to fly the helicopter on my own, which is not something that gives me great results.

#

i want to use it, i just dont want to fly the helicopter on my own.

subtle ore
#

if you are having problems with keyframe

west grove
#

that's why i used the keyframe system: to have it fly in the path i need

#

it's annoying, because it would solve plenty problems

#

i mean, in the end of it... the object is moving, so there must be something that you can fetch the coordinates from, no?

subtle ore
#

breathe?

shadow sapphire
#

I like the new key frame system, especially for camera work, but it definitely has some oddities about it.

west grove
#

hmm. getpos does recognize the objects shift in position. it seems unitcapture is not working with it.

subtle ore
#

@west grove are you confused as to how to grab a position of a vehicle?

getPosATL _veh;
west grove
#

no πŸ˜„

subtle ore
#

getPos is going to run once when not in a loop

west grove
#

ok, again. this is what i do: setup keyframe animation. have it start. once started, i record the units movement. once done, i save it and later do UnitPlay

subtle ore
#

it's not going to ever change unless it's updated

indigo snow
#

@west grove im sure this means you cant use unitCapture on keyframed objects

west grove
#

yes, that's why i hoped someone in here knows a solution :p

indigo snow
#

so the only solution is flying yourself

#

or getting someone else to do it for you

west grove
#

flying by myself is not a solution :>

indigo snow
#

then there is none

west grove
#

already asked, as always nobody is out to help

indigo snow
#

Then there is no solution.

west grove
#

if you dont do shit on your own, nothing gets done. it's how it is.

indigo snow
#

Then you're outta luck.

west grove
#

yup. nothing new.

#

think i got it

subtle ore
#

Breathe in, breathe out

#

5 laps

west grove
#

do you have asthma by chance? you're writing about breathing so often.

subtle ore
#

Nope

#

Do you?

west grove
#

not that i know of

river meteor
#

I'm having an issue loading a player's inventory from a database using sqf getUnitLoadout player It's saving the array as a VARCHAR and when I try to select it back from the database I end up with this error: Error in expression <[1,[["[["arifle_MX_ACO_pointer_F","","acc_pointer> Error position: <arifle_MX_ACO_pointer_F","","acc_pointer> Error Missing ] Been trying a lot of things for the last few days and would appreciate if anyone has some ideas

tough abyss
#

its getting cutoff, either varchar size is to short (use TEXT) or you are using format in sqf which has 8k limit

#

Can u pastebin the rpt output, looks odd i.e quotations are off

river meteor
#

sure, one sec

tough abyss
#

extDB2/3 using SQL Protocol ? Use TEXT for storing arrays, VAR Char is wrapped in quotations (legacy thing)

river meteor
#

ok, I'll switch to text, and yes extdb3 using sql

tough abyss
#

Its legacy thing from life, VARCHAR is for strings, TEXT is for arrays etc (arrays are normally longer aswell). https://bitbucket.org/torndeco/extdb3/wiki/extDB3 - SQL
If you need more control, use SQL_CUSTOM (abit more complicated since you predefine everything in a ini file).

river meteor
#

Yeah that was the problem, switching to TEXT had the desired effect, thanks.

edgy dune
#

so using createvehicle,is there away to position a vic relative to say a certain player, like use that players cordinate system rather then the globla cordinate system?

#

so like +Y would be direct front

#

and +X would be direct right

#

What im tryna do is

#

spawn several smoke grenades in a line infront of the player

#

and what I have sofar is this

#
removeAllActions _this;

_this  addAction ["<t color='#A668C2'>Smokey</t>",
{


  for [{_j=0}, {_j<25}, {_j=_j+5}] do
{
comment "front";
   _frag_grenade = createvehicle ["smokeshellpurple",((position (_this select 0)) vectorAdd [((vectordir ((_this select 0))) select 1)*-_i,((vectordir ((_this select 0))) select 0)*-_j,0]),[],0,"none"]; 
   
     
     
    
};
  
  

hint format["%1",time];



},[1],0,false,true,"User16"," driver  _target == _this"];


``` however it spawns the grenades infront,which is good,but at a slight angle about 10 degrees right
little eagle
#

Use:

origin getPos [distance, heading] 
#
Syntax:
    origin getPos [distance, heading]         (Since Arma 3 v1.55.133361)

Parameters:
    origin: Object, Position2D or Position3D
    [distance, heading]: Array
        distance: Number - distance from position
        heading: Number - in which compass direction

Return Value:
    Array - format [x,y,z], where z is land surface in format PositionAGL
edgy dune
#

ah thx

manic sigil
#

Is there a way to allow players to wear offside uniforms?

#

Or hell, just civilian clothes?

peak plover
#

Ace shud have sth for that

#

Should b. Config edit

#

So answer is yes

meager heart
#

forceAddUniform ?

#

maybe fixed now

willow basin
#

Only the unlocked_uniforms.pbo is interesting for you

indigo snow
#

Thats is so old by now itll be missing a ton of stuff

compact maple
#

Hello guys. I use task force on my server. When the player leave the server, I would like to save the frequency he sets on his radio on my database. Then when he will reconnect, I want the frequency to be set again automatically on his radio. Is there an existing function that’s set a frequency on radios ? Thanks

still forum
#

What is task force?

compact maple
#

Task force radio is a mod that use team speak to simulate voices in game

still forum
#

Task Force Arrowhead Radio aka TFAR.

#

Not task force

#

yeah there is a function to set radio frequency

compact maple
#

This is what I just wrote lol

still forum
compact maple
#

Did you use that function before ?

still forum
#

Even has a example

compact maple
#

Thanks for the link πŸ˜ƒ

still forum
#

I might have come into contact with that function before yes.

compact maple
#

Also there is a function to GET the actual frequencies used by the players ?

still forum
#

How about you use CTRL+F

#

The set function is TFAR_fnc_setSwFrequency I give you one chance to guess the name of the get function.

compact maple
#

Lol thanks you but I’m on mobile right now

#

Thanks you for the help btw

lusty canyon
#

im having trouble keep lock on a laser object moving +100km, would this be a reveal issue? do laser objects need more than just LOS to keep player lock?

#

in other words how do you keep lock on a laser object regardless of conditions? LOS, speed, weather, etc.

narrow musk
#

What vehicle are you in

lusty canyon
#

player trying to lock with vanilla titan

#

while my remote desig is tracking a target

narrow musk
#

I'm unsure if the titan can actually lock to laser designated targets.

#

I know the titan is laser guided so you can actually move and follow the target and the missile will track ur movement.

lusty canyon
#

it can but for arguments sake lets just use whatever valid laser lockable

#

doesnt have to be titan lets call it a GBU

narrow musk
#

Are you certain ur lock target keys are setup corrrectly, i have trouble locking onto anything in an aircraft due to that.

#

reveal target

lusty canyon
#

so i should loop
_target = laserTarget _remoteDesignatorObj;
player reveal _target

like that?

narrow musk
#

(laserTarget player distance objectused) < 2;

#

are you using triggers?

lusty canyon
#

nah no triggers

#

plus how do you check if a vehicle has a laser turned on/off?

narrow musk
#

Good question, looking into it.

cold pebble
lusty canyon
#

ive already given up trying to order the AI it turn on the laser themselves
guess this is why everyone just creates fake laser objects out of nowhere

#

nice catch dom thanks

cold pebble
#

πŸ˜›

#

Remember reading that recently

cedar kindle
#

is it too late to PV a variable for debrief with a MEH β€œEnded”?

peak plover
#

Yeah, I had issues with that. I think it worked 1/10 times for me

#

If you use BIS_fnc_endMission

#

Do it before that, because endMission has that animation/music/screen

cedar kindle
#

ye got a wrapper atm

warm gorge
#

How is ListNBox column sorting handled? Do I need to do something with scripting commands or something because right now im doing it like ive seen, where people have 1 ListNBox as the filter/header, and another for the actual items that are contained in it.

#

For some reason mine isnt showing any sorting arrows or anything, just the names of each column.

austere granite
#

that isn't listNbox with the arrows i think

#

that's the table thing

warm gorge
#

@austere granite Do you know what class the Eden GUI uses in place of RscControlsTable? I cant find it

#

From what I can see, they just use ListNBoxes, 1 for the filter (columns), and 1 for the actual content

queen cargo
#

Why all want sorting in the listbox? Sort stuff before adding it and all problems are solved

warm gorge
lone glade
#

those are listboxes or listnboxes and they use lb / lnbSort

austere granite
#
        class Filter: ctrlListNBox
        {
            idc = 107;
warm gorge
#

@lone glade Yeah I thought so, I've got a dialog all set up and code for adding items to it, but I thought the sorting functionality was default functionality? I can see the columns, but theres no sort arrows or anything

lone glade
#

that's a ctrlCombo that runs code when you change it

#

I have a similar setup for ACE Arsenal

#

oh right, I also forgot, you can set hidden values and sort by them too using lnbSortByValue

#

that's how I do "sort by amount" (or is it for by weight... can't remember)

warm gorge
#

@lone glade So this replicates the same behavior as the sorting arrows I showed in the link I put just before? Just confused because in the Eden dialog files I only see the 2 ListNBoxes, and no combo boxes or anything so I guess thats all done on the engine?

lone glade
#

the sorting arrows sort by ascending descending but it's the same idea

#

just one more button and a bit different code

#

it's not done engine side, those buttons are controls, you just haven't found the one

#

they're just buttons with onButtonClick EHs that sort by ascending /descending based on which one you clicked

warm gorge
#

Ah okay, interesting. Just using Display3DENSave as a reference, and when I just saw the 2 listnboxes was just confused how it was producing the sorting functionality

#

Managed to get it working with a simple call to BIS_fnc_initListNBoxSorting

little eagle
#

So there are lnbSort commands after all. Yesterday someone said there weren't any. lb only, not lnb.

lone glade
#

that person was full of bullshit

#

good thing I didn't see that post πŸ˜›

little eagle
#

They were confused, and I wasn't sure either if it exists. Not really a fan of lnb.

lone glade
#

more columns

little eagle
#

My poop emoji looks ugly now.

#

πŸ’©

lone glade
#

the black outline is stronger it seems

scarlet spoke
#

Consider following code:

[3,4] select 1 + 1

Will it return 4 or 5?

indigo snow
#

it will return nil since Arma starts arrays with index 0

#

+ has higher precedence than other binary commands

scarlet spoke
#

Oh right... Well the main question was whether + really has a higher precedence. I found that grammar too but I thought it might be an error

indigo snow
#

try it out and know for sure /shrug

scarlet spoke
#

But for that I had to start my other computer... So I was kinda hoping someone around here'd know the answer

indigo snow
#

it will never return 4, at least

scarlet spoke
#

Yeah that was an thinking error on my end 🀷

#

Should have made it like this:

[3,7] select 0 + 1
#

But now I am really curious. I'm gonna fire up my other computer to test this πŸ˜„

#

Okay I just tested: Above code will return 7 which proves that + does have a higher precedence than select

#

@indigo snow

little eagle
#

Plus has higher precendence as other binary commands.

#

[3,7] select 0 + 1

#

[3,7] select 1

#

7

#

This happens with all binary math commands essentially. + - * / ^ min max atan2 etc.

still forum
#

"all" assuming consistency is a thing in SQF.

little eagle
#

Give me a counter example.

#

Well I guess the vector commands are one. They have normal binary precendence. The lowest.

#

tbh, I don't like operator precedence. I wish it was all left to right in math. So I'm fine with vectorAdd being the same as vectorMultiply. It pretty easy to work with.

scarlet spoke
#

Are there any other binary math operators than +, -, *, /, ^, %, mod, min, max, atan2?

little eagle
#

You listed + twice.

scarlet spoke
#

Oops xD

little eagle
#

I can't think of anything else. Oh else also has elevated precendce.

scarlet spoke
#

Also: What about random? It is listed as a math command but can be used as a binary command. Is it also treated differently from "normal" binary commands?

still forum
scarlet spoke
#

Yeah the else-thing I know πŸ˜ƒ

little eagle
#

random is unary.

scarlet spoke
#
seed random x        (Since Arma 3 v1.67.139663)```
still forum
scarlet spoke
#

Those all say bim 4

still forum
#

bim 6 bim 7 bim 9 bim 1 bim 2 bim 3

#

yeah 4 is default

#

look for these ^

little eagle
#

Oh, stuff like > < <= >= == and != have lower precence than binary commands.

scarlet spoke
#

Ah yeah... I thought they are ordered by precedence so I only scrolled through them

little eagle
#

Also || or and and &&

still forum
#

or is lower than and

#

both are lower than default

scarlet spoke
#

Yep that I know πŸ‘Ό

#

I'm just fiddling with the math-command stuff

little eagle
#

I wonder if
ARRAY + ARRAY
has the same precedence as
NUMBER + NUMBER

#

First one isn't technically a math command.

#

What does "bim" stand for?

lone glade
#

weeeelll, isn't array + array array append + copy?

still forum
#

bim is binary.. something

#

I made that up

lone glade
#

binary math?

still forum
#

bimbam buhle

lone glade
#

or bin mispelled

still forum
#

Ah.. yeah that could be

lone glade
#

member getDammage? πŸ˜„

scarlet spoke
#

I always get confused on how to write damage because of that xD

lone glade
#

I want sqf support for arma 4 just for that

#

it already survived from OFP to A3, πŸ˜„

scarlet spoke
#

@still forum in your list <= has a 3 while normal commands have a 4... But aren't all comparisons performed after the binary commands? πŸ€”

still forum
#

comparisons are binary commands....

#

Soo... ?

scarlet spoke
#

Yeah I know... But "special"

still forum
#

3 is lower priority. Which means they get executed "later"

little eagle
#

Lower means done later, so where's the problem?

lone glade
#

what else could they be ded?

scarlet spoke
#

Ah okay then I confused that xD

still forum
#

@lone glade special magic

#

Like sometimes I dream about variables and nular commands being seperate

#

That's kinda similear to that i guess

little eagle
#

Ask again in a few weeks. πŸ˜‰

still forum
#

comparisons being different to binary commands Β―_(ツ)_/Β―

lone glade
#

oh god

#

that's gonna become a meme

little eagle
#

Sure hope so.

still forum
#

what?

#

Oh that

#

lol

lone glade
#

hey ded, wer iz tfar 11.0?

#

gib

little eagle
#

You should've sorted your list dedmen.

still forum
#

Just put it into notepad++ and press the sort button Β―_(ツ)_/Β―

scarlet spoke
#

@still forum according to wikipedia the higher numbers are executed later. That's the way I have it in my parser as well which is why I got confused πŸ˜„

still forum
#

wikipedia has an article about things in the SQF engine implementation that are not publicly visible?

lone glade
#

Bikipedia πŸ˜„

little eagle
#

There.

still forum
#

You remove the cool bimbam name

#

bambam won't be happy bout dis!

little eagle
#

If you name everything bimmelbammel, you won't find it again in a few months.

still forum
#

I just look at the previews in my gist list

scarlet spoke
#

No of course not... But about the "normal" way to number these precedences ^^

#

But it shouldn't suprise me that SQF does it differently 🀷

little eagle
#

atan2 is weird being the same as multiplication etc.

scarlet spoke
#

Yep

#

And thanks for the sorting πŸ˜‰

little eagle
#

is weird too, but I guess it's usefull.

still forum
#

I'm weird too, but I guess I'm also useful.

little eagle
#

CONFIG >> STRING is 3
CONFIG / STRING is 7

#

fml

still forum
#

/ is also slower

little eagle
#

Nah, it's 7 actually.

still forum
#

You should see the internal implementation of / vs >> ....

lone glade
#

I don't want to

#

all I need to know is that / doesn't exist anymore

little eagle
#

I want someone to confirm that NUMBER / NUMBER has the same precedence as CONFIG / STRING. Somehow I still doubt it.

still forum
#

ah yeah my code only shows first command with that name

peak plover
#

What does >> do

#

the config arrow?

lone glade
#

indicates subentry with the left one being the parent and right one child.

peak plover
#

1 x > meme arrow
2 x > config arrow

lone glade
#

1 > is quote in most markdown implementations

#

GODDAMNIT I WANT A MARKDOWN STANDARD PLS

peak plover
#

^

#

What if they do one, but it's not usaing >

lone glade
#

it's fine

#

but I just want consistency

peak plover
#

True, would be a lot easier to use everything without looking up small things they did differenetly

meager heart
#

custom shift operators πŸ‘ˆ πŸ‘‰ /s

#

like configFile πŸ‘‰ "CfgVehicles"

#

πŸ˜„

queen cargo
#

There is a difference between / and >> internally?!

exotic tinsel
#

will this script work?

_baditem = "Weapon_srifle_DMR" in "Weapon_srifle_DMR_04_Tan_F" ;
lone glade
#

no

#

use find

exotic tinsel
#

rgr, thx mate

#

only asked here because it would have been a bear to just quick test it.

little eagle
#

@queen cargo Yes.

configFile >> "Cfg" + "Vehicles" // works
configFile / "Cfg" + "Vehicles" // ERROR
configFile / ("Cfg" + "Vehicles") // works

Because + has priority over >>, but not over /. Therefore the variant with / needs parenthesis.
>> prio 3
+ prio 6
/ prio 7
This is because + and / double as math commands.
I suggest always using >>.

meager heart
#

where you checking priority for the operators, commy ?

meager heart
#

thanks

meager heart
#

i understand now where that confusion came from, about " config File / "Cfg".. is faster/better than config File >> "Cfg".." just priority difference

queen cargo
#

@little eagle Was talking about the implementation not the precedence

little eagle
#

That's an important part of it, no?

queen cargo
#

no

#

that just means you have to be careful using it

#

just tells us that somebody was either lazy or thought "they are the same operators and thus should share the same precedence"

little eagle
#

Β―_(ツ)_/Β―

exotic tinsel
#

hi all, can someone tell me the proper syntax for using the ContainerClosed event handler on a container? i want to call a function when they leave the virtual arsenal

meager heart
#
//--- Arsenal
[missionnamespace,"arsenalClosed", {/* your code */}] call bis_fnc_addScriptedEventhandler;

//--- Cargo container
_container addEventHandler ["ContainerClosed",{
    params ["_container","_player"];
    /* your code */
}];
#

@exotic tinsel

exotic tinsel
#

thanks so much mate

#

where should i put this? in the init of the arsenal? or can i put it in a file?

[missionnamespace,"arsenalClosed", {[player] call TLS_fnc_RoleItemRestrictions;}] call bis_fnc_addScriptedEventhandler;
#

@meager heart

meager heart
#

player init scripts... initPlayerLocal.sqf

exotic tinsel
#

rgr rgr, thanks again mate @meager heart

meager heart
#

np

still forum
#

@queen cargo / is also slower than >> If they were the same internally, they would be equal

queen cargo
#

that is what i was wondering

#

how do they differ?

#

it is not like there are many ways to traverse a tree

still forum
#

/ calls the >> implementation. Instead of them just using the >> implementation for both

fleet wind
lone glade
#

all UI commands or events are local

#

absolutely no exception

fleet wind
#

Roger thanks

queen cargo
#

still should be stated there

still forum
#

If I do this locally will it happen locally?

lone glade
#

it doesn't need to be stated because it's obvious

still forum
#

What kinda question is that even

queen cargo
#

question was more about if the effects are local only

still forum
#

And if No is there a local one
No. A local player doesn't exist

lone glade
#

non local ^

still forum
#

It's all an illusion

little eagle
#

The command has local effects and ideally the wiki should say so. Even if it seems obvious.

still forum
#

Wiki page says so

little eagle
#

But the icon is missing.

#

EL

#

Oh, you fixed it. Thanks.

still forum
#

sneaky breeky

queen cargo
lone glade
#

IV DAMKE

knotty mantle
#

If i have a script and call a function in there that has a waitUntil the script is stopped until the function is done, isn Β΄t it?

lone glade
#

depends if scheduled or not

queen cargo
#

it does not depends
call always will block

lone glade
#

nah

still forum
#

no?

queen cargo
#

yes

knotty mantle
#

it is a scheduled script.

lone glade
#

No, call in scheduled is non blocking

still forum
#

in unscheduled you will get a script error and the script will abort

queen cargo
#

something
... call ...; //Will always block until subscope is done
something```
#

yes

still forum
#

If you mean with "script" the code that contains the call No. That's not stopped

lone glade
#

.... dude

still forum
#

Calling a function, calls the function and when it returns continues on

#

that's like the most basic programming thing.

#

The "script" is not stopped because there is no seperate script. It's all just one single script

knotty mantle
#

yeah okay. but it waits for the function to return smth. So if the function needs 60 seconds due to waitUntil the code that called the function is waiting for 60 seconds for that return?

still forum
#

It's just one script.

lone glade
#

the call is just an extra scope

still forum
#
1;
2;
3;
#

yes. The 3 doesn't execute before the 2

#

Which is what I guess you want to know?

knotty mantle
#

Yeah.

#

Kinda. Breaking it down to this it is πŸ˜„

little eagle
#

If i have a script and call a function in there that has a waitUntil the script is stopped until the function is done, isn Β΄t it?
Yes.

quasi rover
#

Is there way to figure out the projectile, source... when a building is destroyed?
Just like HandleDamage EH when the unit is damaged, we can figure out the unit, hitSelection, source, projectile...etc from EH arguments.

tender fossil
#

What does this mean?

    [1, 2] call {
        if (!params ["_var1", "_var2", ["_var3", true, [true]]]) exitWith {
            hint str [_var1, _var2, _var3];
        };
    };
#

especially that

["_var3", true, [true]]
still forum
#

It's a piece of script

subtle ore
#

look at what params returns

still forum
#

default value true and only allowed types are booleans

subtle ore
#

and so if the parameters passed are invalid according to params then it exits

tender fossil
#

That's what I understood

#

But regarding the piece of script I pasted under it

#

I just don't understand what's happening there / the syntax

#
["var3", true, [true]]
still forum
#

?

#

Just told you that

#

Puts the third parameter into _var3, verifies it's type, default value

subtle ore
tender fossil
#

Oh wait a minute

#

Lol! I'm dumb πŸ˜‚

subtle ore
#

heh

tender fossil
#

(once again)

#

So the last argument represents the data type, which is presented by an example of that data type?

#

So instead of writing something like [String] I make it clear by writing [""]

cedar kindle
#

yea

lone glade
#

check the wiki

cedar kindle
#

and you can have several types

tender fossil
#

Ah, that makes sense

#

I'm just surprised that I rather give an example than include the actual data type (try to understand me, I'm moving from Java to Armaverse and its quirks) πŸ˜„

still forum
#

You didn't fully understand how SQF works then

tender fossil
#

Yup, trying to learn it

still forum
#

There are no static types

#

so there are also no names for these types that don't exist

cedar kindle
#

well there’s only typeName for that and it reports strings for everything

little eagle
#

Ew, they used true as sample for BOOL instead of false.

tender fossil
little eagle
#

Well, you thought wrong.

tender fossil
#

I see πŸ˜›

still forum
#

in SQF eh.. "things" can only be commands or variables

little eagle
#

keyword!

still forum
#

Sometimes you are lucky and there exists a command that just returns the type

tender fossil
#

That's good to know

still forum
#

like true being a command returning a boolean that happens to be true

tender fossil
#

lol

compact galleon
#

technically, operator

still forum
#

is a word without "arguments" a operator too?

#

There is nothing it operates on

compact galleon
#

nullary operator

still forum
#

but variables are no operators

#

and they are the same as a nullary operator

#

So what are both? keywords?

compact galleon
#

true is a nullary operator. It executes a function in the game

#

variables are not operators.

still forum
#

"things" can only be commands or variables
so.. operators can be variables?
or keywords can be operators or variables?

cedar kindle
#

i’d say semantically an operator not technically ; )

still forum
#

I was talking about true or player or asfadasrfasf being either command or variable and nothing else.
I guess you can't call them operators because variables are not operators

compact galleon
#

Technically, yes. It is registered as a nullary operator in the game. Variables are not operators as they do not operate. Operators performs an operation, whether with operands or not.

#

true, false, player, pi are all nullary operators, not variables

#

diag_fps is also a nullary operator, but doesn't return the same value on every call

still forum
#

So... "keyword" would be correct then?

#

"keywords" can only be commands or variables

#

Or did you refer to like true being a command returning a boolean that happens to be true

compact galleon
#

I wouldn't call it that, since keyword has a special meaning

#

The only actual keyword is private

#

I was refering to command. They're technically operators

still forum
#

Ahh.. Yeah. Thought you were refering to the other message

little eagle
#

I believe the wiki calls them commands.

compact galleon
#

A lot of people find SQF difficult to understand. I just think they don't realize it's purely an expression evaluator. If you know elementary algebra, more specifically, arithmetic, SQF is easy to learn.

little eagle
#

But names don't matter. I dub them not-variables henceford.

fossil yew
#

It's true, SQF is more like LISP than like Python.

#

functional programming language

#

but it's harder to learn it that way I guess

compact galleon
#

SQF is easy to learn, if you realize it's purely operators and operands, and you can get your head around operators taking other data types than just numbers.

tough abyss
#

hey there, anyone know by any chance how to check if a mission has an ACE3 dependency via script? perhaps something like isNil (Alive_required) or something? Want to check to ACE3 exists before using a function that uses ACE3 functions

still forum
#

It's like the easiest thing ever if you understand the lowest level. But I guess that's hard to understand?

fossil yew
#

and you can get your head around operators taking other data types than just numbers

Ha, well, that's the core of the problem.

still forum
#

@tough abyss Search for ace. If you found one then it probably has a ace dependency

compact galleon
#

@fossil yew Well, not that hard if you understand what an operator is

fossil yew
#

{code}+{code}=?

tough abyss
#

can I do that per server-side script?

compact galleon
#

@fossil yew Invalid

still forum
#

@fossil yew {code}+{code}=bool

compact galleon
#

The operators has to support it.

still forum
#

that operator doesn't exist. but theoretically possible XD

compact galleon
#

And each one can have multiple arities

still forum
#

@tough abyss check CFG patches. Or just check for ACE_main variable not being nil

compact galleon
#

Eg. - is both a binary and unary operator, taking either 2 numbers, or one numbers.

#

But it also operates on arrays

#

I guess the simplest way to present the notion of other types to newbies is through an imaginary operator mixing colors

fossil yew
#

hahaha

compact galleon
#

eg. red + green = yellow

fossil yew
#

well, ok

compact galleon
#

(red + green) + blue = white

still forum
#

But then you also have to teach them how color mixing works

compact galleon
#

Not necessarily

tough abyss
#

how do I check with a script the content of CfgPatches? πŸ€” @still forum the Wiki isn't very helpful on it

compact galleon
#

Most, if not all people know that colors mix. They don't need to know exactly how they mix.

still forum
tough abyss
#

marvelous! thanks @still forum

#

_ace_enabled = isClass (configFile >> "CfgPatches" >> "ACE_main"); let's see

still forum
#

Or
_ace_enabled = !isNil "ACE_main";

compact galleon
#

Too bad SQF doesn't support associativity

#

Makes the exponent operator return incorrect results

subtle ore
#

Dedmen, wouldn't that always return nil or is ACE_main defined somewhere?

still forum
#

Most ace modules define it

#

don't know if main does.. I guess it does

subtle ore
#

Hm.

tough abyss
#

isn't ACE almost purely CBA settings right now?

still forum
#

Yes? Why?

lone glade
#

by module he means PBOs

fossil yew
#

do you guys have the latest notepad++ plugin for SQF somewhere? I've tried from ACE but it lacks newer commands

tough abyss
#

oh

lone glade
#

as in separate components

tough abyss
#

I thought map modules

still forum
#

Right there. Totally obvious!

little eagle
#

Yep.

tough abyss
#

would it even return true if ACE is configured using purely CBA settings?

still forum
#

?

#

That is absolutely in no way related to this

tough abyss
#

oh I wondered if that !isNil would still work if ACE3 was set up using only the mod on the server and CBA settings, i.e. no map modules

still forum
#

You just repeated yourself. And it's still not related to this

little eagle
#

It returns true if @ace is loaded. Has nothing to do with settings.

#

oops

tough abyss
#

xD

#

Nice

#

poor Ace

#

alright thanks then

knotty mantle
still forum
#

missing bracket

knotty mantle
#

Fml.

still forum
#

Other than that.. No I have absolutely no idea why that's not working

tough abyss
#

shouldn't it be switch(test)?

knotty mantle
#

15 mins. And i didnt find a f**king bracket

lone glade
#

missing };

little eagle
#

You're missing a closing bracket, Silent.

lone glade
#

after the switch

still forum
#

I think you are missing a squirly bracket

knotty mantle
#

Yeah thanks guys. I think i missed a bracket there

subtle ore
#

you can do
switch _var do
just fine

lone glade
#

i've done that mistake so many times I recognize it instantly πŸ˜„

still forum
#

You might be missing a bracket dere boi

queen cargo
#

start using tools for theese things @knotty mantle

lone glade
#

inb4 sqf vm plug

subtle ore
#

Why not just post the code in discord next time?

knotty mantle
#

Cause of the error.

#

I kinda ruled out my stupidity at this point^^

still forum
#

Use proper indentation and you would've found it right away

knotty mantle
#

I normally do. 😦

still forum
#

πŸ—ž

compact galleon
#

πŸ“°

tough abyss
#

I thought a switch needed a _var not a string? πŸ€”

subtle ore
#

Wat

still forum
#

@tough abyss no?

#

You can give it anything

#

There

#

Argument type: Anything

tough abyss
#

hmm alright, must've mixed it up with another language then

#

Is there a benefit/point in structuring statements in this fashion vs. the other?

vehicle player == player && !isNull cursorObject && cursorObject distance player <= 5 && count (nearestObjects [player, ["landVehicle"], 5, true]) >= 1
{vehicle player == player && {!isNull cursorObject && {cursorObject distance player <= 5 && {count (nearestObjects [player, ["landVehicle"], 5, true]) >= 1}}}}

Does it process inwards out?

lone glade
#

one doesn't use lazy eval the other does

tough abyss
#

For instance, if being checked frequently, does it exit if the inner most fails instead of evaluating all conditions?

still forum
#

yes. That's like.. the definition of lazy eval...

tough abyss
#

Never worked with it before, so I was simply curious

little eagle
#

The most outer curly brackets are too much though. That makes the whole thing a code block that is never executed.

#
vehicle player == player && {!isNull cursorObject && {cursorObject distance player <= 5 && {count (nearestObjects [player, ["landVehicle"], 5, true]) >= 1}}}

Is the proper syntax.

tough abyss
#

So it will evaluate if any landvehicles are within 5m before trying everything else?

#

And if that fails, it doesn't evaluate all else?

little eagle
#

No, left to right.

cedar kindle
#

wha what about wrapping each of them in a block

tough abyss
#

Ok, So it would be evaluated last

little eagle
#
true && cond1 // cond1 is evaluated
false && cond1 // cond1 is evaluated
true || cond1 // cond1 is evaluated
false || cond1 // cond1 is evaluated

true && {cond1} // cond1 is evaluated
false && {cond1} // cond1 is ignored
true || {cond1}// cond1 is ignored
false || {cond1} // cond1 is evaluated
meager heart
#
if (condition1 || {condition2} || {condition3}) then {}; // condition3 is only evaluated if condition1 and condition2 are false
if (condition1 && {condition2} && {condition3}) then {}; // condition3 is only evaluated if condition1 and condition2 are true
tough abyss
#

Thank you, much appreciated for the examples πŸ˜›

little eagle
#

For more than 2 boolean expressions,
cond1 && {cond2 && {cond3}}
is more effective.

tough abyss
#

That was the method I was using, it is for use in an addAction, so less calculations the better

cedar kindle
#

god damn

#

why

#

like it wasn’t unreadable to begin with

little eagle
#

Yeah, it's ugly. I agree.

#

And there's no nice way to format it.

subtle ore
#

(woops)

little eagle
#

I wonder what you were trying to say.

#

Knowing you, you were about to appeal and disagree.

subtle ore
#

Newspaper? Who knows what was written on it

#

Nah, i actually wasn't going to say anything

tough abyss
#
[_veh, ["Instant Medical Attention", { player setDamage 0; if(_ace_enabled) then {[objNull, player] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;};}]] remoteExec ["addAction", -2, _veh];``` where _veh is an object on the map somewhere. I'm either using the wrong ACE heal functions or the code isn't executed clientside at all and _ace_enabled is `true`
lone glade
#

hey commy, can I leave custom script profiler scopes with an ifdef for arsenal debugging?

#ifdef DEBUG_MODE_FULL
    private _scopeHandleStats = createProfileScope "handle stats";
    profilerTrigger;
#endIf  
little eagle
#

_ace_enabled is undefined.

lone glade
#

you're not logged in on slack so i'm asking here

little eagle
#

Sure, why not alganthe.

lone glade
#

noice πŸ˜„

tough abyss
#

oh right that might be it

little eagle
#

That IS it.

still forum
#

@lone glade Make a macro for create scope and trigger

tough abyss
#

_ace_enabled is known to server, you're right. Thanks @little eagle !

still forum
#

That way it can easilly be disabled seperatly. You might want debug mode without profiler

knotty mantle
#

If heard the first time about lazy eval but basically i shoul rewrite this (({side _x == WEST} count (list _trigger) > {side _x == East} count (list _trigger)) && !_markerOccupiedByWest) to (!_markerOccupiedByWest && {({side _x == WEST} count (list _trigger) > {side _x == East} count (list _trigger))}) ?

lone glade
#

true ded

little eagle
#

@tough abyss You still don't understand. Local variables don't carry over into the scope of addAction, because it's a completely different script instance.

#

@knotty mantle Your brackets don't work.

knotty mantle
#

Yeah just noticed.

tough abyss
#

I figured @little eagle, rewriting it now to determine the sent message server side

little eagle
#
!_markerOccupiedByWest && {
    {side _x == west} count list _trigger > {side _x == east} count list _trigger
}

There. All parenthesis deleted and now it works.

tough abyss
#
_ace_enabled = !isNil "ACE_common";
if(_ace_enabled) then {
    _medical_attention = [_veh, ["Instant Medical Attention", {[objNull, player] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;}]];
    } else { _medical_attention = [_veh, ["Instant Medical Attention", {player setDamage 0;}]]; };

_medical_attention remoteExec ["addAction", -2, _veh];``` reckon this would circumvent it?
#

( @little eagle )

little eagle
#

I think so, but it's ugly af.

#

Gimme a minute.

tough abyss
#

I know :/

#
_ace_enabled = !isNil "ACE_common";
if(_ace_enabled) then {
    _medical_attention = [_veh, ["Instant Medical Attention", {[objNull, player] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;}]];
    } else {
    _medical_attention = [_veh, ["Instant Medical Attention", {player setDamage 0;}]]; 
};``` better?
little eagle
#
private _fnc_heal = {
    player setDamage 0;
};

if (!isNil "ACE_medical") then {
    _fnc_heal = {
        [objNull, player] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;
    };
};

[_veh, ["Instant Medical Attention", _fnc_heal]] remoteExec ["addAction", 0, _veh];
#

There. Beauty.

tough abyss
#

climax material right there

shadow sapphire
#

What’s the most simple way to script in a runway? You can place helipads as objects... but runways are map objects, I wonder if we could get that functionality from a script

meager heart
#

createSimpleObject ?

little eagle
#

I think, airports, as they are called, are hard coded into the map and cannot be created by script.

lone glade
#

airports are indeed hardcoded

little eagle
#

This says something about dynamic airports, but only mentions the aircraft carriers.

meager heart
#

In cup terrains couple runways

little eagle
#

Dunno, haven't seen the video. But "dynamic airport" is what I'd look for if I wanted scripted airports. No idea if possible though.

stable wave
#

How to disable the thermal vision of the targeting pod?

meager heart
stable wave
#

It works. Thanks

astral tendon
#

how do i set a Icon for a task like we have on the module?

little eagle
astral tendon
#

Not really, with the create task module we can set a task type

#

that also give it a icon like a car, armor or ammo

meager heart
astral tendon
#

that is it , thanks.

#

on side note though, i need to remote exec that or does that already by default apears to other players?

meager heart
#

isGlobal (Optional): Boolean - true to set task globally (default), false to set it only locally

astral tendon
#

Thanks

meager heart
#

btw for icons _icon = ["land"] call BIS_fnc_taskTypeIcon;

astral tendon
#

```desc: Array or String - Task description in the format ["description", "title", "marker"] or CfgTaskDescriptions class````

#

what is that "marker"?

meager heart
#

afaik that is text on task location

#

you can leave it "" empty

exotic tinsel
#

im having an issue trying to get the pos after a player seat switched. here is my call to my function```sqf
player addEventHandler ["SeatSwitchedMan", {[_this, "SeatSwitchedMan"] call TLS_fnc_PlayerAllowed;}];

here here is the top of the function where the issue is occuring```sqf
params ["_v_this", "_v_type"];

_v_player = _v_this select 0;
_v_veh = _v_this select 2;

if (_v_type == "GetInMan") then
{
    _v_pos = _v_this select 1;
}
else
{
    _v_pos = (assignedVehicleRole _v_player select 1);
};

[str _v_pos] remoteExec ["hint", _v_player];
lone glade
#

use params, change that if

#

and for the love of god nothing stops you from using properly named vars

little eagle
#

assignedVehicleRole reports the role your group leader has assigned for you, not your current position. It only happens to be the same iff you are the group leader.

#

But I think your real problem is _v_pos being undefined in the main scope of your script.

#

Therefore it remains undefined in the remoteExec line. The last one.

exotic tinsel
#

thanks, ill clean it up. thanks guys

lone glade
#
if (_v_type == "GetInMan") then
{
    _v_pos = _v_this select 1;
}
else
{
    _v_pos = (assignedVehicleRole _v_player select 1);
};

to

private _v_pos = if (_v_type == "GetInMan") then {
    _v_this select 1
} else {
    assignedVehicleRole _v_player select 1
};
little eagle
#

Nah, this:

params ["_v_this", "_v_type"];
_v_this params ["_v_player", "_v_pos", "_v_veh"];

if (_v_type != "GetInMan") then {
    _v_pos = assignedVehicleRole _v_player select 1;
};

_v_pos remoteExec ["hint", _v_player];
lone glade
#

or that

#

I didn't pay attention to the code because of those varnames

little eagle
#

Snake case does still look ugly though.

lone glade
#

just goddamn terrible

little eagle
#

Could easily get rid of the _v tag of the variables and it could fit into ACE.

#

Well, apart from the RE.

exotic tinsel
#

how do i detect postion on seat switch for everyplayer?

meager heart
#
TLS_fnc_PlayerAllowed = {
    _this params ["_unit"];
    private _position = assignedVehicleRole _unit;
    [str _position] remoteExec ["hintSilent", _unit];
};

player addEventHandler ["SeatSwitchedMan", {_this call TLS_fnc_PlayerAllowed}];
#

for everyplayer with EH added to 1 ?

exotic tinsel
#

yes id like to assign the EH to every player. currently putting it in the initplayerlocal

meager heart
#

^ that thing will do it then

#

if i understand you correctly

exotic tinsel
#

thanks alot mate @meager heart

meager heart
#

np

astral tendon
#

how do i get the muzzle index?

edgy dune
#

is there away to get the thurst angle of a vtol?

#

@astral tendon

astral tendon
#

Nope, that returns the name of the weapon not the index

edgy dune
#

damn im sorry

ocean hare
#

question, would it be possible in anyway to force a weapon to fire ammo it doesn't normally after something happens in a mission?

#

for example an MX suddenly firing 20mm grenade rounds or something out the main barrel

warm gorge
#

Does anyone know how the Eden editor blocks input to background displays when overlayed displays (attribute editing menus etc) are created? I want to do it the same way, but not sure how because I cant see any full-spanning controls they use to block any input.

young current
#

@Namenai#3053 there should be animation source for that if I recall right.

unborn ether
#

@warm gorge keydown keyup EVH override any default input if they return true. Also you might read how 'createDialog' and 'createDisplay' displays are different on interaction

warm gorge
#

@unborn ether Basically ive just got a main dialog created with createDialog, and then im creating an overlaying display with createDisplay. I want the overlaying display to only be interactable while its open, but not the one behind it. This is how the 3DEN editor does it, and was just curious how its achieved because I cant see any special controls used by the dialogues.

unborn ether
#

@warm gorge Example - add a keydown for Display 46 with output of true - you will loose your unit/vehicle inputs as it will override it. You can manage it same way

warm gorge
#

But why would I need to do anything with a keyDown event? A dialog is already still open, so there will be no control over the player's movement. Im just trying to prevent interaction (interacting with its controls e.g buttons) with the background dialog, and only allow interaction with the overlayed display

unborn ether
#

Just gave you an example of how do you override input on displays created. Unit movements is also a keydown on display 46

warm gorge
#

So are you saying that will prevent mouse clicks as well? Through a keyDown event handler

unborn ether
#

For that use mousebttondown and mouzezchangrd

still forum
#

Maybe just the topmost display get's focus. And only that receives inputs then?

unborn ether
#

Or you can simply create another dialogue instead of display

little eagle
#

key inputs fall through all displays of a dialog. 3den seems to be hard coded, there is no config entry I can recognize. But you should be able to replicate the behavior by using a keyDown handler.

#

MouseButtonDown cannot block, but those inputs shouldn't fall through the display anyway as the display should cover the whole screen. If not, just create a transparent control that does cover the whole screen (including tripple screens by using the Abs variants).

warm gorge
#

Thats what I've tried to do now @little eagle . I made an invisible ctrlStatic that spans the whole screen, but for some reason the back display can still be interacted with until a control is clicked on the overlaying display (created with createDisplay).

#

I tried ctrlSetFocus on one of the controls to move the focus to the overlaying display, but it didnt work at all.

little eagle
#

Did you use the unary or the binary version of ctrlSetFocus?

warm gorge
#

I used ctrlSetFocus _control

unborn ether
#

Be aware for that control to be enabled

little eagle
#

Ah, right. I meant the CONTROL version you used instead of the IDC NUMBER version.

#

Yeah, some controls start out disabled. Like RscText that are not multiline.

warm gorge
#

I tried it on a few different controls including a ctrlEdit, ctrlTree, and ctrlStatic. None of them worked.

little eagle
#

controls or controlsBackground? It has to be controls I believe.

warm gorge
#

controls

little eagle
#

No idea about ctrlX, I always use RscX

warm gorge
#

Pretty much the same, just look different. Id like to use the ctrlEdit/RscEdit for focusing, but not sure why its not working

little eagle
#

Did you color it transparent red to check if it really covers the screen?

warm gorge
#

Ill give it a go, but im fairly sure it does because as soon as I manually click on one of the controls in the overlaying display, the it becomes no longer interactable.

little eagle
#

You should use a RscText, enable it manually with it's onLoad eh, and give that a transparent background color for debugging. That's how I've been doing exactly this for years.

#

Is the display not a child display of the one you want to block or are both child displays of one dialog?

warm gorge
#

So I create the main background dialog with createDialog, and then use a createDisplay on the 2nd display to overlap the first one ((findDisplay 46) createDisplay "")

little eagle
#

You might want to consider to use controls groups instead of multiple displays.

#

((findDisplay 46) createDisplay "")

#

Nonono, that's wrong.

#

createDialog your dialog

#

Then use your dialog as base for the child display.

#

_yourDialog createDisplay "blah"

#

That makes it a proper child display of the dialog.

warm gorge
#

Alright ill give that a go 1 sec

#

@little eagle Just gave that a go. But now the main background dialog (created with createDialog) is no longer visible when the child display is created.

little eagle
#

Hmm, consider to make your child display a controls group.

warm gorge
#

I would like to do that, but I plan to use this overlaying display with multiple other dialogues, so I dont want to hardcode it in for every dialog.

little eagle
#

Because atm you have two displays interacting with each other at the same time.

#

Just make the controls group a base class and inherit it.

warm gorge
#

Thats true, I could do that. Curious about what @unborn ether meant by just creating an additional dialog with createDialog for blocking the input though

unborn ether
#

@warm gorge another dialog, not display exactly. You can create dialogs on top of another. All the inputs works only on the topmost dialog

#

createDisplay is better solution if you don't want to block previous dialogue or display inputs, such as in-game unit gear. You can run while browsing your gear

warm gorge
#

I dont want them to be able to run around, so thats not an issue, but in terms of this additional dialog, what controls would it contain? A full screen spanning one orr? @unborn ether

unborn ether
#

@warm gorge New dialog is created on top covering previous one. If you really want something like sub-dialog where you can see previous content - you would like to use functional controls groups

#

@warm gorge You just need to split all the dialog with groups and fade them, disable them for your purpose

#

Anything inside of a controls group inherits its attributes, so if you disable the group, all buttons etc in it will also be disabled

warm gorge
#

Yeah I understand what you're saying, ill give it a go. Thanks for your help guys

dusky forge
#

Does anyone know if KKs redirectClientToServer function still works?

peak plover
#

Why wouldn't it

#

There's mods that use it too

unborn ether
#

+. I've modified it to accept domain names and works fine

meager heart
#

question, would it be possible in anyway to force a weapon to fire ammo it doesn't normally... for example an MX suddenly firing 20mm grenade rounds or something out the main barrel...
@ocean hare

player addEventHandler ["Fired",
{ 
    private _b = _this select 6; 
    private _k = createVehicle ["Cock_random_F", getPosATL _b, [], 0, "CAN_COLLIDE"]; 
    _k attachTo [_b, [0,0,0]]; 
}];

πŸ”₯

little eagle
#

You can't attach objects to CfgAmmo objects.

#

Try it. It fails silently.

dusky forge
#

Was messing around with it is all thanks for the info guys

meager heart
#

was experience with attaching to nades with unlimited ammo and seems working... not sure about bullets will it fails or not at some point, commy

little eagle
#

You say attachTo works for hand grenades?

meager heart
#

yep

little eagle
#

Let me start my game. I'll be using your code snippet.

lone glade
#

@little eagle I mean.... you should already know that

#

didn't you make the chemlight shoulder module thingy?

little eagle
#

No, I did not.

#

Also, it's about attaching anything to grenades, not attaching grenades/chemlights to soldiers.

lone glade
#

wait.... so you're saying I can attach a grenade to a grenade....

#

time to make grenade clusters πŸ˜„

meager heart
#

huge maybe

little eagle
#

When did you do this first, sldt1ck?

#

It works btw. For grenades and bullets.

#

I can attach the chicken to the bullet.

inner swallow
#

we've attached tanks to bullets

indigo snow
#

Ive attached players to bullets

little eagle
#

Do you remember when or which version?

indigo snow
#

The past half year?

little eagle
#

I haven't tried in years honestly, but when I did, it didn't work no matter what.

inner swallow
little eagle
#

Time to retry setVariable too, because that could be very interesting.

indigo snow
#

From recent experiments that still doesnt work iirc

little eagle
#
player addEventHandler ["Fired",  {
    private _b = _this select 6;  
    _b setVariable ["a", 1];
    _v = _b getVariable ["a", 0];
     systemChat str _v; 
}];
#

0

#

: /

#

BUT

meager heart
#

don't remember exactly... i think first time was after 1.60 + game version, commy

little eagle
#

With this you can attach simple objects to the ammo and store variables on those that way.

lone glade
#

oh nice, a new CBA feature πŸ˜„ /s

little eagle
#

Nah.

#

Could be something for mines in ACE though. Although different methods were found for those anyway.

#

attaching handgrenades to your bullets is fun.

meager heart
#

lol

little eagle
#

catgun

knotty mantle
#

If i do missionNamespace setVariable ["test", 1, true] do i actually need the true? I could image as it is set in missionnamespace it is known to everyone.
Furthermore in SP test = 1; publicVariable "test" was faster than setVar. Is this the same in MP?

still forum
#

.....

#

Do you even know what the true and publicVariable do?

#

You should look it up on the wiki

unborn ether
#

@knotty mantle missionNamespace data is both local and global to every PC. Bool argument specifies if it should be broadcasted or held locally

lone glade
#

aw man, I have to save that quote

unborn ether
#

@lone glade Easier to explain

still forum
#

both local and global to every PC uh... wait a minute...

lone glade
#

🍿

austere granite
#

πŸ˜„

peak plover
#

πŸ˜‚ πŸ‘Œ

unborn ether
#

😁

#

I'm just lazy or lame nvm

austere granite
#

por_que_no_los_dos.avi

unborn ether
#

Anybody knows how to execute sqf in post init from addon not using CfgFunctions?

still forum
#

No CfgFunctions? Also no CBA?
Copy the postInit code from CfgFunctions init script. Basically a spawn with a waitUntil isNil on a variable.

unborn ether
#

Thanks will try

still forum
#

That should be a copy paste from the cfgfunctions init script

#

I guess easiest way is to spawn a waitUntil till bis_fnc_init get's true.

unborn ether
#

Nice

still forum
#

Have to be careful to spawn it early enough. If you do it late in init.sqf it might fire a short or long time after the CfgFunctions postInit. But you can't get the timing exact anyway

lone glade
#

ooooooooooor you use CfgFunctions because there's 0 reasons not to and you're good to go.

still forum
#

Β―_(ツ)_/Β―

#

Some people like to walk barefoot over glowing coals

meager heart
#

njet

little eagle
#

I can accept the phrase:
"missionNamespace data is either local and global"
but not "both".

lone glade
#

walking on burning coal is easy, just don't stand there and you'll be fine

meager heart
#

njet!

little eagle
#

how to execute sqf in post init from addon not using CfgFunctions?

#

By starting to use CfgFunctions?

#

I mean, there is literally no reason not to. πŸ€”

unborn ether
#

@little eagle Any function from CfgFunctions is visible, just trying to make it not

peak plover
#

πŸ‘Ž

lone glade
#

....

#

that's insanely stupid

#

because that function is still saved in a var

peak plover
#

Exactpmondo

little eagle
#

Visible?

peak plover
#

Your best bet is to make a srv add-on and pubvar the functions. And hope no is running hacks on ur srv

little eagle
#

Like in the functions viewer?

unborn ether
#

Yep, or simply browsing it in its classes

peak plover
#

He is making mad dollar making life functions. Doesn't want anyone to steal

little eagle
#

OK then. So it's a petty reason like that.

austere granite
#

In that case: No support! :3

unborn ether
#

πŸ˜„

lone glade
#

you say that because you jelly guys

little eagle
#

Anyone can open your addon and check out your code and there is nothing you can do about it.

austere granite
#

But commy, I heard EBO give ultimate proteksjun

unborn ether
#

You just bullying me πŸ˜„

lone glade
#

hahahahahahhahahahahahahaha

#

nice joke adanteh

peak plover
#

Make Srv only funcs or send funcs from srv

austere granite
#

Better joke than "Atom is fast"

little eagle
#

I'd say you just use CfgFunctions. Why would you discuss anything super secret in public discord anyway?

unborn ether
#

Super secret discussion

#

πŸ˜„

lone glade
#

EBOs are the equivalent of
"we need to do this from a legality standpoint, buuuuut if you wanna snoop around..."

still forum
#

I actually don't think BI wanted EBOs to be broken Β―_(ツ)_/Β―

#

Just make a public, visible postInit script but still hide the actual script you want it to execute

little eagle
#

Yeah, by calling a function or using #include or something.

lone glade
#
 14 hours ago 
Hey in case y'all were not aware the latest ACE update added its own version of the arsenal that ovverides the ones in the editor, It does not have mod support for some items unless its using some form of vanlla asset like a backpack reskin

14 hours ago 
I am aware, I disabled ACE arsenal ;)
little eagle
#

The postInit script itself doesn't have to contain anything major.

lone glade
#

til ACE Arsenal doesn't have mod support

still forum
#

Call a anonymous CBA event that has your function as a handler. Oh wait.. no CBA

lone glade
#

CBA IS TEH DEVIL

little eagle
#

Uhm, how would that help?

unborn ether
#

This is getting hot for some reason, just curious πŸ˜„

lone glade
#

nah, it's cold as balls here

#

snow and shit everywhere

peak plover
#

Can 1 use cba on monitized srv?

unborn ether
#

Hello from Egypt

little eagle
#

I don't see why not, nigel.

austere granite
#

Because overlord Commy will come and bulli

#

Nah

little eagle
#

I don't own anything CBA aside from what I wrote in a way I guess.

lone glade
#

there's backdoors in CBA for commy to steal your life functions

little eagle
#

Stop spreading rumors.

unborn ether
#

@peak plover I think you mistook CBA with RHS

lone glade
#

he's getting mad monies from selling them

#

is no rumor comrad, is truth

little eagle
#

Show the backdoors in the CBA source

austere granite
#

CBA has a pfh that checks for vars in all namespaces and does a check if there's "life" in varname, then sends them to commy's inbox

little eagle
#

🍡

lone glade
#

I no show top CBA secrets

little eagle
#

Adanthe, link?

unborn ether
#

LOL

lone glade
#

too secret to show

austere granite
#

fam i already made video sabout this

lone glade
#

NO SHOW ADANTEH, you traitor

unborn ether
#

CBA CIA

little eagle
#

The uploader has not made this video available in your country.

#

Can't even get rickrolled in the brave new world.

still forum
#

@Adanteh#0761 Video is not available in my country

lone glade
#

damn german spies

austere granite
#

The absolute stateof Germoney

peak plover
#

Haha

austere granite
#

This is your country on Furries

lone glade
#

and people coating themselves in cheese and putting on a diving suit then a plastic bag and standing in front of a heater

unborn ether
#

yuk

little eagle
#

That'd be a lot of cheese.

still forum
#

@lone glade sitting. And you forgot the rain coat

lone glade
#

not sure if best suicide ever or darwin award

little eagle
#

Why you'd need the cheese for killing yourself?

still forum
#

smells good

little eagle
#

Depends on the cheese. I like my cheese to not smell at all.

austere granite
#

πŸ₯–

still forum
#

Why no one upvoot the upvoot hand?

little eagle
#

Because you stink.

meager heart
#

that is kinda cheesy

ocean hare
#

@meager heart ayy thanks mate I'll give that a try.

#

Sorry for get late delay, was asleep

#

Very late*

errant jasper
#

Is it possible to add a TFAR vehicle-radio to a vehicle without one, without doing addon config changes?

still forum
#

1.0 yes.. kinda.. hacky.

#

0.9.x no

lone glade
#

GIB 1.0 ALREEEDY

errant jasper
#

Daily reminder, alganthe?

still forum
#

prepare for getting knotted

errant jasper
#

Alright. I'll tell vehicle commanders to bring a LR.

lone glade
#
Dedmen - Today at 11:21 PM
I'll knot your eyes together
still forum
#

Noo... The other knot πŸ˜‰

peak plover
#

Lool

still forum
#

You should edit that quote to contain the full date

#

so that people can look it up

inner swallow
#

i'm sure the odd curious one among us can use the search function too πŸ˜›

still forum
#

01/30/2018 11:21PM european time thingy

meager heart
inner swallow
#

why are all your dates wrong

still forum
#

european time <--

inner swallow
#

next you'll tell me that i should use commas to denote decimal points

#

there is a fix, dedmen

#

go to language settings in discord

#

and pick "English, UK"

#

you will have the correct date format then

little eagle
#

Decimal points are superfluous anyway. No one has to know numbers that accurately.

errant jasper
#

As INDEP calling TFAR_fnc_getDefaultRadioClasses, gives me "tf_bussole" as rifleman radio?

errant jasper
#

My bad. RF is third index. But shouldn't it give 155?

#

Nvm. I am stupid.

#

RHS overrides the "_api" config entry.

inner swallow
#

No one has to know numbers that accurately. β„’

still forum
#

RHS uses _api stuff? That is on the "to remove" list for 1.0. Thought no one uses that...

errant jasper
#

getText (configFile >> "CfgFactionClasses" >> "rhs_faction_vdv" >> ("backpack" + "_tf_faction_radio_api"))) gives
"tf_bussole"

#

I was confused why it was not an-155. And when I added "tf_bussole" as my backpack an error popped up.

little eagle
#

Why is that even a thing. So confusing.

velvet merlin
#

how does one get say3d working while in camera?

#

i tried selectPlayer to units nearby to the AI speaking/sound source, but doesnt work

#

do i have to teleport the player itself nearby, or in camera is fucked up in general?

lusty canyon
#

whats the best/performant way to check if an action anim has completed?
for example i have a unit drop weapon action:

_dummyAIunit action [ "DropWeapon", _container, _weapon ];

do i just loop a WAITUNTIL weapon is null? or is there a better way without using loops?

little eagle
#

Not really, no.

#

"" not null.

meager heart
#

if i understand correctly... this works for me

0 spawn 
{
    private _cam = "camera" camCreate (player modelToWorld [0,5,1]);
    _cam cameraEffect ["Internal", "Back"];
    _cam camSetFov 0.5;
    _cam camSetTarget player;
    _cam camCommit 1;
    sleep 5;
    player say3D "Alarm";
};
#

@velvet merlin

velvet merlin
#

@meager heart well you have it at the player pos here

#

both camera and say3D

meager heart
#

camera is 5 meters away

#

15 meters also works...

velvet merlin
#

default distance of say3d is 100m

#

however seems my problem is some other A3 fuck up

#

Sound: Error: File: F:\Workspace\A3Data\Users\test\missions\LIB_SOV_CAMP_intro.Panovo\any.wss not found !!!

meager heart
#

oh lol

velvet merlin
#

while its defined in cfgSounds as
sound[] = {@ww2\missions_s\campaigns\ForTheMotherland_s\EN\mission_intro\Rus_m1_##I.ogg,1,1,100}; \

#

appears BI implemented that @ external ref badly

little eagle
#

What's with the ## there?

velvet merlin
#

from a macro

little eagle
#

Well, I believe it's wrong next to a _. Next to a _, you don't need ## glue.

dusky forge
#

@peak plover you mentioned mods that use the Transfer system what ones do i have not seen one that has yet but i have probably missed it

rancid ruin
#

what map is Ponovo?

#

panovo

peak plover
#

I can't remember but it's on workshop

rancid ruin
#

why do all those men have a smoke cloud attached to their faces

little eagle
#

I know you haven't left your house in 10 years, but think back when you were a kid. Breath in the cold.

subtle ore
#

Ouch.

rancid ruin
#

bit rich coming from co "spend my life in arma scripting discord correcting people" mmy2

little eagle
#

You're on my list and I just waited patiently for my opportunity. I can't remember why, but you deserved this answer.

still forum
#

throws stones at @rancid ruin

little eagle
still forum
#

fock off

#

raises fists

little eagle
#
Changelog:
v0.9.13
Updated Teamspeak Plugin to be Compatible with Teamspeak 3.1+
Added Arma 64Bit compatability.
still forum
#

Retards making up their own delusional changelogs

little eagle
#

No need to censor. I can handle it.

#

Where did this changelog come from though?

still forum
#

He wrote it himself I guess

little eagle
#

So when was x64 compat added?

#

0.9.12?

still forum
#

yeah

little eagle
#

That's so weird that they just decide to call it 0.9.13 even though that is not the version.

still forum
#

Like.. What happens if we release 0.9.13 now?

#

They call it 0.9.14?

little eagle
#

Β―_(ツ)_/Β―

#

Do it just to fuck with everyone.

velvet merlin
#

so annoying

#

BI introduces @ ref for sounds outside the mission

#

BI is sloppy and breaks it

#

i mean what TF is this

F:\Workspace\A3Data\Users\test\missions\LIB_SOV_CAMP_01b.Panovo\any.wss not found !!!
how can you even search there or write such crappy error message

#

even more fun it seems BI even realized its broken as its not used at all in A3 source (from what i can tell) and the instances they would had to use it (ie Eden) disabled the say3d calls and use now playSound instead

#

anyone knows if DayZ SA/Enfusion at this point uses the A3 sound engine as basis, or did they ditch that completely in favor for whatever

still forum
#

Didn't hear of new sound engine yet

#

Enfusion is supposed to get a improved version of the A3 sound engine

meager heart
#

inb4 it was like... just splendidly perfect, but now it will be badass

velvet merlin
#

progress..

  1. @ breaks the macro it seems => turns the path/string into "any" (thus above error)
  2. however with plain string definition, say/say2D/say3D garble the ogg file - with playSound it works
still forum
#

what macro?

velvet merlin
#
    #define SPEECH(I) \
    class lib_m7_speech_##I \
    { \
        name = "speech_##I";\
        sound[] = {@ww2\missions_s\campaigns\ForTheMotherland_s\EN\mission_7\Rus_m7_##I.ogg,1,1,100}; \
        titles[] = {0,$STR_LIB_missions_lib_campaign_missions_LIB_07_SA_CAMP_Staszow_LIB_m7_ph##I}; \
    };
still forum
#

Uhm.. Shouldn't that sound path be a string?

#

yes it is.

#

Maybe you should pass a string if the wiki says you should

velvet merlin
#

it will be turned into a string even without quotes

#

quotes disable the macro - you would need to use the "toString" parameter in the macro ontop

still forum
#

So you trust the magical weird behaviour of arma configs?

#

String also works for your name entry though

#

@ is a special config thing. So if you use that, you can expect it to do that special config thing

velvet merlin
#

the above all works fine with kbTell or playSound3D

#

say[3D] doesnt like definitions outside the mission. hence you need the @ hack BI introduced in A3

still forum
#

Yes

#

you need the @ in the string

#

which you don't do

little eagle
#

I am still in doubt about _##. Glue macro right next to a under score.

still forum
#

your @ is probably interpreted as the config operator @

velvet merlin
#

@empty harbor are you familiar with any special meaning of @ for macros/preprocessor commands?

still forum
#

@ has a special meaning in config. And yes he knows that. And #arma3_config

velvet merlin
still forum
#

Do you even read what I write?

velvet merlin
#

this is scripting related dude

still forum
#

Is it?

velvet merlin
#

read above

still forum
#

How is a config macro scripting

little eagle
#

Just use DOUBLES and QUOTE like normal people do. Β―_(ツ)_/Β―

still forum
#

I read everything that you wrote above.

#

And I already told you @ has a special meaning in configs.

#

But you don't seem to care, nor want any help with that

#

So... Β―_(ツ)_/Β―