#arma3_scripting

1 messages · Page 449 of 1

terse sleet
#

Google Translate

meager heart
#

probably there https://forum.infistar.de/ you will have more chances for some "solutions" for the infistar things, Kayserili Pablo Escobar/15

terse sleet
#

thak you

shadow sapphire
#

HAHAHA, dude, good job @meager heart. I had zero clue what he needed.

meager heart
#

same 😄

little eagle
#

I still don't know, but I'm happy if he's happy.

ornate pawn
#

looking for someone who can help me with this

#

ppColor ppEffectAdjust [1, 1, -0.01, [0, 0, 0, 0], [1.5, 1, 1.2, 0.6], [0.125, 0.587, 0.114, 0]];

#

Trying to change the color effect

#

but i don't know how to get the color i want

ornate pawn
#

thank you

#

the numbers for this color

#

trying to make my own night vision goggle script

#

i don't like ace one

#

anyone please?

vague hull
#

has anyone used createAgent on headless clients and ran into the problem that the units simply wouldnt move? (basically just stand around)

ornate pawn
#

So i finally got the NVG script to where i wanted. but the effect gets disable when i hop on a vehicle.

#

any clue?

#

script

errant jasper
#

@ornate pawn Line 23 and 70, basically determines that it is only active when you are not in a vehicle.

pulsar drum
#

Do you know how to disable rotation of the text from draw3Dicon command.
Text is always facing to player.
I want text to stay static not facing to player

#

Angle parameter is for icon itself not the text.

still forum
#

the text is not 3D. looking from 90° angle would make it invisible

pulsar drum
#

Nope it is turning and facing all the time to player

austere granite
#

not possible

#

it's 2D text and 2D icons

#

if you want 3D behavior for anything like that you'd have to come up with a different solution

pulsar drum
#

What is 2D ?
Command is draw3Dicon

austere granite
#

because it draws an icon in 3D space

#

it doesn't draw a 3D icon (And textures aren't 3D, so that wouldnt make sense anyway)

#

And the command is drawIcon3D

pulsar drum
#

Yes
Text is 2d but when I move 360 around it is as well

austere granite
#

Nvm

#

[3:09 PM] Adanteh: not possible

#

there

pulsar drum
#

Ok not possible to keep it static to not face to me

lone glade
#

wat

austere granite
#

he wants the 2d texture to behave like its 3D, so if you draw an icon in a given position and walk around it, you'll look at it like it's tilted, instead of it facing directly to the player

winter rose
#

no, it's drawn IN 2 DIMENSIONS on your screen
it is NOT a 3D object with one texture

lone glade
#

you know what, nevermind, I won't get myself involved in this

#

nopenopenope

austere granite
#

Like it's not a crazy thing, it's just not possible

winter rose
#

what you could do is use something that allows you to retexture it (helipad? blood stain? poster? IDK) , set it vertical, and apply your icon texture to it

austere granite
#

You'd need to create an object an setobjecttexture to that and somehow put whatever text you want in that texture (which you cant load either without filepatching)

#

aka not possible

lone glade
#

you want floating text always facing you?

still forum
#

@lone glade opposite

lone glade
#

yeah, then no

#

unless you draw it with lines 😄

#

huehuehue

still forum
#

Didn't you say you won't get involved?

lone glade
#

true true

austere granite
#

can never rely on the frenchies

winter rose
#

wut? TREASON

pulsar drum
#

I want to text on a billboard
But will be dynamic during mission

winter rose
#

@austere granite begone!

still forum
#

@pulsar drum Make a custom billboard model and make it a car license plate.

#

Then you can set whatever text you want on it. Though only a single line and limited length

austere granite
#

ah new command

#

lel

#

creative

pulsar drum
#

@still forum
Custom model means as addon?

still forum
#

Simple object might work too 🤔 Don't know

pulsar drum
#

Do you have a link for car lisence plate?

winter rose
#

setPlateNumber

glad venture
#

is there any sort of logarithm function?

wary vine
#

couldnt you create dialog on the object ?

ruby breach
still forum
#

create dialog on the object What do you mean? You cannot create a dialog ON a object

queen cargo
#

could somebody please confirm that this piece of code is erroring out equally?

_arr = [1];
count _arr select 0;
count _arr # 0;

Another confirmation required:

_arr = [8, 7, 6, 5, 4, 3, 2, 1, 0];
_arr # 2 ^ 3; //should evaluate either to 1 or to 216, need to know which one gets displayed
_arr # 2 * 3; //18 or 6```
lone glade
#

gimme 3 minutes

#

also, NO PRIVATE REEEEEEE

#

first one generic error in expression

queen cargo
#

no need for private in test snippets

#

for both?

#

uhm ... just thinking

lone glade
#

second one is 18

queen cargo
#

add a nested array to the first one

lone glade
#

oooh it's a list of tests

#

first block both error out

queen cargo
#
_arr = [[1]];
count _arr select 0;
count _arr # 0;``` should both error
lone glade
#

second one is 216 and 18

#

that's correct

#

i'm 100% sure # is just an alias for array select index

queen cargo
#

it is

lone glade
#

I KNEW IT

queen cargo
#

but it has different precedence

#

now before you close

#

the upper test now has to go into the other direction

lone glade
#

???

queen cargo
#
_arr = [8, 7, 6, 5, 4, 3, 2, 1, 0];
3 ^ _arr # 2;
3 * _arr # 2;
#

one might error out

lone glade
#

729 and 18

queen cargo
#

both work?

lone glade
#

yes

queen cargo
#

so # is above ^

little eagle
#

# is the highest prio binary command, and still below unary?

queen cargo
#

has to be below unary

glad venture
#

is there a way to have decimal values like .001 that don't automatically get turned to 0?

winter rose
#

huh... yes?
0.001 == 0 // returns false

#

what seems to be the problem?

little eagle
#

Decimal values don't get automatically turned to 0.

winter rose
#

sleep 0.001 you mean @glad venture ?

gleaming oyster
#

You mean rounding?

little eagle
#

I think he doesn't know how floats work.

glad venture
#

I had some problems with that before but it was numbers like 1e-6 and it was giving me some sort of undefined error

little eagle
#

Or maybe he's just confused by the serialization and thinks the number shown in the debug console or after using str and format mean anything.

gleaming oyster
#

He needs a floatie.

little eagle
#

Fix your script, don't use str on large numbers.

gleaming oyster
#

Conversion loses accuracy yes?

little eagle
#

It's more of serialization creating scientific notaton that can not be recompiled.

#

Don't use format or str on large or small numbers. That's the only thing you can do.

#

str/format etc. and compile etc. are not bijective.

winter rose
#

had to google that one…

little eagle
#

1: A -> B
2: B -> A
1 and 2 bijektive, e.g. BIS_fnc_netId, BIS_fnc_objectFromNetId.

#

1: A -> B
2: B -> 💩
1 and 2 not bijective, e.g. str and compile.

#

Either avoid the conversion, or choose something bijective if there is something.

winter rose
#
call compile format ["player setDamage %1", _dmg];

👀

little eagle
#

Well that works, but it will never be the same as
player setDamage _dmg;

winter rose
#

oh, so there was a faster way…

little eagle
#

😐 I hope you're not serious.

winter rose
#

obviously 😄

#
call compile format ["%1 %2 ;", (str "hint") select [0, 4], str "Hello!"];
little eagle
#

That just errors.

winter rose
#

select 1, 4 indeed

wary vine
#

Probably a retarded question. but on the RscCombo, what are the color sections that define the un- focused color and focused color

little eagle
#

You could check in the config viewer.

wary vine
#

I changed all the colors on my defines to 0,0,0,0

#

and its still the same

