#arma3_scripting

1 messages ยท Page 414 of 1

river meteor
fleet wind
#

I am useing this to define it ```hpp
class RscEdit
{
idc = -1;
type = 2;
style = "16 + 512"; // multi line + no border
x = 0;
y = 0;
h = 0.2;
w = 1;
font = "PuristaMedium";
sizeEx = 0.04;
autocomplete = "";
canModify = true;
maxChars = 100;
forceDrawCaret = false;
colorSelection[] = {0,1,0,1};
colorText[] = {0,0,1,1};
colorDisabled[] = {1,0,0,1};
colorBackground[] = {0,0,0,0.5};
text = __EVAL("Line 1" + endl + "Line 2" + endl + "Line 3"); // how to output multiline
};

#

And this in my dialogs thingy and for some reason i can not even see the thing ingame ```sqf
class JaM_TextEnter: RscEdit
{
idc = 1400;

x = 0.572187 * safezoneW + safezoneX;
y = 0.324 * safezoneH + safezoneY;
w = 0.12375 * safezoneW;
h = 0.044 * safezoneH;

};

#

I am very new to this so its prob a VERY simple mistake...ยจ

river meteor
#

are you doing createDialog "JaM_TextEnter"

fleet wind
#

No thats what the actual Name i put on the RSCEdit i placed in the GUI editor.

#

@river meteor

river meteor
#

the dialog won't create unless you have a script to tell it to create

#

you can test it by running the command ```sqf
createDialog "JaM_TextEnter"

fleet wind
#

Oooo Yes lulz i open it via a sign

river meteor
#

and it doesn't open and you get no errors in your rtp?

fleet wind
#

Pm ed you a screenshot of the begining of the code and then the part above is the last line ill show you a picture of how it looks in game

#

Pmed you the whole dialog

river meteor
#

you need to add lineSpacing = 0 to RscEdit if you are going to use multi line style

#

err = 1 not 0

uneven prawn
fleet wind
#

I do not want to use multiple line

river meteor
#

instead of 16+512 hve it be 2+512 then

fleet wind
#

I want someone to be able to enter a maximum of say 10 caracters. What i am makeing is a thing where people can input whatever and then display that as a numberplate with setPlateText

river meteor
#

look at your config options for your RscEdit

#

you can specify the maxChars there, and you will want to change the style to 2 if you want a border and 2+512 if you want no border. You probably also want to set text to "" so that nothing displays inside of your edit box. I recommend a script with a UI Event Handler to handle displaying the input

fleet wind
#

Is it not possible to make whatever got put in to the box to a veriable ?

river meteor
#

I've never used it, but the onChar UI event seems like you could read the input into a variable when the event fires

#

without an event, you have no way to know when to read what's in the input box

fleet wind
#

What if i make a button so when thats pressed it reads whats in the box would that be possible?

river meteor
#

yes, but that still uses a UI event. This is not a problem by the way, using UI events are not very much code

#

or you could do a key event, so when the user presses the enter key it reads the input box

meager heart
#

@fleet wind Nice tutorial with dialogs http://steamcommunity.com/sharedfiles/filedetails/?id=287378519 and you can do it with just ctrlCreate


0 spawn
{
    disableSerialization;
    _empty_display = findDisplay 46 createDisplay "RscDisplayEmpty";
    _rsc_edit = _empty_display ctrlCreate ["RscEdit", -1];
    _rsc_edit ctrlSetPosition [0.25,0.5,0.5,0.05];
    _rsc_edit ctrlSetBackgroundColor [0,0,0,0.85];
    _rsc_edit ctrlCommit 0;
    uiSleep 5;
    _empty_display closeDisplay 1;
    hintSilent format ["Your text was %1", ctrlText _rsc_edit];
};
fleet wind
#

Thanks @meager heart Will have a look at that Guide but i where to be a lazy bastard for how where would one have to place that code for it to work ๐Ÿ˜‰

meager heart
#

If that was question, then put it in debug console and type something in a text box ๐Ÿ˜„

still forum
#

@uneven prawn Yes it's possible. I could do that. But you couldn't.

uneven prawn
#

Does it require a mod or something?

still forum
#

It would yeah

#

A mod that doesn't exist yet.. Well.. It does but that's not publicly available. And it's quite "hard" to make

edgy dune
#

wats the smallest value for sleep

still forum
#

0

#

Well... -1e27 Might be actually the smallest

#

They all don't really make sense though

#

your question also doesn't really make sense

lone glade
#

wait a second, -1e27? not -1e9 ?

still forum
#

Dunno

#

Guessed

edgy dune
#

i was just curious

#

also wat im tryna do takes a while to maybe possibly explain

#

rememeber dedmen im stoopid

still forum
#

I have time.. Kinda

#

I'll be hear for atleast half an hour

edgy dune
#

okay

#

breath in

inner swallow
#

don't forget to breathe out too ๐Ÿ˜›

edgy dune
#

wow im a idit

#

idiot*

rancid ruin
#

well played

edgy dune
#

why did i take it would take a long time to type thid

#
so I wana make a repulsor type script,like say ur in a jet. my logic for now,which i havent tested is to 

get velocity,lets call it Vi,get it so that I have the components aswell
sleep for a very small time
get the velocity,lets call it Vf
get the absolute difference,call it deltaV,get it so that I have the components aswell
decrease each vector component by that abs difference of the corresponding competent in deltaV times 4
do this utill user says staph
#

im stoopid see

still forum
#

Ah

meager heart
#

Youโ€™re not stupid, you just have bad luck when you think

still forum
#

minimum sleep time is one frame

#

which is 1000/<fps count> milliseconds

#

But. you are not guaranteed that you execute next frame

#

might also take dozens or hundreds or thousands of frames

#

so a sleep 0.1 could sleep for a couple hours

edgy dune
#

bahahahaa

#

.1 second=1 hour

#

gg

still forum
#

When you use a Each frame handler you are guaranteed to execute after one frame time

edgy dune
#

oh

still forum
#

which again can be between 8 and several thousand milliseconds

#

but you can use diag_tickTime to measure how long you have slept for

edgy dune
#

okay thats too fine for me?

still forum
#

so even if it takes longer than you wanted you know how long you slept and can use that in your math

edgy dune
#

good to know

#

ima assume if i do vector-vector it will return the vector diffrence and idk not something dumb like magnatidue right T_T

still forum
#

vector-vector is deltaVector

#

That returning magnitude would be bullshit but.. Not like SQF never does bullshit

indigo snow
#

uh just making sure youre not just gonna subtract arrays instead of using vectorDiff

#

or whatever the command name was

edgy dune
#

oh i like that more

still forum
#

vectorDiff is correct. There is also vectorMagnitude ๐Ÿ˜‰

edgy dune
#

pffftt (aยฒ+bยฒ)โฝยน/ยฒโพ=C

#

for life

still forum
#

life ๐Ÿคข

edgy dune
#

u right

#

sooo question

#

if i do thi

#
_variableThatILike
still forum
#

I hate all variables

edgy dune
#

is that a local or global varialbe if i put that in a addAction

#

T_T

still forum
#

It has a _ at the start

edgy dune
#

foodie

still forum
#

you have a single guess

edgy dune
#

goodie*

#

cause im tired of setvarible and getvariabl

#

typing is hard

still forum
#

global is higher up and local is lower down. _ is quite low.

edgy dune
#

goodie

#

and so

#
varialbeULike=420;
#

is global

still forum
#

I still don't like variables

#

yes v is higher than _ because as you can see v_ the pixels of the _ are lower down

edgy dune
#

oh

#

slighty lost

#

but its okay

#

ill just cry

#

okay inception quesiton

#

how can u tell a addAction to tell it to change its own name

still forum
#

Can't

#

remove the action and add a new one with different name

meager heart
#

Name or text ? with text setUserActionText

edgy dune
#

the test i guess

#

text*

still forum
#

That exists ๐Ÿ˜ฎ

meager heart
#

is it strange ? ๐Ÿ˜„

still forum
#

Yeah ^^

#

Usually we don't have neat commands that do things simpler than how you can already do it

meager heart
#

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

sullen willow
#

What am I doing wrong?


player switchMove "Acts_JetsMarshallingStop_loop" ```

