#arma3_scripting

1 messages ยท Page 421 of 1

pliant stream
#

does a3 have an elseif now

little eagle
#

No.

pliant stream
#

oh i see that's just something you came up with

still forum
#

That's something I'm coming up with right now

pliant stream
#

if you actually implement it, call it elif though

#

elseif is stupid

still forum
#
if (cond1) then {

} elseif (cond2) then {

} elseif {cond3} then { //cond will not be evaluated if any of the above statements triggered.

} else {

};
pliant stream
#

idk switch on true seems cleaner no?

still forum
#

switch on true seems cleaner than a genuine if then elseif else?

pliant stream
#

or jumptable in the case of contiguous integers

#
switch (true)
{
    case a: {}
    case b: {}
    case c: {}
    default {}
}
#

seems less noisy to me

still forum
#

And as a coder that knows other languages with proper if then elseif else structures you also prefer the switch on true?

pliant stream
#

this is sqf we're talking about, not c

still forum
#

Yeah? And?

pliant stream
#

in sqf the switch looks cleaner to me

still forum
#

Because there is nothing better

#

and you are already used to it

pliant stream
#

idk i think i barely ever used it

#
if a then
{
}
elif b then
{
}
elif c then
{
}
else
{
}
#

i guess this isn't too bad either

still forum
#

I can give you both elseif and elif

pliant stream
#

maybe it was just your disgusting brace style that was putting me off haha

#

i don't really care, i'm just an armchair designer here i don't actually do any sqf anymore

still forum
#

Also my implementation still leaves room for idiots to do stuff like

if (cond1) then {} 
elseif (cond2) then {}
else {}
elseif (cond3) then {} //will never happen
;
#

Had the idea 42 minutes ago

#

And now it's done. Why doesn't BI give us such nice things :U

pliant stream
#

whats with the names? do you just pull a random naming convention out of a hat for each symbol? :D

still forum
#

Especially performance as you can do elseif {} which won't execute the condition if it doesn't get to it

#

what symbol? what names?

pliant stream
#

i see snake_case, PascalCase, camelCase, and some weird combos Pascal_snake, camel_snakeCamel, camel_SnakePascal

still forum
#

Intercept is snake_case. I use camelCase and uppercase CamelCase for classnames and other global names

pliant stream
#

alright fair enough

still forum
#
if (cond1) then {

} elseif (cond2) elseif (cond3) elseif (cond4) else {

};

Please don't do that.

pliant stream
#

seems legit

little eagle
#
if (cond1) then {
    block1
} elseif (cond2) then {
    block2
} elseif (cond3) then {
    block3
} else {
    block4
};
#

Dunno how what you posted would work, Dedmen.

still forum
#

why

little eagle
#

Lack of then-blocks.

still forum
#

uh?

#

No.

#

They are right there

errant jasper
#

Is one statement allowed without 'then'

still forum
#

Ah you mean my last post?

errant jasper
#

My bad

#

I mean in elseif: you can have a following statement without bracket?

#

Like in C/C++

still forum
#

It works because elseif returns elseIfType and also takes elseIfType.
the elseif add's the condition for the next statement into the array of statements.
and the then then pushes the code to the last added statement

#

@errant jasper Not possible because SQF

little eagle
#

It's something I don't like about C tbh.

errant jasper
#

Okay. I see. But basically the same practical effect, of what you posted earlier with the sequenced elseifs

still forum
#

The condition check just returns false if a statement doesn't have code

pliant stream
#

you don't like if (foo) bar(); ?

still forum
#

so elseif (cond) elseif (cond) both conditions would automatically be false and they don't do anything

little eagle
#

So what's wrong with:

if (cond1) then {
    block1
} elseif (cond2) then {
    block2
} elseif (cond3) then {
    block3
} else {
    block4
};

???

still forum
#

nothing

little eagle
#

k

jade abyss
#

tl;dr

errant jasper
#