little eagle
#
class RscCombo
{
    deletable = 0;
    fade = 0;
    access = 0;
    type = 4;
    colorSelect[] = {0,0,0,1};
    colorText[] = {1,1,1,1};
    colorBackground[] = {0,0,0,1};
    colorScrollbar[] = {1,0,0,1};
    colorDisabled[] = {1,1,1,0.25};
    colorPicture[] = {1,1,1,1};
    colorPictureSelected[] = {1,1,1,1};
    colorPictureDisabled[] = {1,1,1,0.25};
    colorPictureRight[] = {1,1,1,1};
    colorPictureRightSelected[] = {1,1,1,1};
    colorPictureRightDisabled[] = {1,1,1,0.25};
    colorTextRight[] = {1,1,1,1};
    colorSelectRight[] = {0,0,0,1};
    colorSelect2Right[] = {0,0,0,1};
    tooltipColorText[] = {1,1,1,1};
    tooltipColorBox[] = {1,1,1,1};
    tooltipColorShade[] = {0,0,0,0.65};
    soundSelect[] = {"\A3\ui_f\data\sound\RscCombo\soundSelect",0.1,1};
    soundExpand[] = {"\A3\ui_f\data\sound\RscCombo\soundExpand",0.1,1};
    soundCollapse[] = {"\A3\ui_f\data\sound\RscCombo\soundCollapse",0.1,1};
    maxHistoryDelay = 1;
    class ComboScrollBar: ScrollBar
    {
        color[] = {1,1,1,1};
    };
    colorSelectBackground[] = {1,1,1,0.7};
    colorActive[] = {1,0,0,1};
    style = "0x10 + 0x200";
    font = "RobotoCondensed";
    sizeEx = "(            (            (            ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
    shadow = 0;
    x = 0;
    y = 0;
    w = 0.12;
    h = 0.035;
    arrowEmpty = "\A3\ui_f\data\GUI\RscCommon\rsccombo\arrow_combo_ca.paa";
    arrowFull = "\A3\ui_f\data\GUI\RscCommon\rsccombo\arrow_combo_active_ca.paa";
    wholeHeight = 0.45;
};
#

1.82, RscCombo

wary vine
#

ill have to fiddle till i find the ones i need xD but ty

little eagle
#

Give each of them a distinct color, and write down which thingy is which that way by observing. lol, I' ve done this so many times already.

wary vine
#

when you say "thingy" do you mean technical term "thingy" xD

little eagle
#

thingy is placeholder for <insert technical term>

wary vine
#

or thingamabob

little eagle
#

That's too long and doesn't sound as cute.

wary vine
#

Whatsit

#

got it

#

😄

knotty arrow
#

Anybody know the way to get the name and the idc of a control?

#

all the names and alls idc from a dialog

little eagle
#

ctrlClassName

#

ctrlIDC

#

???

#

allControls _display

gleaming oyster
#

💩

little eagle
#

allControls _display apply {ctrlClassName _x}

#

allControls _display apply {ctrlIDC _x}

#

This how?

#

mudnut, what's up with the poop?

gleaming oyster
#

In response to the question , not answer

#

I mean, where did yours go?

#

You used to have two

knotty arrow
#

i do that var = allControls findDisplay 602;

#

602 is the inventory display

little eagle
#

Got tired of them. This is not a bad question. And I believe bad questions exist.

#

Like "why?", or something else incoherent.

knotty arrow
#

but var = [No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No control,No

gleaming oyster
#

I believe google is a good spot to look first

#

Holy hell, hastebin or pastebin ffs

knotty arrow
#

i find before in google but, var = no control for the win

little eagle
#

I didn't say var = , I said allControls _display.

#

If you store the controls in an array, and then close the display, obviously the controls will all be null.

#

Because they're gone.poof

knotty arrow
#

i do that :

0 spawn {
sleep 5;
var = allControls findDisplay 602;
hint "xd"

};

#

in the sleep i open my inventory

#

and when the hint appear, i close the inventory and see the var

#

and its all no control xd

gleaming oyster
#

Ehhhh....why not just use something like waitUntil ?

little eagle
#

hint "xd"
???

knotty arrow
#

don't matter xD

little eagle
#

ok

knotty arrow
#

only no controll

little eagle
#

What?

broken forge
#

doesn't work, how do i play music for my scenario?

gleaming oyster
#
0 spawn 
{
    waitUntil{!isNull findDisplay 602};
    _wtf = allControls findDisplay 602;
   hint "a cookie";
};
knotty arrow
#

playMusic "LeadTrack01_F"

still forum
#

playMusic "LeadTrack01_F"; That's how you play music

austere granite
#

The controls are null because you close the inventory

knotty arrow
#

mmm

broken forge
#

ah, thanks. had a space in there 😆

knotty arrow
#

right

austere granite
#

You're saving a reference to the control, if you close the control then it'll say no control

knotty arrow
#

thanks adanteh ❤

gleaming oyster
#

Xasd?

#

You just toss random letters in there?

verbal otter
#

how can i get a list of all fonts?

gleaming oyster
#

CfgFontFamilies

little eagle
#
"true" configClasses (configFile >> "CfgFontFamilies") apply {configName _x}
gleaming oyster
#

^

still forum
#

Added: New ctrlAnimateModel and ctrlAnimationPhaseModel script commands OwO

strange urchin
#

Is there any overhead for using sleep?

little eagle
#

Yes, there is overhead for using any command.

strange urchin
#

During the sleep?

little eagle
#

The game will check your script every frame if the time is up for it to run again.

strange urchin
#

So how does it compare with a waitUntil {time > _timeEnd}?

still forum
#

sleep is a single number comparison in engine. Which is like a nanosecond per frame. IF the script even get's checked by the scheduler

little eagle
#

There is no reason to use waitUntil {time > _timeEnd} ever, essentially.

strange urchin
#

I am aware

still forum
#

waitUntil periodically executes that script. Which is several microseconds each execution

little eagle
#

If you can move a task from script to C++, do it.

still forum
#

Just like
count _array is faster than

private _elementCount = 0;
{_elementCount = _elementCount + 1} forEach _array;
little eagle
#

Yeah. And not only faster, but especially shorter to write, easier to read.

dapper path
#

Can someone help me make a lightbar script?

little eagle
#

tf is a lightbar

#

Unrelated, game crashes if you delete a control from inside it's onDraw event >.>

dapper path
#

The flashing lights on top of a cop car

still forum
#

@little eagle Same if you remove eventhandlers from inside a eventhandler on controls

little eagle
#

Well, MouseMoving and MouseHolding could kill the display, though that were on displays.

#

I like self deleting stuff.

#

Though since this is for CBA, the shit should obviously work in savegames etc., so I guess I will have to use PFH or EachFrame anyway.

still forum
#

Ewwww.. savegames

little eagle
#

They're not that hard to do really.

#

You just have to cut back on the display and ui namespace abuse.

#

Why does a server have a ui namespace anyway :thonk:

#

I know it uses it for function caching, but it's a UI namespace...

dapper path
#

commy2 would you be able to help with that?

little eagle
#

Well, either the car has police lights, or it doesn't.

#

Can't much script there.

still forum
#

I could definetly help you with that and write the entire script for you.
But I prefer to use that time to lay in bed and stare at my wall

little eagle
#

Same, but the ceiling.

still forum
#

Wanted to say ceiling but my brain didn't find the word

little eagle
#

cailing

#

Jesus

#

ceiling

dapper path
#

No like I want to take a normal car and edit it to have lightbar etc

still forum
#

create scripted light points and animate them and stuff probably

little eagle
#

You can't script that. You will have to edit the model.

gleaming oyster
#

Stare at the ceiling? Wtf?

little eagle
#

mudnut, how old are you?

dapper path
#

Ok... anyone know of a good tutorial on this... I cant seem to find it

still forum
#

If you were in school you should know the situation of just not wanting to do something and prefering to just do nothing over doing what you should do

#

Tons of life servers probably made something like that.
But they probably don't want to share their top secret technology :kappa:

gleaming oyster
#

My information reads 18, but why does it matter?

little eagle
#

It's okay. :~)

wary vine
#

can i make my own list of autocompletes for a specific control ?

still forum
#

"autocompletes"?

little eagle
#

Well...

wary vine
#

not something i have ever looked into

craggy dune
#

Hey, has anyone an idea if you can set a default Frerquency for Civs on TFAR? Or does this use the GUER Setting as well?

still forum
#

civ uses guer

#

but you can manually script that if you reaaaally wanted it

little eagle
#

Why is that? Sounds weird.

gleaming oyster
#

Lifers

little eagle
#

Fix it, Dedmen.

still forum
#

Like instead of using default frequency. Just use a eventhandler on radio assigned. And then manually set the freq

gleaming oyster
#

How old are you commy? 🤔

little eagle
#

27

gleaming oyster
#

Fair enough

still forum
#

Thinking about that.. Why do life servers choose to use civilian side and then try to fix all the problems with that instead of just using blufor for everyone?

little eagle
#

lol

#

Wanna trade?

wary vine
#

so basically if i start typing in a string , if the strings in an array matches, it kinda gives a list of matches ?

gleaming oyster
#

Trade what? Age? Sure

dapper path
#

So that they can have a police force?

still forum
#

Is autocomplete in general even possible? I know debug console has something like that

#

Like yeah.. bla bla intercept bla bla.. but otherwise...

little eagle
#

As a kid, sometimes I just wanted to stare outside the window. Look at the clouds. Now I can't do that anymore, too many distractions and things that need to be done. :/

wary vine
#

i could probably do a bodge fix with a combo / edit box

little eagle
#

Dedmen, keyDown eh, ctrlSetText

still forum
#

oh boi

#

well.. I wouldn't want to take that effort

little eagle
#

I think the real issue is the cursor movement.

#

well.. I wouldn't want to take that effort
Me neither, because the cursor is stuck.

craggy dune
#

thanks for the info

gleaming oyster
#

Depends on who you are and where you are at as a kid. Looking outside is sort of a absent thing for kids these days. Phones take up their vision

verbal otter
#

@little eagle ty

little eagle
#

What for?

wary vine
#

commy wouldn't you use key up not keydown for an autocomplete ?

little eagle
#

Maybe.

#

You'll have to use KeyDown to intercept™ the tab key tabbing out of the control.

gleaming oyster
#

™ <--

wary vine
#

not looked into intercept

little eagle
#

™™

#

I wasn't talking about intercept.

gleaming oyster
#

TM TM
Trademarking a trademark? Don't we have a sort of inception here?

wary vine
#

interception™

gleaming oyster
#

Paradox

little eagle
#

I think the state owns the trademark to the trademark.

gleaming oyster
#

🤔

little eagle
#

:thonk:

gleaming oyster
#

Heh. Say, is it possible to run a serverCommand without any acess to the server command password? I know the alt syntax you can input the password manually. However, if i didn't want it to be static or read by a user peeping on the mission contents how would i go about this?

wary vine
#

readfiledll

#

and serverfuction

gleaming oyster
#

Eh. It seems like it needs to be in ui evh

#

I want to keep everything within mission contents.

#

Does serverCommand care who is executing the comand if it's local to a client using the ui?

little eagle
#

The client has to have access to the command.

gleaming oyster
#

Right, so i guess we have nifty -> admin command now

little eagle
#

?

steady terrace
#

what am I missing here? error missing ']'

while {true} do {[]remoteExec [heal.sqf, 0]};

gleaming oyster
#
If(admin player != 0) then
{
    //is admin
};
little eagle
#

montarion, this is not how remoteExec or SQF for that matter works.

#

admin command reports a number, not a boolean.

wary vine
#

["heal.sqf"] remoteExec ["BIS_fnc_execVM", 0];

gleaming oyster
#

I see

#

fixed ?

little eagle
#

No.

#

admin requires the owner id.

#

Not an object.

solid ruin
#

Hello guys) Requires a responsible person to support the script partion of the RP server on your terms.

