#arma3_scripting

1 messages Β· Page 437 of 1

still forum
#

No. Till today. No abbrevs πŸ˜„

lone glade
#

jesus I need sleep

#

I didn't notice the second l

wary vine
#

im thinking of making a mini api for it.

still forum
#

You pass that from discord to Arma? @wary vine

wary vine
#

from arma- discord

#

its AltisLife so all info is stored in the database.

still forum
#

How is that related to parseNumber though πŸ˜„

wary vine
#

using discords Auth2 to get the guid.

#

oh no thats.

#

sec

#

thats that.

lone glade
#

....

#

i'm still confused

still forum
#

you can use setListBoxData stuff. To set the price as raw number

#

instead of parsing it from the text

wary vine
#

its for the tax info on the bottom left πŸ˜‰

#

ctrlText returns with $

still forum
#

yeah

#

I'm saying don't use ctrlText

#

There is no reason to parse the human readable variant.

#

just store the machine readable one. and use that

wary vine
#

dw im a dumbass

lone glade
#

buuuut ded, both are human readable πŸ›«

wary vine
#

why dont i just take the price they have entered, and work out the tax from that -.-

still forum
#

Or just go with the variant that is human and machine readable

#

Like the departing plane emoticon

wary vine
#

one last thing, what do you think I should change about the ui ?

still forum
#

both human and machine know that'll mean a million $

lone glade
#

your profile color triggers me

#

soooooo much

wary vine
#

its not profile color xD

#

its just a random color i picked

lone glade
#

ohgod

#

just use profile color

wary vine
#

the orange is done with defines

#

so I can change it to what ever I want and all dialogs will change with it πŸ˜›

ionic orchid
#

I wish the units wouldn't fidget around so much

wary vine
#

disable movement xD

little eagle
#

compact mode

ionic orchid
#

oh I mean the player controlled units - I'm just trying to figure out some cutscenes but they always start waving around and standing on one leg

#

aggressively short idle times

tough abyss
#

Is there an easy way to change the side of an UAV like the Mk21 Centurion?

inner swallow
#

yes

#

spawn without crew

#

then, spawn a man of the appropriate side, drag it into the turret like you would into any other vehicle

tough abyss
#

Oh well, that was so easy that I didn't think about it. Thanks alot!

ionic orchid
#

does anyone know of a way to disable the grid position & height that follows your cursor on the main map? There doesn't seem to be a description.ext, difficulty option or script command that controls it

ionic orchid
#

awesome, found it

#

If anyone's interested:

((findDisplay 12) displayCtrl 1016) ctrlShow false;
wide gulch
#

hi i use the following command to make my support have only 1 HE round, but when i test in mission
I can call my round, the operator tells me that it's inbound, i can see the marker on my map, but the shot is never deliverd.... do you have an idea why?

ART1 removeMagazinesTurret ["RHS_mag_m1_he_12",[0]];
ART1 addMagazine ["RHS_mag_m1_he_12", 1];

next lily
#

Have you stood by the gun and actually see if it ever shot the projectile?

wide gulch
#

i will try now

next lily
#

Because if they don't shoot it, I imagine that's got something to do with why it doesn't land.

wide gulch
#

the thing is with 2 ammo instead of one with addmagazine it works

#

it fires the round

next lily
#

So then it means your round isn't landing or landing where you want.

wide gulch
#

that's strange because i have a clear sight on the marked area and it's surrounding

#

and the splash message is never to be delivered

next lily
#

...

#

WAIT.

#

What's the projectile lifetime?

#