Adds the action as intended but it either doesn't execute the script or something else. Not totally sure.
edgy dune
#

wats the best wayto get the vector of a vector poinin the other way? ```
[1,1,1]-vectorName?

sullen willow
#

Should specify that the second line is the actual surrender.sqf file

still forum
#

Uh

#

addAction executes the script in the quotes

#

surrender.sqf is not a script

#

it's a filename with a script insdie it

#

@swift ferryenai#3053 vector*-1 ?

#

FUCK YOU DISCORD. Thanks.

#

Ok addAction apparently accepts script filename

#

@sullen willow any errors anywhere?

#

Did you try adding a systemChat or hint or smth into your script to see if it executes

sullen willow
#

No errors, it's just not playing the animation.

indigo snow
#

@edgy dune _vector vectorMultiply -1

#

[0,0,0] vectorDiff _vector might suit too

edgy dune
#

thx

indigo snow
#

_vector apply {-_x}

still forum
#

:U ๐Ÿ—ž

indigo snow
#

Id also like to point out that [1,1,1] - _vector wont reverse it, consider [0,0,0] trivially

thorn saffron
#

what is the biggest possible container for holding items? I don't want to add stuff to my shop container if I can fill it up and not be able to add more

lone glade
#

any supply480 containers

#

you can even create bigger classes

thorn saffron
#

fun fact: the huron cargo container has less space than a weapon box

lone glade
#

the max you can fit in any container is 480 "units of mass"

#

so, about 480 bananas, or 48 nades

thorn saffron
#

Eh, the addMagazine does not work on a box. The addMagazineCargo does not let you set the ammo count in the mag. I can manage though.

unborn ether
thorn saffron
#

๐Ÿ‘

main oriole
#

Hi guys got a question, so im currently putting a mod together which has multiple textures for the same 3d model, is there a way of scripting to the same p3d file or does individual p3d files have to be used for each texture?

edgy dune
#

or i mean atleast ask there aswell

main oriole
#

idk if you could do it with scripting though thats why im askging

meager granite
#

You can only do what's predefined in config and model itself

#

For anything else, you'll need to change model and config

still forum
#

@main oriole #arma3_config hiddenSelections hiddenTextures. If you want to have multiple times the same model with different textures. Otherwise multimaterial texture #arma3_model or #arma3_texture

rotund cypress
#

Usually we don't have neat commands that do things simpler than how you can already do it

#

More like big inconcistency

#

Some things have neat helper commands, some dont

still forum
#

And more often than not the thing you currently need right now is not there.

thorn saffron
#
["muzzle_snds_acp","","optic_MRD",""]```
How can I filter out the empty strings? The ""
still forum
#

_array select {count _x > 0}

#

Or

#

_array = _array - [""]

#

Second one probably better

queen cargo
#

the does the - variant rly removes all occurances?

thorn saffron
#

will it remove every instance of the empty ""? ^

lone glade
#

yes

#

@still forum geee

still forum
#

throws stones

lone glade
#

_array select {_x != ""}

#

spits at ded

#

P.E.R.F

still forum
#

_array select {!(_x isEqualTo "")}

#

slaps @lone glade with newspaper

queen cargo
#

just thinking ... in theory, one could optimize stuff like that select away

still forum
#

Okey.. Perf of that is worse.

lone glade
#

huehuehue

still forum
#

Okey.. Then.

#

removeAllEmptyStrings _array

#

HAH!

lone glade
#

THATS CHEATING

queen cargo
#

@still forum can one check for the commands in code?`
thinking about simple optimization of stuff like select {...}

still forum
#

yeah

#

I added that to the optimizer. It just goes down into the code and optimizes it again by calling the optimize func

#

But you need to do that at runtime

#

So if you want to optimize it you need to replace it with something else

lone glade
#

oh yeah, that's what I wanted to ask you about ded, can you check lbSetPicture ?

#

there has to be fuckery or broken code involved

still forum
#

Like a custom Intercept command or a... uh............... Instruction

lone glade
#

I refuse to believe that command takes so long to execute.....

queen cargo
#

_arr select {<simpleexpression>} could be optimized away easy when using an extra command

still forum
#

You mean because... yeah

#

@queen cargo especially _array = _array select Could instead just modify _array in place

lone glade
#

it's literally the worst UI command perf wise ๐Ÿ˜ญ

still forum
#

@lone glade the IDC variant or the control variant?

lone glade
#

both if possible

still forum
#

What are you using?

barren magnet
#

You could intercept it to make it better lol

lone glade
#

control variant

#

didn't we check and both ended up being the same perf wise?

thorn saffron
#
_containerArray = everyContainer box1;

_weaponsAndAttachements = weaponsItemsCargo box1;

_containersWeaponsAttachements = []; 
{
_containersWeaponsAttachements append weaponsItemsCargo (_x select 1);
} forEach _containerArray ;

_strippingArray = _containersWeaponsAttachements + _weaponsAndAttachements;

// Actual Function starts below
// creating a magazines, weapons and items arrays
_strippedWeaponsItems = [[],[]];
_strippedWeapons = [[],[]];
_stripedMagazines = [[],[]];
{
    (_strippedWeaponsItems select 0) pushback (_x select 1);
    (_strippedWeaponsItems select 0) pushback (_x select 2);
    (_strippedWeaponsItems select 0) pushback (_x select 3);
    (_strippedWeapons select 0) pushback (_x select 0);
    (_stripedMagazines select 0) pushback ((_x select 4) select 0);
    if ((count _x) == 7) then {
    (_strippedWeaponsItems select 0) pushback (_x select 6);
        (_stripedMagazines select 0) pushback ((_x select 5) select 0);
        } else {
        (_strippedWeaponsItems select 0) pushback (_x select 5);
        };
} forEach _strippingArray;
{
    (_stripedMagazines select 1) pushback 1;
} forEach (_stripedMagazines select 0);
{
    (_strippedWeapons select 1) pushback 1;
} forEach (_strippedWeapons select 0);
{
    (_strippedWeaponsItems select 1) pushback 1;
} forEach (_strippedWeaponsItems select 0);```
still forum
#

Don't remember checking

lone glade
#

.... holy fuck

#

I have hopes now

still forum
#

holy macaroni. A bunch of kinda shit code that.. wtf

#

Explains

#

pls

queen cargo
#

you got a list with stuff one could optimize away like that?

#

because if not, then you might want to start one ๐Ÿ™ˆ

still forum
#

_array select {<constant that evaluates to true>}

#

We don't even have <constant that evaluates to true> yet. Like 2*2==4 or smth

queen cargo
#

_x == "" would be no constant though

still forum
#

yeah. I meant like true or 1==1 or nonsense bullshit

#

Which Idiot would run select on a hardcoded array? Instead of just modifying the array

#

@thorn saffron classnames is select 0 right?

thorn saffron
#

The code above creates arrays for stuff that is attached to weapons that inside a box and possibly inisde vests etc. that are also inside a box. In a format that can be used with the normal add items commands.

[["muzzle_snds_acp","","optic_MRD",""],[1,1,1,1]]```
I just need to get rid of the empty strings from the array with the classnames
#

@still forum yes

queen cargo
#

starting to raise issues now at SQF-Assembly for this

#

theoretical support for commands is inside already btw

#

just practical support is not unless you added some commands

still forum
#

I added some things I think

#

Stuff like sqrt and such

queen cargo
#

>> too

#

actually ... to make 2+2==4 optimize, only the == is lacking

still forum
#

@thorn saffron Did you test that your array format is really correct? To me it looks like Line 7 messes the format up completly

thorn saffron
#
_containersWeaponsAttachements = []; 
{
_containersWeaponsAttachements append weaponsItemsCargo (_x select 1);
} forEach _containerArray ;```
This one checks uniforms, vests and backpacks for any weapons inside. confirmed working.
#

the final arrays return perfectly fine, its only the empty strings that cause issues.