wary vine
#

if !((admin (owner player)) isEqualTo 0) then
{

};

gleaming oyster
#
If(admin (owner player) != 0) then
little eagle
#

Still doesn't work. owner only works on the server, and on a dedicated server, player is null.

gleaming oyster
#

So, a) remoteExec it b) pass player to server ?

little eagle
#

I forgot what you're trying to do.

gleaming oyster
#

At this point i am just looking at the usage of admin, it originally was ui evh with serverCommand

steady terrace
#

oh. thanks @little eagle and @wary vine !

wary vine
#

that might help you mud

little eagle
#

Just use these and not that command.

gleaming oyster
#

Alright lol

little eagle
#

The command is pointless crap :~)

#

Guess having it makes sense, but the implementation is horrible.

#

Oh, it even says the whole admin command only works on the server. Well thanks for nothing.

wary vine
#

if you can basically do the same with the available command its pointless

gleaming oyster
#

ServerCommandAvailable was the original method iirc

ruby breach
#
(call BIS_fnc_admin == 2)
little eagle
#

Was about to post that, but that function is literally the same as what I posted.

ruby breach
#

Yup

velvet merlin
#

Added: New ctrlAnimateModel and ctrlAnimationPhaseModel script commands
anyone tried this yet by now?

#

or is this only for the compass stuff

gleaming oyster
#

define IS_ADMIN_LOGGED serverCommandAvailable "#shutdown" , oh. Yeah this is no different

half monolith
#

if (call BIS_fnc_admin isEqualTo 2) then heres how we use, you could alter?

little eagle
#

🤔

half monolith
#

i came bearing a gift but i have question, about vehicle respawns, we are using
BIS_fnc_moduleRespawnVehicle
im try to understand what the third last condition is doing.
position selection type (0 = random, 1 = newest, 2 = oldest)
what is newest/oldest?

little eagle
#

I wouldn't use the function, if it's meant to be executed by a module.

half monolith
#

ok , noted, but do we know the answer to the question?

wary vine
#

createVehicle, waitUntil vehicle is dead >> create vehicle again

little eagle
#

By not using the function, but the module instead. Those modules have a ui and it probably says more explicitly what everything does.

gleaming oyster
#

Could be when the respawn points were created 🤷 shrug .

half monolith
#

the condition above this is what does that, i believe

little eagle
#

At least try to read the module ui in the game. It will tell you what it does.

half monolith
#

ill look at the module see if i can get anything from it :

#

thanks..

wary vine
#
private _respawnTime = 60;//60 seconds.
for "_i" from 0 to 1 do {
    private _vehicle = "classname" createVehicle [x,y,z];
    private _timeSpawned = time;
    waitUntil {
      (!alive _vehicle) ||
      (time >= (_timeSpawned + _respawnTime))
    };
};
still forum
#

time = (_timeSpawned + _respawnTime) that doesn't work

wary vine
#

feck

still forum
#

time is a reserved variable. And using nothing on || won't work too

half monolith
#

we do have the suggested way of doing things. however i noticed an issue .

little eagle
#

this respawnVehicle [30, 0]
Into the init box.

half monolith
#

so we testing this way

wary vine
#

arma doesnt like exact times

unborn ether
#

It likes exact times when the source of the time is the same all the time, server for example with its serverTime

still forum
#

Nope it still doesn't.

little eagle
#

It likes exact times when the source of the time is the same all the time
Jesus

still forum
#

You just cannot execute anything when no script is being executed.

#

The times are atmost exact to frametime

#

which can be low as we know arma..

little eagle
#

The tick time doesn't care about frames tho.

unborn ether
#

Well, still the best to get one time from server, or execute time-based action on it (if its so critical ofc). Relying on current PC time for critical tasks never been good for me.

#

AFAIK time and even serverTime is different for each connected PC?

little eagle
#

time starts at 0 when you JIP and diverges, serverTime is synched at JIP, but also diverges afaik.

#

Also serverTime is broken in SP.

#

So sad, why don't they fix stuff like that,,,

#

I think serverTime also jumps backwards a minute after you connect or something weird like that,

still forum
#

Do you guys think a "fileExists" script command that checks if give filepath exists in pbo or via filePatching could be a security risk?

little eagle
#

How would it be?

still forum
#

With filePatching one could use it to enumerate all files in Arma directory and then read them with loadFile.. Atleast if filePatching is active which in itself is already a security risk

unborn ether
#

no, since you have preprocessFile|LineNubmers

little eagle
#

Don't put anything critical into the Arma directory. It's not like you you could search C in the editor a few years ago.

#

And esp. loadFile.

unborn ether
#

oh yeah that one too ^

little eagle
#

fileExists should've been a thing from 1.0

still forum
#

I guess you can already enumerate all files via loadFile anyway

little eagle
#

Or just debin the pbo.

still forum
#

I'll add that once Dwarden tells me that now is the right time to dump a few script command requests

little eagle
#

Does it mean anything if they still bother with SQF after the last DLC?

still forum
#

they added new commands today. So I guess there is more coming

unborn ether
#

I would like to see something like dropBackpack|dropUniform|dropVest or dropWeapon existing 😄

little eagle
#

removeWeaponCargoGlobal

#

etc.

unborn ether
#

dreams 😦

still forum
#

we don't have drop commands yet?

little eagle
#

getObjectCargo, setObjectCargo

unborn ether
#

oh good would fap to that one

little eagle
#

We have a drop action, but it aborts when you turn your avatar and is therefore super unreliable.

still forum
#

I didn't look into removeWeaponCargo commands.. Might not be that hard to implement

little eagle
#

getObjectCargo, setObjectCargo over removeWeaponCargo etc.

unborn ether
#

Yeah, because the only way now is just to wipe it out. pain.

still forum
#

but removeWeaponCargo would take weapon classname. And if you have multiple weapons. Some with attachments, some with magazines.
Which to choose?

little eagle
#

I choose

#

getObjectCargo, setObjectCargo

#

tbqh

unborn ether
#

Well for that one it just can be the first met, the one that commy2 states will fit that request more.

still forum
#