To be clear I am talking about this part: } elseif (cond2) elseif (cond3) elseif (cond4) else { .. Which works because of the weird implementation of having a goddamn type, elseIfType, used for optional branching.

still forum
#

I could fix that by having elseIfTypeWithoutCode elseif BOOL return elseIfTypeWithoutCode and elseIfTypeWithoutCode then CODE return elseIfTypeWithCode

#

That way a elseif without code is an invalid argument for the next elseif

#

But too lazy

errant jasper
#

So am I correct in that: if (cond1) then { BlockA} elseif (cond2) elseif (cond3) elseif (cond4) else {BlockB}
Then BlockB will only run if all conditions are false?

#

And if cond4 is true then nothing happens?

still forum
#

no

#

the conditions without a code will automatically be false

#

Because there is no code so they are kinda invalid

#

That's equal to

if (cond1) then { BlockA} elseif (false) then {} elseif (false) then {} elseif (false) then {} else {BlockB} 
#

and that's equal to
if (cond1) then {BlockA} else {BlockB}

errant jasper
#

So it will run if cond1 is false. The remaining conditions do not matter?

still forum
#

it will go through and stop at the first condition that evaluates to true

#

The else statement is implemented same as a
elseif (true) then {BlockB}

errant jasper
#

I understand (probably)... Think I will just stick to my regular patterns..

fossil yew
#

Is there a recommended ratio between setObjectViewDistance and setViewDistance values (except former being less than latter)?

errant jasper
#

Think what values are preferred are quite personal. Up to 5km's I actually prefer they are identical.

#

Are you playing with ACE? Then you can just set the maximum, and people can run with their own settings, limited by the maximum.

fossil yew
#

Yes, I am. Just wandered if it ever makes sense to make them different. From the performance perspective.

errant jasper
#

Lowering the objectViewDistance does give better performance.

#

The drawback is ofc you are looking down unto that empty valley that actually has houses.

fossil yew
#

Yup. And I think that goes for units too. Enemy might be there but it's not to be seen. ๐Ÿ˜ƒ

still forum
#

Why don't you just let the player decide?

meager heart
#

^ That like cheating in pvp

still forum
#

Limit min/max distance

#

and let them decide between them

pliant stream
#

is having better hardware cheating?

still forum
#

yes

#

And just because you don't have the money to buy a better graphics card that means everyone else you play with is always cheating

fossil yew
#

Nah, this is a philosophical chat, I am not talking about restricting anything. My mate and I were actually talking about how other games put a static image of "horizon" instead of just drawing everything and I was wondered if something like that can happen in Arma.

#

Arma uses "fog" outside of viewdistance

#

and there is that object view distance limit which makes sense but always hard to put an exact number on it

errant jasper
#

But there are practical problems of having too large a max viewdistance. Team mates with worse computers will not be able to see what you see. And too large view distance might confer wrong sense of security, because the server will only properly send network information about objects using its own viewdistance.

still forum
#

"properly" means far away objects might lag behind about a second or so

fossil yew
#

(object) view distance is calculated in 3D? For example if a plane flies above 2000m while object view distance is 1000m, he will just see the terrain?

still forum
#

They will still be there and visible. So I don't see a wrong sense of security

#

yes @fossil yew

#

In helicopter/plane I usually crank it to the max even if fps go down to 10

fossil yew
#

how can you play like that?

meager heart
#

carefully ๐Ÿ˜„

fossil yew
#

I mean, it's nice, but also a bit sluggish ๐Ÿ™‚

#

haha ok

still forum
#

It's possible ๐Ÿ˜„

#

Atleast helicopter if I'm only the gunner

#

Plane and helicopter pilot get's a little harder

meager heart
#

in a2 was dinamic vd script...

still forum
#

ACEX also has one afaik

peak plover
#

ace has

#

wihtout acex

#

fov based is very niiish

tough abyss
#

wtf kind of error is this arma:

Error in expression <gunDisplay setPosATL (house modelToWorld [-2.2 + (-0.2 * _size), -3.>
19:43:40   Error position: <modelToWorld [-2.2 + (-0.2 * _size), -3.>
19:43:40   Error Type Number,Not a Number, expected Number
pliant stream
#

sounds like NaN

lone glade
#

_size may be nil

tough abyss
#

I'll look into it, just threw me off. So is it a number, or no? ๐Ÿ˜‚

peak plover
#

maybe type is number, but it's not a real number

lone glade
#

it is, but it isn't ๐Ÿ˜›

tough abyss
#

So, a fake one ๐Ÿ˜›

peak plover
#

yeah, it's a fake

lone glade
#

I had a scalar that returned true for type checks, didn't provide any errors, but it wasn't equal to itself

pliant stream
#

-oo, oo etc are not in R

lone glade
#

that was a gigantic PITA to find out

tough abyss
#

Sounds like fun lol thanks for the help

still forum
#

@tough abyss Have to be careful reading that. It's type is Number,Not a Number and it want's Number

tough abyss
#

Ahh, that helps.

still forum
#

I don't know where BI got the idea to name the NaN type Number,Not a Number... But I also don't know where BI got alot of their other ideas

tough abyss
#

Ya, should really be NaN

lone glade
#

i'd say lost in translation

#

otherwise modelToWorldVisualWorld is even worse than I thought.

#

and in case you're wondering, yes that's a real command, as well as modelToWorldWorld

lone glade
#

modelToWorldModelWorldWorld ?

still forum
#

modelToWorldWorldWorldVisualWorldWorldVisualWorldVisualASL !

lone glade
#

gib a visual one, so:
modelToWorldModelVIsualWorld

tough abyss
#

if I were to call a function with a paramater in format 0 = [param1, param2, nil] call <function> and in this script assign the 3rd parameter _s = _this select 2; how can I use an if-statement that runs a piece of code only if the 3rd param has not been passed as nil?

lone glade
#

that's not how you call funcs

tough abyss
#

tag_fnc_function*

lone glade
#

remove the 0 =

still forum
#

Uh.. you use isNil ??

tough abyss
#

yep

still forum
#

To check if it's nil?

tough abyss
#

but it still tries to run the code that's in the if-statement

still forum
#

And that's exactly how you do it

tough abyss
#

that's the current if statement: sqf if(!isNil _s) then { [ _v, _s, true ] call BIS_fnc_initVehicle; };

peak plover
#

'_s'

#

need qoutes around the variable

still forum
#

You should check the isNil wiki page ^^

peak plover
#

or { }

still forum
#

Because that's also not how isNil works

tough abyss
#

thanks @peak plover I mixed up the info on the wiki. I'll give that a shot ๐Ÿ˜ƒ

#

@still forum what do you mean? Should it be if ( !(isNil '_s')) then ....?

lone glade
#

nah, it checks if the var exist

still forum
#

isNil takes a string or a code

#

a nil is neither string or code

lone glade
#

also nothing stops you from using properly named local vars

#

name them properly for your own sanity

still forum
#

or just use params

#

to detect if a parameter was not passed I usually use scriptNull as default value

#

also you can do if !(isNil "...")

pliant stream
#

if !isnil '_s' then {}

lone glade
#

missing round brackets ^

still forum
#

Also why are you using ' instead of " ?

lone glade
#

because "funs"

pliant stream
#

don't need no parentheses

tough abyss
#

I know about those brackets it was about the formulation of the if-statement ๐Ÿ˜›

#
if(!isNil "_setup") then {
                [
                    _vehicle,
                    _setup, 
                    true
                ] call BIS_fnc_initVehicle;
            };```
#

splendid, running tests now

errant jasper
#

Either I am missing something, or people intentionally put misleading code on the BIKI

still forum
#

call compile to get a variable..

#

seriously?

#

What mindless piece of stawhead idiot is that guy?

lone glade
#
_getVariableOrNil = {
    if (!isNil (_this select 0)) exitWith {
        call compile (_this select 0);
    }; 
    nil; 
};
#

wow

#

just, wow.

still forum
#

What?

#

What are you talking about? If I look at that wiki page there is nothing like that on there

#

Don't know at all what you mean.

lone glade
#

๐Ÿ‘

still forum
#

Don't know how I managed to overlook that. I usually check every edit

cedar kindle
#

mNS getvar on a local var ๐Ÿค”

still forum
#

Oh crap.. you are right

#

I'll just remove the whole comment as it actually makes absolutely no reason to be there

cedar kindle
#

๐Ÿ˜„

errant jasper
#

Good job. At least the comment will no longer confuse non-scripters trying to use the function.

little eagle
#

I think this is a worse version of RETNIL.

#

So:

if (!isNil "_var") then {_var}
#

Needed in scheduled environment, because just using _var would error if the variable is undefined.

errant jasper
#

Can you use it in a sentence give an example? I assume there would be more than just _var, a side effect also?

little eagle
#

Let's assume you have a function that reports a return value.

#

So the function ends with _return, right?

#

But _return might be nil/undefined.

#

Your function would work fine in unscheduled environment.

#

But it would error in scheduled environment.

errant jasper
#

Ah okay, I see now

little eagle
#

So instead of writing the last line as _return, you'd write RETNIL(_return).

#

RETNIL is just a macro which is essentially what I wrote.

errant jasper
#

I mean seriously. Any coherent reason why scheduled environment would behave different, except related to scheduling?

little eagle
still forum
#

They just set the "nil is error" flag

#

actually doesn't have anything to do with scheduled vs unscheduled

little eagle
#

Unscheduled probably doesn't have this because of bwc.

still forum
#

it's a flag that happens to be set for scheduled but not for most unscheduled scripts

#

Nothing guarantees that, that won't change

errant jasper
#

How/where is this flag set?

still forum
#

uhh

#

In the code?

little eagle
#

How do you explain code inside isNil not erroring if it's a flag? Does the command unset the flag?

still forum
#

Yes it does

little eagle
#

krgr

still forum
#

It launches a new script instance with that flag disabled, and then executes that instance in unscheduled

errant jasper
#

So it is a flag you have no direct control over, that certain commands toggle, and also typically set in the scheduled environment?

little eagle
#

disabled you mean.

still forum
#

spawn launches a new script instance with that flag enabled, and then pushes that into the scheduler array

#

yes

#

Saw that while writing last message

#

@errant jasper yep

#

I think it's quite consistend as in enabled in scheduled and disabled in unscheduled. But we all know BI

little eagle
#

Make it a command. Just like disableSerialization.

#

disableUndefinedCheck

#

idk

still forum
#

Doesn't VBS have that?

#

Or was that all private vars

little eagle
#

Maybe?

errant jasper
#

Or maybe let's not continue the BIS insanity, and have commands that toggle either on or off, instead of only one way xD

still forum
#

I don't know if I can easily toggle that at runtime

errant jasper
#

That's true. But more as a general principle to strive for.

little eagle
#

Well, if isNil and spawn can, why not a command like disableSerializtion? Maybe not easy with intercept.

still forum
#

They can because they pass the flag along when creating the script instance

#

Yeah. "not easy" was what I meant. Sure it's possible the hard way

#

Ah forget that

#

It's right next to enabledSerialization

little eagle
#

It only annoys me when I write something for CBA and then it breaks when someone tries to use it in init.sqf and the like.

still forum
#

serializationEnabled/canSuspend/localOnly/undefinedIsNil are all next to eachother

little eagle
#

localOnly?

still forum
#

undefinedIsNil = true -> empty variables become nil.
undefinedIsNil = false -> empty variables error

#

Yep. Have the same thought. Don't remember, checking right now what it does

little eagle
#

canSuspend should atm be always the same as not undefinedIsNil.

still forum
#

I can also change canSuspend at runtime and set it to true for unscheduled scripts XD

#

Wonder what would happen

#

Though it seems a little different

#

localOnly set's all variables as if they have a private

little eagle
#

privateAll is attached to a scope?

still forum
#

in VBS it also reads all variables as "private" and doesn't see higher scopes

#

in VBS yes. In SQF it's attached to the script instance

little eagle
#

So bad. We definitely don't need everything VBS has.

still forum
#

Oh.. localOnly also makes global variable assignments private variables I think

#

Meaning myVar = 1; after that myVar is nil

little eagle
#

urg

still forum
#

because of missing _ it reads from missionNamespace instead of local scope

little eagle
#

localOnly is never used, right?

still forum
#

true. Always set to false

little eagle
#

Better leave it that way. It sounds horrid.

still forum
#

That's so dumb.. It could be so awesome if it was properly implemented

#

there is the global flag per script instance.
And there is a local flag per variable assignment.
That get's set if you use private keyword and it starts with _.
Global flag missing the _ check makes that whole thing kinda useless

chrome nebula
#

Can anyone help me out, looking for a script to adjust player loadout and rank dependent on UID?

still forum
#

What do you need?

#

Most basic script basics? You should probably watch some tutorial on the youtubes or read the wiki instead of asking us.

subtle ore
#

youtubes is very badz sometimez dedmen

unborn ether
#

Is there any possible way to discover a code block of EVH that was already assigned?

little eagle
#

No.

still forum
#

discover a code block that was assigned
"discover" ? "code block"? "assigned" ?

chrome nebula
#

@still forum you talking to me? ๐Ÿ˜ถ

still forum
#

yes

unborn ether
#

@little eagle Awesome, ty

chrome nebula
#

So basically when player logs in, script runs to determine UID and assigns a loadout and a rank depending

still forum
#

script runs to determine UID You mean a single call to getPlayerUID

chrome nebula
#

Yus please

still forum
#

You want someone here to write the whole script for you? Or give you hints about what commands to use? Or explain you the basics of scripting?

chrome nebula
#

Could someone do the code for me? Iโ€™m in work currently

rancid ruin
#

since you're at work you won't mind paying for the time it takes to write the script i'm sure

meager heart
#

#350

tough abyss
#

$20/h pls

lone glade
#

stop being bad cup oneoh

rancid ruin
#

i'm keeping it real

tough abyss
#

no pain, no gain right ๐Ÿ˜›

little eagle
tough abyss
#

๐Ÿ˜‚

still forum
#

@chrome nebula You can then wait a couple hours or days and see if anyone here is bored enough to write a script for you for free.

#

Or you can learn how to script and ask for advice/help in here

lone glade
#

on the other hand if you wanna learn this is the place

still forum
#

There are people here that are willing to teach people all of the script basics instead of just linking them to a tutorial?

lone glade
#

well, once in a blue moon yes

tough abyss
#

linking is more likely to happen

tame portal
#

Did I hear selling code? ( อกยฐ อœส– อกยฐ)

meager heart
#

๐Ÿ˜„

tough abyss
#

OPTiX awakes from his slumber

chrome nebula
#

well, Iโ€™m happy to learn?

rancid ruin
#

here are some of the components you will need on your quest
if setUnitLoadout getPlayerUID == { then }

lone glade
#

extra hints in DLCs, cost is #350 each

meager heart
#

forEach

still forum
#

forEach? Why

#

Assuming he does it in initPlayerLocal there is only one player to check

tame portal
#

{call compile "yourcode"} forEach allMissionObjects "";

pliant stream
#

here's what you should do: get a book on C or another real language, work through that and when you've got a good grasp of everything, come back and you'll have no problem writing this sqf crap

rancid ruin
#

yes good advice, go learn c and then come back and write this script

pliant stream
#

yes

#

or other

#

python is pretty popular

little eagle
#

That is what scripting languages are for. So you have to learn C first.

pliant stream
#

gotta start with the basics

#

can't run before you can walk you know

rancid ruin
#

if you learn assembly first then your SQF scripts will be much faster as well

little eagle
#

oneoh basically posted everything one needs.

tame portal
#

listen to oneoh

#

(not to commy)

rugged prairie
#

I guess this a scripting question (as i dont know much about programming), but here goes: Ryan's Zombies mod used a module to spawn zombies, is there a programming reason for Arma devs not to implement such a thing for units?

little eagle
#

D-did I write something false?

pliant stream
#

yea this gommy guy is full of ๐Ÿ’ฉ

tame portal
#

i know this is your greatest fear commy but no i was just being an ass lul

still forum
#

@rancid ruin But you first need to take a special class in SQF Assembly

little eagle
#

No, you can write modules to spawn units, and that has been done before.

still forum
#

@rugged prairie lazyness?

tame portal
#

I think we scared him off

rancid ruin
#

it's not reasonable to expect a noob to learn asm and c this fast

still forum
#

Yes SQF Assembly exists.

#

And yes. Writing assembly manually can make scripts faster

#

Well.. You don't know how intelligent the noob is

little eagle
#

No one wants or needs to make something like that fast. oneoh posted the parts needed, and if one reads the wiki, one can figure out how to write it.

rancid ruin
#

well no i forgot these components [ ]

lone glade
#

we should crowdsource an sqf tutorial, like with chapters and shit'

rancid ruin
#

and " "

lone glade
#

but then again, arma 4 and enscript

still forum
#

@lone glade +5

#

Some people from a german armaforum wanted to do that...

pliant stream
#

whats this arma 4? some hoax i bet

rancid ruin
#

this channel should've had a weekly scripting challenge for years now...i suggested it ages ago and it's a good idea

#
  • some kind of community blog
tame portal
#

i will like the part when you have to explain someone why Enscript looks like C++ and then has keywords like "expands"

still forum
#

You can compare that forum to a life forum or the steam workshop though.. So you know how good that's gonna be

#

@rancid ruin make. Give Ideas. We'll solve challenge and write blog about ideas

rancid ruin
#

wat

still forum
#

I have lots of in-depth knowledge crap that I just puke into this channel which then get's forgotten

#

Give me a place to do stuff in and I'll do :U

rancid ruin
still forum
#

How about armablog.blog

errant jasper
rancid ruin
#

what about armablog.blog.blog.blogspot.blog

still forum
#

Actually very bad idea.. A .blog domain is 30โ‚ฌ

lone glade
#

holy moly

still forum
#

a .ovh domain is just 1,19โ‚ฌ

rancid ruin
#

.tk is free

tame portal
#

doyouknowtheway.sqf

lone glade
#

just make a bunch of articles on the BI wiki

#

one per chapter and add a link easily viewable on the landing page

rancid ruin
#

wikis are dogshit for browsing

lone glade
#

ACE3 wiki then ๐Ÿ˜„

still forum
#

@rancid ruin I'll happily pay for that domain. If it's not unreasonably expensive like .blog or .xxx

errant jasper
#

Nah, most wikis just have terrible search, and poor layout for long term reading

lone glade
#

plus we get versionning

tame portal
errant jasper
#

but none of these are onsolvable problems

tame portal
#

then we can reuse it for enscript

still forum
#

Also github for the thingy like on ACE wiki is quite nice

pliant stream
#

oh yea those blog websites with like 60% empty space and like 5 random links to posts are much better than wiki

rancid ruin
#

tbh you could just use github pages + jekyll for a cms

still forum
rancid ruin
#

that's all free

still forum
#

With the same kind of deep programming knowledge ๐Ÿ˜„

rancid ruin
#

people could submit PRs for blog posts or whatever

still forum
#

If you give me ideas about what to write about I'll do that

lone glade
#

how to abuse array refs with pushback / append / any command that modifies the array instead of returning the modified one huehuehuehue

rancid ruin
#

beginners guide. server-client relationship. remoteExec. what is doable with scripting and what is doable with configs.

still forum
#

armablog.art XD
Or armablog.tech for just 47,99โ‚ฌ

#

I certainly won't be writing a beginners guide

rancid ruin
#

i would do github pages cos it'd be easier for collaboration

still forum
#

make a orga

rancid ruin
#

with a wordpress blog or something you'd have to set up multiple users, worry about security, php, etc, fuck that

#

i would offer to host it but i don't trust that my server wouldn't be hacked by arma cunts

tame portal
#

if dedmen writes a blog we will need a blog explaining his blog

pliant stream
#

shared arrays are abuse? wtf

tough abyss
#

you mean 17 page tutorial

still forum
#

I'm fully for github pages.

#

armablog.wang XD 10,69โ‚ฌ

tame portal
#

the fuck is .wang

errant jasper
#

Is my.wang available?

tough abyss
#

some demain he bought

still forum
#

no it's not

#

But there doesnt seem to be a IP on that domain

#

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

rancid ruin
errant jasper
#

I recently bought an .io domain. Still quite expensive.

still forum
#

You can transfer my.xyz for just 3806,80โ‚ฌ

tame portal
#

sqf.bible

still forum
tame portal
#

its avaialble for 140โ‚ฌ

lone glade
#

yep ded

rancid ruin
#

people will find it via hyperlink anyway

#

the community just needs something like KK's blog, only better, and active in 2018

#

we're in danger of losing knowledge or just not sharing it

still forum
#

Hm... There is a sqf.something domain still free. Wondering if I should buy it

#

I already have a 6 letter domain that I can use for shortlinks

rancid ruin
#

don't bother man, it's hassle

still forum
#

What hassle?

#

Only costs like 3,50โ‚ฌ a year.. That's like a cent per day

rancid ruin
#

money, domain privacy, less open

still forum
#

Didn't even mean for the blog

#

just for myself for coolness ๐Ÿ˜„

lone glade
#

breath in
RELIZ TFAR 1.0 ALRADEE
breath out
this was your daily reminder

rancid ruin
#

i guess if you just point whatever.whatever to a github page then it could be useful

still forum
#

I'm buying man. 1โ‚ฌ in the first year. I'll use it for my sharex image uploads and make the main page a redirect to the blog

tepid mist
#

I hope this is the right channel to ask this, but how do I add Zeus to myself via the debug console? The mission I want to do this in is TRGM2. I've tried the assingCurator with my player ID, but I should spawn the module itself first probably, and I have no clue how to do that.

rugged prairie
#

Nah, I was eating ๐Ÿ•

rancid ruin
#

sorry no this is the arma blog channel

still forum
#

you can spawn the module with createUnit not the most trivial thing to do though

tough abyss
#

why not open the mission in editor and place a Game Master module with owner your player UID or logged admin?

rugged prairie
#

Going back to the spawn module question, is there a performance difference (between a module vs a spawn script)?

tepid mist
#

Because I do not own this mission, it's simply downloaded from the workshop, and I dont trust my players to not fuck up vehichles, and the Zeus would be the fastest way to fix mistakes :D

rancid ruin
#

a module is just a script anyway, just added in a more editor friendly way afaik

tough abyss
#

you can still open up the mission if you know where to find it

rancid ruin
#

modules are kinda just a more streamlined way of doing things

tough abyss
#

somewhere in /workshop

#

if you play it, it's physically on your PC @tepid mist just gotta know where to find it and open it with a PBO manager

still forum
#

@rugged prairie a module is a script.

#

Oh I'm too late :U

tough abyss
#

true but I think it's easier to have that script already been done at mission init than deploying it everytime with the debug console

tepid mist
#

I'll try to find it, otherwise I'll figure out the createunit command, thank you!

tough abyss
#

I usually just write in the rules, you fuck a vehicle up without valid reason, you're off the server this month

rancid ruin
#

reasonable

tough abyss
#

especially on the I&A missions... 50% of the people there has no clue what they're doing

rancid ruin
#

sounds like you don't have a clue what you're doing as well tbh

tough abyss
#

what do you mean

rugged prairie
#

Thanks for the clarification Dedmen. I'm going to read up a bit on it.

still forum
#

I now own sqf.ovh \(O_O)/

tough abyss
#

sqf-mastery.dedmen

pliant stream
#

no such tld

still forum
#

XD

pliant stream
#

yea good luck with that

tough abyss
#

didn't the xyz domains explode in their price? I think I saw it for like $7 a year on Google Domains quite some time ago

still forum
#

yeah

#

well partly. Some names are insane

#

others are like 8โ‚ฌ

#

still expensive compared to the 1โ‚ฌ for .ovh or 4โ‚ฌ for .de

peak plover
#

.fun 1 dollar ๐Ÿคท

still forum
#

sqf.fun would be a lie though

tough abyss
#

I'd expect ovh to be more expensive as OVH is the only registrar of ovh domains

#

is that a donate button I see there? ๐Ÿ˜‚

lone glade
#

#realShit

peak plover
#

What is ovh?

pliant stream
#

some shitty tld

tough abyss
#

privately held company for webhosting and stuff

lone glade
#

french CDN / VPN provider / ISP

tough abyss
#

didn't they also host ArmA 3 servers?

rancid ruin
#

OVH gave away 2 free .ovh domains to everyone with an account when they first got control of the tld

#

ovh host about 30% of the internet in europe probably

still forum
#

yeah. I got two back then

#

Gotta catch the bus. back in 30 minutes

#

oneoh get the github orga online. I'm in writing mood

lone glade
#

german supplex the bus*

cedar kindle
#

gotta write that code!

warm gorge
#
private _duration = 5; // Duration (seconds)
_duration = _duration * 100;

for "_i" from 0 to _duration do {
    uiSleep 0.01;
    _ctrlProgressBar progressSetPosition (_i / _duration);
    _ctrlTextTitle ctrlSetText format ["%3 (%1%2)...", round (_i * (100 / _duration)), "%", _title];
    if ((!alive player) || {!(call _condition)}) exitWith {_fail = true;};
};

This doesn't seem to progress for exactly the specified seconds. Am I doing this wrong?

cosmic kettle
#

0.01+time commands take, but should be negligable.
at first glance seems correct.

warm gorge
#

Alright cheers, yeah it was only slightly off, was just curious why

meager heart
#

why not while ?

pliant stream
#

it's impossible to sleep for an exact duration, this is not just an arma thing

meager heart
#

also uiSleep in for loop...

pliant stream
#

what you'll want to do is sleep in some increments and keep checking if it's yet time to invoke the action you want to perform

#

then each time you invoke the action you reset the timer

subtle ore
#

are all integers in arma floats? or?

pliant stream
#

there are no integers

#

it's all single precision float

subtle ore
#

okay

warm gorge
#

@meager heart Does a for loop over a while in this case really make much of a difference?

cosmic kettle
#

while = oneachframe, not sure about for

pliant stream
#

that's not correct at all

still forum
#

@still forum Sleep can sleep anywhere between the specified time and several hours

#

@warm gorge

#

bad discord

cosmic kettle
#

woops guess I had it mixed with waitUntil

still forum
#

while = oneachframe, not sure about for Uh.. no

rancid ruin
#

for == if

still forum
#

nothing in scheduled is each frame

pliant stream
#

anyway the whole premise is flawed. what you want is something like this ```
total = total time to wait
interval = time between actions

start = current time
end = start + total
while (current time) < end
sleep for some small duration x, such that x < interval
if (current time) - start >= interval
perform action
start = start + interval

warm gorge
#
private _interval = 0.01;
private _start = diag_tickTime;
private _end = _start + _duration;

while {diag_tickTime < _end} do {
    uiSleep _interval;
    if ((diag_tickTime - _start) >= _interval) then {
        _ctrlProgressBar progressSetPosition ??;
        _start = _start + _interval;
    };
};

I believe I've converted your pseudocode correctly, just not sure how to go about actually progressing the progress bar. @pliant stream

still forum
#

>= _interval doesn't really make sense if you already sleep for >= _interval time

#

though if you increment start... uh

pliant stream
#

do you need to update a hundred times a second?

#

increase interval to 0.1 and sleep 0.01

#

or 0.03, whatever floats your boat

still forum
#

for the progress pos.
totalTime = _duration
elapsedTime = (diag_tickTime - _start);

And then you can calculate how many percent are done and use that for your progress position. And get rid of the if check

pliant stream
#

yea just do ((current time) - (start time)) / duration to compute the elapsed ratio

still forum
#

I always forget if it's x/y or y/x ๐Ÿ˜„

#

I always try when doing such things

warm gorge
#
private _start = diag_tickTime;
private _end = diag_tickTime + _duration;

while {diag_tickTime < _end} do {
    uiSleep 0.01;
    private _progress = ((diag_tickTime - _start) / _duration);
    _ctrlProgressBar progressSetPosition _progress;
    _ctrlTextTitle ctrlSetText format ["%3 (%1%2)...", round (_progress * 100), "%", _title];
    if ((!alive player) || {!(call _condition)}) exitWith {_fail = true;};
};

Awesome, got it working. Cheers guys. Appreciate it! ๐Ÿ˜ƒ

astral tendon
#

is there a way to set the spawn point in the vehicle be disabled when it is full?

meager heart
peak plover
#

When I tested it a while ago

#

I got faster results using time instead of diag_ticktime

cerulean whale
#

Just curious, trying to help a mateout here, what, scripting wise causes the most fps drop?

meager heart
#

bad scripting

indigo snow
#

too much scripting

still forum
#

I think.. crashing the game causes the biggest fps drop

#

Or does anyone know something that causes a bigger drop?

lone glade
#

uninstalling arma

#

or even worse, turning your monitor off

#

ALL the frames are gone now huehuehuehue

still forum
#

you can't do that via script tho

lone glade
#

make a UI element that flashes very fast and changes color

#

can't see the frames = no frames

still forum
#

Or just make a UI with thousands of empty frames

pliant stream
#
_f = { _this call _this };
_f call _f
still forum
#

So increase the frame rate

pliant stream
#

this should do the trick

#

{ _this call _this } call { _this call _this } isn't that elegant

#

now to just remoteexec on all clients

still forum
#

squint wat

lone glade
#

don't question it

#

I would just ignore him

still forum
#

agree

#

asking what makes the most fps drop just doesn't make sense anyway

#

so why even try to answer

tough abyss
#

I don't usually work with createTrigger and I am running into some issues after spawning them server-side.

west_spawn_zone setTriggerStatements ["this && (local player) && (vehicle player in thisList)", "nul=[thisList] spawn EH_fnc_inSafeZone;", "nul=[thisList] spawn EH_fnc_outSafeZone;"];

According to documentation, editor based triggers are only created on the server (they were working fine with above when placed via editor) but now they are being created server side, they don't want to work. I believe it has to do with the condition statement using local player and vehicle player in thisList, but it isn't acting in the same fashion as before.

Thoughts?

lone glade
#

wrong

still forum
#

XD

lone glade
#

wait 5s

still forum
#

well local player can obviously not work serverside

#

there is no player. nor can a player be local to the server

lone glade
#

triggers are created on all clients unless specified otherwise for editor triggers

still forum
#

unless he himself is the host

tough abyss
#

Well, I understand that logic for sure, but how can I get past the locality issues if I am spawning it on the server only versus editor based before?

lone glade
#

make it a non server only trigger / change the statements ?

#

"local player" only works for clients, which doesn't work if the trigger isn't present there.

tough abyss
#

I understand, I am just wondering how to distribute that to clients without spawning a new trigger for every client

still forum
#

spawn just one global trigger?

tough abyss
#

Well that is what it is doing now

lone glade
#

you drop the trigger and ask here for something similar

tough abyss
#

And it is publicVar'd

lone glade
#

you want players to not be able to fire within the safezone right?

tough abyss
#

It is for a mixture of things

still forum
#

I don't see how publicVar is relevant?

indigo snow
#

use isPlayer to check if a remote unit is a player

still forum
#

You can't publicVar a trigger

tough abyss
#

Yes, you can.

still forum
#

No?

#

How?

#

You can't.

indigo snow
#

i mean you can pubvar the variable with the trigger reference

still forum
#

exactly.

tough abyss
#
tr = createTrigger ["EmptyDetector", _somePos];
publicVariable "tr";
lone glade
#

which doesn't exist on the client

still forum
#

you are pVar'ing a variable

#

not a trigger

tough abyss
#

Well, its referencing a trigger, if you want to get picky

still forum
#

and it doesn't exist on the client

#

so all you are doing is transmiting a null object

lone glade
#

that one is global eaglebyte ^

tough abyss
lone glade
#

by default createTrigger creates it on all clients unless specified otherwise

tough abyss
#

"A single server trigger can be used by all clients as well as the server"

lone glade
#

yes

#

but, again

#

it's your statement that is the issue

#

the trigger works fine, the code in the condition field isn't

#

in your case it would only work on non dedi MP on the host machine

tough abyss
#

Yes, I understand that. I was wondering if someone with more experience in creating triggers via script may know how to replicate an editor placed trigger to a scripted one with the locality intact.

lone glade
#

Again, why keep trying to use triggers?

tough abyss
#

Because I want to avoid this: "A trigger should only be created on the server to avoid barrage of dead triggers on client disconnects"

indigo snow
#

you can use isPlayer to check if any unit is a player, so you dont need to use player

still forum
#

@tough abyss I think you missunderstand that sentence

tough abyss
#

I may, that is why I am asking for clarification ๐Ÿ˜ƒ

still forum
#

(local player) Doesn't make any sense at all

#

The player is by definition local

tough abyss
#

haha yes

still forum
#

Does the trigger work if you reduce the condition to something simpler?

#

Your nul= is also complete bullshit

#

completly useless

tough abyss
#

When placed in the editor it doesn't want to accept it without that

#

Useless, yes, but won't work without it

still forum
#

Yeah. That's because of a stupid bug in editor code text fields that BI doesn't want to fix

#

Only applies to the edit box though. nothing else

#

It works just fine without it

lone glade
#

it's because of how the editor text fields (and also debug console afaik) are processed

still forum
#

Arma just doesn't let you enter it into the text box. Your custom script trigger isn't a editor text box though

rancid ruin
#

this is an exciting friday night

peak plover
#

It's friday?

queen cargo
still forum
#

@rancid ruin what's happnin

rancid ruin
#

nothing lol

still forum
#

why

#

make something happen

rancid ruin
#

i just realised it's friday night and i should do something

#

but i can't even be bothered to play a game or anything

#

let alone go out and do things

still forum
#

get the sqf blog started

#

so we can start on writing crap

rancid ruin
#

you say that like i've made a blog on github before

#

i'm just good at telling people what to do

queen cargo
#

why bother to make a blog at github?

rancid ruin
#

free, easy to collab

lone glade
#

version control

queen cargo
#

host it yourself and ... just do it
hell ... i created a simple blog software for my page twice already Oo

lone glade
#

github pages are free

still forum
#

You obviously didn't read our conversation about it @queen cargo

queen cargo
#

nope

rancid ruin
#

the idea is to have a community arma blog kinda thing

still forum
#

@lone glade do you know how to do it?

rancid ruin
#

KK style but for everyone to contribute (within reason)

still forum
#

Or do we have to get bux?

queen cargo
#

something that would requrie a way to suggest new papers with admins cross-reading them?

lone glade
#

@still forum get bux, I did it once but it's been more than 2 years

rancid ruin
#

i think you just create a repo and then attach a github page to the repo

peak plover
#

Everyone should be able to contribute, but everyone should also be able to critique on what everyone

rancid ruin
lone glade
#

I remember it being very straightforward and pretty well documented

rancid ruin
#

i think you'd need some kind of curation or you'd have noobs posting bullshit

lone glade
#

the one issue we have with the ACE3 wiki is that you basically need WSL to build the site locally, otherwise you'll have to deal with ruby fuckery on windows

still forum
#

Seek for help has been dispatched towards people that know how to do this stuff

#

You can just read the markdown tho so...

#

Most stuff won't change on the site. And articles are written in markdown right?

lone glade
#

yes

rancid ruin
#

i'm experienced with wordpress and i host plenty of sites but i'm not exactly a well rounded web dev @still forum

#

although it's not rocket science

still forum
#

Same for me

lone glade
#

but we use some html classes for sorting articles and other stuff such as "notes"

still forum
#

We'll just wait for bux to setup the basics for us now ^^

lone glade
#

there's also the whole "is it where I want it to be"

#

ruby gems on windows can just go eat a dick

#

it's version hell 2.0

rancid ruin
#

html classes?

still forum
#

class htmls

lone glade
#

out from html school

#

from html earth, from html planet

still forum
#

</school>

lone glade
#

ye sasseh boi

queen cargo
#

so ... requirements would be:

  • Basic page to read through the articles
  • Ability to comment on articles
  • Ability to login with eg. github (OAuth) to contribute articles
  • Ability to review contributed articles before publish
    or did i missed something?
rancid ruin
#

i just googled html classes, i thought i'd missed something

still forum
#

@queen cargo Basically a github repository.

#

Just like on ACE

lone glade
#

basically a github repo which auto deploys changes

rancid ruin
still forum
#

loads the shotgun

queen cargo
pliant stream
#

x39 i might i consider contributing to sqf vm if you fixed them headers and shit ๐Ÿ˜‚

lone glade
#

lights up a torch

queen cargo
#

not even sure what you mean with fixing headers
commandmap is already moved into its own header

pliant stream
#

the weird #ifdef _HEADER stuff

queen cargo
#

probably will never do

#

feel free to "fix" it

#

i personally do not get annoyed by this like you are
and i do not see any reason why i should waste my time on changing something i am fine with

also i yet have to reject a PR for reasons like this

rancid ruin
#

3 contributors

queen cargo
#

mhh? @rancid ruin

rancid ruin
#

i'm just messing with you. hard to reject PRs when you aren't getting any ๐Ÿ˜Ž

queen cargo
#

hard to get PR at all

lone glade
#

fire department, QUICK

still forum
#

๐Ÿš’

rancid ruin
#

well looking at jekyll, i don't like many of these words

lone glade
#

let's not forget @little eagle wise words:

commy2 ๐Ÿ’ฉ - Today at 7:19 PM
SQF is fine. People won't suddently start writing solid scripts just because we change to something else.
rancid ruin
#

words like ruby and gcc

lone glade
#

hehhehehehe

pliant stream
#

what is static analysis????

queen cargo
#

using sqf-vm you theoretically could write whole real programs using SQF

rancid ruin
#

i'm checking the docs page out and it has "previous" and "next" buttons - on the docs page i mean wtf

still forum
#

@rancid ruin github takes care of building the site

lone glade
#

making jekyll work on windows is what versionning hell looks like.

queen cargo
#

just would require some comands for it to work

lone glade
#

sure github takes care of it, but for local tests.... shudders

astral tendon
#

how do i create via script a spawn point module like we have on the editor?

#

I need to dynamically create a delet it.

lone glade
#

spawn point module? you mean a respawn position?

astral tendon
#

Yes

#

or something equivalent

subtle ore
#
[west,_YourCoolRespawnPointPosCoolThing] call BIS_fnc_addRespawnPosition
lone glade
#

^ that

subtle ore
#

and if you assign it to a variable, use that info for the reverse

lone glade
#

check the parameters for it

astral tendon
#

the _YourCoolRespawnPointPosCoolThing is what?

lone glade
#

just remember that it's local

#

the marker

subtle ore
#

๐Ÿ˜‚

astral tendon
#

Local? so the PC that make the spawn possition is the only that can spawn in it?

lone glade
#

5s, i'll post the parameters

#

warning a bit large

#
/*
    Author: Karel Moricky

    Description:
    Add a respawn point.
    It's recommended to call the function on server only.
    When called on client during briefing, the position will broadcasted correctly.

    Parameter(s):
        0:
            NAMESPACE
            SIDE
            GROUP
            OBJECT
        1:
            STRING - marker
            GROUP - group leader (use grpNull to dynamically use player's current group; useful when it changes frequently)
            OBJECT - object in which or around which players will be respawned
            ARRAY - precise position
        2 (Optional): STRING - respawn name, can be text or link to localization key

    Returns:
    ARRAY in format [target,id] (used in BIS_fnc_removeRespawnPosition)
*/
astral tendon
#

That is one large boi

meager heart
#

yes he tall

astral tendon
#

but anser me, does that means being local that mean only the PC that make it is the only who can see and spawn?

subtle ore
#

If you pass a an object instead of missionNamespace or side

river meteor
#

X39#2180 Problem with sqf-vm is the lack of syntax checking. I was excited to use it, but if it canโ€™t catch my errors and bugs as well as arma can, then I am better off sticking to arma.

pliant stream
#

well it's not feature complete is it

still forum
#

if you want syntax checking then use the SQF linter

tough abyss
#

Thatโ€™s why we will use intersharp kek
Need to test porting types

still forum
#

btw you are very welcome in intercept slack

queen cargo
#

@river meteor SQF-VM has syntax checking
but it does not implements all types yet
which is why it cannot catch all your syntax errors (simply because it thinks stuff like loadfile is a variable instead of a command) but rather says unknown command
however, using eg. arma.studio, you will be able to lint your code files

lone glade
#

I just realized that the intercept logo being a squirrel biting a nut is oddly fitting...... for you ded

#

huehuehue

still forum
#

why

#

I'm usually not biting nuts

lone glade
#

furry n' all dat ๐Ÿ˜›

still forum
#

I don't think I know any squirrel furries

#

actually..

#

It's a rare furry race

pliant stream
#

๐Ÿค”

queen cargo
still forum
#

Intercept-Squirrel incoming?

lone glade
#

intercept brainfuck

#

DO IT

still forum
#

looks better than LUA on first look

lone glade
#

don't let your memes be dreams

queen cargo
#

that is an actual scripting language
which is what i always think of when seeing that logo

#

yes, it is
but lua is plain C
squrrel requries c++ iirc

pliant stream
#

lua has a really good vm though

queen cargo
#

optimized in literal ages of work

still forum
#

We have C++ so who cares

#

Don't want C crap anyway

pliant stream
#

hey don't disrespect c

queen cargo
still forum
#

squirrel lang actually looks very enscript like...

queen cargo
#

it is literally based around C family

still forum
#

@rancid ruin bux just said he'll help with the basics

rancid ruin
#

i'ma finish reading about jekyll later and see if i can help somewhere along the way

#

like, some kind of decent index page or categorisation system would be useful

#

rather than just a stream of random blog posts

still forum
#

Currently trying to get arma3 as name

#

sqf is taken

rancid ruin
#

damn

peak plover
#

Try fun

#

I used to have faith

still forum
#

arma3 account did nothing since 2013. And back then it only forked a dayz repo without ever contributing anything

#

I asked github support if they can give us the name

astral tendon
#

So, the synchronizeObjectsAdd dont really work with spawn modules, they do synchronize but the spawn point is not set to it.

#

im doing something wrong?

fleet wind
#

Allright i am trying to add a array of items into a listbox (dialog) I have tried this code { lbadd = [1500, _x] }forEach ["Test1","Test2","Test3"]; But i get this error Error reserved variable in expression
the idc is correct and i have no clue if it makes a diffrence but the dialog is created above that code and its all in a function.

still forum
#

yes

#

lbadd is a command

#

can't use that

echo nest
#

Anyone here have extensive knowledge about admintoolkit 2.2? I have a quick question

still forum
#

I don't know what admintoolkit is soo...

#

ask question

fleet wind
#

wait so what is the command for adding things in to ListBoxes then ๐Ÿ˜ฌ

still forum
#

lbAdd

#

Read it's wiki page

queen cargo
#

it is @still forum
even worse: it is simple to implement

only problem i have with it is the threading of them ... but i cannot remember what the actual problem was (just that i did not liked how it was solved)

still forum
#

Theading and suspending looks very weird

#

but I don't think that would really be used for Arma scripting

queen cargo
#

iirc it is also extremly limited and not actual threading

#

more like the arma suspension thingy
pause main context and continue the other context

still forum
#

coroutines. yeah.

echo nest
#

Why was my message removed?

still forum
#

but classes and such are muuch more intuitive that LUA

#

@echo nest wasn't

echo nest
#

Lok

queen cargo
#

if it was red @echo nest, it was not delivered correclty

echo nest
#

Ok thx

queen cargo
#

whole syntax is @still forum
and people barely know about squirrel

still forum
#

Also heard about it for the first time today

echo nest
#

When I tell admin tools to spawn an item. Nothing is spawned. Anyone have any ideas?

still forum
#

That is very specific.

queen cargo
#

found it randomly when i was searching for LUA alternatives

peak plover
#

Is the admin toolkit like unofficial toolkit what is that

still forum
#

It's some exile tool I guess

#

according to google

echo nest
#

It's an admin tool for exile

still forum
#

Should better ask in exile forum then

peak plover
#

Try exile discord

echo nest
#

Everyone there just responds with"buy infistar". And I'm not gonna spend 40$ for something I might not use after 30 days

#

Just thought I'd give this discord a try.

peak plover
#

NcStar is a scam

#

You don't need anti-cheat just don't play with cheaters

echo nest
#

I just want an admin tool. Don't need anti cheat

peak plover
#

Just use the debug console

echo nest
#

Does that have teleport and item spawn?

still forum
#

it has literally everything that's possible

peak plover
#

You can teleport and spawn items with it but you have to type in the code manually

echo nest
#

That's ok. I'm gonna google it now

astral tendon
#

is there a way to detect if there is a music playing?

tough abyss
#

@still forum in lua you can make a class implementation through meta tables

still forum
#

yeah. but seems kinda ugly doesn't it?

#

But I think the lua C++ bindings that exist make implementation easier

#

as such easy to use bindings don't seem to exist for squirrel

tough abyss
#

It works
Class someclass = class(โ€œsomeclassโ€)
SomeClasse:method()
Self.someVAr = โ€œโ€ โ€” global class usable variable
End

#

Never used squirrel

#

C++ has some binding with c# through clr hosting but for some reason arma didnโ€™t play nice with it, at least for me. Idk what lua uses but I assume just doFile with exposed functions

#

Or luaBind if iirc

queen cargo
#

squirrel was posted by me @tough abyss

tough abyss
#

Ah my bad

lofty nymph
#

anyone know how to change the color of a checkbox??

astral tendon
#
remoteExec ["BIS_fnc_holdActionAdd",[0,-2]select isDedicated, true];  

What does that [0,-2]select isDedicated does? also, in MP another action apears

knotty mantle
#

it checks whether it is running on a dedicated server. If it is it execs the function everywhere but the server. Otherwise it runs globally.

cedar kindle
#

@astral tendon select 0 for false, 1 for true

astral tendon
#

False or true for what?

cedar kindle
#

for isDedicated

#

and it picks the corresponding value in the array before select

inner swallow
#

isDedicated can be true or false

#

and select uses a boolean value like this: true => 1, false => 0

astral tendon
#

what about that [0,-2]? and why check the isDedicated here?

inner swallow
#

it's for remoteExec

#

target machines for remoteExec

astral tendon
#

Hum... dont really get it, what is that option anyway?

inner swallow
#
targets (Optional): [default: 0 = everyone]
Number - Only 0 and 2 are special. When 0, the function or command will be executed globally, i.e. on the server and every connected client, including the one where remoteExec was originated. When 2, it will be executed only on the server. When 3, 4, 5...etc it will be executed on the client where clientOwner ID matches the given number. When number is negative, the effect is inverted. -2 means execute on every client but not the server. -12, for example, means execute on the server and every client, but not on the client where clientOwner ID is equal to 12.```
#

like i said, check the wiki ๐Ÿ˜›

#

Select selects one value from the array [0,-2] based on the boolean isDedicated

astral tendon
inner swallow
#

eh?

#

It's for remoteExec

#

not the hold action

astral tendon
#

oh i see

inner swallow
#

So if the if the environment is not a dedicated server, it remoteExecs to all clients

#

if it is a dedicated server, then it only runs for clients

#

(this way, it works on local hosted servers too)

astral tendon
#

So the BIS_fnc_holdActionAdd is Local?

inner swallow
#

you know i'm going to ask you to check the wiki again ๐Ÿ˜›

#

probably is, i don't know for sure

meager heart
#

its just addAction

astral tendon
#

Because later i had a problem that every player that joins created a new action

inner swallow
#

depends on where you're running the command from

#

you'd run that from the server, once

astral tendon
#

I need to test this again but first it was from the unit init, now i put on a SQF with a variable

inner swallow
#

if you run it from the unit int, then either don't use remote exec

#

or use if (isServer) then {do stuff}

#

because unit inits run for every machine

#

and you don't want that in this case, since then every machine remote execs it to every mahcine

astral tendon
#

Interesting, what about units variable that some times JIPs do not carry over?

inner swallow
#

not sure what you mean

astral tendon
#

Lets say, i make a unit with the name TestGuy

#

A command like

if(alive testguy) then{hint "he is alive"}
#

then start the game wtih a host and a client

#

then the client disconnect and connect again and nothing happens or gets a error of undefined variable

#

That usualy happens to me

inner swallow
#

depends on where you're running the command maybe

astral tendon
#

Were could i get that error?

inner swallow
#

although shouldn't, alive takes a global arg

queen cargo
#

if you call that comand from client and never public variable, it will never be in JIP @astral tendon

#

same goes for server

inner swallow
#

although a unit var shouldn't need that?

queen cargo
#

such things as unit variables are not existing

inner swallow
#

i mean, you name a unit something

astral tendon
#

Also, when i talk about variable i talk about the variable we give on the editor

queen cargo
#

the unit names are nothign but global variables
however ,they should be globally available

inner swallow
#

yeah that's what i mean

#

never happened to me roque, tbh.

astral tendon
#

That also happens to other objects

queen cargo
#

what is described above should actually never happen
either user error or some bug you discovered

#

if you create an environment that you can share to test that bug, BI surely will fix it

inner swallow
#

In the case of the remoteExec command originally pasted above, it has its JIP flag set to true, so JIPs will get it fine if only executed from the server.

astral tendon
#

I already fixed most of the problems by avoid use variables that clients need to read

#

if that was a week later i could ship my mission file for those testings

fleet wind
#

Allright its me again.... When i try to add a simple _unit addaction ["Test Plz",{[_this select 0] call JaM_fnc_selectstyle}]; it gives me awarning saying it (the function) may not be declared. Am i doing something wrong when i define them ? http://prntscr.com/i9dyf2 http://prntscr.com/i9dyie

peak plover
#

Ok, you can check if they loaded correctly buy clicking the functiosn button under the debug console (in 3den ctrl + d)

#

On the top left choose missionConfigFile in the functions browser

#

Your path is wrong

#

Wait

#

nvm

queen cargo
#

@fleet wind where you get that error

#

if in your "IDE" then ignore it

peak plover
#
class pooPoo{
    class kaka {
        file = "functions";
        class gaga{};
    };
};
//
call pooPoo_fnc_gaga;
queen cargo
#

only errors rly matter are the ones in arma

fleet wind
#

@peak plover can you skip the first tagg thing ?

peak plover
#

Check the functions library in-game.

fleet wind
#

How would i do that?

peak plover
#

in editor

#

CTRL D

#

and functions

#

It's a button on the bottom

#

Then when it opens

#

Top right EDIT LEFT

#

Switch to missionConfigFile

queen cargo
#

could you answer my question @fleet wind?

#

_unit addaction ["Test Plz",{[_this select 0] call JaM_fnc_selectstyle}];
your JaM_fnc_selectstyle is correct
only thing matters is that there is a file located at /functions/fn_selectstyle.sqf
if it is, it probably is a text editor warning you refer to and not some ingame error (because it would be new that ingame anything is erroring at all when undefined variables are used)

fleet wind
#

Yes sorry @queen cargo i get an error in game with one of my 3 functions Error undefined variable in expression

queen cargo
#

double check that you can load the file functions/fn_selectstyle.sqf in the editor

peak plover
#

BTW how often do people use LOCATIONS?

queen cargo
#

depends on what you mean with using

fleet wind
#

CTRL D does nothing in editor ....

peak plover
#

oN the top

#

Tools > debug console

#

*tools > functions

#

That one exists too

#
nearestLocation  [[0,0,0],'u_installation']
#

I just checked and there's tons of location types in the vanilla game

#

I wanna abuse some of them

#

And create my own locations

#

Just wondering if anyone else does that so I don't conflict

fleet wind
#

tools > functions viewer?

peak plover
#

Yeah

fleet wind
#

Its all there

peak plover
#

The middle selection on top left is the tag thing

queen cargo
#

make a screenshot of the error msg @fleet wind

fleet wind
#

Nothing changes

#

@queen cargo

queen cargo
#

JaM_fn_test is not correct

#

JaM_fnc_test is what you need to use

fleet wind
#

I am really that stupid lul let me test

astral tendon
#

how do i pass a crew to a seat to a gunner?

queen cargo
#

npnp
those issues are usually the once that slip through with ease

astral tendon
#

like we have on the action menu

queen cargo
#

just next time open up with the exact error msg in the very begining @fleet wind ๐Ÿ˜„

fleet wind
#

Will do boss lol Sorry to waste your time

queen cargo
#

no wasting here
you have been nice

#

this channel is for helping afterall

astral tendon
#

any ideas?

queen cargo
#

not really sure what you actually want to do

astral tendon
#

A code to pass from a passager seat to the gunner, like we already have on the action menu

queen cargo
#

with the addaction condition checking that you are currently not in the gunner slot already (gunner vehicle player != player)

astral tendon
#

moveInGunner do not work when the unit is inside of the vehicle

queen cargo
#

first moveout then movein

astral tendon
#
_this = vehicle player;
moveout player;
player moveInGunner _this;
#

Im using this but i feel that is a litle wrong

queen cargo
#

you can add a comment "dirty" if it makes you feel better

astral tendon
#
_thisIsWrong = vehicle player;
moveout player;
player moveInGunner _thisIsWrong ;
peak plover
#

ABout the location question

Invisible
Name

im using these classes to create locations and use them for myself

#

But my question is, would this ever interfear with anything?

drowsy axle
#

Hey guys. Is it possible to get the location of a smoke?

subtle ore
#

Yes.

lone glade
#

depends if you mean position or the location it's closest to

#

both are yes but both are done a bit differently

drowsy axle
#

I'm looking for a gun run to be made on the pop of yellow smoke.. (would be funny if the AI popped yellow smoke)

subtle ore
#

AI do "pop" smoke, not sure what you mean for a gun run?

#

You mean like on a plane?

lone glade
#

ofc

drowsy axle
#

Yea A-10 brrrrrt

lone glade
#

what else would he mean, bob in his cessna? huehuehue

subtle ore
#

Wtf, okay well you're creating the smoke in the first place. So...

drowsy axle
#

haha lol

subtle ore
#

Yes, Alganthe

lone glade
#

wait, I have better

subtle ore
#

like.

private _coolSmokeIGuessIDunnoThisIsLongVariableName = "SmokeShell" createVehicle getPosATL _vehicleThingy;
_pos = getPosATL _coolSmokeIGuessIDunnoThisIsLongVariableName;
lone glade
#

the bestest at close ground support ๐Ÿ˜„

subtle ore
#

๐Ÿ˜ฑ

drowsy axle
#

How would I spawn a the gun run module from zeus? (without the use of zeus obvs)

#

Would that be possible?

lone glade
#

yes

#

ah fuck, that's stupid, they have a curator check for that module O.o

subtle ore
#

Any reason why zero CfgCloudlet classes are working with a particle source set by setParticleClass ?

lone glade
#

absolutely none?

subtle ore
#

Nope, not a single one works

lone glade
#

how do you know it doesn't work?

subtle ore
#

Nothing Visual after object is created, nothing seems to be returned after creation either

lone glade
#

are you using a particleSource class ?

subtle ore
#

Yes, is there other ways to create it?

lone glade
#

don't think so.

subtle ore
#

Huh, weird.

lone glade
#

I feel like arma is trolling me

subtle ore
#

It probably is

lone glade
#

config entry:
tabs[]= {[], [0]};
retrivieval:
(getArray (_x >> "tabs")) params ["_leftTabsList", "_rightTabsList"];
error:

if (count _ri>
 5:54:31   Error position: <foreach _leftTabsList;
};

if (count _ri>
 5:54:31   Error foreach: Type String, expected Array
 5:54:31 File z\ace\addons\arsenal\functions\fnc_compileStats.sqf, line 70
#

TYPE STRING

#

STRING

subtle ore
#

0_o

lone glade
#

rolf

#

for a second I thought you attached smokes to the A10 bullets

#

FUCK YOU DID

subtle ore
#

Nope ๐Ÿ˜ƒ

#
fn_smoke =
{
  params[["_vehicle",objNull,[objNull],1]];
  for "_i" from 0 to 5 do
  {
    _vel = velocity _vehicle;
    ("SmokeShellYellow" createVehicle getPos _vehicle) setVelocity[_vel select 0,_vel select 1,_vel select 2];
  };
};
player addEventHandler["FiredMan",
{
  [(vehicle player)] call fn_smoke;
}];

Excuse the crappy code, it's getting late

#

The velocity change isn't the smoothest in the slightest or in the right direction for that matter but it's okay I gues

lone glade
#

it's no biggie tbh

subtle ore
#

Well you gotta get that realism packed in

lone glade
#

GG

#

absolutely GG:
code:

private _tabs = getArray (_x >> "tabs");
private _leftTabsList = _tabs select 0;
private _rightTabsList = _tabs select 1;

TRACE_3("tabs test", _tabs isEqualType "", _leftTabsList isEqualType "", _rightTabsList isEqualType "");

return:

 6:12:29 [ACE] (arsenal) TRACE: 0 tabs test:  _tabs isEqualType ""=false,  _leftTabsList isEqualType ""=true,  _rightTabsList isEqualType ""=true z\ace\addons\arsenal\functions\fnc_compileStats.sqf:61
subtle ore
#

Lool

lone glade
#

guess i'll just use compile and add a comment ....

subtle ore
#

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

lone glade
#

fuck it, two config entries and call it a day

queen cargo
#

uhm ... wut?
you rly wanted to create a single array for two tab lists?
should work though unless config issue ... but still ... wut?

lone glade
#

config issue

#

for some godawful reasons it doesn't support sub-arrays

queen cargo
#

theoretically you could have used sqf-vm to check that

#

mhh?

lone glade
#

they're stored as fucking strings

queen cargo
#

missing []?

lone glade
#

nope

#

they're stored as strings

subtle ore
#

"Theoretically you should have used SQF-VM to check that" > You're starting to sound like Dedmen

#

Or Commy for that matter.

queen cargo
#

you are wrong @subtle ore
they sound like me back when i was more active

#

@signal peak supports config parsing using parseconfig__ and mergeconfig__

subtle ore
#

that's on you ยฏ_(ใƒ„)_/ยฏ

queen cargo
#

so ... tabs[] = {{"something"}, {"something"}}; is not working? @lone glade

lone glade
#

I haven't tried using code brackets for sub-arrays

queen cargo
#

uhm ... what did you used then?

lone glade
#

tabs[]= {[], [0]};

queen cargo
#

and that compiles Oo

#

wtf

lone glade
#

yes, yes it does

#

as goddamn strings....

queen cargo
#

so ... tabs[] = random; will not error out

#

wut

#

da

#

fuuu

#

anyways ... it will work if you use the correct syntax @lone glade

lone glade
#

true, I shouldn't have used logic there ๐Ÿ˜„

queen cargo
#

it should have crashed

#

that is more the problem here

lone glade
#

I figured out that was the correct syntax since it didn't crash or error out

#

welp, good news is that it works, bad news is that I have to convert all of my stats and write the API to add / remove them later on ๐Ÿ˜ญ

#

I swear @still forum why'd you have to point out the flaw of the old system

west grove
#

oi fellas. got a question- maybe someone can help me with it. I'm connecting to a uav via connectTerminalToUAV, then i'll show the feed with showUAVFeed true -- it's all fine and working, BUT it'll connect me to the driver. instead, what I want to have is the feed from gunner perspective locked to a target. anyone got thoughts about this?

meager heart
#

you can try lockCameraTo...