#

I just need something like

(_stripedMagazines select 0) - [""]
still forum
#

Fun

#
        _strippedWeapItems_name pushback (_x select 6);
        (_stripedMagazines select 0) pushback ((_x select 5) select 0);

What is in 6 and 5?

#

the magazine is already in 4

thorn saffron
#

depending if its arifle with UGL it can be either UGL ammo or bipod

still forum
#

ah

lone glade
#

ded

#

the IDC variant seems faster by 10-20ms

#

it could be test variance tho

still forum
#

still slow though?

lone glade
#

150ms vanilla

#

should be about 200ms modded

still forum
#

UGH

#

I'll check. Working on Taros stuff right now

lone glade
#

that's for a full filling of the left + right panels ofc

still forum
#

@thorn saffron only magazines?

lone glade
#

a fuck me, it's within test variance, no noticeable improvement :/

still forum
#

Profile the command call seperately maybe

thorn saffron
#

whatever, if I get rid of empty strings in one array I will know how to do the others

still forum
#

Profiler should have enough precision for that

#

Yeah I know @thorn saffron Working on it

lone glade
#

hm... they're about the same, I wonder why i get 20ms differences at times

#

max was 150ms, min 130ms

thorn saffron
#

@still forum

[["muzzle_snds_acp","","optic_MRD","","","","CUP_optic_MAAWS_Scope","","muzzle_snds_H","acc_pointer_IR","optic_ACO_grn_smg","bipod_01_F_khk"],[1,1,1,1,1,1,1,1,1,1,1,1]]```
All I need is to remove the empty strings from the first subarray and I will be able to get the item count correct. I will just run the removal before adding the count.
still forum
#

@thorn saffron

_containerArray = everyContainer box1;

_weaponsAndAttachements = weaponsItemsCargo box1;

_containersWeaponsAttachements = []; 
{
_containersWeaponsAttachements append weaponsItemsCargo (_x select 1);
} forEach _containerArray;

// Actual Function starts below
// creating a magazines, weapons and items arrays
_strippedWeaponsItems = [[],[]];
_strippedWeaponsItems params ["_strippedWeapItems_name","_strippedWeapItems_Counts"]
_strippedWeapons = [[],[]];
_stripedMagazines = [[],[]];

{
    _x params ["_primary","_barrel","_side","_optic","_magazine","_bipod"];
    _strippedWeapItems_name pushback _barrel;
    _strippedWeapItems_name pushback _side;
    _strippedWeapItems_name pushback _optic;
    (_strippedWeapons select 0) pushback _primary;
    (_stripedMagazines select 0) pushback (_magazine select 0);
    if ((count _x) == 7) then {
        //_bipod here is UGL magazine
        _strippedWeapItems_name pushback (_x select 6);
        (_stripedMagazines select 0) pushback (_bipod select 0);
    } else {
        _strippedWeapItems_name pushback _bipod;
    };
} forEach _containersWeaponsAttachements + _weaponsAndAttachements;

{
    _x params ["_names","_counts"];
    {
        _counts pushback 1;
    } forEach _names;

} forEach [_strippedWeaponsItems,_strippedWeapons,_stripedMagazines];


_stripEmptyStrings = {
    params ["_left","_right"];

    private _index = _left find "";//Find empty string on left side.

    while {_index >= 0} do {
        //Delete value in left and right array.
        _left deleteAt _index;
        _right deleteAt _index;

        _index = _left find "";//Find nextempty string on left side.
    };
};
{_x call _stripEmptyStrings} forEach [_strippedWeaponsItems,_strippedWeapons,_stripedMagazines];

Have fun

lone glade
#

apply within apply would work too

still forum
#

I think you can somehow make the forEach at line 7 more compact. But too lazy to think now

thorn saffron
#

@still forum Thanks, it worked

still forum
#

Oh .. Neat.. I wrote that in notepad++ without syntax highlighting ๐Ÿ˜„ Lucky I didn't put a typo in there

thorn saffron
#

you kinda lost one ; but other than that it seems to work fine

#

Now all that's left to do is to just get the items and weapons from box and containers inside the box and combine with the stripped arrays. This way I will know exactly what is in the box... does not sound as grand now that I say it

still forum
#

@lone glade It supports animated textures. Whatever that is ๐Ÿ˜„

thorn saffron
#

Tank threads and such

still forum
#

Animated modicons would be neat

#

Not animated as in animating a model and moving the UV

#

animated as in gif

lone glade
#

mouse hover the DLC icon in the info box

#

your mind will be blown

still forum
#

@lone glade In a mission. If you don't start with \ it searches through all files in mission. Then it searches through.. eh... dtaExt? Then again dtaExt folder. Then in PBO's

#

I kinda understand why it could be a littl slow

lone glade
#

dtaExt ?

still forum
#

Dunno

#

A folder in game directory apparently

#

filePatching could make that worse. Do you have that enabled? I did when I tested

lone glade
#

yes I do

#

oh jesus

#

every launcher updates revert my launcher to french

#

the translations, it huuuuuurts

still forum
#

I don't think I'll find it by just randomly clicking around in the code... I need a profiler for that

lone glade
#

eh, 15 ms gain average by disabling file patching

#

disabling icons is 50ms tho :/

still forum
#

The IDC variant should be slower

peak plover
#

What icons?

still forum
#

Does exactly the same but needs to find display first

#

LBSetPicture @peak plover

#

OMFG BI WHY SO DUMB?!!!!

#

No not dumb.

#

what

#

WTF am I seeing

#

@lone glade was also slow when setting pic to "" right?

peak plover
#

I get fps drop with 3d icons ๐Ÿ˜ฆ

#

pls fix

still forum
#

@lone glade I demand answers now

peak plover
#

How come the normal zeus icons don't hurt performance as much

still forum
#

Maybe it's not the icons but your drawing code?

peak plover
#
            drawIcon3D ["A3\Modules_F_MP_Mark\Objectives\images\CarrierIcon.paa", [0.0,0.0,1,0.7], (_pos), 2.0, 2.0, 0, "Active", 1];
#

foreach [all my groups]

#

inside a oneachframe

still forum
#

forEach all your groups doesn't give _pos tho

#

and you should draw in Draw handler

#

not eachframe

#

@lone glade I have a alternative. Go Scheduled

#

Global variable script handle. Terminate it when the panel is refreshed. Fill the panel but keep an array of icons instead of applying them.
When done with filling spawn a loop over these icons that set's the icon.

lone glade
#

I WAS EATING OK

#

and yes, it's as slow with ""

#

so going with your solution wouldn't really change anything @still forum

still forum
#

It would reduce the frame drop but not improve speed

#

slow with "" doesn't make much sense though

lone glade
#

which framedrop?

still forum
#

When the panel updates in unscheduled

lone glade
#

those 130ms are opening + filling the left AND right panels + infobox and stats

still forum
#

It get's the listbox from the left hand variable. Checks if the types in the array are correct. And then tries to find the texture. But if string is empty it aborts immediatly

lone glade
#

filling a panel after this is sub 50ms

still forum
#

so it doesn't search for the texture nor does it try to load it. So why is it slow?

lone glade
#

BI?

#

I blame BI

still forum
#

Don't think so. I can't see it

lone glade
#

not running the command is the best way to gain perf

still forum
#

We need better profiling tools

lone glade
#

when we tested it months ago using "" didn't do shit :/

still forum
#

Something that instead of recording hundreds of scope creates just one and shows you the average

lone glade
#

true

still forum
#

On my todo now.
I just don't see how it can be slow with empty string if we are using the binary variant with control. The IDC I can somewhat understand as it needs to find the control...
Do you want to add the todo to my github to investigate that with a proper profiler? I obviously can't run Arma at work

lone glade
#

yup

#

done

#

honestly i'm not even sure why the unary variant was added

still forum
#

That one is older

lone glade
#

oooh

#

that explains it

somber solstice
#

Guys HELP, how to force underwater filter effect without swimming?

#

I found only how to change filter in CFG, but I have no idea how to force it

vagrant sedge
tough abyss
#

Hi guys, I'm trying to use playSound3D function with a sound located in a addon, and it's not working, is it possible or I'm just wrong ?

subtle ore
#

@tough abyss PlaySound3D needs the path + extension , paste your formatted code please

tough abyss
#

playSound3D ["\nolosharp\sounds\beer.ogg", player, false, getPosASL player, 1, 1, 0]

#

should be working no ?

#

(and thx for your help :))

vagrant sedge
#

I'm not sure but, I think if you want to use sounds from A3 or mods you have to use an @. If nolosharp RP is the mod folder "@nolosharp\sounds\beer.ogg" or something like that should work.

still forum
#

Uhm

#

@vagrant sedge total bullshit.

tough abyss
#

hum

still forum
#

@tough abyss I would really recommend to read the biki page about playSound3D

#

Look at the examples and how they have their file path

#

You have a subtle error that you should notice when comparing to the examples

#

We had someone with the same problem a couple days ago

tough abyss
#

Hum

#

Thx for help

#

Quite lost on that one, but I'm trying to find

still forum
#

Pay attention to the start of the filepath

tough abyss
#

are u talking about the \

#

because I tried without it, but didn't changed anything

still forum
#

all the examples don't have that

#

is your pboprefix correct? did you pack that pbo yourself?

tough abyss
#

packed myself, and the prefix should be ok

#

sounds works when I use config.cpp and say3d

still forum
#

config.cpp? how do you not use config.cpp right now?

#

your mod has to have one

tough abyss
#

hum

#

It have one

#

but I thought we could use sounds by using their path directly

still forum
#

so say3D right now works. but playSound3D doesn't?

tough abyss
#

that's it

still forum
#

no errors?

#

did you try to use .wss or .wav instead of .ogg?

tough abyss
#

maybe I should ! Dindn't tried that

#

that's quite surprising in fact

#

when the path isn't correct I have logs

#

18:12:22 Sound: Error: File: \nolosharp\sounds\beer.ogg not found !!!

#

but when I remove backslash, he seems to find it

#

so maybe it's juste cause of .ogg

tough abyss
#

@still forum Dudeyou were right

#

Thx for your help

#

in .wav it works properly

still forum
#

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

tough abyss
#

Really thanks for your help

still forum
#

Should add a note to wiki then. There is one example in the notes that uses ogg but it doesn't say anywhere that ogg doesn't work

tough abyss
#

Cannot register on the wiki (desactivated for the moment)unfortunetly

subtle ore
#

I thought it was going to be activated after the new year?

still forum
#

new year probably means new year for the web guys

#

maybe they are still on vacation or smth

#

I'll do it friday when someone reminds me

subtle ore
#

:+1:

unborn ether
#

Is there any ways to differ createSimpleObject besides its type, for example 3 objects of the same types?

meager heart
#

allSimpleObjects ?

unborn ether
#

Still will return me a maximum of p3ds or types

#

I think there's no ways to differ, just seeking ideas

umbral nimbus
#

Bottom like, would anyone know where and when the script is kicked off when you select a target from the artillery computer or when you press the 'Fire' button

#

like = line

#

I would like to add a feature or two

peak plover
#

ask the guy who mad it

umbral nimbus
#

who is it?

#

Because im talking about the Vanilla Artillery computer here.

#

from BIS

thorn saffron
#

Ok, I dumb. How can I combine these 2 arrays?

[["100Rnd_65x39_caseless_mag_Tracer","3Rnd_UGL_FlareWhite_F"],[1,1]]

[["30Rnd_65x39_caseless_mag_Tracer","11Rnd_45ACP_Mag","ClaymoreDirectionalMine_Remote_Mag","CUP_MAAWS_HEAT_M"],[1,1,1,1]]```
umbral nimbus
#