what do you propose for the format?
[weapons, items, magazines, backpacks]
magazines are array of [classname, ammocount].
weapons are array of [classname, side, top, muzzle, bipod, magazine, secondary magazine]
And backpacks... Oh god.. backpacks..

little eagle
#

How does removeItem pick the weapon when used on a rifle in a backpack 🤔 ?

little oxide
#

Dedmen, you can use magazinesDetail to get ID and use removeWeaponCargo with ID in parameter

still forum
#

No I can't.

#

Please leave.

little eagle
#

I too read the wiki.

unborn ether
#

for ammocount you can separate it to removeMagazineAmmoCargo (long asf tho)

little oxide
#

getVehicleLoadout can be a good one, like getUnitLoadout but for vehicle

little eagle
#

Don't name it "vehicle".

still forum
#

We are already talking about that. That's getObjectCargo.

little eagle
#

It would work on ammo boxes. Just "object".

still forum
#

what do you think about the format I posted above?
backpacks would nest kinda deep. But you can't put backpacks into backpacks right? atleast in vanilla. So that shouldn't be too bad

#

also items have to be [classname, count]
theoretically... could/should be the same for magazines and weapons.. ugh

unborn ether
#

Ofttopic: actually you can have backpack in backpack and getUnitLoadout gives interesting result, instead of its count it gives BOOL

little eagle
#

I'm sure you can write something down that makes sense. :~P

still forum
#

So getUnitLoadout would break in that case? Then I have nothing to fear. If my implementation is broken then.. ¯_(ツ)_/¯

little eagle
#

The inventory system is poop.

#

I said this in 2013.

#

I say it in 2018.

still forum
#

uses search function

#

you didn't say it here 😉

little eagle
#

discord isn't that old, dummy.

still forum
#

you said it in november 2016

little eagle
#

keep looking.

still forum
#

no

#

I will leave now.

#

Too much 💩 here

little eagle
#

o\

#

💩 is love

#

💩 is life

wary vine
#

umm

#

I have gone through all the colors on a listbox

#

I cant seem to stop it pulsing to white xD

little eagle
#

maxHistoryDelay = 0;

wary vine
#

I want it to pulse but not white if you know what i mean xD

little eagle
#

Probably can't then.

wary vine
#

balls xD

#

maxHistoryDelay = 0; still flashing xD

little eagle
#

🤔

wary vine
#

period = 0;

#

stopped it

little eagle
#

Cool. I knew there was some entry for the delay.

wary vine
#
  colorSelect[] = {0.1,0.1,0.1,1};//When Hovering over selection
  colorText[] = {0.3,0.3,0.3,1};//Color of text
#

for the flashing text too

little eagle
#

Didn't you say you tried them all?

wary vine
#

yh

#

no idea how i didnt notice it

#

it was 0.6

#

but it looked white

little eagle
#

1,1,1,0.6 is a ligher grey

quasi rover
#

Current default value of radius parameter of addAction is 50m. Is it the same value compared to previous one(before the Tank DLC)? I think addAction is activated from longer distance than before Tank DLC

little eagle
#

Pretty sure it's 15, not 50.

quasi rover
#

thx, commy2

half monolith
#

default is more than 15.

#

hgad to change it all after update

#

i have a video showing this i dunno if link here

ruby breach
#

Biki currently says 50

errant jasper
#

If you create a CBA settings addon that contains the userconfig\cba_settings.sqf that only overwrites Server kind settings, does it need to be loaded by clients also, or is it enough with just the server?

little eagle
#

server would be enough if those settings are set to overwrite the clients.

errant jasper
#

ty

peak plover
#

Turing a script into a mod?

arctic veldt
#

Yea

#

@peak plover I also saw your name in the credits 😉

peak plover
#

Probably another nigel

#

U'd wanna use cfgFunctions in ur mod config

#

like this

#

from \common\Arma 3\Addons\functions_f.pbo

#

u should call it like

#

mm

#

or mit

#

not ace

arctic veldt
#

Yeah this was named that way the second time around, I can see why I shouldn't so I'll rename it

little eagle
#

ACE
What are you doing?!

peak plover
#

overwriting all your hard work ? 😄

arctic veldt
#

:kappa:

little eagle
#

Just saying that to avoid collisions, I wouldn't use someone elses OFPEC tag.

arctic veldt
#

Yeah I didn't think very hard

little eagle
#

thonk*

arctic veldt
#

thinked

little eagle
#

think thonked thunkt

arctic veldt
#

😄

little eagle
#

CfgPatches?

arctic veldt
#

Don't have it, I didn't believe it was needed

little eagle
#

Without CfgPatches, your config is ignored.

arctic veldt
#

Ohhh

#

@little eagle thanks a tonne, that sorted it 😂

little eagle
#

config crash course

arctic veldt
#

I've had previous experiences with the configs but I've never picked up CfgPatches is a must-have

#

Or may stop stuff from loading/working

exotic tinsel
#

is it possible to add a runway that shows up on the pilots hud for landing? i know i can slap some run way parts down but how do i get a player built run way to be used for auto landing and visible in the pilots hud?

half monolith
#

it may help, maybe not

exotic tinsel
#

@UD1E#2095 thank you

ornate pawn
#

does anyone here knows how to create visual effect with scripting?

tough abyss
#

@ornate pawn describe "visual effect"

ornate pawn
#

well i believe this was created using swfx

#

sweetFX *

#

here's the original video

warm gorge
#

How do I simulate a shift + left click waypoint marker on the map through scripting? Is there a scripting command to set it the same way?

ornate pawn
#

anyone knows how to disable AI voice?

#

like no voice

#

without having to use a mod.

viral gust
little eagle
#
0 = this spawn {_this setSpeaker "NoVoice"};

?

ornate pawn
#

yeah i don't want to disable radio..

#

thanks @little eagle

warm gorge
#
private _destinations = ["marker1", "marker2", [3757, 13481, 0], [3957, 13481, 0]];
private _destination = [];

{
    private _markerPos = [getMarkerPos _x, _x] select (_x isEqualType []);
    private _distance = player distance _markerPos;

    if (_distance > 500 && {_distance < 5000}) exitWith {
        _destination = _markerPos;
    };
} forEach _destinations;