(not that I think they'd overlook that)

#

But that's about the only thing I can think of, bar their own scripting.

ornate pawn
#

I have a little bird helicopter attach to a platform but when i detatch the helicopter the helicopter starts boucing to end up blowing up. i already attached the helicopter like 2 feet above the platform and still bounce and blows up

strange urchin
#

Try setting velocity or something

meager heart
young current
#

set its postion after that

#

@ornate pawn

wide gulch
#

@meager heart i don't how, but it worked after i rebooted my pc, without changing anything...
anyway it wasn't the problem it worked perfectly from the number of specific ammunitions desired to the confirmation that the shot was fired... the only problem it's the round was lost between its point of departure and the final destination

#

there was not even a "splash out" msg, and i checked the shot was fired...

meager heart
#
If adding a magazine to an empty artillery support with this command in ArmA 3, use https://community.bistudio.com/wiki/reload If you do not reload, Artillery calls will not fire rounds, because the AI won't reload automatically (tested with 82mm mortar)
```comments on `reload` page ^
wide gulch
#

but it works now

#

actually there is 1 single round in the arty

#

so maybe that's why

#

the idea is to give support to an assault, with 1 arty piece with 1 round of he and an other peice with full magazin of smoke.... and only 1 arty pieces because more would too powerfull for the scale and i can't use mortar

meager heart
#

also RHS_mag_m1_he_12 < afaik that is 12 rounds in magazine

wide gulch
#

yes that's why i use
ART1 addMagazine ["RHS_mag_m1_he_12", 1];

#

1 mag with 1 round

#

i spent 2 hours to figure out how to have 1 round in an arty piece... maybe because i'm a beginner...
but it works

meager heart
#

you need use this addMagazineTurret

#
_vehicle addMagazineTurret ["RHS_mag_m1_he_12",[0],1]; //--- 1 magazine for turret [0] with 1 round
#

also you can check it with

#
systemChat str (getArtilleryAmmo [arty_name]);
#

or hint or copyToClipboard ^

wide gulch
#

ok you're right i just tested, i was made it works... but i guess i changed something...
but that's still funny that AI makes the fire animation

#

thank you

#

still the same it doesn't land

#

and when i play the arty operator the round is loaded

meager heart
#

try reload it maybe

wide gulch
#

ok i figured out

#

it was because the arty was out of the map, on a platform on the sea

#

i relocated it and it works

meager heart
#

nice

wide gulch
#

πŸ˜ƒ thank you for your help, and to make me check, because for me it was working

warm gorge
#

Can you have a href link on a button? Or do you need a structured text control

little eagle
#

Structured Text Control, but you can always just make that transparent and put it over some other "button" like control.

warm gorge
#

Alright thanks, I think I might do that

warm gorge
#

@little eagle Is it possible to make the whole structured text clickable for the link, rather than just the actual text? If not, ill just put some large hidden text instead

little eagle
#

Doubt it.

warm gorge
#

Alright all good

warm gorge
#

So I'm now trying to align an image in a structured text vertically in it's box (RscStructuredText with background) using the method on the wiki of adding a padding blank line, but for some reason the following code does nothung unless I increase the size of the padding however that just pushes it right down:

private _template = "<t size='0.5'>&#160;</t><t align='center' size='3'><a href='%1'><img image='content\icons\pauseMenu\%2'/></a></t>";
private _link = "www.google.com";
private _icon = "test.paa";

private _ctrlButton = _display ctrlCreate ["ctrlStructuredText", -1];
_ctrlButton ctrlSetStructuredText (parseText (format [_template, _link, _icon]));
_ctrlButton ctrlSetBackgroundColor [0, 0, 0, 0.8];
_ctrlButton ctrlCommit 0;
little eagle
#

Different idea. Make the structured text control tiny (0,0) and activate it indirectly by an actual button using ctrlActivate.

warm gorge
#

So when the button is clicked, activate the structured text control?

ornate pawn
#

Does anybody knows why insignias wont show in the objects virtual arsenal?

little eagle
#

So when the button is clicked, activate the structured text control?
Yes.

warm gorge
#

Okay ill give that a go now

little eagle
#

WORKS, does it show face and voice, but not the insignia or none of the 3?

ornate pawn
#

it doesn't show face, voice and insignia

#

when you place a box in eden editor you have an arsenal option

little eagle
#

Put

BIS_fnc_arsenal_fullArsenal = true;

into the init.sqf file.

ornate pawn
#

but that will open full arsenal i need to restrict the virtual arsenal

#

only to show specific stuff

little eagle
#

Have you tried it?

ornate pawn
#

1 sec

lusty canyon
#

possible to make a uav exclusive to only one specific player? (other players on same team dont see it in the terminal list or can cursor control it)

ornate pawn
#

didn't work

little eagle
#

Did it do anything?

ornate pawn
#

nope

little eagle
#

Open the debug console, enter BIS_fnc_arsenal_fullArsenal = true; and press LOCAL EXEC and try again.

ornate pawn
#

k

#

doesn't do anything

little eagle
#

Can you post the code of your mission that handles the arsenal please?

ornate pawn
#

i told you already that i ain't using any code

#

all im doing is placing a box

little eagle
#

Which box?

ornate pawn
#

and in the Object Equipment storage i choose arsenal

little eagle
#

Ah.

ornate pawn
#

I need the arsenal to be limited

#

only stuff that im going to be using

little eagle
#

Well, how do you limit it?

ornate pawn
#

by choosing item by item

#

you never done it?

little eagle
#

No, sounds like a pain.

ornate pawn
#

it does

little eagle
#

And there it doesn't give you the option to select insignia?

ornate pawn
#

but no insignia, voice and face

little eagle
#

ok

#

Well, you will have to do it by script then.

ornate pawn
#

yeah

#

wow this is crap

#

even if i put this code in the init box

#

[myBox,["arifle_MX_F","arifle_MX_SW_F","arifle_MXC_F"],true] call BIS_fnc_addVirtualWeaponCargo;

#

it opens the arsenal but still no face and no insignia or face

#

why BIS has to make everything so complicated ?

warm gorge
#

When arsenal is opened, BIS_fnc_arsenal_fullArsenal is set to whatever is passed to the function, so forcing that variable before wont do anything

little eagle
#

You sure?

warm gorge
#

Yeah

#
missionnamespace setvariable ["BIS_fnc_arsenal_fullArsenal",[_this,0,false,[false]] call bis_fnc_param];
little eagle
#

I see.

warm gorge
#

By the way, ctrlActivate doesn't seem to activate structured texts unfortunately 😦 Oh well, im sure ill figure out some other workaround

little eagle
#

Weird. I swear some people used that before.

ornate pawn
#

So i'm going to do a script for a custom arsenal?

errant jasper
#

This is part of the code for arsenal:
if (_fullVersion && !is3DEN) then {

#

inside there it adds insignias

#

So try running the mission outside 3den

fossil yew
#

Wiki say enableDynamicSimulation works "for given non AI object". What to use for AI then?

ornate pawn
#

that code goes where?

errant jasper
#

And for reference _fullVersion = missionnamespace getvariable ["BIS_fnc_arsenal_fullArsenal",false];

still forum
#

bis_fnc_arsenal_data = nil; missionnamespace setvariable ["BIS_fnc_arsenal_fullArsenal",true];["Open",true] spawn BIS_fnc_arsenal; This is the code that I use

#

I guess clearning the arsenal_data is important

errant jasper
#

So try what commy2 and shadowranger suggested, and run it outside 3den.

ornate pawn
#

yeah that opens a full arsenal

#

but not what i need

#

i need to have a custom arsenal

#

where i can choose weapons and guns

#

i don't need all the waepons

#

i don't need all the uniforms

#

get it?

little eagle
#

Well, the insignia, face and voice button is behind a is3den, so...

still forum
#

Yeah..

unborn ether
#

This allows whitelisting

still forum
#

Just use ACE Arsenal and be done with it FFS

ornate pawn
#

so i'm gonna have to use a mod

#

na its okay dude.

little eagle
#

I tried the white listing, but the button to toggle to go to the insignia is hidden anyway.

lone glade
#

fun fact, vanilla arsenal whitelisting is bugged anyways

#

so even if you whitelist you'll still be able to easily bypass it or load loadouts that don't have whitelisted stuff

ornate pawn
#

that sucks..

lone glade
#

you have to check "allowed" items when exiting arsenal

little eagle
#

Can't you disable the Load button?

lone glade
#

no idea,

meager heart
#
For personalization in MP, please use squad logo defined by squad.xml . Insignia is intended to be set by mission (i.e., by mission designer, by Group Management, or by any other system).

Karel MoΕ™ickΓ½
ornate pawn
#

want me to tell you something?

#

open the stupid arsenal

#

and keep pressing Shift

#

you'll get to the invisible insignia

#

voice and face

#

lol

meager heart
#

Can't you disable the Load button?

/// Buttons ID's  ///
//   HIDE   44151  //
//   RANDOM 44150  //
//   SAVE   44146  //
//   LOAD   44147  //
//   EXPORT 44148  //
//   IMPORT 44149  //
//   TRY    44346  //
/////////////////////
[
    missionNamespace, "arsenalOpened", {
        params ["_display"];
        _display displayAddEventHandler ["keydown", {_this select 3}];
        {
            (_display displayCtrl _x) ctrlEnable false;
            (_display displayCtrl _x) ctrlShow false;
        } forEach [44151, 44150, 44146, 44147, 44148, 44149, 44346];    
    }
] call BIS_fnc_addScriptedEventHandler;
#

Β―_(ツ)_/Β―

ornate pawn
#

So i place a metal locker and in its Object: Equipment storage i select item by item. then after that when i open the arsenal i keep pressing shift till i get the voice, face or insignia option haha

meager heart
#

better use ace arsenal, BullsEyE|WORKS πŸ˜€

ornate pawn
#

talking about ace mod?

meager heart
#

you will have less troubles

ornate pawn
#

my god...

#

fix your shit BIS..

#

im done for today

#

thanks for the help tho

warm gorge
#

@little eagle It turns out RscShortcutButton has a url field which can be defined in a class definition. Only downside is there's no scripting command to set it, but I can work with that.

little eagle
#

nice.

#

Just showing the buttons doesn't fix it either, because this is how they're "disabled":

                    _ctrl ctrlsetposition [0,0,0,0];
                    _ctrl ctrlcommit 0;
#

So they aren't disabled, just made zero width and height.

#

Which is reasonable, but you also have to disable them, otherwise they can be reached by shortcut.

#

This is done for:

                IDC_RSCDISPLAYARSENAL_TAB_FACE,
                IDC_RSCDISPLAYARSENAL_TAB_VOICE,
                IDC_RSCDISPLAYARSENAL_TAB_INSIGNIA

if

if (_fullVersion && !is3DEN) then {

is NOT true, so if either not in 3den OR the full version is enabled.

lone glade
#

Use ctrlEnable false instead

little eagle
#

I guess ace arsenal it is.

#

This code is extremely hard to read, because of the high number of indents and if's inside if's inside if's.

lone glade
#

dude

#

feel my pain

little eagle
#

One cool thing is this function tho:

["#(argb,8,8,3)color(0,0,0,1)",false,nil,0,[0,0.5]] call bis_fnc_textTiles;

Idk, I find it amazing.

lone glade
#

don't forget their infatuation with uiNamespace

little eagle
#

Well if it exists, you have to use it. Right???

meager heart
#

what if that is... bad thing ? πŸ€”

ornate pawn
#

How about BIS fixing it?

#

instead of having to use a mod..

lone glade
#

hahahahahah

#

I made ACE Arsenal, do you know why I did?

#

because BIS wasn't fixing it and everybody thought it was too much work, so I made mine instead

unborn ether
#

That's called a good scripter, because mostly nothing of BIS can fit your purposes.

little eagle
#
[missionNamespace, "ArsenalOpened", {
    params ["_display"];

    {
        private _ctrlCompass = _display displayCtrl (13 + _x);
        private _ctrlWatch = _display displayCtrl (14 + _x);
        private _ctrlFace = _display displayCtrl (15 + _x);
        private _ctrlVoice = _display displayCtrl (16 + _x);
        private _ctrlInsignia = _display displayCtrl (17 + _x);

        ctrlPosition _ctrlCompass params ["_left", "_top", "_width", "_height"];
        ctrlPosition _ctrlWatch params ["", "_offset"];
        _offset = _offset - _top;
        _top = _top + 2 * _offset;

        {
            _x ctrlSetPosition [_left, _top + _offset * _forEachIndex, _width, _height];
            _x ctrlCommit 0;
            _x ctrlEnable true;
            _x ctrlShow true;
        } forEach [_ctrlFace, _ctrlVoice, _ctrlInsignia];
    } forEach [930, 900, 830];
}] call BIS_fnc_addScriptedEventHandler;

This brings back the buttons, but they don't work when I click on them.

ornate pawn
#

mm

little eagle
#

But yeah, the arsenal is bad. That's nothing new.

meager heart
#

ace arsenal standalone... expected/planned ? πŸ€”

little eagle
#

Define "standalone".

meager heart
#

just ace arsenal, without ace framework/main addon ?

#

people was asking

little eagle
#

You can delete the rest already.

meager heart
#

oh

#

didnt know that

little eagle
#

You need main, common and the interaction menu I think though. The rest can be deleted.

meager heart
#

roger

#

Traslation: "commy and guys (from ace team) are... nice"

#

there one word is... lets say impossible to translate lol

little eagle
#

I recognize my name and towarisch, but the last one could still be a slur.

meager heart
#

meaning is above and that word is swearing... πŸ˜„

little eagle
#

I wonder whether that was meant positive, or was deserved.

meager heart
#

"fuckin nice" that is 1/10 of that meaning...

#

all cool πŸ‘Œ

little eagle
#

I'm joking of couse. And I don't want to die of Polonium poisoning.

meager heart
#

lol

thorn saffron
#

is there a command to get AI to fly at set ASL height?

meager heart
exotic tinsel
#

im having issues with my server profile. the hosting company says its set up properly but the effects are not being applied when we logon. is there something i need to do to the files in my pbo? some setting i have to set before i package my files up? i am trying to use a custom profile.

tough abyss
#

[player, [param, false]] remoteExec ["someCommand",-2, true];
if I execute this from a client would player be the client who remoteExec'd or the player its being executed on?

lone glade
#

the one from the machine that sends it

#

there, clearer

tough abyss
#

is there a way to make it the new machine?

lone glade
#

Yes, remoteExec a function instead

hidden field
#

i may have an odd question, but whats up with running code in uinamespace ?

still forum
#

Yeah..

#

What's up with it?

hidden field
#

any benefits?

still forum
#

You cannot run code "in" a namespace

#

a namespace is a list of variables.

lone glade
#

it's where you store stuff

still forum
#

So I don't really know what you mean.

#

If you mean the with command. Then that just sets the default namespace

#

But you usually don't run scripts where every variable is in UI namespace

hidden field
#

with is what i meant

still forum
#

Yeah. It just changes the default namespace

#

aka when you do globalVariable = true is equals currentNamespace setVariable ["globalVariable", true]

#

with just changes the currentNamespace

hidden field
#

okay i was a bit confused by that after looking into the bis arsenal script

lone glade
#

they just store functions in uiNamespace for the lulz

still forum
#

You're not the only one πŸ˜„

#

If you want to look at something to learn from it.. Stay away from BIS arsenal ^^

hidden field
#

i already got that the bis arsenal is a bit... strange πŸ˜‰ i just wanted to know how they created the camera und the mouse controls <.<

lone glade
#

the mouse controls?

still forum
#

You could also look at ACE Arsenal for that

lone glade
#

you mean the floating icons?

still forum
#

Much easier to read. And has the same camera and mouse controls (aka mouse->camera movement)

lone glade
#

ooooh

hidden field
#

not UI controls, what dedmen said

lone glade
#

actually that part is from BI, I just updated it a bit

hidden field
#

looks like i have to look into the ace version ^^ (btw i so wish cba would stop messing with eden controls -.-)

hidden field
#

thx dedmen

still forum
#

CBA messes with eden controls?

lone glade
#

I don't think so ded

hidden field
#

to be specific, the debug consol controls

still forum
#

Ah yeah..

#

Totally not "Eden" though πŸ˜„

hidden field
#

i do like the bigger version, but i HATE the keybinding change -.-'
(and yeah just a part of eden/3den <.<" sorry for mixing it up)

lone glade
#

hm.... I should remove that mention "lifted from BIS_arsenal" since then I rewrote most of it

subtle ore
#

If I were to add a stacked event handler for the event type "arsenalClosed" would I add the event handler to the arsenal object or the player? Is there a better solution besides checking if the display is open?

lone glade
#

stacked EH????

subtle ore
#

BIS_fnc_addStackedEventHandler takes event type "arsenalClosed", I was curious

lone glade
#

for vanilla it's a UI EH and for ACE it's a CBA one

still forum
#

missionNamespace afaik @subtle ore

subtle ore
#

Okay then.

hidden field
#

well looks like the new cam pos is calculated every time the mouse moves and than updated... and thanks to a high "update rate" it looks rather smooth, or do i missed something?

lone glade
#

yes^ but it's not smooth if the unit is moving

hidden field
#

dedmen: yeah and that reattaching
alganthe: good to know ^^ but i belive it is designed for static/not moving objects πŸ˜‰

next lily
#

As far as I'm aware, there's specific dialogue IDCs to correspond to different parts of an optic, for example where it says 'flir/bhot/whitehot', the rangefinder, the grid (in some cases), the FCS components, etc.

#

Is there a list of all these specific IDCs somewhere?

still forum
#

In the config.

marble basalt
#

hello agian, was wondering if anyone knows of anything i could use to pull the class names of all items inside a vehicals cargo

safe forum
#

how I can add my dll in battleye whitelist?

tardy ingot
errant jasper
next lily
#

@hasty violet
I can't confirm this, but I was told that myvar = "something" is identical to missionNamespace setVariable ["myvar", "something"], so I'm not sure how different it really is.

#

Again, cannot confirm, but that's what I've been told.

#

Though I suppose you can't do my var = "something", while you can do missionNamespace setVariable ["my var", "something"];

#

I mean that works.

#

If you have to grab it from another client, I'd set it to public (third argument)

#

Well, you can do what I do-

#

Copious amounts of testing and file patching.

#

I mean, then you can absolutely just set it like...

#

unit setVariable ["earprotection", true, true]

#

then you can just... unit getVariable "earprotection"

#

Boom.

ionic orchid
#

from what I remember, I had a problem with player variables resetting when they died and respawned

next lily
#

Ah.

#

That might be an issue.

ionic orchid
#

so I moved everything out into a namespace to avoid the entire issue

lone glade
#

........

#

just wow

ionic orchid
#

I don't remember exactly what broke - but it was enough to prompt the change

lone glade
#

i'm stumped

#

I moved everything out into a namespace to avoid the entire issue

#

don't you see any issue with that sentence?

ionic orchid
#

it was probably losing addActions, now that I think about it

next lily
#

...

#

While true, I've found is a great way to tank FPS.

#

and or lock stuff up.

lone glade
#

it would probably crash or freeze the game (in the instance of that broken line of code being fixed and doing what he probably intended)

next lily
#

my experience, anyway. Maybe I just did it stupidly.

lone glade
#

in scheduled

next lily
#

Yes, but if you run it as a function...

#

it's going to try and run 10000 cycles in one frame.

lone glade
#

doesn't matter if it's in a func or not

next lily
#

Which makes your computer very sad.

lone glade
#

only if it's in scheduled / unscheduled

#

hell, there's valid uses for while do loops in unscheduled

next lily
#

for while true loops tho?

ionic orchid
#

I use while {true} all the time

#

for catching player connections and processing

next lily
#

Every time I've done it, it's bitten me in the ass so. Β―_(ツ)_/Β―

ionic orchid
#

just put a uiSleep in there to space out the processing and it's perfectly fine

lone glade
#

.....

#

okay you're clearly spouting nonsense now

#

(not you lorenluke)

next lily
#

But I think alganthe and I agree, try to avoid while true, if you can @hasty violet

lone glade
#

yes^

next lily
#

Also, @lone glade, you've seen me in discord slack, me spouting nonsense is nothing new. :P

#

Er, ACE slack.

#

See what I mean?

#

πŸ˜…

lone glade
#

but... just...
put a uiSleep in there to space out the processing and it's perfectly fine

next lily
#

A regular sleep command in scheduled space would work to keep the freezing to a larger minimum, but I'm not sure about uiSleep.

#

And even then, that only helps in scheduled.

lone glade
#

no

#

both are completely nonsensical

next lily
#
    <something>
    sleep 1;
}```
?
#

Still nonsensical?

lone glade
#

if you want something to run every (possibly) 1 seconds yes

#

but you're not "spacing the processing"

next lily
#

That's fair.

ionic orchid
#

space it out to once per second -_-

lone glade
#

oh wait, first time ded's article is actually linkable

next lily
#

@hasty violet
Have you tried using a CBA PFH?

#

If you need to run something in such fashion like that, it's what I'd suggest.

vapid drift
#

So I don't think I know enough about my problem to google properly because I'm not having any luck.

When you create a module, how do you pass the direction it's facing to the function it calls?

next lily
#

@vapid drift
Can't you just use [getDir this] call <function>?

vapid drift
#

I don't think so

#

So I define the module in the config.cpp including the function = "functionName"

#

in the function it calls, I need to get the location and direction of the module that called it... does that make sense?

#

I don't see any reference of that in module frame work but I know it's possible

next lily
#

@vapid drift
Why not use a gamelogic?

#

Have that pass the information where the gamelogic is your position and direction.

vapid drift
#

So put the logic in the map and then the whole
[getDir this] call <function> business?

next lily
#

Yeah, so you'd have the logic named, e.g. 'GL'.

#

Then you get the arguments you need for your function, and pass with them getDir GL, getPos GL somewhere in the arguments.

#

Needless to say that the function being called needs to be written to handle those.

vapid drift
#

Kind of defeats the purpose of someone being able to just drop down a module though doesn't it?

next lily
#

Purpose of the module is defeated if it can't be used as intended, either.

#

Try and see if you can getPos/getDir somehow with the module itself.

vapid drift
#

Yeah, like I said though, it definitely can I'm just not sure how

#

The module itself is a config file

next lily
#

What module and what exactly are you trying to do?

vapid drift
#

nevermind, I figured it out

next lily
#

what was the solution?

vapid drift
#

you can access the logic itself from the called function on _this

#

_this select 0 specifically

next lily
#

_this returns arguments from a call.

#

So if it's fed [module, something, whatever], then yeah, _this select 0 is the first one in that array.

vapid drift
#

This was a custom created function

#

custom created module*

#

That's basically what I was trying to figure out... what exactly does it feed to the function it calls because I couldn't find that in the module framework

tardy ingot
#

(sorry for jumping in), if you're unsure what a function returns, hint it's results via

hint str _this

next lily
#

@tardy ingot
I usually use hint format ["%1", _this], but yeah both do the same thing.

tardy ingot
#

I find str to be amazinly helpfull

#

it will convert just about any type into a string instantly

next lily
#

Different strokes and all.

#

What is safeZoneX and safeZoneY?

next lily
#

Does it change with aspect ratio?

#

So someone running in 16:9/16:10 versus 4:3?

tardy ingot
#

aspect ratio doesnt effect safezone as far as I'm aware

#

my UI seems to stay the same regardless of any screen size (assuming I stay within the safezone)

next lily
#

Yes, but are those the same aspect ratio?

tardy ingot
#

one is 16:9 one is 16:10

next lily
#

πŸ€”

tardy ingot
#

the safe zone will keep everything basically centered

#

but you can override the safezone by just subtracting it

next lily
#

I'm considering having one edge of a control tied to absolute size and the other tied to the safe zone.

tardy ingot
#

x = (safeZoneX+0.1) should give you 10% into the screen from the left of your screen

#

Well it really does depend on how complex your UI has to be

#

dealing with 'responsive' UI is a pain in the ass

next lily
#

It's a javelin.

tardy ingot
#

lol

#

Not bad!

next lily
#

ACTUALLY!

#

Here.

tardy ingot
#

well then in that case.... it might be best to useup all the actual UI, and just give the safezone a black ground

next lily
#

I dislike the way the ace lockon system works...

#

So in the case seen there, you have the window, and then the gate system targeting the window.

#

The problem is that inside the grey box, I don't want the aspect of that to stretch or contract, because that's supposed to represent a 1degree x 1degree FOV...

#

which if it's not square, then... it can't have a 1x1 aspect ratio as desired.

tardy ingot
#

well if you use 0.5,0.5 as your x and y values you should get center screen regardless of safezone, it wont change size on other screens

#

or aspect ratios

#

I'm pretty sure it's basically a fixed size

next lily
#

The center I can find, that's not the issue.

#

The issue is if I go <x> to either side, but ALSO go <x> up and down...

#

if I use safe zones, will that still be square?

tardy ingot
#

no

next lily
#

Hence.

#

So I'd have to go <x> to either side and <x * 4/3> up and down to keep it square?

tardy ingot
#

Yeah you'd have to account for the current aspect ratio of the client

next lily
#

But from what that says, absolute coords are fixed to 4:3

tardy ingot
#

that would be just for the safe zone I beliee

#

believe*

next lily
#

Hmm.

tardy ingot
#

(I just noticed this was just posted my bad)

#

in that refrence the safe zones change depending on the aspect / resolution

next lily
#

Hence the problem.

tardy ingot
#

yep you basically want to expand the safezone if I can gather?

meager heart
#

size of the "safezone box" is the same on all screens and monitors, with the same aspect ratio 4:3, but the coordinates of the top left corner, of that box, is different for every screen zise / aspect ratio

next lily
#

ugh...

#

facedesk

#

I'll... probably be back to ask more questions once I think I /actually/ begin to understand what you guys have already shown. x.x

tardy ingot
#

Ill sum it up

#

the things inside the safezone never change

#

ever

#

the values of everything outside the safezone change depending on resolutions or aspect ratios

#

the safezoneX and safezoneY variables will return the values from the screen borders to the start of the safearea

next lily
#

The safezone itself is centered, though, yes?

tardy ingot
#

you can easily subtract the aspect ratio from these safezone values to create an artificial safezone for yourself, but this might have unexpected results across different resolutions as they breach the standards

#

yes

#

its fixed and centered

#

if you open the ingame GUI editor it's width and height is the safezone

next lily
#

Then why does the safezoneH and safezoneW extend beyond the monitor as in the image?

tardy ingot
#

beacuse that value is the full width of the screen

#

it's just an example

#

if you subtract the safezone values it will be the full screen width

#

eliminate safezone X and Y to get the fullwidth of the screen space

next lily
#

So the safe zone values are constant, but the safezone width and height aren't?

tardy ingot
#

correct

next lily
#

...

#

No wonder these things are so confusing.

tardy ingot
#

if you want to play with the full screen width and height

#

just base your default X and Y positions from safeZoneX and safeZoneY

#

safeZoneX + 0.1 will give you 10% from the left of the screen

next lily
#

So where would safeZoneX + 1 get me?

#

off the screen?

#

Or the edge?

tardy ingot
#

right side of the screen

#

edge of the right side

#

safeZoneX - 0.1 will give you 10% from the right

next lily
#

So safezoneX + 1 is the right edge of that 4:3 box.

tardy ingot
#

correct regardless of screen width or aspect

next lily
#

that's what I need.

tardy ingot
#

safezoneX is topleft of the screen

#

well just left πŸ˜›

next lily
#

Now...

#

does a rectangle with points at...

#

[safezoneX, safezone Y],
[safezoneX, safezoneY + 0.4],
[safezoneX + 0.3, safezoneY],
[safezoneX + 0.3, safezoneY + 0.4]

#

form a square?

#

Always?

tardy ingot
#

if the aspect is 4:3

next lily
#

Well, aren't the safezone doodads 4:3?

#

ergo, always?

tardy ingot
#

yes but safezoneX breaches the safezone

#

safezoneX is left of the screen

#

not the safezone

#

(yes its that confusing)

next lily
#

...

tardy ingot
#

Arma theme plays

next lily
#

(OFP theme is better)

tardy ingot
#

never4get

next lily
#

Digressing...

#

SafezoneX is not the safezone.

tardy ingot
#

righty so,

#

correct

next lily
#

Then what is it?

#

The very edge thereof?

tardy ingot
#

0

#
  • 1
#

the default is inside the safezone

next lily
#

Ugh... mind if we go to PM and not clog the channel?

tardy ingot
#

Sure

next lily
#

(I think my stupidity has done enough damage)

tardy ingot
#

PURDGE THE LOGS!

still forum
#

@hasty violet two -- "true" condition can never be turned off. you'd have a hard time stopping that loop in some emergency
Incorrect in scheduled. terminate command.
@next lily it's going to try and run 10000 cycles in one frame. Only on unscheduled.
While true, I've found is a great way to tank FPS. Yeah well.. You either do nothing in scheduled. Or you freeze the game for a short time in unscheduled.
@tardy ingot I prefer systemChat str _this over hint str _this because hint always overwrites the last hint so if your function is called often... But I think systemChat might not work in SP?
it will convert just about any type into a string instantly "about any" == "any but Nil"

tardy ingot
#

@still forum systemchat is quite hard to test with in SP so I tend to just unify my method and just "hint str" everything. However in recent months i've moved into testing within edens multiplayer environment to better avail of certen functionalities.

I may release a log like command that will draw multiline hints (stacked) for dule environment testing

#

Actually, while you're here @still forum, would you happen to know if a parsing function exsits for spotting syntax errors.. The default black error box is massively underwhelming I find.

still forum
#

yeah. There is a parsing function that shows you syntax errors. It's called compile πŸ˜„

#

Otherwise no. But there are external tools that let your IDE show you errors.
Google "SQF Lint"

tardy ingot
#

Ty!

real tartan
#

I use systemChat format ["mySuperCoolMessage | _variable: %1", _variable]; there I can quickly switch to systemChat/diag_log

modern sand
#

I have a question regarding the 'in' command. Say for instance I have a variable set to a string (_var1 = "TestString1"), and have an array with 'TestString1' inside of one of the strings (_array1 = ["BlahBlah","TestString1 Blah Blah"]). If I was to use an if statement like this (if (_var1 in _array1) then {_result = true} else {_result = false}). Would _result return to true or false. So what I'm overall asking is does the in command check if the entire string is equal to the other entire string, or just checks if the keyword (TestString1) is inside of one of the arrays string.

still forum
#

false

#

because it doesn't contain the value TestString1

#

in just checks values

#

not contents of values in values

modern sand
#

Strange, seeming I originally thought that to be true. But seem to be getting issues.

#

Wait nvm, ^ that's incorrect. My issue has to do with other functions calling my main one a long with my switch statement. My bad

warm gorge
#

Any ideas why sometimes when I call playSound on a couple of the Orange DLC sounds, I get "Warning Message: Sound Orange_vehicle_Alarm_Loop_01 not found", but other times it works?

winter rose
#

a typo maybe? Or the exact same code?

warm gorge
#

Exact same code, its very weird.

winter rose
#

weird indeed
any sure repro?

#

like, if I do that @home 50 times I will get at least one occurrence?

warm gorge
#

Like right now ive just reloaded my mission, and entered playSound "Orange_vehicle_Alarm_Loop_01"; in debug console and it gave me the error. It's hard to reproduce it working, because for me it seems random.

winter rose
#

(also... no mods? not that it would really matter)

warm gorge
#

Yep, pure vanilla. Just tried in a plain mission (no scripts or anything), same thing. It doesnt seem to be with all Orange DLC sounds, just having problems with the alarm sound, but would need to go through them all to double check.

next lily
#

Might it be a bad download?

#

No wait, that's DLC, not a mod.

#

Heard of weirdness with downloads of content before though.

still forum
#

They can corrupt the same as mods.
But that wouldn't explain the "randomly not working". If it was corrupt it probably would never work

next lily
#

Fair point.

#

Might not hurt to verify integrity just in case, assuming it's steam.

#

Might catch some stuff you didn't know was going wonky on you.

warm gorge
#

After going through a few other sounds and returning to the bugged one, its now suddenly working again

next lily
#

Are you sure it's working?

#

Or just not a lucky streak in the 'random'?

warm gorge
#

Honestly don't know

lone glade
#

dev branch ^ ?

#

there's some sound issues on it right now.

warm gorge
#

I'm so stupid, just realised I was using the wrong sound name dont even know how I had it working sometimes and others not, actually was a typo surprised I didnt even realise because I specifically did check. Must be too tired lol

still forum
#

Hm.. a typo maybe? Or the exact same code?
@winter rose Had the right guess right at the first answer to your question then πŸ˜„

lone glade
#

happens to everyone

warm gorge
#

Yeah he did, apologies

winter rose
#

nah no problz, happens to everyone!

#

but still, victory dance \o\ /o/ \o/

vapid drift
#

So I think I'm just missing something simple here...

#

When a player uses and action on an object, I realize it's executed locally

#

How can I have part of the code execute on the server? I'm not talking about globally... I mean specifically have the server execute a section of the code.

still forum
#

remoteExec

vapid drift
#

that will execute the code on each connected player correct? Or is that essentially the same thing?

still forum
#

No

#

Whatever you specify

vapid drift
#

Thank you!

weary pivot
#

so i have been continuing my map and need to know a few scripts. 1 is how to make people lay-down on a military cot wounded.

peak plover
#

How do I return the initbox stuff with a command?

weary pivot
#

2 is i need a town to be filled with citizens that wander.

peak plover
#

playMove / SwitchMove to do animation

#

And attachto

#

To attach the civilian to cot

vapid drift
#

@Ethramene consider ALiVE?

peak plover
#

Can I use a command to return whatever is in the initbox in 3den ?

winter rose
#

I'm not sure it is even related to init input

peak plover
#

Yeah it is

#

I guess there is no way to return

winter rose
#

why would you need it though? it may be sign of a perfectible mission structure

cedar kindle
#

you can read the sqm

coral rock
#

Is there anything particular you need from it? Ie could you store it in a variable

vapid drift
#

Is there a known reason that I'm not aware of that would cause my functions to not fire properly until at least the second time that they're called?

#

Do I need to preprocess them or something?

still forum
#

Besides user error? no.

vapid drift
#

lol

#

Well, just a small example

            ace_hearing_disableVolumeUpdate = true;
            playMusic ["BackgroundTrack01_F_EPC", 24];
            0 fadeMusic 0;
            3 fadeMusic 1; 
            3 fadesound 0;
            sleep 3;
#

The first time the function is called, the cutText, fadeMusic, and fadeSound all execute properly but the music doesn't play

#

the second time and beyond, the music plays

still forum
#

How much time between first and second call?

vapid drift
#

Minutes

#

It's initiated by the player

unborn ether
#

@vapid drift I had some issue with that. AFAIK if you try to input start seconds in some range (neagtive or over the music actual lenght) that might result in that next track can stop randomly.

#

@vapid drift Better use addMusicEventHandler to be consistent on your actions.

vapid drift
#

Ok, thanks

fleet wind
winter rose
#

shownGPS maybe

fleet wind
#

"Checks if client has GPS reciever enabled" is that for when its open tho i am confused

still forum
#

Just try it out ^^

#

I'd say that's what you want. But always try just to be safe

fleet wind
#

Will try indeed thanks

winter rose
#

and I'll edit the wiki if you report back that's not the case πŸ˜‰

subtle ore
#

@winter rose Well one things for sure, it's not lupus.

still forum
#

You can never be sure!

subtle ore
#

True, but. It's never been the case

winter rose
#

wrong! check the magician's episode

#

't was a lupus

#

Episode s4e08 πŸ˜„

subtle ore
#

Errr....you sure he didn't figure something out last moment? I'll have to rewatch it

fleet wind
#

Well that doset work. it allways turns out as true.

winter rose
#

I checked it out too, confirmed. I think it is "is GPS enabled" (showGPS) and not a "is GPS visible on screen"

subtle ore
#

^ would make sense

fleet wind
#

Hahhaha sorry im stupid there is a visibleGPS

#

command

subtle ore
#

Yeah

winter rose
#

and this one -does- work with custom miniscreens!

peak plover
#

What's the trigger classname?

#

How to exclude triggers from allMissionObjects?

unborn ether
#

@peak plover not sure, but maybe there's a #-like reference to an object kind. I don't even know where to find that list of kinds.

peak plover
#

allmissionObjects returned EmptyDetectorAreaR50

#

weird

tough abyss
#

is it possible to override a preinit function?

#

without mods

cloud thunder
#

"EmptyDetector" @peak plover

unborn ether
#

@tough abyss If function is coming from addon - no, only addon.

tough abyss
#

rip thanks

peak plover
#

Thx @cloud thunder I ended up going with typeOf and find

wary vine
#
{
  private _category = _x select 0;
  private _sold = _x select 1;
  private _title = _x select 2;
}forEach _arr;

{
  _x params ["_category","_sold","_title"];
}forEach _arr;
#

pretty sure the second one should be ok to replace the first one right ? i remember using something like that before, but not sure.

still forum
#

Other way around

#

replace the first one by the second one

wary vine
#

o.O

still forum
#

Oh. That's what you said

#

πŸ˜„

wary vine
#

xD

#

nerd πŸ˜‰

still forum
#

The params one is the good one ^^

wary vine
#

just trying to tidy up the code of my market...

#

because I have had to change it 40 milliontimes already xD

#

but so far its working well, so starting to finalize my backend πŸ˜‰

#
{
  _x params ["_category","","_listingTitle","_title","_items"];
  _items params ["_itemClassname","_itemCategory"];
}forEach _arr;
``` so this should work right ?
lone glade
#

if you're using an array of arrays yes

wary vine
#

ty

#

well this is being pulled from the db ```
[""Houses"",""0"",""Listing Title"",""Listing Description"",[26,""house"",""Land_i_House_Big_02_V1_F"",[]],""""""76561198132926159"""""","""",""1231"",""1581""]]"*/

lone glade
#

wow, that's string galore

wary vine
#

Yeah, I have no idea what happened xD

#

it is diag_log'd

#

so extra "" anyway

#

Im just using it for reference.

#
{
  _x params ["_itemCategory","","_listingTitle","_listingDesc","_items","","_price",""];


  //just double checking _items is an array, not string.
  if (_items isEqualType "") then {_items = call (compile _items)};

  //Default Variables.
  private _itemClassname = "";


  //Get the Item classname.
  if !((toLower _itemCategory) in ["vehicles","houses"]) then {
    _itemClassname = (_items select 0) select 0;
  } else {
    _itemClassname = _items select 2;
  };

  //get the image.
  private _displayImage = "";

  if ((toLower _itemCategory) == "virtual items") then {
    _displayImage = getText(missionconfigfile >> "virtualItems" >> _itemClassname >> "icon");
  } else {
    _displayImage = ([_itemClassname] call Life_fnc_fetchcfgdetails) select 2;

    //Because meh..
    if (_displayImage == "pictureStaticObject") then {_displayImage == ""};
  };

  //list the items.
  _listbox lnbAddRow[_listingTitle,_itemCategory,_price];
  _listbox lnbSetPicture[[_ForEachIndex,0],_displayImage];
}forEach _arr;

if ((lbSize _listbox <= 0)) then {
  _listbox lnbAddRow["No Results Found","",""];
};
``` Look ok ?
still forum
#

No

#

I hate the inentation and the missing spaces before/after commands

#

also call compile... That's almost always dumb.

#

parseSimpleArray <--

austere granite
#

depends on what you expect

#

call compile can be quicker

still forum
#

your if/else for _itemClassname can be replaced by _itemClassname = if() then {_items select 0 select 0} else {_items select 2}

#

same for _displayImage

#

also you have a typo in the code of the Because meh... line

#

and it's _forEachIndex and not _ForEachIndex

#

your last if statement has one pair of parenthesis too many

austere granite
#

and space after commands :3

still forum
#

Yeah.. ^ Like I said in my first comment.

austere granite
#

ah

#

and spaces go after commas! πŸ˜„

still forum
#

The }forEach _arr triggers me the most. } forEach _arr FFS

#

Also if ((toLower _itemCategory) == "virtual items") then { No need for the toLower. because == is already case insensitive

#

keeps rambling on while walking to his bed and going to sleep

wary vine
#

xD

austere granite
#

it's just good to learn "early"

lone glade
#

now if we could get a case insensitive variant of in that'd be nice (we have findIf but still)

wary vine
#

yeah.

#

I have been using toLower alot with this.

lone glade
#

also the wiki page for findIf:
https://community.bistudio.com/wiki/findIf

NOTE: Because command findIf terminates as soon as it finds an element that fulfills the condition, it is more efficient then count in scenarios where you need to check for presence / absence of at least one element that evaluates to true.

THATS WHAT IN IS FOOOOOR

wary vine
#

with switch(case) aswell.

winter rose
#

than*, btw

austere granite
#

kek

wary vine
#
{
  _x params ["_itemCategory","","_listingTitle","_listingDesc","_items","","_price",""];

  //just double checking _items is an array, not string.
  if (_items isEqualType "") then {_items = parseSimpleArray str _items};

  //Get the Item classname.
  private _itemClassname = if !((toLower _itemCategory) in ["vehicles","houses"]) then {(_items select 0) select 0} else {_items select 2}

  diag_log format ["%1", _itemClassname];

  //get the image.
  private _displayImage = if (_itemCategory == "virtual items") then {getText(missionconfigfile >> "virtualItems" >> _itemClassname >> "icon")} else {[_itemClassname] call Life_fnc_fetchcfgdetails) select 2};

  //Because meh..
  if (_displayImage == "pictureStaticObject") then {_displayImage == ""};

  //list the items.
  _listbox lnbAddRow[_listingTitle, _itemCategory, _price];
  _listbox lnbSetPicture[[_forEachIndex, 0], _displayImage];
} forEach _arr;
``` any better πŸ˜‰
austere granite
#

do check if parseSimpleArray is actually faster with what you usually expect btw

#

like we ended up not switching because it was slower

#

also still lnbAddRow[_listingTitle

#

lnbAddRow [_listingTitle

wary vine
#

xD

#
  private _displayImage = if (_items select 0 isEqualType []) then {
    if (((_items select 0) select 1) == "virtual items") then {getText(missionconfigfile >> "virtualItems" >> _itemClassname >> "icon")} else {([_itemClassname] call Life_fnc_fetchcfgdetails) select 2};
  } else {
    ([_itemClassname] call Life_fnc_fetchcfgdetails) select 2;
  };
``` had to change that part a bit xD
#
["Land_i_House_Big_02_V1_F","House (Big, White)","pictureStaticObject",2,"Structures_Town",-1,"CfgVehicles",[],[],"",[],[],[],bin\config.bin/CfgVehicles/House_F,[]]
wary vine
#

Anyone here good with ctrlcreate within controls groups ?

#

semi have it working...

#

the first button is a a config'd controls , this is just for base purposes

#

but the scrollbar isnt being created..

austere granite
#

scrollbars only appear if the control group is smaller than its conents

wary vine
austere granite
#

also make sure you're not using the noScrollbar types obviously

wary vine
#

still missing the scrollbar

#

the scrollbar was there when I had premade controls.

#

but this is slightly more dynamic

austere granite
#

your group is probably bigger than the contents then

#

So no scrollbar

wary vine
#

nope x

#

xD

#

my group is the same size as the guibox in gui editor

austere granite
#

make sure you try by just setting it to the height one of one button for example

wary vine
#

nope xD

#
  if (count _AllControls == 1) then {
    _controlsGroupPos set [4,ctrlPosition (_buttonCtrlPos select 4)];
    _controlsGroup ctrlSetPosition _controlsGroupPos;
    _controlsGroup ctrlCommit 0;
  };
austere granite
#

4,c

#

:3

#

anyway that is how they work, confirm if you're actually them to the proper controls group

wary vine
#

its not permanant.

austere granite
#

etc etc

wary vine
#
class Something
{
  idd = 9991;
  onLoad = "uiNamespace setVariable ['Something', _this select 0]";
  onUnload = "uiNamespace setVariable ['Something', displayNull]";
  duration = 99999999;
  class controlBackground {};
  class controls
  {
    class RscControlsGroup;
    class RscText;
    class RscStructuredText;
    class ControlsGroup: Life_RscControlsGroup
    {
      idc = 9992;
      x = 0.25 * safezoneW + safezoneX;
      y = 0.225 * safezoneH + safezoneY;
      w = 0.455 * safezoneW;
      h = 0.55 * safezoneH;
      class controlsBackground {

      }
      class Controls
      {
      };
    };
  };
};
#
  _textCtrl = _display ctrlCreate ["Lega_ControlsGroupTextControl_Base", 9992];
  _pictureCtrl = _display ctrlCreate ["Lega_ControlsGroupPictureControl_Base", 9992];
  _backgroundCtrl = _display ctrlCreate ["Lega_ControlsGroupBackgroundControl_Base", 9992];
  _buttonCtrl = _display ctrlCreate ["Lega_ControlsGroupButtonControl_Base", 9992];
#

its like there not actually being created in the group...

austere granite
#

yea that's not how it works πŸ˜‰

#

check the wiki page for ctrlCreate

wary vine
#

its working for the most part

austere granite
#

_display ctrlCreate [_classToAdd, _idcOFCONTROLTOMAKE, _controlsGroup]

#

_display ctrlCreate ["Lega_ControlsGroupTextControl_Base", -1, _display displayCtrl 9992];

wary vine
#

ill check now

#

BEAUTIFUL ❀ ty

#

2am .. dont judge me xD

austere granite
#

meh, UI coding can be tricky and there's not a lot who even bother

wary vine
weary pivot
#

how do you add sound dialog to a character to make him say something

wary vine
meager heart
#

"sound dialog" πŸ€”

wary vine
#

playSound ?

#

say3d ?

meager heart
#

playSound3D ?

ornate pawn
#

Trying to place a greyhawk drone but its an empty drone so i cannot control it?

meager heart
unborn ether
#

@wary vine you should use mouseEnter and mouseExit on your controls to restore previous control attributes, to avoid blinking. Seems a bit sloppy when it blinks like that.

vapid drift
#

So I still can't figure out why this function isn't executing properly the first time. Once I fire it once, it does what it's supposed to but not until then:

The action that spawns it:

            [[_pilot02, ["Test Me", {
                ["testMe"] spawn TFR_fnc_jumpHandler;
            }]], "addAction", true, true] call BIS_fnc_MP;

And the section in the function that is spawned:

    case "testMe": {
            ace_hearing_disableVolumeUpdate = true;
            playMusic ["BackgroundTrack01_F_EPC", 24];
            sleep 5;
            playMusic "";
            ace_hearing_disableVolumeUpdate = false;
    };
#

The first time I select the action, no music. The second and beyond, music for 5 seconds just like it's supposed to

lusty canyon
#

is it possible to make a simple comboBox + btn dialogUI without defining classes in cfg/ext. just pure sqf?

#

bah so many magic numbers in dialogs >.< y no enums!

still forum
warm gorge
#

Is it possible to get any sort of data about a #track (vehicle track) object? Im trying to determine what sound one is playing

meager heart
lusty canyon
#

@meager heart so with those premade classes i can make UIs without cfg/hpp/cpp ?

meager heart
#

yes

#

there is "NOTE"

lusty canyon
#

man thats so complicated, i give up.
here's an easy question instead: how can you get the classname of a units equipped nvg?

meager heart
#

with hmd afaik

lusty canyon
#

great so i can do player unlinkItem (hmd player); and will also cover all nvg mods

next harder question: how can you build a continuous square wall enclosure based on a given 4 pos2d coords.
(positions based on player onmapclicks, not accurately aligned)

meager heart
#

wut

lusty canyon
#

ok so lets say i want to enclose a village on the map with hbar barricades.
player selects the desired "corners"

ClickOnMapEH = addMissionEventHandler ["MapSingleClick", {
    _pos = (_this select 1); 
}];
// player does that 4 times, saved in missionNS

so now how do you make a wall spanning those 4 corner points?

unborn ether
#

What happens to a vehicle created with createVehicleLocal if entered by a player in MP? Any issues might happen?

young current
#

many, the vehicle is local only to the player so others wont see it

winter rose
#

if the player disconnects, isn't the object transferred to the server btw?

unborn ether
#

@young current Mostly interested in netcode damage. Will it create some additional utilization?

young current
#

that I do not know

#

why would you have only a local vehicle where player can enter?

still forum
#

The player will float in the air and drive a invisible vehicle

unborn ether
#

@young current Local events like SP quests in MP. Long story.

winter rose
#

you may want to globally create, if I understand it properly another group may come to the other player's area
if they see a player interacting with nothing, they might freak out πŸ˜ƒ

unborn ether
#

Well Im focused on that point that no one will see that events.. i hope :D. Like just a strange dude running in a field doing something you don't see.
Was actually interested in exactly local cars behaviour.

meager heart
#

little secret stealth project with local vehicles πŸ€”

tough abyss
#

Or just other local stuff that gets attached to invisible vehicles like JSRS used to do way back when.

wary vine
#

@still forum ==

#

xd

#

I found it xD

unborn ether
#

@meager heart pink panter music

meager heart
#

πŸ˜„

wary vine
#

soo, ran into an issue with ctrlCreate and buttons...

#

all the buttons are created fine... but apparently they all have the same btnSetaction, when I set it on the specific control, any idea's ?

#

i got it, had to format the function before hand.

queen cargo
#

Uhm... Wut? Please tell me you are not using buttonsetaction for that

rotund cypress
#

Ctrladdeventhandler + buttonclick

ornate pawn
#

does anybody knows where the map markers are located in the arma 3 root folder?

still forum
#

map markers?

#

They aren't located anywhere.

#

Do you mean the map marker icons?

ornate pawn
#

yes

#

the map markers icons

ornate pawn
#

anyone?

still forum
#

I don't think so. Because if anyone who is here right now would know.. Why wouldn't he have told you yet?

ornate pawn
#

nvm

#

found them

still forum
#

\A3\ui_f\data\map\markers\nato\b_unknown.paa

ornate pawn
#

ui_f_data pbo

#

yeah i need them to place them in a custom image

#

to display in a monitor

#

thanks dude

still forum
#

Quick way would've been to get a AIO config. And just CTRL+F for Marker

ornate pawn
#

nice

#

thanks

meager heart
drowsy axle
#

Could someone check over this: I keep getting an error that "_u is not defined."

#
params [_u,_p];
_l = getUnitLoadout _this select 0;
_this select 1 setUnitLoadout _l;```
#

This file is called via a unit: sqf this addAction ["Get Loadout", {[_this,_this select 1] call CP_fnc_shareLoadout;}];

#

is everyone sleep? 😦

meager heart
#

wrong syntax for params, also check wiki for theaddAction

#

Parameters array passed to the script upon activation in _this variable is: [target, caller, ID, arguments]

drowsy axle
#

What's the difference between params and param

#

checked the wiki. no difference.

meager heart
#

param - single element
params - array of elements

#
param [index, defaultValue, expectedDataTypes, expectedArrayCount];

params [
     [index, defaultValue, expectedDataTypes, expectedArrayCount],
     [index, defaultValue, expectedDataTypes, expectedArrayCount],
     [index, defaultValue, expectedDataTypes, expectedArrayCount]
];
drowsy axle
#

ah okay

leaden summit
#

Is there a way to check if a player has read a leaflet? I've used the BIS_fnc_initLeaflet function to make a map on the wall readable which is how the players get intel for their mission. Is there a way to check once it's read so I can then assign a task?

ornate pawn
#

If i have an AI saying something with say3D ""; how can i make him stop saying it ?

cedar kindle
#

@drowsy axle you’re also missing strings in params

meager heart
#

too late, again πŸ˜”

meager granite
#

Anyone had experience with CfgDisabledCommands ?

#

Trying to disable allMapMarkers and markerText commands:

class CfgDisabledCommands {
    class ALLMAPMARKERS {
        class SYNTAX1 {
            targets[] = {0,0,0};
            args[] = {{},{}};
        };
    };

    class MARKERTEXT {
        class SYNTAX1 {
            targets[] = {0,0,0};
            args[] = {{},{"STRING"}};
        };
    };
};

markerText is disabled, allMapMarkers still works. Any ideas?

still forum
#

well it has 0 args. So maybe leave args array empty?

#

instead of array of two empty arrays

meager granite
#

Gonna give it a try.

unborn ether
#

Simply open debug console and type utils 1 then click on LOCAL EXEC (available since Arma 3 v1.67) it will generate all possible args structure. You just gonna need to change specifics

meager granite
#

Nope, didn't help. Also tried removing args completely before, didn't work.

#

Thats exactly how I got this config originally @unborn ether

unborn ether
#

Strange. Had no such issues.

#

Maybe that's issue with commands that have no args?

meager granite
#
    class ALLMAPMARKERS {
        targets[] = {0,0,0};
    };

worked

unborn ether
#

Mark that on Wiki if config generator is doing that wrong

meager heart
#

from the wiki

If a command doesn't have left arguments, or right arguments the correct syntax is:

class CfgDisabledCommands
{
    class ALLPLAYERS
    {
        targets[] = {1,1,1};
    };
};
#

nothing wrong there 🀷

meager granite
#

Done

#

The tool produces wrong config, that's the issue.

little oxide
#

Just need to report it, to BI, so he will fix it anyway

#

🀞

drowsy axle
#

thanks @cedar kindle

knotty mantle
#

Is it possible to make the pilot of an helicopter "movable" like the driver of a tank if i am the commander?

drowsy axle
#

No. @knotty mantle

#

Only via waypoints.

lone glade
#

no bren, you can't swap seats in helos

#

at least not from single seat compartments like pilot and copilot seats

knotty mantle
#

yeah i am aware of that. But the commander is ordering the driver by commands. I thought maybe there is a way for the gunner to do the same with the pilot.

#

yeah but i see how i put it wrong in my first sentence.

#

I meant steering the helicopter as gunner by giving the pilot move commands (like the tank commander gives orders to AI driver)

lone glade
#

Nope

knotty mantle
#

Unfortunate.

#

But thanks for the quick anwser

drowsy axle
#

πŸ˜ƒ

#

Does anyone know how to get started with EXTDB(3) for database connections?

#

I'm looking to make a persistent mission.

rotund cypress
#

Read their docs. Simple as that. @drowsy axle

drowsy axle
#

Where do I find them? @rotund cypress

rotund cypress
#

extDB3 bitbucket repo

#

Under wiki

drowsy axle
#

It only has a few pointers on their bitbucket

#

Am I looking at the wrong area, because none of the link under the wiki or anywhere else, actually explain anything.

hidden field
drowsy axle
#

Thanks @hidden field

ornate pawn
#

does anybody here knows about how the TAOR Markers work for Alive?

drowsy axle
#

Could someone proof-read this for me? ```sqf
private _nearbyLocations = nearestLocations [player, ["NameCity","NameCityCapital","NameMarine","NameVillage","NameLocal"], 100];

private _weaponArray = [
"srifle_DMR_05_blk_F",
"arifle_Katiba_F",
"srifle_DMR_06_olive_F",
"arifle_Mk20_F",
"arifle_MX_SW_F",
"hgun_PDW2000_F",
"LMG_Zafir_F"
];

private _itemBoxArray = [];

private _houseArray = _nearbyLocations nearObjects ["house", 100 ];

{
private _buildingPositions = [_x] call BIS_fnc_buildingPositions;
{
private _weapon = selectRandom _weaponArray;
private _itemBox = "WeaponHolderSimulated" createVehicle [0,0,0];
_itemBox setPos _x;
_itemBox addWeaponCargoGlobal [_weapon, 1];
private _magazines = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines");
private _mag = _magazines select (floor (random (count _magazines)));
_itemBox addMagazineCargoGlobal [_mag, 5];
_itemBoxArray = _itemBoxArray + [_itemBox];
private _markerDebugCreate = createMarker ["WeaponDebugMarker", _x];
private _markerDebugType = "WeaponDebugMarker" setMarkerType "Dot";
private _markerDebugColor = "WeaponDebugMarker" setMarkerColor "RED";

} forEach _buildingPositions; 

} forEach _houseArray;

sleep 120;
{
deleteVehicle _x;
hint "Items (at a distance greater than 250m) have been deleted, successfully!";
} forEach _itemBoxArray;``` Called as a function ([] call CP_fnc_markerLoot;). Keeps saying that "sleep 120;" has an "Error: Generic error in expression".

winter rose
#

private _houseArray = private _nearbyLocations nearObjects ["house", 100 ];

#

sounds wrong

drowsy axle
#

It's already private'd _nearbyLocations

#

Changed it.

winter rose
#

private _houseArray = _nearbyLocations nearObjects ["house", 100 ];

still forum
#

@drowsy axle Spaces in classnames in _weaponsArray

drowsy axle
#

I saw them @still forum Changed.

still forum
#

private _weapon = _weaponArray select (floor (random (count _weaponArray))); -> private _weapon = selectRandom _weaponArray;

drowsy axle
#

Changed. Thank you.

#

Anything else?

#

Would changing "house" to "house_f" change anything/be wrong?

still forum
#

Β―_(ツ)_/Β―

#

Yes. Changing something will change something.
If that will be wrong I don't know

drowsy axle
#

Okay πŸ˜›

#

Does: private _nearbyLocations = nearestLocations [player, ["NameCity","NameCityCapital","NameMarine","NameVillage","NameLocal"], 100]; return as an array or a position?

#

Changed to: ```sqf
private _nearbyLocations = nearestLocations [player, ["NameCity","NameCityCapital","NameMarine","NameVillage","NameLocal"], 100];

private _weaponArray = [
"srifle_DMR_05_blk_F",
"arifle_Katiba_F",
"srifle_DMR_06_olive_F",
"arifle_Mk20_F",
"arifle_MX_SW_F",
"hgun_PDW2000_F",
"LMG_Zafir_F"
];

private _itemBoxArray = [];

//private _houseArray = _nearbyLocations nearObjects ["house", 100];
{
private _houseArray = _x nearObjects ["house", 100];
{
private _buildingPositions = [_x] call BIS_fnc_buildingPositions;
{
private _weapon = selectRandom _weaponArray;
private _itemBox = "WeaponHolderSimulated" createVehicle [0,0,0];
_itemBox setPos _x;
_itemBox addWeaponCargoGlobal [_weapon, 1];
private _magazines = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines");
private _mag = _magazines select (floor (random (count _magazines)));
_itemBox addMagazineCargoGlobal [_mag, 5];
_itemBoxArray = _itemBoxArray + [_itemBox];
private _markerDebugCreate = createMarker ["WeaponDebugMarker", _x];
private _markerDebugType = "WeaponDebugMarker" setMarkerType "Dot";
private _markerDebugColor = "WeaponDebugMarker" setMarkerColor "RED";

    } forEach _buildingPositions; 
} forEach _houseArray; 

} forEach _nearbyLocations;

sleep 120;
{
deleteVehicle _x;
hint "Items (at a distance greater than 250m) have been deleted, successfully!";
} forEach _itemBoxArray;```

still forum
#

A position is an array.. So...

drowsy axle
#

Yes. πŸ˜› I know.

still forum
#

Wiki says Array

drowsy axle
#

Is having a foreach for the _nearbyLoc going to make the _x be the position of each location, that is 100m around the player?

still forum
#

no

#

It returns locations

#

not positions

#

Like the wiki says

drowsy axle
#

right... 😦

#

How can I turn those locations into positions?

#

hang on πŸ˜›

pseudo cypress
#

hey guys i have a little problem i use a painting script for exile and i wanna change the permission for it to specific UIDs i tried it with this:

https://pastebin.com/cgvC5wXq

but it doesnt work for me can someone help me pls `?

still forum
#

yes

#

If you click on the "location" link on the wiki page you'll get more info about it. And at the bottom of the page you'll see related script commands. One of them being how to get the position of the location

#

What does "doesnt work" mean? @pseudo cypress

#

You are sending a variable either to everyone or no one

pseudo cypress
#

@still forum everyone can use the painting

still forum
#

Uh.. yeah..

#

You set it to true which means everyone.. That's correct.

pseudo cypress
#

sry im very very new in scripting so if i change all the true to false it should work? or just the last one on the end ?

still forum
#

If you set it to false then no-one will be able to use that. Besides who executes that script.

pseudo cypress
#

hmm so how can i change it that just the UIDs can use it ? -

still forum
#

Sure

#

missionNamespace setVariable[_function, compileFinal preprocessFileLineNumbers format["%1\%2.sqf",_path,_function], _client];
->

 missionNamespace setVariable[_function, compileFinal format ["if !((getPlayerUID player) in %1) exitWith {}; %2",admins,preprocessFileLineNumbers format["%1\%2.sqf",_path,_function]], true];
pseudo cypress
#

sry if im asking so much dumb question but where should it put it in ?

still forum
#

Yes. Very dumb

#

this -> that
Remove this and put that in the same place

pseudo cypress
#

ah oh crap didnt saw your first message :/ sryyy

still forum
#

It was all in one single message....

#

πŸ˜•

pseudo cypress
#

yeah my bad πŸ˜“

#

i will test it thank you very much

astral tendon
#

I could not find anything related to BIS_Disabled_Door in the wiki, I wanna find more about commands related to doors, were i can find it?

lone glade
#

until the namespace is cleared

#

so mission restart for missionNamespace, game restart for UI and profileNamespace

#

.... just why the fuck are you not using CfgFunctions

#

the whole idea is wrong

#

again, use CfgFunctions, be it a "script" or an addon, use it.

#

because you don't have to compile them yourself? because it's easier to maintain? because it's straight up better?

#

DAC is seriously outdated

#

and bugged

#

...

#

it wasn't tho

#

K

#

just do your thing.

queen cargo
#

seriously ... CfgFunctions is way easier then this

#

"include in file XYZ"
instead of include this "functions_mygenericscriptaddon.hpp" file into your description.exts function section

lone glade
#

the fuck am I reading

queen cargo
#

so you fucked up your script

#

cool

#

no, that is something different completly

#

there is only one reason to not use cfgfunctions right now and that is for self-implemented headers/footers
as that is not implementable using cfgfunctions as of right now

lone glade
#

or if you don't want clients to compile those funcs because whatever

queen cargo
#

they have to use them at some point @lone glade
always

lone glade
#

both are questionable too.

queen cargo
#

so to come back to the point: telling the user "just do what you need to always do, #include "functionsfileformyscript.hpp" in the description.exts cfgFunctions section

#

and done

#

and in your pre/post-init script you then do whatever is needed

#

eg. use spawn to start a script scheduler instance

queen cargo
#

[] execVM "wh\earplugs\wh_earplugInit.sqf"; this is wrong
lemme repeat @hasty violet
you did not understood either how SQF works or how cfgfunctions works

lone glade
#

that's not how CfgFunctions works

#

at all

#

did I link the wrong section?

#

oh shit I did

queen cargo
#

use theese two links @hasty violet

lone glade
#

see what X39 linked^

queen cargo
#

no, it is THE way how to do that

#

execVM etc. are all not to be used for scripters

#

add either a preinit or a postinit and spawn the script in there

#

done

lone glade
#

oh, shit no I found what his actual issue is X39

queen cargo
#

no more execVM or whatever it is

#

mhh @lone glade

lone glade
#

he has 10 000 comments for each lines of code

#

and the include paths are wrong^

queen cargo
#

not consider, learn it

lone glade
#

wait, those paths work?

#

I mean the ones you use to call compile

astral tendon
#

I am trying to make my missions DLC free so is there i way i can remove DLCs to make sure of that?

young current
#

dont run them when you make it

#

that should work

wary vine
#

quick one, do you think I could do a sorta dupe protection, by using the "take" handler, and checking if the client can see the server (for the pull ethernet dupe bug) ?

#
tag_client_fnc = {
  _unit = [_this,0,objNull,[objNull]] call BIS_fnc_param;
  _container = [_this,1,objNull,[objNull]] call BIS_fnc_param;
  _item = [_this,2,"",[""]] call BIS_fnc_param;

  isConnectedtoServer = false;
  _startTime = diag_tickTime;
  [_unit] remoteExec ["tag_fnc_isClientconnected",2];
  waitUntil{isConnectedtoServer || (diag_tickTime >= (_startTime + 2))};
  if !(isConnectedtoServer) exitWith {
    hint "something about connection issues";
    delete the items.
  }
};


tag_server_fnc = {
  _unit = [_this,0,objNull,[objNull]] call BIS_fnc_param;
  _owner = owner _unit;
  isConnectedtoServer = true;
  _owner publicVariableClient "isConnectedtoServer";
};
``` as example
unborn ether
#

@wary vine The key is ping-like function. remoteExec to the server function with some unique key back from it. If that unique key doesn't change in some period of time - something is wrong with client connection. Just don't forget about sensitivity, so you will not flood the server with that shit or get all clients fucked because of small interval.

wary vine
#

this would be on take event handler, so if isConnectedtoServer is still false after x seconds in the above statement it is 2, it will delete the weapon from their inventory

meager heart
#

BIS_fnc_param - "This function is obsolete since the introduction of param and params."

wary vine
#

ok.

#

Ill switch it, but is the idea viable ?

unborn ether
#

@wary vine Well, besides that, your players might encounter a random item deletion because of some small lag.

wary vine
#

I could play around with the time for that though

#

i think 2 seconds should be more then enough,

unborn ether
#

@wary vine No its mostly about that arma is living on UDP protocol. So for the whole timeline of 2000ms you might have a segment where this remoteExec will not reach the server. So once that happens, your 2 seconds safeguard is already failure:


100ms // failed to remoteExec
// anything below doesn't really have a reason anymore
250ms // fine
500ms // fine
1000ms // fine
...
#

@wary vine and yeah, instead of _owner = owner _unit you can simply use remoteExecutedOwner

wary vine
#

So what would be the best idea for the duping issue then xD

unborn ether
#

@wary vine You should create a query of pings. Once per N-ms (depends on how accurate you want this to be), for example each 200ms for whole 2000ms timeline = 10 checks in 2 seconds.

#

@wary vine Just think about when and where that should be done, and once its fine utilize remoteExec ping chain to stop sending all 10 packets. In case packets will fail to reach the server, they will be utilized anyways.

wary vine
#

Yeah, ill take a look πŸ˜ƒ ty

peak plover
#

Wait, ur measuring ping with RE?

#

How big is it with RE?

#

ohh okay

#

so I read into it

#

very interesting

#

Cool idea

meager heart
#

How big is it with RE?
like this (ツ)_/Β―

wary vine
#

.<

unborn ether
#

publicVariable Β―_(ツ)_/Β― setVariable

#

πŸ˜„

still forum
#

^ publicVariableServer

@hasty violet and he would have to start the script in init.sqf / initPlayerLocal.sqf with an execVM. No. CfgFunctions postInit.
I do not want him to have two steps Yeah... You only have one step.
I would prefer for him to just have one step Uh.. That is one step...
@queen cargo did not understand*
@astral tendon I am trying to make my missions DLC free so is there i way i can remove DLCs to make sure of that? Yeah. Don't build on Tanoa. And don't place vehicles that have a DLC icon.

@unborn ether No its mostly about that arma is living on UDP protocol. Arma still makes sure that packets get through though...

unborn ether
#

@still forum Well that means arma does query them internally, since thats a behaviour of TCP packet, not UDP. AFAIK all of my remoteExec's being discarded while connection is lost. Anyways I was checking that in range of ~3-10s with no connection, might encounter timeouts.

#

If that's true, that gives me a reason of why laggy clients are such a pain to arma servers. It sometimes simply chokes of all that client flood.

still forum
#

Yes. Exactly.

#

Position updates are non-guaranteed. But stuff like script stuff are guaranteed

meager heart
#

afaik even scripts because of laggs could be rejected/not executed, is that correct ?

#

about RE only ^

still forum
#

no. Guaranteed is guaranteed

meager heart
#

rgr

still forum
#

If you completly loose connection then they are ofcause not executed.
Aka when the server shows you as disconnected.

unborn ether
#

Just thought about that to be 10 seconds. Its just made me paranoid a bit.
disconnectTimeout = 10; // Server wait time before disconnecting client, default 90 seconds, range 5 to 90 seconds. (since Arma 3 1.56+)

#

10 seconds = you have nothing to do here with all your packets query.

#

nah

fossil yew
#

This piece of code tries to recreate vehicles in the base previously loaded from server's profileNamespace. But weirdly, there are explosions occurring despite vehicles not being very close to each other.

// create empty vehicles
{
            _x params ["_vehicleType", "_vehiclePosition"];
            _vehicleType createVehicle _vehiclePosition;
            sleep 0.5;
} forEach _vehicles;
#

Is there a smarter way to do the same?

#

vehicles are saved with

_vehicles = (getMarkerPos _markerName) nearEntities [["Car_F", "Tank_F", "Helicopter_Base_F"], _range];
...
_vehicles apply {
                [typeOf _x, getPos _x]
} // create array of vehicles
unborn ether
#

@fossil yew Short allowDamage or BIS_fnc_findSafePos