array1 + array2

#

[1,2,3] + [4,5,6]

#

= [1,2,3,4,5,6]

thorn saffron
#

nope

umbral nimbus
#

yup

thorn saffron
#

derp

inner swallow
#

You could also use append

#

Apparently more performant

umbral nimbus
#

check the wiki link I gave you

thorn saffron
#

@inner swallow Tried, somehow I made it dupe the mags

umbral nimbus
#

go through the wiki and see f there is your sollution

thorn saffron
#

@umbral nimbus Thats not it:

[["11Rnd_45ACP_Mag"],[1],["30Rnd_65x39_caseless_mag_Tracer","3Rnd_UGL_FlareWhite_F"],[1,1]]```
#

I need it like this:

[["11Rnd_45ACP_Mag","ACE_HandFlare_Red","MiniGrenade","100Rnd_65x39_caseless_mag_Tracer","ClaymoreDirectionalMine_Remote_Mag","CUP_MAAWS_HEAT_M","30Rnd_65x39_caseless_mag_Tracer","3Rnd_UGL_FlareWhite_F","CUP_MAAWS_HEAT_M","11Rnd_45ACP_Mag","30Rnd_65x39_caseless_mag_Tracer","3Rnd_UGL_FlareWhite_F","CUP_MAAWS_HEAT_M","11Rnd_45ACP_Mag"],[2,2,3,2,1,1,1,1,1,1,1,1,1,1]];
inner swallow
#

That's... different

umbral nimbus
#

aaaaaah you didnt say so

inner swallow
#

Pushback (select 0 + select 0)?

#

And then the next subarray

thorn saffron
#

It mixes up the arrays completely

#
{
(_containerMagazines select 0) pushback (_x select 0);
(_containerMagazines select 1) pushback (_x select 1);
} forEach _stripedMagazines;```
```sqf
[["11Rnd_45ACP_Mag","30Rnd_65x39_caseless_mag_Tracer",1],[1,"3Rnd_UGL_FlareWhite_F",1]]```
inner swallow
#

No no

#

You want to make a new array and pushback the appended subarrays

thorn saffron
#
_containerMagazines = getMagazineCargo box1;
{
(_containerMagazines select 0) append ((getMagazineCargo (_x select 1)) select 0);
(_containerMagazines select 1) append ((getMagazineCargo (_x select 1)) select 1);
} forEach _containerArray;
{
(_containerMagazines select 0) pushback (_x select 0);
(_containerMagazines select 1) pushback (_x select 1);
} forEach _stripedMagazines;```
inner swallow
#

BTW you can use ```sqf to highlight

#

At the start of the code block

thorn saffron
#

thats what I do

inner swallow
#

Oh, shit, sorry

#

On mobile ๐Ÿ˜…

#

What I'm thinking of is

#

_result [] = { select 0 + select 0}

#

And then _result pushback (select 1 + select 1)

#

Something like that

thorn saffron
#

something like this I think