Anyone see an error in this code? I'm getting this error: 15:21:31 Error in expression <ons_destination=[];{private _markerPos=[getMarkerPos _x,_x]select(_x isEqualType>
15:21:31 Error position: <getMarkerPos _x,_x]select(_x isEqualType>
15:21:31 Error getmarkerpos: Type Array, expected String

viral gust
#

It'll fail on the 3rd and 4th "Destination" in your destinations array because it's passing as an array

warm gorge
#

But im doing a check with _markerPos to see if it's an array or not. Otherwise it wont run getMarkerPos

little eagle
#
private _destinations = ["marker1", "marker2", [3757, 13481, 0], [3957, 13481, 0]];
private _destination = [];

{
    private _markerPos = _x;
    if (_markerPos isEqualType "") then {
        _markerPos = getMarkerPos _markerPos;
    };

    private _distance = player distance _markerPos;

    if (_distance > 500 && {_distance < 5000}) exitWith {
        _destination = _markerPos;
    };
} forEach _destinations;
#

@warm gorge Do it like this.

warm gorge
#

Alright ill give that a go, strange why it would bug out though with the way I did it

little eagle
#

Not strange. The array is evaluated before the condition.

#

top to down, left to right.

viral gust
#

I wish the arma scripting language was strongly typed -_-

warm gorge
#

Ah I see what you mean

#

Thank you 😃

little eagle
#

Since z is always 0, and you're using
OBJECT distance ARRAY
which assumes the ARRAY is AGL,
I'd use distance2D for the correct distance of those two positions. Yours is always a bit larger atm.

#

Alt add this before the distance check:

_markerPos set [2, getTerrainHeightASL _markerPos];
_markerPos = ASLToAGL _markerPos;
warm gorge
#

Alright ill change it to distance2D I think

little eagle
#

Well, disregard. AGL also has z=0 unless your player is flying around. It's okay.

#

Sorry, a bit early.

warm gorge
#

All good haven't changed anything yet 😃

warm gorge
#

Is it possible to set a map waypoint the same as when you shift + left click on the map?

viral gust
#

@warm gorge You'll have to create it manually with a rectangle on top of an ellipse. It doesn't appear to be the standard marker we all know and love

warm gorge
#

Alright cheers

sly trench
#

Who knows how to build a coop MP mission in the campaign? Are there any such campaigns except apex

meager heart
#

Is it possible to set a map waypoint the same as when you shift + left click on the map?
not the same, but you will have couple more options with this

0 spawn {
    disableSerialization;
    private _ctrlW = 2;  
    private _ctrlH = 1.25;  
    private _posX = (safeZoneX + (safeZoneWAbs / 2)) - (_ctrlW / 2);  
    private _posY = (safeZoneY + safeZoneH) - _ctrlH;
    private _display = findDisplay 46 createDisplay "RscDisplayEmpty";
    private _ctrlMap = _display ctrlCreate ["RscMapControl", -1];

    _ctrlMap ctrlSetPosition [_posX, _posY - 0.25, _ctrlW, _ctrlH];
    _ctrlMap ctrlCommit 0;

    player onMapSingleClick {
        if (_shift) then {
            private _wp = group _this addWaypoint [_pos, 10];
            _wp setWaypointType "MOVE";
            _wp setWaypointDescription (profileName + "move there and do something!");
        };
    };
};
```try it in the console ^
#

@warm gorge

warm gorge
#

I might be able to work with that, cheers

glad venture
#

could I use a custom texture for BIS_fnc_setUnitInsignia and does it have to be defined in description.ext or could i just link it like /textures/logo.jpg?

still forum
#

you can use setObjectTexture basically

#

so yes. You can use a custom texture

winter rose
#

but I heard there is a bug with setObjectTextureGlobal and relative paths, be wary

glad venture
#

@still forum i don't want to use set object texture because it will be just small logos that are different and I don't want to have to create a full texture for each one because the mission file will be too big

still forum
#

BIS_fnc_setUnitInsignia uses setObjectTexture

#

there is no alternative if you don't want to use that.
So not possible then.

glad venture
#

well with setUnitInsignia only the insignia has to be there right? so it would only be like a 128x128 for each different one?

winter rose
#

yes

#

you can setObjectTexture only on the insignia spot though

glad venture
#

oh so is it just index 1?

winter rose
#

this ^ BIS fnc function is doing the job

glad venture
#

oh

#

so just setObjectTexture[1,"logo.png"]; ?

still forum
#

I don't know which index. But one of them certainly

glad venture
#

or is 1 for backpack?

still forum
#

The backpack is a seperate object

#

a setObjectTexture on the uniform can't possibly do anything on the backpack

glad venture
#

would i do player setObjectTexture or (uniform player) setObjectTexture, player setObjectTextureGlobal has been working for me

still forum
#

uniformreturns a string.
What type does setObjectTexture expect? Object. correct.
Is a string a object?

little eagle
#

no!

warm gorge
#

I've always had issues with setObjectTextureGlobal on units not syncing properly all the time. Havent been able to identify exactly when the textures dont sync, but I know that it doesnt function correctly

misty trail
#

Hi all i am trying to get an array of all markers that have turned Green on my map but cannot work it out _arr = allMapMarkers select {(markerColor == "ColorGreen") } but i get an error Error Invalid number in expression

still forum
#

it doesn't magically know what marker you might mean

winter rose
#

select { markerColor _x == "ColorGreen" } I believe

misty trail
#

Ahhh perfect no errors 😃

winter rose
#

👍

strange urchin
#

If you use setObjectTexture with your own custom textures, I believe you’ll want to get the path of the actual mission pbo if that’s where your texture is stored. There’s a trick on how to do it, don’t remember what it was.

#

Ah, here it was

meager heart
#

could I use a custom texture for BIS_fnc_setUnitInsignia and does it have to be defined in description.ext or could i just link it like /textures/logo.jpg?
I've always had issues with setObjectTextureGlobal on units not syncing properly all the time.

//--- Description.ext
class CfgUnitInsignia
{
    class mbadge
    {
        displayName = "Combat medic badge"; 
        author = "random dude"; 
        texture = "pictures\medic_badge.jpg"; 
        textureVehicle = ""; 
    };
};
//--- script
[_unit,"mbadge"] remoteExec ["BIS_fnc_setUnitInsignia"];
```works ^ was no troubles 🤷
misty trail
#

OK some advice please I am using EOS and trying to save the zones when cleared and restore on restart of server so I have got the array of cleared Zones :-
_arr = allMapMarkers select { markerColor _x == "ColorGreen" }; profileNamespace setVariable ["X_mission_C_Zones", _arr];

As I am using profileNamespace will this save on the server or local for everyone
fleet wind
#

If you use saveProfileNamespace Saves the variables stored in profileNamespace to the persistent active user profile.

misty trail
#

Cheers

still forum
#

profileNamespace saves wherever you set that variable. If you set it on the server then it will be saved on the server

meager heart
#

server also have "user profile" and profileNamespace... ^ so possible both options (server/client)

misty trail
#

Thanks seems to be on server then 😃

errant jasper
#

@meager heart Did you test this with join-in-progress? Looking at the code it does not look like it would work.

misty trail
#

err nope not yet good point !

tender fossil
#

Is is possible to scan messages sent on MP server?

still forum
#

"messages"?

tender fossil
#

Chat messages I mean

little eagle
#

No.

tender fossil
#

Eg.: SIDE CHANNEL: Ezcoo: "get rekt nub"

little eagle
#

Kind of. You could read it before sent by script running on the clients.

still forum
#

you can check what clients are sending out on clientside.
But you cannot monitor stuff serverside

tender fossil
#

Yeah, I was thinking of a server side solution... But manually scanning the msgs on clients is fine too

still forum
tender fossil
#

That's nice to know @still forum

#

Though it's an unmodded server

still forum
#

¯_(ツ)_/¯

little eagle
#

Once the messages are sent, there is no way to read them.

#

The chatlog is STRUCTURED TEXT and you can't read that.

#

Only the edit box from the chat (not chat log) can be read, because it's STRING.

still forum
little eagle
#

intercept can read TEXT?

tender fossil
#

Could maybe do some very hacky solution with RCon and database 😛

still forum
#

yeah that too.
But that is too not readable on serverside

little eagle
#

RCon?

tender fossil
#

Battleye

little eagle
#

That's a creative abbreviation.

tender fossil
#

Remote Console

#

BE RCon

little eagle
#

¯_(ツ)_/¯

#

Is this for word filters?

still forum
#

no

tender fossil
#

Yes

still forum
#

oh wait

#

Thought rcon 😄

little eagle
#

Yeah, could write that with cba, without, idk.

tender fossil
#

Just playing with the idea of monitoring the chat channels for insulting or otherwise hostile messages, and genuinely guiding the player to talk in more friendly way, then warning and finally kicking the player

still forum
#

That serverside admin supertool that I know could easily do that. Filter out words and then send the censored messeage to other clients instead of the original

little eagle
#

Why censor? Can't you replace the insult with something funny and/or self defeating?

still forum
#

That is called "modern censor"

little eagle
#

You not only have to read the sent message, you also have to block it, and I really doubt this is possible even with addon.

tender fossil
#

You beautiful hunk, stop it omg

#

I can see that already working ^^

still forum
#

you can remoteExec to all clients and tell them to spawn a black box over the chatbox so that no one can read the message

austere granite
#

<REDACTED>

little eagle
#

The chat box can be moved in the LAYOUT menu, though I'm pretty sure you could read the position anyway.

#

I blame this again on the chatbox being hard coded, and not scripted.

still forum
#

Enfusion will fix

little eagle
#

Best is probably to kill it and replace it with your own chatbox.

#

Nah, you could easily make your own chatbox. Even server command could be handled.

#

It's just that no one bothered yet, or no one could figure out how.

#

Maybe I'll write it like that scripted lobby if I have free time.

#

Sounds mildly fun.

still forum
#

remoteExec and custom UI doesn't sound that hard

little eagle
#

Yeah, it's definitely possible.

still forum
#

hide default chat list. And use CBA chat EH.

#

Just problematic for scripted/engine stuff

#

AI messages. systemChat and other chat commands

little eagle
#

I could do it with only mission I think.

#

The chat wouldn't include systemChat / AI etc.

#

It would be a separate chat for the players.

#

Could even move that in LAYOUT menu, but that would require addon again. :/

austere granite
#

Best is probably to kill it and replace it with your own chatbox.
I had a WIP for it, but i ran into some annoying issues there

#

Can't remember what it was exactly

little eagle
#

The dumbest thing, mission only, is checking each frame if the chatbox is opened.

austere granite
#

was mostly out of annoyance with the ** Connecting, ** is using modified data file ** conntected spam * 50000

#

sick markdown

little eagle
#

markdown is good , markdown is great

austere granite
#

markdown has very consistent syntax across all implementations!

#

Header please thanks

#

oh no wait

little eagle
#

???

frank ruin
#

Can you use

#

camSetTarget

#

On a picture element in a dialog?

#

Therefore lets say show a particular piece on the map in a dialog window.

#

Serving as maybe multiple locations on the map in a sort of security cam dialog ?

#

Or can you only assign it to an object or player ?

still forum
#

camSetTarget set's the camera target

#

You mean you want to set the camera target onto a sepcific object?

#

or you want to show the 2D map?

little eagle
#

camSetTarget requires OBJECT, not CONTROL, so no.

frank ruin
#

I want to show a 3d view of a location.

#

And preferably multiple 3D view (spectator view) of locations.

#

And this in a dialog window.

#

As a CCTV kind of setup ... 😉

#

Is such thing possible?

little eagle
#
private _mission = uiNamespace getVariable "RscDisplayMission";
private _map = _mission ctrlCreate ["RscMapControl", -1];
_map ctrlSetPosition [0,0,1,1];
_map ctrlCommit 0;

Do this in debug console

#

Maybe it's close to what you want.

frank ruin
#

That's 2d view.

#

I would like to see the 3d view in such format lets say ...

#

Withouth spectating fully ...

little eagle
#

🤔

On a picture element in a dialog?
Those are all 2d though.

still forum
#

render to texture also works in dialog

#

I guess that's what he means

little eagle
#

r2t will not work nice on that distance though.

#

It like craps itself for objects farther away than 100 meters.

frank ruin
#

Can I run for example multiple spectating of people. In a dialog with multiple boxes displaying the cams on those persons?

still forum
#

mcc sometimes creats a small helmet cam thingy. That works fine over half of the map

little eagle
#

Doubt you can make a bird perspective with r2t.

#

Sure, but only objects 100 m around the camera.

still forum
#

ahhh that.. yeah

little eagle
#

Can I run for example multiple spectating of people. In a dialog with multiple boxes displaying the cams on those persons?
I just told you why you can't -__-

#

Well, not from bird view at least.

frank ruin
#

Don't need birdview.

#

I would need like the behind the person view.

#

What you get when you would spectate a person.

little eagle
#

Do you know what pip is?

frank ruin
#

Pic in pic right?

little eagle
#

Yes. That's the closest you can get to displaying something else than your avatar, more than one thing on the screen at a time.

#

And it's really ugly looking.

#

Nothing close to an actual spectator where you only watch one unit.

frank ruin
#

["rendertarget0",[[heli1,heli1 selectionposition "slingload0"],cargo1],heli1,false] call BIS_fnc_PIP;

#

You wouldn't be able to push this in a dialog would you?

little eagle
#

Not with that function at least .sec

#
private _mission = uiNamespace getVariable "RscDisplayMission";
private _cam = _mission ctrlCreate ["RscPicture", -1];
_cam ctrlSetText "#(argb,256,256,1)r2t(rendertarget0,1.0)";
_cam ctrlSetPosition [0,0,1,1];
_cam ctrlCommit 0;

Maybe try this?

frank ruin
#

Doesn't pop anything.

little eagle
#

Even if you create it after the BIS_fnc_PIP ?

#
private _mission = uiNamespace getVariable "RscDisplayMission";

private _cam = _mission ctrlCreate ["RscPicture", -1];
_cam ctrlSetText "#(argb,256,256,1)r2t(rendertarget10,1.0)";
_cam ctrlSetPosition [0,0,1,1];
_cam ctrlCommit 0;

private _camera = "camera" camCreate getPosWorld player;
_camera camCommit 0;
_camera cameraEffect ["INTERNAL", "BACK", "rendertarget10"];

What about this?

glad venture
#

how would I go about drawing a name tag above an ai?

little eagle
glad venture
#

how would I put it above an ai's head? I tried changing the height and using getposATL but they are both by the feet

still forum
#

Move it higher...

#

If you increase the height of the icon position.. It will be higher

little eagle
#

The part where you use
getPos cursorTarget
You add 2 meters to the z.
Like
ASLToAGL getPosWorld cursorTarget vectorAdd [0,0,2]

#

Btw., dedmen, can you fix the wiki?

still forum
#

probably

#

you have 10 minutes before I go to bed

unborn ether
#

@frank ruin If you want to make CCTV you can use r2t as preview, its quality is usually not so good on far distances even on high settings. Most of players turn that to low, so its even worse. To actually spectate, its better to use actual camera.

little eagle
#

Nuke the onEachFrame from that page, and also change the getPos AGLS to something that actually uses AGL.

#

Example 1 & 2 I mean.

still forum
#

getPos AGLS where?

little eagle
#

Example 1 & 2

frank ruin
#

@little eagle That did work,mm

still forum
#

I don't see AGLS though

little eagle
#

@frank ruin Nice.

#

I'm sure you can make something usable out of that then.

#

getPos?

still forum
#

Change to what?

little eagle
#

The command needs AGL, but getPos is AGLS

#

The example uses the wrong format.

still forum
#

I don't know what command returns AGL

little eagle
#

ASLToAGL getPosASL

still forum
#

ASLToAGL getPosASL cursorTarget ?

little eagle
#

Yep.

#

Looks derp compared to getPos, but getPos is wrong and will fail in houses, on rocks etc. You know this.

austere granite
#

getPos is what brainlets use

little eagle
#

player in player

still forum
#

fixed then I guess

austere granite
#

getPosRealVisualAGL is the best command

little eagle
#

For a second I thought that was a thing.

glad venture
#

do I use on each frame for every player or addMissionEventHandler?

still forum
#

That question doesn't add up in my brain

#

Ahhh

#

re-read it.

#

addMissionEventHandler then

#

I guess. Because "for every player" doesn't make much sense

little eagle
#

onEachFrame doesn't work more than once, as the last one overwrites the previous one.

#

It's just for debugging.

glad venture
#

but oneachframe is local right?

still forum
#

all eventhandlers (besides addMPEventHandler) are local

little eagle
#

Yes, but a different script may use it too, and you'll break that or it will break yours. So don't.

still forum
#

never use onEachFrame only use EachFrame in addMissionEventHandler or the BIS_fnc_addStackedEventHandler

little eagle
#

Or Draw3D in this case.

still forum
#

oh.. yeah.. EachFrame is wrong in any variant for this. Draw stuff should be in Draw3D

nimble mural
#

Hey ive got a quick question im trying to apply a custom texture within the editor on a headgear, is anyone aware of a way to do this in editor? Or will I have to go straight to using a config to test my texture?

still forum
#

config

nimble mural
#

Thanks

little eagle
#

Addon config even.

still forum
#

there are only commands to retexture vehicles via script. aka backpack or units or... vehicles.
But helmet and night vision and weapons and weapon scopes and... goggles are all "weapons"

little eagle
#

Can't even retexture vests. :/

little oxide
#

It's possible to play an animation to an unit when i'm inside the eden editor ?

still forum
#

there is vestContainer but never tried that. I know backpackContainer returns the backpack itself. So maybe vestContainer...

little eagle
#

While inside the editor, no time passes, and since animations need time, you can't play an animation in the editor.

little oxide
#

Ok thanks for the clarification

little eagle
#

Dedmen, doesn't work. It works for the backpack, because the backpack is it's own container, while the vest and uniform use a dummy object.

still forum
#

such a dummy thing that arma thing

little eagle
#

something something inventory system, something something poop

#

I wish

#

.>

still forum
#

hey moderatörs! commy is being poopy again

#

runs away

little eagle
#

✊🏼

gleaming oyster
#

Whats with the 🔨

glad venture
#

is there a way to wait until the player has spawned in?

wary vine
#
waitUntil {
  (isPlayer player) 
  &&
  (!isNull (findDisplay 46))
};
meager heart
#

@errant jasper if your question was about insignia, never had any troubles with jip's (was using it for units only, dedicated/local host) 🤷

#

also wiki note "Do not remote execute" but without re was fails...

jade abyss
#

@still forum DAMN FURRY!

meager heart
#

fürry* 😄

jade abyss
#

and @deft dock smells like old banana

deft dock
#

@jade abyss smells like my ballsack after 2 days of not showering

jade abyss
#

awesome?

deft dock
#

not by your sisters face expression once on her knees

#

¯_(ツ)_/¯

jade abyss
#

Erm, you mean my brother, right?

#

Anyway, everyone got it's fetish/kinks

deft dock
#

if so, tell him he's very feminin

little eagle
#

REVEILLE

jade abyss
#

Yeah, possible, Chirs

#

Rewhat? Macrommy?

little eagle
deft dock
#

ok, back to important stuff

jade abyss
#

ah

winter rose
#

« Réveil » meaning "wake-up" indeed 👀

meager heart
#

🔔

little eagle
#

I have it on my phone to wake up coworkers, classmates etc. that sleep on their desks.

meager heart
little eagle
#

Sure, but that's just loud. So you actually need a loud device for it.

jade abyss
#

fart?

little eagle
#

too smelly and doesn't work on command

jade abyss
#

noob

#

😄

austere hawk
#

just take a hand crank siren

exotic tinsel
#

is there a way to detect if plane is over water or land? trying to make sure my ai paratroopers only eject over land if the target is near a coast

unborn ether
#

@LifeSnatcher#6222 getPos results in AGLS position type, so that measures from both sea/terrain contact

#

And if have one, so assume your Z-coordinate is the one that will show height from anything.

viral gust
exotic tinsel
#

will surfacetype work if i use the plans position in the air?

viral gust
#

It takes 2D position so you'll just have to select 0 and select 1 to pass it's X and Y

exotic tinsel
#

rgr, thanks guys

viral gust
#

You'll probably more specifically want the surfaceIsWater syntax that you linked to as it's more geared to your specific need

little eagle
#

surfaceIsWater ignores the z, so you'd use getPosWorld if you wanted to be the most efficient.

exotic tinsel
#

yup, its working great, thanks guys

meager heart
#

_plane distance2D _pos 🤔

gleaming oyster
#

Wait, couldn't you measure the angle from which the object is to the player? Since if you were to use the distance 2d as the adjacent side amd the distance as hypotenuse side you'd technically be able to get the theta?

meager heart
#

we have bis_fnc_getPitchBank

#

also vectorDiff maybe

still forum
#

throws 🍌 at @jade abyss
DAMN DUDE WITH BANANA IN HIS FACE!

gleaming oyster
#

Look at me trying to over complicate things lol. I don't trust BiS functions anymore though. Always a overcomplicated solution

still forum
#

there is a getPos syntax that returns the angle I think

#

A wait. That was the opposite. I'll find it for ya

gleaming oyster
#

No, i think youa are thinking of getDit

still forum
#

😄

gleaming oyster
#

:D lol

#

GetDir only cares about the direction in relation to two objects though right?

#

Not necessarily the angle?

meager heart
#

afaik that is getRelDir

still forum
#

It returns the angle as if the first object was facing northwards

meager heart
#

^

still forum
#

getRelDir takes the object. It might take the angle the object is currently "looking" at into account. Thought the wiki page doesn't really say that

jade abyss
#

BAANNNAAANNAAAAAAA

winter rose
#

« Returns direction, which is relative to object's current direction, from given object to another object » was already there, but it's even clearer now

meager heart
#

clearness increased

tender fossil
#

Is there a way to check which scope player is using at given moment? Eg. whether he's using binoculars or some 8x scope

still forum
#

binoculars are not a scope

tender fossil
#

Well, binoculars or a scope 😛

still forum
austere granite
#

cameraView == "GUNNER" @tender fossil

#

to check if person is actually using scope / binos

winter rose
#

^ executed on the client obviously

high prism
#

If you remoteExec things (that are filtered) from the server to the client, would that still trigger the Battleye filter?

tender fossil
#

Thanks @still forum @winter rose @Adanteh#0761 ! 😚 👍

gleaming oyster
#

@still forum Thanks for revised desc. I'll have to use this in an interesting way.

fossil yew
#

I have a "framework" mission with roughly 400 AI belonging to rival sides (west and east) all over Malden, dynamic simulation turned on and two side of players (roughly 25 players) playing in the same area. After roughly hour of play, stuttering in the mission occurs every 2-3 seconds. I can't find the source of stuttering - there is no scripting code running every 2 seconds - spawning of AI occurs very rarely (twice in 60 minutes, 2 groups only).

Can anyone give me some pointers what to look for?

tough abyss
#

@fossil yew I don’t know if this is a possible answer, but are you offloading so off the server?

fossil yew
#

care to elaborate?

gleaming oyster
#

Get an HC

#

Delete ai players cannot see

#

Recreate them when in zone or in visible range

warm gorge
#

Is setObjectViewDistance [0, 500] the same as calling setShadowDistance 500?

gleaming oyster
#

@warm gorge I would assume so. But why set object to zero?

warm gorge
#

Was just an example, wouldn't actually do that. Just not sure why an alternative syntax was introduced when theres already a shadow distance command

gleaming oyster
#

First number in array is the object view distance in your first example there.

meager heart
#

check it with getObjectViewDistance 😀

warm gorge
#

Yep seems to be the same

glad venture
#

is there like an empty vehicle/object type that I can use to attach to a vehicle to have that play a sound?

winter rose
#

setViewDistance / viewDistance
setObjectViewDistance / _get_ObjectViewDistance 😄 consistencyyy

meager heart
#

is there like an empty vehicle/object type that I can use to attach to a vehicle to have that play a sound?
if you about playSound3D it will be played on "sound source" position anyway... say3D is better for moving objects, but effects are local... remoteExec should help, swatguy17

gleaming oyster
#

Even better, use CfgVehicles in description.ext to use with createSoundSource

meager heart
#

isn't it the same as playSound3D i mean it will be at source position ? 🤔

gleaming oyster
#

Not sure.

misty trail
#

I have a trigger set to Radio Alpha that runs a script i.e call in air support - but how can I limit it so the player can use it again for say 10 min ?

peak plover
#

Can rotorlib model be changed with scripting?

viral gust
#

@misty trail one option would be to have a Boolean server variable, "lockAirSupport" for instance, that is set accordingly when you want to allow or disallow air support calls. Then in your script where you actually launch the air support, call your "AirSupportCooldown.sqf" that sets the variable to disallow further calls, sleeps ~n~ minutes, and then resets the variable. Maybe even send a hint to the player(s) saying the air support asset is available again

misty trail
#

perfect that makes sense I was over thinking the whole process !

viral gust
#

No worries! Happens all the time ;)