(_containerMagazines select 0) = (_containerMagazines select 0) + (_stripedMagazines select 0);
(_containerMagazines select 1) = (_containerMagazines select 1) + (_stripedMagazines select 1);```
inner swallow
#

Yeah, although in this case you should be able to use append

thorn saffron
#

Does not compile

(_containerMagazines select 0) = (_containerMagazines select 0) append (_stripedMagazines select 0); 
(_containerMagazines select 1) = (_containerMagazines select 1) append (_stripedMagazines select 1);
river meteor
#

Does not compile? Are you using SQF-VM?

#

Or do you mean you got an error?

thorn saffron
#

I just mean it throws an error

inner swallow
#

Does append return anything?

#

You probably won't need the = either

#

Read the wiki Taro ๐Ÿ˜›

thorn saffron
#

I prefer to bother people ๐Ÿ˜›

inner swallow
#

Lol

thorn saffron
#

yeah just this was enough

(_containerMagazines select 0) append (_stripedMagazines select 0);
(_containerMagazines select 1) append (_stripedMagazines select 1);
#

Created by annoying people enough that they help me out. I got it pretty close on my own though.

young current
#

Does "animateSource" command not work on buildings/houses

#

made something that inherits from class house, but it does not do anything with animateSource command.

#

Animate works though

#

could possibly just inherit from something else I guess

#

or could it be simpleobject thing?

unreal skiff
#

I am looking for a way to run RCON commands but from a third party (not from the server)

#

Anyone know how to?

umbral nimbus
meager heart
young current
#

@meager heart that issues is not quite the same, in the post it seems like the default source names have changed and it worked with right source names

#

I may have had wrong source = in the animationsource class though so testing

#

yeah my own typo xP

meager heart
#

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

young current
#

works ๐Ÿ‘Œ

meager heart
#

success

daring eagle
#

Is there a possibility i can auto mount a specific attachment on a weapon?

inner swallow
#

depending on your definition of auto-mount, yes

daring eagle
#

Like when i select my gun in the arsenal, the scope will be on it. And you can't pull it off in the arsenal.

inner swallow
#

oh, that way. Not that i know of.

daring eagle
#

So what's your way then? Maybe that's the fix for what my problem

inner swallow
#

although if you have it on once, and change gun, it should stay on

#

well, i was thinking of using a script command in the unit's init box

#

that way you start the mission with it attached

daring eagle
#

Mhhm i see, i will toy around with those options. Thx for the advice!

inner swallow
#

cheers

subtle ore
#

unit init's box , yuck. The only way you can truly prevent the player from removing the scope is just by doing constant checks.

inner swallow
#

yuck
it works fine

#

The only way you can truly prevent the player from removing the scope is just by doing constant checks.
that wasn't the requirement

subtle ore
#

And you can't pull it off in the arsenal. ?

#

it works fine
debatable, not very clean to say the least.

#

plus it runs for every client that joins, using init boxes on everything

unborn ether
#

@subtle ore are you trying to make arsenal with specific stuff?

inner swallow
#

plus it runs for every client that joins
if (local this) then {}

#

and often "not very clean" is not much of a concern tbh

subtle ore
#

@unborn ether No, this isn't my concern. Look above

#

@inner swallow But why not just write one script that runs on the units you want it to?

#

I mean, you're almost crippling yourself trying to use an init box (applies for triggers as well), rather than just one script

exotic tinsel
#

is this possilbe? and if so what is the right way to set it because what ive tried isnt working.
player addEventHandler ["GetIn", {_this execVM "TLS\functions\Server\fn_DriverCheck.sqf";}];

young current
#

I believe getIn runs in the vehicle

exotic tinsel
#

ok, thats what i thought, trying to find away around setting each one of my vheicles up one at a time

#

thanks

#

how would i modify this to pass vehicle?
player addEventHandler ["GetInMan", {_this execVM "TLS\functions\Server\fn_DriverCheck.sqf";}];

lone glade
#

you're already doing it...

exotic tinsel
#

cool thx mate

subtle ore
#

hence _this

exotic tinsel
#

Im trying to create a script that checks for pilots online and if not then sync the highcommand to squad leaders to use transportation heli. i got the pilot check done just having trouble finding a way to sycn high comand to all squadleaders. any one willing to help me out

#

im a noob i figured it out

exotic tinsel
#

I failed to get it to work. any one able to help me out with this script. im not sure if i should paste it in here its kind of big

bitter onyx
#

OK could someone PM me about how to go about seeing what scripts will cause a slowdown on a server or see whats bogging it down

lone glade
#

Learning how to use dedmen's profiler is a good start

exotic tinsel
#

anyone willing to pm me to help with a script for assigning highcommand to squadleaders if no pilots online

jade abyss
exotic tinsel
#

rgr that, sry about that

fossil yew
jade abyss
#

Yep

#
if (typeof player == "B_Soldier_SL_F") then```
->
```sqf
if (typeof _x == "B_Soldier_SL_F") then```