gleaming oyster
#

@peak plover How do you mean "changed" ? Nothing official has any support for "changing" any features, afaik it's only commands to check if a certain feature is enabled

#

You can simulate your own flight model in a sense.

peak plover
#

I was hoping to enable it via sqf

#

instead of description.ext

gleaming oyster
#

You can force it in the description.ext, or force it on the server

#

But i do not think you can flip it on or off via sqf

real tartan
#

I am trying to get all airports from Tanoa. _places = nearestLocations [_centerPosition, ["Airport"], _mapSize];

#

Still missing last one Tuvanaka Airbase. Feature or bug ?

#

from Wiki: Airport (On Tanoa only. Tanoan airports have their own location type. On Altis and Stratis, airports are NameLocal)

meager heart
#

also check landAt page comments, there is airports ID's

little eagle
#

@real tartan allAirports, but your issue is maybe, that you're not covering not the whole map with nearestObjects. You put a circle inside a square and therefore, the edges are not filled out, You only scan pi/4*100% of the total area of the map.
Use

_mapSize] * squrt 2

in future.
I don't think that would necessarily account for sloped terrain, but that would only skip objects at the edges of the map.

real tartan
#

@little eagle I suspected "out of range", I figured it out and then come here to see the same suggestion. thank you anyway

little eagle
#

Cool. It's weird that the variable called _mapSize , when it is in fact only half of the map's size, or radius. Idk where the variable came from though.

meager heart
#

btw there are no magic variables _mapSize or ?

real tartan
#

_radius = sqrt((worldSize * worldSize) + (worldSize * worldSize)) / 2 ?

errant jasper
#

Yes worldSize

#

_radius = (worldSize / 2) * sqrt 2

little eagle
#

The world is flat and a square.

real tartan
#

@errant jasper I used pytagoras, starting with basics 😄

still forum
#

@meager heart there are in general no magic variables

little eagle
#

Sure there are. _x

still forum
#

I wouldn't call a variable passed to my code a magic variable

#

more like a parameter

#

same as _this is a parameter. There are just also others like _x

little eagle
#

Are we arguing semantics?

still forum
#

yes

meager heart
little eagle
#

I like "parameter" more. Descriptive name instead of occult Jungian crap.

still forum
#

presses delete

little eagle
#

Gonna use that from now on.

meager heart
#

😀

still forum
#

In any other language they are called parameters. And they are the same in SQF

#

just that you don't see the immediate connection like on call/spawn where you pass the parameter yourself. Doesn't mean they are something magic

little eagle
#

Copy paste the page, rename it "script parameters", and make this one redirect?

still forum
#

But still.. To some people SQF is pure magic

#

@winter rose ^ wiki stuff

#

I should've been sleeping for 7 minutes...

little eagle
#

SQF is pure magic to you if you're looking at the code of someone vastly more experienced than you.
E.g. if you're a scrub, or if a mortal is looking at my godly code.