+edit your text above pls @exotic tinsel (it's a pita to read like that =})
exotic tinsel
#

rgr thanks guys

#

how can i send a hint to _x squad leader to let them know that they do or do not have support any more?

jade abyss
#

(no need to delete the stuff ^^)

#

remoteExec / remoteExecCall

fossil yew
#

["You don't have a support any more"] remoteExec ["hint", _x];

#

argument 2 is an object and in the wiki it will tell you that command will be executed only where _x is local

exotic tinsel
#

worked like a charm thank you so much

marble basalt
#

hey was wondering does anyone know how one could export the array generated by the script in this video https://www.youtube.com/watch?v=Qpu33XEycEs to a log file or something? trying to speed up making a loot table for a mission im workin on and i have a few mods on that add alot so thought it be easier to remove the things that are broken or dont want than to add it all one by one

still forum
#

diag_log straight to RPT

marble basalt
#

how would i do that

#

still learning sorry

still forum
#

copyToClipboard str array in debug console would also work

#

Or diag_log array

#

array being your variable

#

I'd recommend copyToClipboard

marble basalt
#

trying it now

#

i think it worked!

#

thanks a lot

#

glad people like you on here to help

still forum
#

You can probably pre-sort it ingame

#

and just export the seperate arrays

#

not probably. you can.

marble basalt
#

ok will do the script builds arrays of all weapon types and throws it into a loot table

#

so would just need to edit it where it spawns one set at a time

#

break it down to sort easier

#

cant be having people finding used launcher in the table now can i

#

i could but that would just be plain rude

inner swallow
still forum
#

Not that kinda sort @inner swallow

inner swallow
#

eh ๐Ÿ˜„

marble basalt
#

well thanks agian im off for now

inner swallow
#

Dedmen why though?

still forum
#

Because

#

That sorts by alphabet

inner swallow
#

Was that not the intention here?

still forum
#

No

#

Sorting by weapon type cuz loot table

inner swallow
#

Oh, I see

fossil yew
#

why does he need that? Seems like he wants to do some persistent thingy?

still forum
#

You are asking why somebody needs something?

#

He posted a video. If you looked you'd know why

lofty rapids
#

Hello there, I need a bit of help for something that's driving me crazy, is there a way to make this script repeatable ? It works, but only one time, I'd like to reset the waituntil condition to 0 after the key has been pressed

#

[] spawn {
waitUntil {inputAction "User20" > 0};
_execblocNote = execVM "blocnote\blocnote_Open.sqf"
};

still forum
#

Check wiki about while

lofty rapids
#

I tried with a while loop but i crashes the game

still forum
#

uhhh

fossil yew
#

do you put sleep in it?

lofty rapids
#

Because once the value is set to 1, it cant go back to 0

#

Yep

still forum
#

Ah I see

#

use while loop

#

and another waitUntil that checks when the value goes back to 0

#

inputAction should be 0 when the button isn't pressed

lofty rapids
#

Okay I'm gonna try this right now, thank you, will tell you if it works ๐Ÿ˜ƒ

#

Crashed >_<

fossil yew
#

why not use onKeyDown event handler and check if the right key has been pressed and then you can spawn your script in it?

still forum
#

show full code

#

do you have CBA by chance?

lofty rapids
#

while {true} do {
[] spawn {
waitUntil {inputAction "User20" > 0};
_execblocNote = execVM "blocnote\blocnote_Open.sqf";
sleep 5;
};
}

#

Nope, not using CBA

fossil yew
#

you're spawning infinite threads

lofty rapids
#

@fossil yew Because I dont know how usekeydown works ^^'

#

so i need to remove the spawn, right ?

fossil yew
#

yeah

lofty rapids
#

And I just left waituntil

still forum
#

Did you even read what I wrote?

#

WTF

#

Dude...

lone glade
#

shhhh ded

#

let it happen

lofty rapids
#

I read it

still forum
#

You didn't do it

lofty rapids
#

I sent you the code

still forum
#

and you don't know how spawn works apparently

#

no you didn't

lofty rapids
#

After you said "do you use cba"

still forum
#

I said add a second waitUntil that waits for the inputAction to become 0

#

you didn't

#

Do you know how spawn works?

lofty rapids
#

Not really, I know it adds code to the scheduler

still forum
#

Yeah

lofty rapids
#

But I've never really used it

still forum
#

you are adding millions (till the game crashes) of scripts that all at the same time wait for the inputAction

umbral oyster
#

(findDisplay 46) displayAddEventHandler ["KeyDown", {
params ["_empty","_dickCode","_shift","_ctrl","_alt"];

        switch _dickCode do {
            case 2:{
                        _execblocNote = execVM "blocnote\blocnote_Open.sqf";
                    };
                };
            };
still forum
#

@lofty rapids You are spawning millions of scripts. But you want to repeat one script

#

So the while is in the wrong place

lone glade
#

๐Ÿฟ

lofty rapids
#

Oh thats why

still forum
#

@umbral oyster GG. Nice nonsense awful script there

umbral oyster
#

@still forum why?

still forum
#

params for all parameters although you only need one. And a completly nonsense switch

#

I don't know how I should answer the why for the switch.. It's just nonsense

lofty rapids
#

Thanks for explaining a bit how spawn works ๐Ÿ˜ƒ

umbral oyster
#

like execVM

lofty rapids
#

It now works without the spawn in the loop

#

๐Ÿ˜ƒ

still forum
#

You are basically spawning so many scripts till it's too much and the game crashes

lofty rapids
#

Yep, it crashed so fast

#

Right after pressing the play button

fossil yew
lofty rapids
#

Thank's for the documentation, gonna read this

#

Sorry for being a "noob" at scripting, I still need to understand a lot of things ^^

fossil yew
#

np

#

you should start from scratch, I don't know if there is a guide for learning SQF tbh

lofty rapids
#

Started learning 8 months ago

#

But some things are really tricky

fossil yew
#

'cos strolling through the Wiki isn't most time efficient

lofty rapids
#

(Dialog ๐Ÿ˜ข )

exotic tinsel
#

im trying to write a down and dirty remove restricted items from inventory. could someone please take alook at it and tell me how far off i am. https://pastebin.com/sXeEZEx3

little eagle
#

It's forEach, not for Each.

still forum
#

Besides the typo's and SQF wrongnesses the logic you are thinking about is correct

exotic tinsel
#

lol crap ok

little eagle
#

_removeditems == _removeditems + ", " + _x;
Single = for assignment. == is a comparison that reports BOOL, but doesn't assign any values to an identifier.

still forum
#

and ARRAY select STRING doesn't exist

little eagle
#

_gooditem == false
You can't compare booleans with ==. Just use the not operator !.

#

__playerloudout
Two _ when it should be one _.

exotic tinsel
#

yeah being up 26 hours working on scripts has def taken its toll. im embarrassed

lone glade
#

jesus christ

#

get some sleep and review your life choices

little eagle
#

_currentElement = __playerloudout select _x;
The current element of the array is _x. So there is no need to use select here. It will just error, because _x already is a STRING.

exotic tinsel
#

lol

#

im applying ur fixes as you post them

little eagle
#

Idk, I don't think this works like this.

logic you are thinking about is correct
Doesn't look right to me.

fossil yew
still forum
#

It removes items if you are not allowed to have

fossil yew
#

you have arrays in arrays in arrays in arrays ...

winter dune
#

In a forEach, can you use _y ?

still forum
#

I thought he asked about if his thinking works. And not how horribly wrong his script is

#

@winter dune Sure? Why not?

little eagle
#

Well it doesn't.

still forum
#

Iterating through all items and then removing items that are not allowed

winter dune
#

Though only _x will work

still forum
#

Sounds right to me

#

@winter dune you can use _SomethingLikeThisIfYouWantOrWhateverElseYouWantReallyNoLimitsWhatsoever

exotic tinsel
#

back to the drawing board. thanks guys for feed back all good.

fossil yew
#

do the following - go to ACE slack and search it properly, I think Dedmen, commy and company made several examples of similar code

#

(don't bother them over there)

still forum
#

you can't really search in ACE slack

lone glade
#

slack history is limited

still forum
#

because of the message limit

fossil yew
#

I know

#

but I have seen a lot of similar questions

still forum
#

The chance to find that script there is about 0

fossil yew
#

let me try ๐Ÿ˜ƒ

still forum
#

I didn't see anything like that in the last months

fossil yew
#

true ๐Ÿ˜ฆ

#

tried getUnitLoadout

#

got some medical stuff script from someone

lone glade
#

.......

fossil yew
#

makes me think maybe we as arma community would be nice to donate some money at least for slack

#

it would be beneficial

still forum
#

Also thought about that

lone glade
#

rolf

#

are they in the red ?

#

i'd be much more concerned about discord

still forum
#

the message limit even applies to my PM's where I keep my todo list.

lone glade
#

oh, that's why you went with github

#

I was wondering

still forum
#

Couple weeks ago Slack notified me about what I wanted it to notify me about. I couldn't see what it was because history limit

#

Commy wanted me to do something

fossil yew
#

๐Ÿ˜„

#

nice way to put stuff under carpet haha

still forum
#

@lone glade donate to ACE slack. Not slack in general

#

So that we can pay off the history limit

lone glade
#

oooh

#

how much is it?

fossil yew
#

seriously put a donation link on your home page

#

7$ per month

#

omg, per active user per month?! are they crazy?

#

think it's out of scope (read wallet) ๐Ÿ˜ฆ

still forum
#

yeah

#

Maybe just make a bot that records all messages and makes then searchable that way

fossil yew
#

good idea, yeah

still forum
#

Wanted to do the same for discord so I can see the crap spammers write here and get banned

fossil yew
lone glade
#

wait, wait, PER ACTIVE USER?

#

yeeeeaaaaaah, it's definitely for businesses ๐Ÿ˜„

fossil yew
#

yup, my company has one, not for public I'm afraid ๐Ÿ˜ฆ

jade abyss
#

screw Slack

#

Getting headache from that damn thing...

still forum
#

We don't have threads in Discord though

#

Use HipChat!

jade abyss
#

(ffs, why can't you change the fkn background of the chat to dark...)

lone glade
#

DISCORD NO BLOB MOJIS

#

DISCORD BAD

jade abyss
#

Oh god... HipChat...

lone glade
#

you can

#

mine is dark

jade abyss
#

Pic or didn't happen

#

@still forum We tested HipCrap a while ago... damn... that thing sucks ass

still forum
#

I never tested ^^

jade abyss
#

Don't touch it

still forum
#

I know you have to run a completly closed VM for it

lone glade
#

there it is

#

dark slack

jade abyss
#

Think about the molested inbread of Windows, Linux and and a Commodore64

#

liar, you just painted that in, Alganthe

lone glade
#

damn

#

I paint fast

still forum
#

Rainbow ๐ŸŒˆ ๐Ÿณ๏ธโ€๐ŸŒˆ

jade abyss
#

^^

exotic tinsel
#

would "items" work instead of "getUnitLoadout" ?

still forum
#

items would return items

#

a vest is not a item. Neither is a weapon.

#

So kinda.

exotic tinsel
#

rgr

#

any othere way to get the players inventory/loadout?

little eagle
#

You probably can't remove a vest using unassignItem and removeItem either.

jade abyss
#

Ctrl+F Inventory, Vest or loadout

fossil yew
#

you'll likely need to either interpret getUnitLoadout or try calling multiple commands

still forum
#

I'd just use what I need.

fossil yew
#

yeah, try to focus

still forum
#

If I need items then I would use a mix out of getContainerItems and stuff

#

because items is just bullshit

exotic tinsel
#

its for role items restrictions so the medic doesnt get a lynx

#

ill keep diggin

lone glade
#

do you have arsenal in your mission?

exotic tinsel
#

yup

#

im executing this when they exit the arsenal

lone glade
#

check whatever I wrote for I&A, it should still be in the thing

exotic tinsel
#

or thier inventory

still forum
#

Why do you even let them pick the items in the arsenal if you want them not to have then

lone glade
#

because vanilla arsenal doesn't care about limitations

still forum
#

If the arsenal doesn't have a lynx. How would you get a lynx

exotic tinsel
#

it was just an example

lone glade
#

load a loadout with a lynx

#

because vanillArsenal has broken loadout verification

fossil yew
#

it might be easier for you to create a mod and just put scope=1 for things you don't want

lone glade
#

hahahaha no

still forum
#

XD

lone glade
#

holy fuck ded

still forum
#

Make them DLC items that you don't have

fossil yew
#

thou shall not have that! ๐Ÿ˜„

still forum
#

I think you can't pick them up then?

fossil yew
#

likely not

lone glade
#

you'd murder me If I linked my I&A restriction code

fossil yew
#

it's gone from the game

still forum
#

murders @lone glade for good measure

fossil yew
#

but it's protected so you can inherit it

still forum
#

No I won't.

#

You are dead to me now

#

Till you are alive again in the next episode although you died

#

Just to die again that episode

lone glade
#

omae wa mo SHINDEIRU
NANI?

still forum
#

Was talking about SP Kny

exotic tinsel
#

ok so i have a working version but its nasty and can not be the right way. i have to loop through, uniform, vest, backpack, weapon, etc everytime someone exits thier eventory. please tell me this is not the right way.

still forum
#

Sounds right to me

#

Besides the looping

exotic tinsel
#

wont that cause tons of lag thought?

still forum
#

No

exotic tinsel
#

though*

#

you being for real or letting me crash my server, i really dont know

still forum
#

as long as you don't use items and iterate through all of them. it won't generate lag

#

crash your server?

#

That script runs clientside

exotic tinsel
#

from lag

still forum
#

It won't lag your server

exotic tinsel
#

alright

#

should i post it when i finish cleaning it up?

#

im guessing its not new

still forum
#

I don't care. Maybe other people do

exotic tinsel
#

if its an eventhandler that will run client side?

still forum
#

That question is....

#

I'll just say yes.

exotic tinsel
#

sorry mate im a noob

#

should i call the function in the eventhandler using exevm?

still forum
#

not really

#

You should use CfgFunctions and call it directly

exotic tinsel
#

cool cool thats how i have it setup

lone glade
#

i'm starting to think I don't wanna add the "hit" stat anymore.... jesus

fleet wind
#

Hello people i have made myself a little GIU (Dialog) and have added a RSCedit. There is no text in the Box and i want players to add text and that then becomes a variable. I have no clue how to do this to. Please help.

little eagle
#

Is there like a button to confirm what was entered?

fleet wind
#

That could be sorted no worries

#

How would i do it with a button?

little eagle
#

Add an eventhandler to the button that executes code when the button is activated.
And that code reads the edit boxes input using ctrlText.

#

And then does whatever you want with that.

fleet wind
#

Thanks works Great The only thing i was looking for was ctrlText was looking through the wiki but unable to find it. Thanks for the help anyway.

little eagle
#

Cool.

blazing quiver
#

Hey

#

Does anyone know how I could disable collision with an object?

#

Like, if I placed down a box and wanted to be able to ghost through it, is that possible?

sick gazelle
#

enablesimulation = false;

still forum
#

Yes attach it to something else

#

To something invisible preferably

blazing quiver
#

I'd like for it to remain visible, but nothing else

#

I'll try enable simulation, thanks

little eagle
#

Dev only or something.

still forum
#

@AHomelessWalrus#7053 enableSimulation won't disable collision. It will disable your ability to open the box though.
And.. I never said anything about invisible. attachTo.

fleet wind
#

Found it setPlateNumber

#

Lets se if it works

still forum
#

I'll wait till you discover that it doesn't and then ask why

fleet wind
#

Its only in dev lulz

little eagle
#

That's how it is with new things.

still forum
#

you can get it on non-dev too. If you are desperate enough

fleet wind
#

What do you have to do then ? ๐Ÿ˜ฌ

still forum
#

Learn Assembly,C++,Intercept,SQF,Reverse engineering

little eagle
#

-_-

#

Go watch your cartoon, Dedmren.

fleet wind
#

Wish me good luck ๐Ÿ˜ฉ

#

Im a very new to this wole scripting thing anyway ill just wait unitl they push the update ๐Ÿ˜‰

cedar kindle
#

is disableCollisionWith broken?

#

or is it physx only

blazing quiver
#

Yeah, disable simulation didn't work

#

Was there another method?

still forum
#

@AHomelessWalrus#7053 I would recommend "reading" to you. It's a nice thing

#

@cedar kindle physx

#

Humans are not physx though sooo...

#

They collide

blazing quiver
#

@still forum You mentioned attachTo, basically I just hook it with another object then and it'll inherit those collisions or something like that?

still forum
#

The object you attach to something else looses collision

blazing quiver
#

ah, that would work

#

thanks

blazing quiver
#

@still forum Tried it out, but still looks like the object has collision. Any ideas?

still forum
#

driving with a car into it or running into it?

#

Oh lol

#

oops

blazing quiver
#

I'm pretty sure the attachto works correctly because the object moves to the new position where the thing it's attached to is

still forum
#

I mixed it up apparently

#

attachTo works with physx but not with non physx. and disableCollision works with non physx but not with physx

#

player disableCollisionWith yourBox

blazing quiver
#

OK, I'll give that a shot

#

thanks

#

that script would go into the init field of every unit, right?

still forum
#

no

#

one is enough

#

or init.sqf

blazing quiver
#

alright

worthy spade
#

I want to make a black screen with cutText, but some UI elements appear in front of that layer. How do I force the cutText element to be in front of everything else?

little eagle
#

All cut things are in layers next to each other. Unless your ui elements are also done via cut, you can't change the order.

worthy spade
#

Can I use something other than cutText in that case? I only want a black screen.

little eagle
#

What ui elements is in front of it?

worthy spade
#

The spectator elements.

#

Sidebar with unit list, camera controls etc.

meager heart
#

If you can, use it before spectator is initialized, then it will work

worthy spade
#

I'm doing that already

cutText ["", "black out", 0.5];
sleep 2;
["Initialize", [(_this select 0), [blufor], true, false, true, true, true, false, false, true]] call BIS_fnc_EGSpectator;
#

Actually that might be the problem, cause I have the respawn screen in the background which also uses the cutText...

little eagle
#

Don't think you can hide those with cutX.

meager heart
#

works for me

#

with onPlayerKilled.sqf and respawn scripts

little eagle
#
private _display = uiNamespace getVariable "RscDisplayEGSpectator";
private _control = _display ctrlCreate ["RscText", -1];
_control ctrlSetBackgroundColor [0,0,0,1];
_control ctrlSetPosition [safezoneXAbs, safezoneY, safezoneWAbs, safezoneH];
_control ctrlCommit 0;

I guess this should also work.

meager heart
#

hax

little eagle
#

Seems less hacky than those cutX tbqhfamlam.

candid jay
#

Probably an easy question but I don't seem to find the relevant starting point. Is it possible to camCreate on a monitor or laptop, to create security cameras that are viewable directly in game?

still forum
#

yes.

#

one

#

Render to texture

#

afaik only one

#

not sure

river meteor
#

you could probably do something with custom UAVs to do multiple

candid jay
#

how so?

#

AFAIK screens can only be 2D interfaces

#

unless somehow I can do a monitor which is a vehicle that has PIP

#

but to my understanding anyways PIP doesn't take a camera

#

and is automatically computed based on the rear view...

little eagle
#

Car side mirrors use PIP and they are 3D.

candid jay
#

yes that's what I said

#

but can you specify a camera view to be used for a PIP?

#

I'm googling "render to texture" but I am not finding much yet

#

๐Ÿ˜ƒ

little eagle
#

Well, obviously all car mirrors show different things, so yes.

still forum
#

but to my understanding anyways PIP doesn't take a camera Aha
and is automatically computed based on the rear view
Is that so

#

How do you look at anything without a thing to look at it with?

#

magic?

#

Sure!!! We all know SQF and Arma are based on pure magic

meager heart
#

@candid jay ```sqf
0 spawn
{
private _laptop = "Land_Laptop_unfolded_F" createVehicle position player;
_laptop setObjectTexture [0, "#(argb,512,512,1)r2t(uavrtt,1)"];

private _cam = "camera" camCreate (player modelToWorld [0,5,1]);
_cam cameraEffect ["Internal", "Back", "uavrtt"];
_cam camSetFov 0.5;

"uavrtt" setPiPEffect [0];

_cam camSetTarget player;
_cam camCommit 1;

};

unborn ether
#

A huge question about data/bandwidth relation. What is an actual limit for total objects existing via ctrlCreate or mission.sqm, or setVariable or remoteExec data considering that objects are fully simulated or just simple, variables are global, and remoteExecs are JIP. Based on default arma basic.cfg settings, on a good DS machine hardware with mythical 1GBit bandwidth? Just to get where it ends by your experience?

still forum
#

I don't think anyone has experience on that

#

ctrlCreate is something completly different too

#

and remoteExec aren't objects

unborn ether
#

sorry not ctrlCreate ๐Ÿ˜„

#

createVehicle

lone glade
#

maybe he means network usage ?

still forum
#

sending a object via remoteExec sends the oid which is just one integer

#

32bit

unborn ether
#

@lone glade Merged, like objects calculation on CPU + bandwidth usage.

still forum
#

Which doesn't really help you

torn juniper
#

can anyone give me any pointers to correctly use and apply event handlers and a custom addaction on players in MP? everything works via editor and SP scenarios but I would like to get it working for MP/coop scenarios without the use of initplayerlocal to fire everything I need because that would require people who use it to manually add the correct EHs, which without nothing would work

candid jay
#

dedmen, just asking. no need for irony, unless it pleases you ๐Ÿ˜ƒ thanks for the help.

#

thank you sldt1ck!

still forum
#

It does please me yes

#

If you didn't get that out of my sarcasm. Every PiP uses a camera

drowsy axle
#

Which channel do I use for GUI questions?

lone glade
#

this one

drowsy axle
#

Sweet

#

Is it neccessary to have a .hpp with the "base" parent classes?

still forum
#

no

#

you can put it directly into the config.cpp

#

You have to have the base classes you use declared though (declared != defined)

worldly locust
#

anyone know how to stop a failed task from being subsequently succeeded?

#

I have a destroy task on a convoy which fails if the convoy gets to the end of it's waypoints.

#

but if I delete the convoy units the trigger fires (yes, trigger) and completes the mission.

unborn ether
worldly locust
#

Ah. Yes.

#

I just tried taskState "Convoy" !="FAILED" as part of the condition and that gave off a generic error

unborn ether
#

@worldly locust Yes, because argument is not a String it is a Task type.

worldly locust
#

AH. Didn't read it close enough

#

cheers

meager heart
#

or just add in activation field of your trigger after your code there deleteVehicle thisTrigger;

worldly locust
#

lol. yep. that would work...๐Ÿคฆ

candid jay
#

Is it possible to define which markers should be visible on a custom map control that inherits from RscMapControl?

#

Or the markers visible in the map will be by default all available on the control too?

unborn ether
#

@candid jay Any map control reads all markers created. The only way is to temporary do setMarkerAlpha for allMapMarkers (or for specific types) while you browsing this map display.

#

@candid jay And yes, basic map markers, such a Gas Station marker will never go away

candid jay
#

oh that's a good suggestion demellion. Thank you.

thick ridge
#

Anyone know off hand if init.sqf gets executed again on the client if they return to the mission lobby and change players?

still forum
#

it get's executed after preInit

#

so yes

#

There isn't much difference between just going to the lobby or completly disconnecting

little eagle
#

I don't think it is executed again for the local host, because that is more like loading a savegame. But not 100% sure, as I never use init.sqf.

inner swallow
#

it should only be for the client, and yeah it runs again

little eagle
#

init.sqf guaranteed also runs for the server.

thick ridge
#

Thanks

inner swallow
#

^^yeah but not if the clinet goes to lobby and rejoins (afaik)

thick ridge
#

Yeah, definitely not on the server

grizzled rain
#

How do I make a AI point? sorry new this stuff

astral tendon
#

I am testing this

#
[this] join grpNull;
group this addWaypoint [position car_1, 0];
this setUnitPos MIDDLE;
"];````
#

in the wiki the exemple they give is _soldier setUnitPos "UP";

#

the "" do not work with this command

#

but it works if i put that command late when the unit was already created

subtle ore
#

0_o

#

Opfour is not a group,

astral tendon
#

it is

#

i made it

subtle ore
#

Post all of your code

astral tendon
#

the code is just that, i am just testing on the editor

#

there is two units here

subtle ore
astral tendon
#

why the face palm anyway?

subtle ore
#

That unit init has no idea what opfour is,
and what is "[this] join grpNull; group this addWAypoint[position car_1,0]; this setUnitPos MIDDLE;"];

#

Why is it all broken up into quotes and msising brackets? Why are the brackets even there?

#

Why did you put that in the unit creation anyways?

astral tendon
#

And why would i not do that?

subtle ore
#

Please take a look at the syntax please

astral tendon
#

but is not wrong

subtle ore
#

It sort of looks like you're using the alternate syntax

#

yes it is

astral tendon
#

it all works, is jut that "" thing that is the question to me

#

Opfour is a group variable i made for the test

subtle ore
#

My bad, I guess I didn't ever see that optional para

#

but ithas no clue what opfour is

astral tendon
#

its just a name

#

i put a unit, then give hes group a name opfour so when i create the unit it is sigh to that unit and then removed and make it owns

#

im just playing around with the unit creation

subtle ore
#
private _otherDudeGroup = group other_dude;
//not
private _otherDudeGroup = opfour;
astral tendon
#

๐Ÿคฆ

#

Never mind, thanks.

meager heart
#

@astral tendon replace "UP" with 'UP'

astral tendon
#

I got it, but it also works with out any of the "" ''

#

i need to know if that is something related to the editor and the debug console before dedicate to do a sqfwith it

meager heart
#

k

astral tendon
#

another problem is that i cant set the face of the created unit face

[this] join grpNull;
group this addWaypoint [position car_1, 0];
this setUnitPos 'UP';
this getSpeed FAST;
this setSkill ['aimingAccuracy', 0.1];
this setSkill ['aimingShake', 0.1];
this setSkill ['aimingSpeed', 0.1];
this setSkill ['spotTime', 0.1];
this disableAI 'WEAPONAIM';
this setUnitLoadout getUnitLoadout selectRandom units loadout;
this setFace 'AfricanHead_01';
"];
meager heart
#

๐Ÿƒ ๐Ÿ’จ

astral tendon
#

the problem was the lockIdentity

unborn ether
#

@astral tendon You can use SQF in your markup after ```

astral tendon
#

test sqf

#

nop, i did not get it.

unborn ether
#

@astral tendon

createUnit
#

Fuck sake ๐Ÿ˜„

astral tendon
#

uh, can you paste it some place else?

little eagle
#

```sqf
lockIdentity
```

astral tendon
#
stuff
tough abyss
#
getPlayerUID test
astral tendon
#

sqf Me setdamage 1

tough abyss
#

...

astral tendon
#

rip

tough abyss
#

its tilda tilda tilda sqf new line with code then new line tilda tilda tilda

little eagle
#

No space after tripple * .
Press Shift+Enter for newline.

tough abyss
#
createUnit
#

example

astral tendon
#
if (!alive player)  then {hint "Rip"}
tough abyss
#

ay

astral tendon
#

noice

astral tendon
#

can some one add a note that on the unit init if you use setFace you need first use lockIdentity

#
lockIdentity this;
this setFace 'AfricanHead_01';
#

something like this

rotund cypress
#

Is the lockIdentity always set to true default though? @astral tendon

#

Maybe there is a command like; isIdentityLocked or something

astral tendon
#

I tink that only happens with the createunit

#

units from the editor i dont need to do that

subtle ore
#

Using unit init boxes again facepalm

#

Next it'll be triggers

astral tendon
#

what is the problem anyway?

subtle ore
#

Awful to work with, unreadable past three or four lines

#

Triggers are like shooting yourself in the foot, and if you want to expand functionality it's likely to be limited down the road

#

Same with unit init boxes, no local variables.

#

Terrible to work with

astral tendon
#

I am not even using triggers for this anything complex, so i dont know what you are talking about on that.

#

And what happens afther the 4ยฐ line on the unit init?