still forum
#

Variables are magic same as thunder is made by the gods

errant jasper
#

Curious, does anyone actually use SQF's exception handling?

still forum
#

very few people use it as a exitWith replacement. Because you can also return stuff and get the return value with catch. over multiple scopes

#

But I don't remember seeing anyone that actually uses it for error handling like it was made for.

little eagle
#

I don't think it's a good idea to just quit a script mid execution. At least let it fail gracefully.

errant jasper
#

Good to know. Rather limited use then. I think the couple of times I need to do similar I used goto and a _result variable. But then again, in those cases I was not calling too deep.

little eagle
#
private _normalVector = vectorNormalized _rotationAxis;
private _sinTheta = sin _theta;
private _cosTheta = cos _theta;

// Rodrigues Rotation Formula;
// https://wikimedia.org/api/rest_v1/media/math/render/svg/2d63efa533bdbd776434af1a7af3cdafaff1d578
(_vector vectorMultiply _cosTheta) vectorAdd
((_normalVector vectorCrossProduct _vector) vectorMultiply _sinTheta) vectorAdd
(_normalVector vectorMultiply ((_normalVector vectorDotProduct _vector) * (1 - _cosTheta)))

This one is pure magic to me.

still forum
#

That's not magic sqf to me though. just magic math

little eagle
#

Yeah.

#

Actual SQF magic:

fullCrew vehicle _unit select {(_x select 0) isEqualTo _unit} param [0, [nil, ""]] select 1
still forum
#

agreed. very much. if you don't know the commands and which ones takes one/two arguments.. you're screwed

#

Actually... let's...

fullCrew vehicle _unit select {_x#0 isEqualTo _unit} param [0, [nil, ""]] select 1
errant jasper
#

That expression gets the role of the unit?

#

*vehicle role?

little eagle
#

Yes.

#

Like assignedVehicleRole, except that it doesn't screw you over if you have an AI leader in the group of _unit.

#

Minus the "assigned" part.

ruby breach
#

You could always make use of the expectedArrayCount parameter of param to make it look like more magic.

little eagle
#

I suspect you can use findIf and speed it up a bit.

#

And make it even more unreadable.

#
(_turrets select {{_x == _weapon} count (_vehicle weaponsTurret _x) > 0}) param [0, []]
knotty mantle
#

Is there a way to decrease or increase vectoring for VTOLs? I got one flying over my head with 700 km/h but the rotors are still facing upwards 😄

meager heart
knotty mantle
#

Yeah i am sadly not having a unit inside that vehicle.

little eagle
#

Put a dummy in and then delete it.

meager heart
knotty mantle
#

Well i wanted to stay away from pilots as they tend to f*ck up the flight. But i´ll test if he has an impact.

#

Thanks working nearly perfect. Somehow they dont want it down to the last pitch. but it is way better than before 😃

little eagle
#

nearly perfect
So "flawed"?

glad venture
#

is there an event handler for a vehicles ammo changing?

ruby breach
#

Passes newMagazine and oldMagazine

glad venture
#

@ruby breach would this cover loading from something like a HEMTT?

little eagle
#

It's only for soldiers I thought, but not sure.

ruby breach
#

Biki says soldiers and vehicles, but I'm not sure myself

glad venture
#

im trying to disarm a ghosthawk

little eagle
#

would this cover loading from something like a HEMTT?
Probably not as reloading is the act of changing the current magazine, not adding to the magazine cargo.

#
_heli setVehicleAmmo 0;
#

Done.

#

???

glad venture
#

I do want chaff and flares, and also don't want Hemtts to give it minigun rounds

little eagle
#

So you want to remove the weapons, not the mags?

glad venture
#

yeah or just remove only the gun ammo

little eagle
#

Well, what is it?

glad venture
#

if i disable the gun, will it be on all helicopters?

little eagle
#

Magazines can be reloaded, weapons are gone outside of scripts.

#

if i disable the gun, will it be on all helicopters?
Not necessarily.

glad venture
#

is there a way to check how much ammo is in specifically the gun and remove only the gun's ammo? I could just waitUntil the ammo is not 0, remove it and call the function again

little eagle
#

Which gun?

glad venture
#

the ghosthawk one

little eagle
#

Trying to help, but this is hard to follow.

glad venture
#

the M134 minigun

little eagle
#

Init box?

glad venture
#

it'll be spawned through script but I can add the commands to the script

little eagle
#
private _mainTurret = [0];
private _weapons = _heli weaponsTurret _mainTurret;

{
    _heli removeWeaponTurret [_x, _mainTurret];
} forEach _weapons;
#

This may or may not mess up how you can aim as gunner or turn your head.

#

Could add the dummy weapon to fix that. Not sure, haven't touched helis in years.

lone glade
#

afaik the view limits are in the turret not the weapon

little eagle
#

Yeah, but I vaguely remember not being able to turn at all without weapon.

#

Which is I assume why FakeWeapon exists.

lone glade
#

true

little eagle
#

"true" or "possibly true"?

lone glade
#

possibly true

little eagle
#

true

glad venture
#

how would I show a map on a UI?

little eagle
#

I'm having flashbacks here.

glad venture
#

should I use a RSC frame or picture or what

little eagle
#
private _mission = uiNamespace getVariable "RscDisplayMission";
private _map = _mission ctrlCreate ["RscMapControl", -1];
_map ctrlSetPosition [0,0,1,1];
_map ctrlCommit 0;

Posted yesterday.

tough abyss
#

hello

little eagle
#

"hi" in timid

tough abyss
#

Any idea how to make rifle optics work on pistols like joint rails on crack? I've googled that a few different ways with no results.

little eagle
#

You can't do that with scripts.

#

Compatible optics are defined in config. Addon config, so you need an addon for that,

tough abyss
#

darn

#

also if i was to post a script here, would you be able to tell me why it's behaving funny in multiplayer locking people other than the script executer in place?

little eagle
#

Maybe.

tough abyss
#

how'd you do that code snippit

#

code box

#
_flier = Player;
myUAV = [getPos _flier, 50, "B_UAV_01_F", west] call BIS_fnc_spawnVehicle; 
createVehicleCrew (myUAV select 0);
supportUav = myUAV select 0;
sleep 0.1;
_flier connectTerminalToUav supportUav;
_flier remoteControl driver supportUav;
sleep 0.1;
driver supportUav switchCamera "Internal"; 
sleep 210;
//_flier hint "Drone battery will die in 30 seconds."
sleep 0.1;
_flier remoteControl driver supportUav;
sleep 30;
_flier connectTerminalToUAV objNull;
sleep 0.1;
deleteVehicle supportUav;```
viral gust
tough abyss
#

ty i had to google that quickly lol

little eagle
#

how'd you do that code snippit
```sqf
player setDamage 1;
```

#

Who wrote that script, Slay?

tough abyss
#

me with a bunch of random bits

#

i'm winging it

little eagle
#

May I ask what the reasoning behind those sleep 0.1 is?

tough abyss
#

Perhaps it's a placebo but i feel like it if has too much going on at once it doesn't do all of it

#

so i tossed them in there

little eagle
#

Okay, all they do is obscure what's going on.

#

What's the goal of that script?

viral gust
#

And what drones battery only lasts 4 minutes :P

tough abyss
#

to have a very arcadey quick drone deploy like wildlands then have it die in 4 minutes, but instead get deleted

little eagle
#

Spawn a drone and kill it after 4 minutes?

tough abyss
#

basically yeah but have it instantly connect and control when you press the button

little eagle
#

I think it would be cool if the drone actually ran out of fuel and crashed.

tough abyss
#

it works kinda as intended but it locks people besides the person executing it

#

i'm unsure what is doing it, have yet to go through and disable bits to see, was wondering if you seen anything right off the back that stands out that might disable another players controls

little eagle
#

How is the script executed?

tough abyss
#

via a radio trigger

little eagle
#

Hmm, not sure how those work...

tough abyss
#

press 0 twice then you get some type of options depending on what you put in the activation i think off hand

#

would have to go check eden

#

but i'm not sure if it executes that for the entire team, or just the player that clicked it

little eagle
#

That's what I'm not sure about either.

tough abyss
#

actually come to think of it, both players deploy drones

#

when one calls it

little eagle
#

It seems to me that the script is executed for every connected machine then. Or maybe at least for everyone in that group.

tough abyss
#

it seems to be for the group, i've yet to see ais have them but any obvious way to negate that?

little eagle
tough abyss
#

it would probably be more accessible that route

little eagle
#

The statement ("script") is only executed for the client that clicked on the action.