#arma3_scripting

1 messages ยท Page 486 of 1

errant jasper
#

Then you can remove the if-statement too.

#

For some mods it is not that easy, but for this one you seemingly can.

frigid raven
#

glad

#

๐Ÿ˜„

tired delta
#

if (_curObject isKindOf "House_F" && {player distance _curObject < 12} || (typeOf _curObject in ["Building_Class_1", "Building_Class_2"])) exitWith {
[_curObject] call life_fnc_houseMenu;
}; can someone tell me what i have done wrong on this line

ruby breach
#

Post RPT with the full error that you're getting

frigid raven
#

Is there any way to grep the config file

#

I am looking for an ALiVE mod specific intel item

frigid raven
#

I cannot friggin add a intel document to my inventory ffs

#
[player, "CUP_Item_item_Cobalt_File"] call CBA_fnc_addWeapon;

always results in false

hollow thistle
#

Have you tried CBA_fnc_addItem

frigid raven
#

yes at first

#

drives me kinda nuts ๐Ÿ˜ฆ

#

configfile >> "CfgVehicles" >> "CUP_Item_item_Cobalt_File"

that's the bad boy

#

Event this one doesnt work configfile >> "CfgVehicles" >> "Intel_File1_F"

hollow thistle
#

Oh, I dont think you can add CfgVehicles stuff to inventory.

#

But I might be wrong ๐Ÿ˜…

meager heart
#

CUP_Item_item_Cobalt_File -> CUP_item_Cobalt_File maybe ๐Ÿ˜ƒ

#

@frigid raven

frigid raven
#

But...

#

Ok some questions now...

#

1.) How can I figure out the "working" class name to use?

#

2.) When using [player, "CUP_item_Cobalt_File", true] call CBA_fnc_addWeapon; the document object is NOT added to my inventory BUT placed on the ground

#

That is partwise ok, since the function described that if my inventory is full that happens

#

Problem: Inventory is empty

meager heart
#

CUP_item_Cobalt_File < ITEM

#

CBA_fnc_addWeapon < WEAPON

frigid raven
#

yea I tried Item, too

#

sorry had to say this

#

ok wait now addItem worked ffs

meager heart
#

๐Ÿ˜„

frigid raven
#

but I had to strip off my whole ivnentory first

#

need to reproduce ... sec ๐Ÿ˜„

meager heart
#

take your time

#

lol

frigid raven
#

dont put me under pressure!!!

#

wtf works now

meager heart
#

sqf magic

high marsh
#

sqf magic > magic

meager heart
#

kinda

#

yes <

high marsh
#

๐Ÿค”

frigid raven
#

Ok back to the class name thingie

meager heart
#

dude...

#

check this

frigid raven
#

๐Ÿฅ

meager heart
frigid raven
#

jesus murphy...

meager heart
#

magic is real

high marsh
#

Yup. It's all true

#

You thought magic was a childs game? Magic is real, it's heart exists inside SQF

meager heart
#

also dat timing...

hollow thistle
#

setMMagic 1;

meager heart
#

world

high marsh
#

setMagicWorldGlobal 1;

ruby breach
#

setWorldMagicToMagicWorldVisual

frigid raven
#

Okay the same call is not working for

configfile >> "CfgVehicles" >> "Intel_File1_F"
#

Is tehre any property called doNotAddToInventoryIfSteamIdIsOfXetra11Ffs = true ?

#

or for real now - some items seem not "addable" to teh inventoriouz

#

Please say yes you are right, xetra11

high marsh
#

@frigid raven getPlayerUID gets steamid64 ,

#

you have the command canAdd which checks if it can fit into your inventory

#

and obviously the uniform and vest, backpack variants

frigid raven
#

player canAdd ["Intel_File1_F", 1] // true
[player, "Intel_File1_F"] call CBA_fnc_addItem // false

#

๐Ÿ˜ƒ

#

๐Ÿ”ซ

meager heart
#

what about just addItem ?

#

also afaik parent category for the cup items CfgWeapons not CfgVehicles

frigid raven
#

what u mean?

frigid raven
#

I copied that

#

from 3DEN Config Viewer

meager heart
#

Intel_File1_F < that is vanilla one ?

frigid raven
#

ehm it is CBA I think

#

I saw the icon of it on the Editor

#

CBA Icon

#

A question - might it be that CfgWeapons can be picked up but cannot have any actions attached - but CfgVehicles can have Actions attached but cannot be picked up?

#

If so - then I understand why I am not able to add it to my inventory. These Intel Items yield an "Collect Intel" action

#

by "default" it seems

#

So... mybe that is the whole issue here where I am dangling around

#

Nah that theory does not work...

#

since configfile >> "CfgVehicles" >> "CUP_item_Cobalt_File" is CfgVehicle, too

#

and can be obtained

#

๐Ÿ˜ฆ meh I thought I had it ๐Ÿ˜ข

meager heart
#

try this >

0 spawn {
    private _document = "Intel_File1_F" createVehicle (player modelToWorld [0, 5, 0]);
    _document setVariable ["RscAttributeDiaryRecord_texture", "a3\structures_f_epc\Items\Documents\Data\document_secret_01_co.paa", true];
    [_document, "RscAttributeDiaryRecord", ["TopSikret Documets", "Documents description", ""]] call BIS_fnc_setServerVariable;
    _document setVariable ["recipients", playerSide, true];
    [_document, "init"] spawn BIS_fnc_initIntelObject;
};
#

server side only for the everything above ^, this is just an example... like always ๐Ÿ‘€

#

@frigid raven

frigid raven
#

what ... the hell

#

All this is needed to make this friggin object addable to my inventory?

#

I think I stick with the CUP objects then o_O

meager heart
#

turns out that interaction with docs items slightly... complicated ๐Ÿคท

#

and Intel_File1_F < that is vanilla item

frigid raven
#

alright gonna take care of that if my mod is v0.2 xD

#

btw: (typeName player) isEqualType "OBJECTasdasd"

#

how?

#

because both are String?

#

forget it - got it

#

Only one more hour of my questioning! Then I have to go to bed!

#

๐Ÿ’ 

cold pebble
#

player isEqualType objNull

frigid raven
#

yep - realized that now

#

thx

drowsy axle
#

Would someone be able to explain how to use Stringtables?

#

I have knowledge within HTML. So the tags are okay. I just want to understand how to apply it to (sentences) strings.

meager heart
drowsy axle
#

Ah sweet, tanks @meager heart

#

Do I have to do both: sqf // stringtable.xml <?xml version="1.0" encoding="utf-8" ?> <Project name="Any Name"> <Package name="Mission One"> <Container name="Some Words"> <Key ID="STR_myKey"> <Original>Hey there</Original> </Key> </Container> </Package> </Project> & sqf // config entry class Test { word = $STR_myKey; };?

meager heart
#

that was example how to use it in the configs

drowsy axle
#

Right. Okay, not required?

meager heart
#

yep

drowsy axle
#

Nice. Just checking.

unborn ether
#

Shouldn't it be word = "$STR_myKey"; ๐Ÿค” ?

meager heart
#

no

drowsy axle
meager heart
#

thats preproc error

#

check your included file

#

vanillaunits.sqf

#

also \

#

not /

drowsy axle
#

Might be why: also \ not /

meager heart
#

probably / < that is the problem

drowsy axle
#

Nope. I've went back to the editor and loaded it. Still an issue.

#

Worked as one file.

#

How would I make: sqf private _units = selectRandom [ CAP_Squad_OPFOR, CAP_WeapSquad_OPFOR, CAP_Team_OPFOR, CAP_ReconTeam_OPFOR ]; into only picking one of these?

frigid raven
#

How to have a nested magic variable? Can I call it _y ?

{
 {_y } forEach INTEL_ITEMS_WHITELIST;
 _x
} forEach _items;
drowsy axle
#

No. @frigid raven

frigid raven
#

So... no way to solve this?

drowsy axle
#

One sec

frigid raven
#

kk

#

ah well for loop eh?

drowsy axle
#
{
    _x = _y;
    {
         _y
    } forEach INTEL_ITEMS_WHITELIST;
     _x
     ...blah...
} forEach _items;```
frigid raven
#

...clever

#

๐Ÿ˜ฎ

#

...well

#

I dont get it tbh

#

๐Ÿ˜„

drowsy axle
#
{
    _x = _z;
    {
         _x = _y;
         {
             _z + _y + _x = _a;
         } forEach _blah3;
    } forEach _blah2;
} forEach _blah1;```
frigid raven
#

you assign _y to _x but... what is _y in that case

#

only _x is the magic variable

drowsy axle
#

Okay... one sec. @frigid raven

#

_uniform _vest _backpack ```sqf
_uniform = ["classname"];
_vest = ["classname"];
_backpack = ["classname"];

{
_x = _playerUniform;
{
_x = _playerVest;
{
_x = _playerBackpack;

        unit1 forceAddUniform _playerUniform;
        unit1 addVest _playerVest;
        unit1 addBackpack _playerBackpack;

    } forEach _backpack;
} forEach _vest;

} forEach _uniform;```

#

This is just an example.

#

It's an ineffective way of adding the players stuff. But it gets the point across, I hope.

#

I hope this helps you understand @frigid raven

frigid raven
#

sec

#

No I do not understand your assignments

#

_playerUniform = _x

#

that would be what I expect

#

You are sure you arent mixing this up?

ruby breach
#

He is definitely mixing this up

frigid raven
#

ok good - since the mixup is clear now. I still get your point @drowsy axle was just confused by the mixup of the assignments

drowsy axle
#

It works both ways.

ruby breach
#

No, it really doesn't.

drowsy axle
#

It was for more clarity

#

as _x into _blah

ruby breach
#

If you define _x as an undefined private variable, it's not going to work.

drowsy axle
#

I know. Sorry okay.. xD

#

If you define _x as an undefined private local variable, it's not going to work. -- It's not private in this code.

#

If you want to be correct ;P @ruby breach

ruby breach
#

Likely a slightly easier to understand example (although there's likely a better way to handle whatever you're doing than forEach) - ```sqf
{
_x params ["_var","_val"];
{_x setVariable[_var,_val];} forEach [Unit1,Unit2,Unit3];
} forEach [["var1","val1"],["var2","val2"]];

slender halo
#

also, there is no need for these forEach to be neasted

drowsy axle
#

Anything wrong with this? sqf {_x distance player > 1000 and side _x == east } count allunits != 0

#

What are you going off @slender halo my example?

meager heart
#

use findIf

drowsy axle
#

Where? @meager heart ๐Ÿ˜ƒ

ruby breach
ruby breach
#

As a replacement for everything you just typed

drowsy axle
#

ik I'm dumb. I thought it was within my code @meager heart

frigid raven
#

@drowsy axle thx works that way - a pity that I did not figured this way out by myself... as a 4y experienced dev...

drowsy axle
#

@frigid raven at some time, everyone needs help.

slender halo
#

wow, nice, haven't put my hands in sqf for a while, nice new command

frigid raven
#

meh... @still forum is an exception I am sure

drowsy axle
#

lol

#

sure

ruby breach
drowsy axle
#
allunits findIf {_x distance player > 1000 and side _x == east};```
wary vine
#

quick question, pveh vs remote exec for request and responses

slender halo
#

you should use && instead of and

drowsy axle
ruby breach
#

Depending on how the mission works, you could also make it a little faster with lazy evaluation

#

You also still need to check if it's greater than -1 to return a bool though

drowsy axle
#

fuck me

frigid raven
#

omg sweet - SQF Plugin for IntelliJ has a OnHover Documentation Update... so when my cursor is on a keyword I immediately can read the doc of BIS wiki โค

drowsy axle
#
enemyFromPlayer = allUnits findIf {_x distance player > 1000 and side _x == east};

if(enemyFromPlayer isEqualTo 0) then {
    TrigWave = true;
};```
#

oh my @frigid raven What is IntelliJ?

#

oh...

#

I used this "suite" for PHP.

ruby breach
#

That's still not going to work

frigid raven
#

Yea I am a Java Webdev so

ruby breach
#

Type number expected bool

frigid raven
#

I am using IntelliJ at work - for my private stuff I use emacs -> spacemacs on Arch Linux

drowsy axle
#

UPDATED

ruby breach
#

Still not going to work

drowsy axle
#

Why not?

ruby breach
#

Because findIf returns the zero based index of the first result

drowsy axle
#

ah

slender halo
#
({(_x distance player) > 1000 && {side _x == east}} count allunits) != 0
drowsy axle
#

Sorted my issue. It was my fault. I was doing two loops when I only wanted / expected 1.

meager heart
#
/*
    ({(_x distance player) > 1000 && {side _x == east}} count allunits) != 0
*/

#define EAST_ALIVE    (allUnits select {side _x isEqualTo east})

if (EAST_ALIVE findIf {_x distance player > 1000} != -1) then {
    /* code */
};
``` maybe ๐Ÿ˜ƒ
frigid raven
#

now download discord for linux terminal...

#

ill be back from teh other side...

meager heart
#

k

#

lol

drowsy axle
unborn ether
#
Example 1:
_unit = group player createUnit ["B_RangeMaster_F", position player, [], 0, "FORM"];
drowsy axle
#
{
    private _unit = _x createUnit [position _objects, CAP_UnitGroup];
    _unit forceAddUniform "U_O_Protagonist_VR";
} forEach _units;```
#

get the return value @unborn ether

#

Not the fucking thing... but the RETURN VALUE.

hollow thistle
#

are you trippin on something?

#

I can guess _units is supposed to be array of classnames.

#
type createUnit [position, group, init, skill, rank]

Return Value:
Nothing - NOTE: THIS SYNTAX RETURNS NO UNIT REFERENCE!

#

So change first line of your for each to:

private _unit = CAP_UnitGroup createUnit [_x, position _objects];
drowsy axle
#

Check the first syntax @hollow thistle

hollow thistle
#

You do not need to mention people every time you respond directly under their response.

drowsy axle
#

at least it ain't @ everyone

#

๐Ÿ˜›

#

anyway. I'll try you suggestion, but the first syntax says that it returns value.

hollow thistle
#

yes it says it returns the value.

#

And you're using the alterantive one.

drowsy axle
meager heart
#

lol

hollow thistle
#

๐Ÿคฆ

#

jesus

#

I'm out.

meager heart
drowsy axle
#

I see that. It is my bad. I thought I followed the first one.

tough abyss
#

Someone needs a crash course in how to read and understand commands syntax on wiki

drowsy axle
#
{
        private _unit = CAP_UnitGroup createUnit [_x, position _objects, [], 0,"NONE"];
        _unit forceAddUniform "U_O_Protagonist_VR";
    } forEach _units;``` My apologises @hollow thistle / @meager heart
#

Someone needs a crash course in how to read and understand commands syntax on wiki What book is that in?

#

@tough abyss ^ is joke dw

tough abyss
#

The book @queen cargo is writing I guess

queen cargo
#

Writing is not coming along good tbh... Not very creative lately..

meager heart
#

oh btw...

queen cargo
#

Mhh? @meager heart

meager heart
#

i'm doing something wrong there ?

#

i mean was expecting [[1, 228, 3, 4, 5], [6, 228, 8, 9, 10]]

ruby breach
#

Technically that's what you got. Just with a lot of extra zeros displayed

meager heart
#

yeah, with extra precision

#

X39, probably on mobile...

queen cargo
#

Yup

#

The str method is literally just float to string without any formatting done in sqf-vm

#

Can be fixed fairly easy.. But.. Never really bothered

meager heart
#

ok i see

queen cargo
#

When implementing tofixed I will "fix" that ๐Ÿ˜‰๐Ÿ˜‚

meager heart
#

rgr

#

well... it's ok how it is atm, just to much 0000 ๐Ÿ˜ƒ

tough abyss
#

You might want to remove spaces after comma too, arma packs arrays tight when str ing it

queen cargo
#

Nah
Want that formatting space.. Hate how arma just ignores that

#

Though.. All is optional ๐Ÿคทโ€โ™‚๏ธ can Start a vote for it

tough abyss
#

No itโ€™s great, easy to parse

drowsy axle
#

Guys. You need to check this out... I am so proud of this.

#

All by my lonesome: ```sqf
_loadouts = selectRandom [
"RIFLE",
"UGL"
];

{
    CAP_unit = CAP_UnitGroup createUnit [_x, position _objects, [], 0,"NONE"];
    private _handler = [_loadouts] execVM 'CAP\loadout\rifleman.sqf';
    waitUntil {scriptDone _handler};
} forEach _units;```
#

Obvs excluding the things YOU wonderful peeps helped with.

#
params ["_loadout"];

if (_loadout isEqualTo "RIFLE") then ...```
#

oh wait. the _loadout needs to be within the {}forEach.

#

Otherwise each unit is the same.

meager heart
#

that execVM there...

drowsy axle
#

wut? abut it? @meager heart

meager heart
#

it's bad

drowsy axle
#

I know.

#

I tried using CAP_fnc_rifleman

#

but I couldn't be bothered at the moment with functions.,

meager heart
#

the worst thing that you are using it in a loop

drowsy axle
#

Why is it bad?

#

it seems fine, for now.

meager heart
#

well... up2u

drowsy axle
#

I'd rather improve it.

#

and it does work.

#

So no need for sloppy coding.

#

I always just try and get things to get an expected result and tidy up afterwards.

regal kraken
#

Hmm does the engine assign a rank to each soldier? And I guess there's an option somewhere to make that rank visible to the players (eg. in front of the name in various contexts)? Possibly even with the graphics of the rank insignia?

drowsy axle
#

@regal kraken ShackTac HUD does this, along with ACE.

#

Defaulted to Private.

regal kraken
#

So the service from the engine itself is rather limited (like in many cases - but it's still there at the bottom)?

regal kraken
#

Okay. I'm asking more from a roadmapping PoV ๐Ÿ˜ƒ

drowsy axle
#

drawIcon3D [format["\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa", rank _x], [1,1,1,1], _pos, _size, _size, 0, "", 0, 0, "PuristaSemibold"];

regal kraken
#

Good to know there are existing examples

queen cargo
#

Got few more of those fancy ones
Full promise System for example @drowsy axle ๐Ÿคทโ€โ™‚๏ธ๐Ÿ˜‚

regal kraken
#

Important question is what kind of licensing the mods can provide?

drowsy axle
#

?? @queen cargo

queen cargo
#

Yup

drowsy axle
queen cargo
#

Do as you like ๐Ÿคทโ€โ™‚๏ธ๐Ÿคทโ€โ™‚๏ธ ๐Ÿ˜‚

drowsy axle
#

Imagine if it took the draw tool from the map... dicks in the air lol

queen cargo
#

๐Ÿ˜‚๐Ÿ˜‚

drowsy axle
#

pls tell me that is it possible. xD

queen cargo
#

It is

drowsy axle
#

oh wow

#

xD

queen cargo
#

Though.. Not sure 100%

drowsy axle
#

I would pay 0.01 for that.

queen cargo
#

You need the line Info

drowsy axle
#

Before:
Enemies are here.. marked on map.

After:
Enemies are here.. marked in the air, with a downfacing arrow.

queen cargo
#

?

drowsy axle
#

Good code or what?

queen cargo
#

I am on mobile
And will not judge at this time of the day

drowsy axle
#

Hahah okay.

#
hint format["Wave %1.",_w];

[ 
  ["VR SYSTEM","Wave: %1.",0]
] spawn BIS_fnc_EXP_camp_playSubtitles;``` How can I get format to work with `playSubtitles`?
#

The above is an example, to show my expected results and NOT my attempt to solve. ^

glad edge
#

is there a way to make a trigger, trigger allies to fire at you regardless of being allies but only in the vicinity of the trigger?

#

(i.e. I'm trying to make a game mode where I play as independent and only want enemies to fire at me when I'm in restricted zones such as bases, but not out in the streets)

glad edge
#

or have them just enemies that don't fire unless fired upon until entering a restricted zone

frigid raven
#

@drowsy axle

    for "_i" from 1 to 9 do {CAP_unit addItemToBackpack "1Rnd_HE_Grenade_shell";};

Can you explain the loop? Isn't there a way to actually tell the amount to be added beforehand by a func param?

tough abyss
#

@glad edge try making something like undercover mode from antistasi, if the player isn't wearing military gear and is far from an enemy base then change the side relations to friendly.

glad edge
#

But I wanna run around with military gear and not get shot until I fire at something or someone

#

Excluding in bases, then just shoot me

frigid raven
#

@tough abyss is this feature open source? I want to add something similar in the future

#

ah sorry

#

I read "I try making..."

tough abyss
#

Ok then just check if the player is near to a mil base and then change side relations

frigid raven
#

implying that you are working on such a feature

tough abyss
#

@glad edge

glad edge
#

How would I do that

#

(and I'll have to do it tomorrow since I need to sleep)

frigid raven
#

sleep? we don't do that here

marble basalt
#

anyone know the function to cause blood to spawn under the player? working on bleeding script

frigid raven
#

brutality

marble basalt
#

what?

frigid raven
#

Sorry was just saying brutality... because it sounds brutal

#

not any contstructive info tho.. sorry

marble basalt
#

rip

#

yah trying to add a old school bleeding script to replace the basic and quite underwhelming one exile has built in

#

wanting to remake the one from arma 2

#

dayz*

frigid raven
#

Doesn't ACE3 medical has this?

marble basalt
#

thats ace

frigid raven
#

mybe you can grab some codez from them

#

oh

marble basalt
#

and ace breaks everything

#

and i could try

#

but idk

peak plover
#

function to cause blood to spawn under the player?

#

This literally means nothing and everything

#

What exactly do you want?

high marsh
#

blood decal underwater?

peak plover
#

blood spray_

#

decal?

#

icon?

still forum
#

@frigid raven https://discordapp.com/channels/105462288051380224/105462984087728128/491657375967739904 Grab a AIO config. Just google "Arma AIO config" there is a BI forums thread with them uploaded.
https://discordapp.com/channels/105462288051380224/105462984087728128/491672145093591050 no it isn't. Weapons are CfgWeapons. Not CfgVehicles.
the document object is NOT added to my inventory BUT placed on the ground That's a special feature of CBA_fnc_addWeapon.
https://discordapp.com/channels/105462288051380224/105462984087728128/491678959541551125 yes. You cannot add vehicles to your inventory.
There are many CfgVehicle entries for items so that you can place them directly in the Editor. Get the classnames out of Arsenal instead.
https://discordapp.com/channels/105462288051380224/105462984087728128/491693699030450178 which doesn't even make any sense to check anyway. Because player is always object.

@unborn ether https://discordapp.com/channels/105462288051380224/105462984087728128/491710449826660375 yes. But "most" binarizers automatically detect that it has to be a string and add the quotes internally.

@drowsy axle https://discordapp.com/channels/105462288051380224/105462984087728128/491713738920165377 Huh? selectRandom is already only picking one of these

@frigid raven https://discordapp.com/channels/105462288051380224/105462984087728128/491713746167922688 just put it into a different variable.
_myStuff = _x;
Ignore the crap posted by Capwell. He mixed up left and right hand side when assigning variables.

@meager heart https://discordapp.com/channels/105462288051380224/105462984087728128/491726772547878926 findIf is intended to not make it iterate through everything. What you did is iterate through everything and then findIf again. Bad solution.

#

@drowsy axle https://discordapp.com/channels/105462288051380224/105462984087728128/491743317948628992 like any other return value.
private _var = <command>
https://discordapp.com/channels/105462288051380224/105462984087728128/491748158796333056 Are you drunk?

@tough abyss https://discordapp.com/channels/105462288051380224/105462984087728128/491751162001883140 not like we tried a dozen times.
https://discordapp.com/channels/105462288051380224/105462984087728128/491759990491709451 use private for your loadouts. Also do you really need to pack that into an array before execVM'ing? No actually you don't.

Also why execVM and wait? Instead of just call? That's kinda stupid

https://discordapp.com/channels/105462288051380224/105462984087728128/491843667703889933
Easier https://community.bistudio.com/wiki/backpackContainer https://community.bistudio.com/wiki/addItemCargoGlobal
for "_i" from 1 to 9 do {CAP_unit addItemToBackpack "1Rnd_HE_Grenade_shell";};
->
backpackContainer CAP_unit addItemCargoGlobal ["1Rnd_HE_Grenade_shell", 9] Much better to read isnt it?

#

Good morning ๐Ÿ‘‹

meager heart
#

What you did is iterate through everything and then findIf again ...?

#

there is only 1 findIf ๐Ÿ‘€

still forum
#

(allUnits select {side _x isEqualTo east}) and a select that iterates through all units

#

Just because it's hidden in a macro doesn't mean it's not there ^^

meager heart
#

ok i see what you mean, better option for that ? ๐Ÿค”

still forum
#

keep both inside the findIf

meager heart
#

kk

still forum
#

Okey.. Most bestest variant probably allUnits inAreaArray to grab all ones in distance

peak plover
#

Also

#

Why did you use a macro there?

meager heart
#

check there commented stuff... makro was just for readability

peak plover
#

Aah okay

#

That makes sense

#

If there's no reason to save it into a variable, the best way to make big if statements more readable is macro

#

Never thought of it like that

#

But mostly you'd want as few loops and as few iterations in those as possible

#

(findIf >> side check >> inArea check)

#

Real question is

meager heart
#

anyway that will be used in execVM'ed script in the forEach loop... just tried to make it a bit better ๐Ÿ˜„

peak plover
#

Did you consider frinedly fire in this scenario?

#

What if a unit friendly fires, so their side is no longer east

meager heart
#

Mr.@drowsy axle will answer that question, i have no idea tbh ๐Ÿ˜ƒ

#

nigel, scroll up there was long conversation with few parts lol

frigid raven
#

@still forum you really took time to answer all of our stuff. You have to love us somehow... u just have to

still forum
#

Either that or do work.

tough abyss
#

Discord links donโ€™t work in mobile app so no Idea what you referred to

still forum
#

Trying to get him to read wiki

tough abyss
#

Oh I see

still forum
tough abyss
#

Your attempts are futile, pathetic humans!

frigid raven
#

you guys cry at night eh?

queen cargo
#

sometimes
but that is mostly related to someones xxx-life

#

or due to hellish dreams of SQF realms where in all eternity i will be doomed to serve to the hellish god of horror

frigid raven
#

Will I ever be a good coder?

still forum
#

How long have you been at this and how long do you expect to continue?

proven crystal
#

does someone here know a little about the insides of VCOM? I have a few questions about the flanking, call for reinforcements and the advancedmovement

#

specifically, if i set Advancedmovement to false, will that disable the call for backup as well?

still forum
proven crystal
#

rgr

late gull
#
if (count(nearestObjects [player, ["house"], 250]) > 0) exitWith {
    hintSilent "too close to a house - 250m";
};
#
"Land_Pot_02_F"
#

why the hell is that pot detected like a house? :S

still forum
#

Because. Simulation type house

#

I use that too for my non house things

late gull
#

any trick?

still forum
#

Can't really think of anything ๐Ÿค”

late gull
#

thinking

still forum
#

check size of bounding box? If it's too small it's probably not a house

#

Depends if you consider a dog house or a garden shed as a "house"

late gull
#

can i get the class in someway?

#

1de999bc100# 1779935: pot_02_f.p3d

#

how to get only the model, or the class of this model

hollow thistle
#

typeOf - returns config classname

late gull
#

oki, got it

meager heart
#

sizeOf+typeOf maybe

hollow thistle
#

bounding box solution would be universal though.

late gull
#

nope, pure sqf

hollow thistle
#

or sizeOf as sldt1ck said, but sizeOf is inaccurate.

#

I'm not sure if it is consistent between objects.

late gull
#
private _nearHouses = nearestObjects [player, ["house"], 250];
if (count(_nearHouses) > 0) then {
    {
        if (typeOf _x != "Land_Pot_02_F") exitWith {
            hintSilent "too close to a house - 250m";
        };
    } forEach _nearHouses;
};
#

works

hollow thistle
#

on this map, in this place you're checking ๐Ÿ˜‰

meager heart
#

oh btw... maybe entities with base class and excludes ๐Ÿค”

late gull
#

it should be a then :p

meager heart
#

probably will be really slow...

late gull
#

because the range?

#

can get too many items in the middle of the town

meager heart
#

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

still forum
#

If you're using cba you can try
nope, pure sqf

CBA is pure SQF tho..

#

Btw we have findIf for things like that

late gull
#

but i have no idea how to use CBA xD

#

this findIf it's a new thing huh? 1.82

still forum
#

yush

proven crystal
#

you could check for the count of positions

#

pot wont have positions, but on the other hand it probably may malfunction if the houses around dont have positions either

#

in towns you shouldnt have a problem, that would only happen if you are somewhere rural and the only house around has no positions

#

@late gull

late gull
#

hmm ok, ty

proven crystal
#

most buildings do have positions though. i think even some of the ones you cant enter for some reason. but i dont know that for sure. i think in most cases you would find some sort of shed next to them, which then has a position...

#

so i guess if your plan is to avoid buildings, it might do the job in 95% of the cases....

late gull
#

but what's the problem with my solution code? :p

proven crystal
#

works too, but no idea if other items would pop up too

#

if thats the only one yours is fine ^^

late gull
#

the only whitelisted it's that pot

#

:p

proven crystal
#

if its more but rare cases, make an aray of objects

drowsy axle
#

@peak plover Did you consider frinedly fire in this scenario? What if a unit friendly fires, so their side is no longer east Once a unit friendly fires. It becomes (sort of) civillian / rating = -1;sqf if (player rating =< -1) then { player addRating 999; };

peak plover
#

It becomes side enemy

drowsy axle
#

Nope.

#

What you can't do is change a unit's side at runtime.

#

Once the rating is above or equal to 0 then it "becomes" a friendly side again.

#

This can be seen in Zeus.

#

@still forum the for "_i"loop is the default export of Arsenal Loadouts.

#

Is the use of params okay here: ```sqf
CAP_fnc_removeAll = {
params ["_this"];

removeAllWeapons _this;
removeAllItems _this;
removeAllAssignedItems _this;
removeUniform _this;
removeVest _this;
removeBackpack _this;
removeHeadgear _this;
removeGoggles _this;

};

CAP_fnc_RIFLE_East = {

params ["_this"];

_this forceAddUniform "U_O_Protagonist_VR";
for "_i" from 1 to 3 do {_this addItemToUniform "30Rnd_762x39_Mag_Tracer_F";};
_this addBackpack "B_ViperHarness_blk_F";
for "_i" from 1 to 4 do {_this addItemToBackpack "FirstAidKit";};
for "_i" from 1 to 16 do {_this addItemToBackpack "30Rnd_762x39_Mag_Tracer_F";};
for "_i" from 1 to 2 do {_this addItemToBackpack "SmokeShellRed";};
_this addHeadgear "H_HelmetSpecO_blk";_this addGoggles "G_Goggles_VR";
_this addWeapon "arifle_AK12_F";_this addPrimaryWeaponItem "acc_flashlight";

};

CAP_fnc_RIFLE_West = {

params ["_this"];

_this forceAddUniform "U_B_Protagonist_VR";
for "_i" from 1 to 3 do {_this addItemToUniform "30Rnd_762x39_Mag_Tracer_F";};
_this addBackpack "B_ViperHarness_blk_F";
for "_i" from 1 to 4 do {_this addItemToBackpack "FirstAidKit";};
for "_i" from 1 to 16 do {_this addItemToBackpack "30Rnd_762x39_Mag_Tracer_F";};
for "_i" from 1 to 2 do {_this addItemToBackpack "SmokeShellRed";};
_this addHeadgear "H_PilotHelmetHeli_B";_this addGoggles "G_Goggles_VR";
_this addWeapon "arifle_AK12_F";_this addPrimaryWeaponItem "acc_flashlight";

};```

still forum
drowsy axle
#

I know.

still forum
#

that use of params is "okey" yes. But stoopid

#

What you are doing is _this = _this

#

Sure.. You can do that if you really want to... but..

drowsy axle
#

Because _this wasn't defined.

#

I ran it without the params

hollow thistle
#

๐Ÿ™ƒ

still forum
#

Then it will still be _this = _this

#

and if _this is not defined then _this will also be not defined

drowsy axle
#

It is, through the [] call bit

#

[player] call CAP_fnc_removeAll;

tame portal
#

nil call CAP_fnc_removeAll

tough abyss
#

That wonโ€™t do anything

#

You need to put nil in array if you want to pass it around

still forum
#

Maybe not doing anything is the intention here

tame portal
#

was just a guess, couldnt check myself and its been some time ๐Ÿ˜›

still forum
#

[player] call CAP_fnc_removeAll; why though? Why put it in array just so you have to write extra code to take it out again?
player call CAP_fnc_removeAll; and just use _this and you're golden

drowsy axle
#

Right.

still forum
#

Shame ๐Ÿ””

drowsy axle
#
[CAP_Unit,_loadouts] execVM 'loadout\spawnedAI.sqf';``````sqf
params ["_unit","_loadout"];

_unit call CAP_fnc_removeAll;

if (_loadout isEqualTo "RIFLE" && ((side _unit) isEqualTo east)) then { _unit call CAP_fnc_RIFLE_East } else { _unit call CAP_fnc_RIFLE_West };

if (_loadout isEqualTo "UGL" && ((side _unit) isEqualTo east)) then { _unit call CAP_fnc_UGL_East } else { _unit call CAP_fnc_UGL_West };```
#

Would it be better to rename _this to _unit?

tame portal
#

it would make it more readable yea

drowsy axle
#

Okay

#

Removed the []'s as not needed.

meager heart
#

you can use _unit call CAP_fnc_removeAll once b4 the if's and remove it from there...

drowsy axle
#

Yeah. You are right.

tough abyss
#

Just tested serverTime seems to be fixed

drowsy axle
#

Does having something in the init.sqf make it available both server and client?

meager heart
drowsy axle
#

init.sqfsqf if (playerSide isEqualTo east) then {CAP_UnitSide = west;}; if (playerSide isEqualTo west) then {CAP_UnitSide = east;}; if (playerSide isEqualTo independent) then {CAP_UnitSide = east;};initServer.sqfsqf if (CAP_UnitSide isEqualTo east) then {CAP_UnitGroup = createGroup west;}; if (CAP_UnitSide isEqualTo west) then {CAP_UnitGroup = createGroup east;}; if (CAP_UnitSide isEqualTo independent) then {CAP_UnitGroup = createGroup east;};spawnedAI.sqfsqf if (_loadout isEqualTo "RIFLE" && (CAP_UnitSide isEqualTo east)) then { _unit call CAP_fnc_RIFLE_East } else { _unit call CAP_fnc_RIFLE_West }; if (_loadout isEqualTo "UGL" && (CAP_UnitSide isEqualTo east)) then { _unit call CAP_fnc_UGL_East } else { _unit call CAP_fnc_UGL_West };

meager heart
#

oh crap... init.sqf Executed when mission is started (before briefing screen) < Event_Scripts page ๐Ÿ˜ƒ

#

it runs on the server and clients

cedar kindle
#

use initPlayerLocal.sqf

meager heart
#

and initServer.sqf

drowsy axle
#

initPlayerLocal.sqfsqf [ ["VR SYSTEM","Welcome to Wave Defence! Contact your Instructor to get your Loadout!",0] ] spawn BIS_fnc_EXP_camp_playSubtitles; //player call CAP_fnc_removeAll; //player call CAP_fnc_RIFLE_West; InstructorGuy addAction ["Loadout: Rifleman.",{ player call CAP_fnc_removeAll; player call CAP_fnc_RIFLE_West; }];

meager heart
#

waitUntil {time > 2}; < better do not suspend init scripts

drowsy axle
#

Okay

meager heart
#

if you need delay there use spawn

still forum
#

waitUntil {time > 2}; < better do not suspend init scripts only really matters for postInit. The others atleast have no negative effects if they even let you slp

drowsy axle
#

is that correct? waitUntil {(vehicle player) == player};

#
[] spawn {
    waitUntil {(vehicle player) == player};
    [ 
      ["VR SYSTEM","Welcome to Wave Defence! Contact your Instructor to get your Loadout!",0]
    ] spawn BIS_fnc_EXP_camp_playSubtitles;

    //player call CAP_fnc_removeAll;

    //player call CAP_fnc_RIFLE_West;

    InstructorGuy addAction ["Loadout: Rifleman.",{
        player call CAP_fnc_removeAll;
        player call CAP_fnc_RIFLE_West;
    }];
};```
still forum
#

if you want to wait till the player is not inside a vehicle.. yes

peak plover
#

I think he wants to make sure player is pointing to the player

still forum
#

๐Ÿค”

#

you mean.. !isNull player?

meager heart
#

player in player

frigid raven
#

To be or not to be

#

I often ask myself if I exist, too

#

So it is a philosophical code expression which should not be judged!

drowsy axle
#

waitUntil {player in player}; Would that work @meager heart

meager heart
#

๐Ÿ˜ƒ

cedar kindle
#

this is not needed in initplayerlocal

#

player is always defined there

meager heart
#

i mean... dude, that was joke... even if it works ๐Ÿ˜‰ don't use it

#

@drowsy axle

drowsy axle
#

x

#

xD

#

How about: waitUntil {vehicle player = player};?

tough abyss
#

waitUntil {vehicle player == player};
ftfy

drowsy axle
#

ftfy?

tough abyss
#

fixed that for you

drowsy axle
#

o

#

k

#

tanks

tough abyss
#

IFVs

#

What if player starts in vehicle already?

ruby breach
#

(isNull objectParent player) is a better way to do that

tough abyss
#

^ agreed

tough abyss
#

How do I set things up to be able to play a sound from a file?
I got it in the description.ext and using this addAction ["Play", {playSound3D ["sound.ogg", _this select 3]}, this]; says that Sound: Error: File: sound.ogg not found !!!

class CfgSounds
{
    sounds[] = {sound};
    
    class sound
    {
        name = "sound";
        sound[] = {"sound.ogg", 1, 1.0, 100};
        titles[] = {};
    };
};
proven crystal
#

path to the sound file complete?

tough abyss
#

well it's in the mission root directory, that should work?

proven crystal
#

i guess then the path is correct yep

tough abyss
#

Maybe check wiki?

#

Sound file extension must be specified even if a config entry has none:

#

so it has to have the file extension

errant jasper
#

Read the wiki comments. To play mission sound files you have to do something else with the path.

tough abyss
#

theres something about correct path for custom missions

errant jasper
#

And even then, I would guess it suffers from the same issue as setObjectTextureGlobal has with mission paths.

tough abyss
#

ok it works now, thanks.
I'll send you the mission if I finish it.

proven crystal
#

i dont seem to be capable of creating some local markers via remoteexec

#

[_side,_unit] remoteExec ["fez\fez_AI_OPS\fez_OPS_Intel_Localmarkers.sqf", 0, true];

#

supposed to create some markers for players depending on their side

#

so for _side show a marker on the _unit

tough abyss
#

remoteExec looks fine, probably something wrong with the Localmarkers.sqf

proven crystal
#

i have a diag log in the beginning of that file but not even that shows up in the rpt

tough abyss
#

well there's your problem

#

Read the wiki comments. To play mission sound files you have to do something else with the path.
this

#

yeah I got it now

#

one second

#

Fetzen

#

I know whats wrong

proven crystal
#

what is it then?

tough abyss
#
    _soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
    _soundToPlay = _soundPath + "sounds\monster_condom.ogg";
    playSound3D [_soundToPlay, _unit, false, getPos _unit, 10, 1, 50]; ```
#

You're putting a file in there

#

remoteExec takes in function names

ruby breach
#

RemoteExec needs a function to be an actual function (defined in CfgFunctions and CfgRemoteExec), and not a filepath iirc

proven crystal
#

hmm crap

#

cant i put a bit of code in there?

#

dammit

tough abyss
#

here's something that should work:
{ // execute the file here, with execVM or something } remoteExec ["bis_fnc_call", 0, true];

#

so for your example it would be:

still forum
#

remoteExec execVM ?

tough abyss
#

Ok fine

#

Copy paste the code in there i guess

proven crystal
#

will try thanks

#

hmm but how do i pass the "_side" parameter now?

#

because i want to create those markers only on clients of a specific side

ruby breach
#

Why even pass a side parameter at all then?

#

You're already using remoteExec

#

Just remoteExec to one side only

proven crystal
#

good point

#

but i think i figured it out

#

works now thanks everyone

frigid raven
#

I failed on declaring a sub-folder in my CfgFunctions. Can anybody tell me what the mistake here is:

    class Scripts {
      file = "Scripts";
            class initEventsServer {};
            class initEventsClient {};
            class addPlayerActions {};
            class addPlayerVariables {};
            class initNpcs {};
            class punishRenegade {};
            class saveReputation {};

        class Profiles {
            file = "Scripts\Profiles";
            class createPlayer {};
            class addRegisterAction {};
            class login {};
            class playerLogin {};
            class getPlayerProfile {};
            class registerPlayer {};
          };
        }
tough abyss
#

no ;

#

in class Scripts { }

austere granite
#

wouldn't matter, it would still load just give a message in RPT

#

whats your full cfgFunctions config?

#

I also don't think cfgFunctions even does multiple file entries with extra subfolders

#

aka your nested Profiles class would not load

frigid raven
#

yea that is whats happening

#

only profiles doesnt load

#

well that I have to flat it out

#

@tough abyss so I do not need ; at the end of the class <funcName> {} ?

tough abyss
#

i meant you are missing the semicolon

austere granite
#

You just have to move Profiles up a level

#

Then it should work

#

I don't think cfgFunctions have ever been recursive

unborn ether
#

@frigid raven The best way to nest CfgFunctions is to do something similar to this:

class CfgFunctions {
    class DT {
        tag = "DT";
        class Systems {
            file = "\yourServer\functions";
            class yourFunction {};
        };
    };
};
#

You'll never messup anything in your mind.

frigid raven
#

Ah ok now I get it

#

thx ^^

peak plover
#

Are there any othjer damage systems other than ace3?

tough abyss
#

yes the vanilla one?

hollow thistle
tough abyss
#

20x20km map of region of Russia
im sold

hollow thistle
#

I'm sure if all of the stuff that is advertised is done, their workshop entry has 400mb ๐Ÿ˜…

tough abyss
#

theres probably like 20 dependencies so it adds up to like 30GB

peak plover
#

No there's not 20 dependencies

#

Thanks @hollow thistle I'll check it out

tough abyss
#

Whats a good sizeEx to use?

peak plover
#

Something something safeZone

#

You can find out how big the screen is

#

Setting the text size according to the size of the screen is good (for me)

frigid raven
#

Do you guys always make a ; on one-line expressions?

player addAction ["Show reputation", { [_this select 0, clientOwner] remoteExec ["X11_fnc_showReputation", 2]; } , [], 0.5];

for instance

#

I'd like to get rid of the ...remoteExec ["X11_fnc_showReputation", 2]; <<<

#

but wanna stick with the best practises

unborn ether
#

@frigid raven AFAIK using ; after the function return might give some issues, so using something like:

DT_fnc_someFnc = {
    private _string = "";
    _string;
};

Will haver issues (you might ask Dedmen for example, if its total true).
So usually I stick to syntax where {...}; and not {...;}; since your function actually will look like the last one (remoteExec usually returns "")

still forum
#

I do. Unless it's a return value or inside otherwise oneliners like your example

#

AFAIK using ; after the function return might give some issues, so using something like: no.

unborn ether
#

Well that's why I asked to confirm, I heard that wrapping return with ; gives some issues.

tough abyss
#

As a C++ programmer, missing semicolons haunt me in my sleep.
So I put them everywhere I can.

frigid raven
#

alright then

#

dont want nightmares

copper raven
#

Hello, is there a way to skip loading time of a magazine? Not talking about reload time between shots, talking about reload time for the whole magazine. Adding something like Titan AA to a vehicle. It takes long time for it to be loaded, looking for a way to skip this, without having to use mods.

frigid raven
#
private _playerProfiles = profileNamespace getVariable [KEY_PLAYER_PROFILES];

Where KEY_PLAYER_PROFILES is from a constants.hpp file.
How can I have it be used like a string?
I actually defined it as such - but it is not used as one:
#define KEY_PLAYER_PROFILES "dpl_player_profiles"

#

@copper raven sorry did not read your question - did not want to interfere

copper raven
#

Not talking about reload time between shots

drowsy axle
#

How do I reference a mission in the server.cfg that is inside a mods addon folder?

hollow thistle
#

AFAIK using ; after the function return might give some issues, so using something like: IDK where you get your "wisdom" but you're saying bullshit for another time. (remember remoteExec discussion?)

#

No hard feelings tho.

copper raven
#

Had high hopes for that command when i saw it FeelsBadMan

frigid raven
#

@copper raven
The description is confusing to me. What the command essential does is to set the reloading state/time of the given weapon. For example you can fire a missile, and make the weapon available to fire again instantly if you apply 0

#

thats what sb. tells about the mentioned function actually

#

and u demanded Adding something like Titan AA to a vehicle. It takes long time for it to be loaded, looking for a way to skip this, without having to use mods.

ruby breach
#

xetra, you're mixing syntaxes

frigid raven
#

@ruby breach tell me more wise one

ruby breach
#

getVariable is either a string, or an array w/ 2 elements

copper raven
#

You can change reload time in a magazine between missiles with that command, but not reload time of the actual magazine itself.

frigid raven
#

ah ye sorry @ruby breach forgot about the default value

#

@copper raven ah ok - wow confusing stuff

still forum
#

@copper raven it does exactly that tho

#

read the notes at the bottom

copper raven
#

It only works for me between shots, doesn't work for the magazine, tried it for 3rd time now.

Add 4Titan AAs(magazine: "4Rnd_Titan_long_missiles")
Command has no effect
After Titan AAs have loaded
Shoot
Command works, reload time 0
Can shoot again instantly

still forum
#

yeah. You start reloading and then run the command once you started reloading

#

which should insta finish the reload

copper raven
#

Thats exactly what i'm doing. It has no effect, it only works when you run the command after firing from a loaded mag. When you add a mag through addMagazineTurret or so, that command doesn't have any effect on that loading time.

#

Tried emptying magazine after addMagazineTurret, then setting it back to 4, loading time was still persisting.

tough abyss
#

Donโ€™t empty the mag, set ammo back with penultimate shot

gleaming cedar
#

Guys, anyone knows how to do a spark effect?

#

I have a dragon egg you need to collect, how do I make it kinda magical and make particles come from it

#

why

#

๐Ÿ˜ฆ

#

๐Ÿ˜„

#

Dragon emoji

#

Want a pic of it?

meager heart
#

๐Ÿ˜ƒ

#

if there is no ๐Ÿ”ž content

gleaming cedar
#

THERE IS ALWAYS 18+ CONTENT

still forum
#

Dragon + ๐Ÿ”ž ... ๐Ÿค”

#

Well you certainly want particle effects

#

But I don't know if there is already one that would do what you want

#

and particle coding is.... ugly

austere granite
#

Particle config creation is the very best thing about arma

#

And I'm really upset that the one of the few things BIS is doing for DayZ modtools, is having a different particle editor

gleaming cedar
austere granite
#

/s

gleaming cedar
#

I can't find any way to change the radius on it

#

So I thought maybe someone made a particle or can help me with making one

still forum
#

Well just making that existing one smaller is alot easier than making a new one

gleaming cedar
#

But I don't find any value to do so

still forum
#

If you're making a mod you can copy that thing in the forum and just make size or sizeVar smaller

#

Which is the "ugly" part

gleaming cedar
#

Aren't size and sizevar only for the particle itself not for the radius?

drowsy axle
#

How do I reference a mission in the server.cfg that is inside a mods addon folder?

gleaming cedar
#

@drowsy axle Let me see I dont this before

#

@drowsy axle I think it's in the server config file

#

class Mission1
{
template = "MyMission.Altis"; // Filename of pbo in MPMissions folder
difficulty = "Regular"; // "Recruit", "Regular", "Veteran", "Custom"
};

#

Here you need to change it

still forum
#

Oh. yes they are. Radius is more speed of particle and lifetime. And I think volume maybe?

drowsy axle
#

@gleaming cedar I mean.

meager heart
#

Dragon + ๐Ÿ”ž ... ๐Ÿค”
Dedmen, when you see this kind of question Want a pic of it? in the internet... there is so many options... ๐Ÿ˜„

still forum
#

I know many of these options

#

cough

austere granite
#

furry

#

strikes again

still forum
#

Awwo

austere granite
#

OwO

meager heart
#

๐Ÿ˜ƒ

still forum
#

Just kinda new to me that @meager heart knows ๐Ÿค”

meager heart
#

I mean... I was there before your parents met, saw a lot ๐Ÿ˜ƒ

gleaming cedar
#

@still forum are u actually a furry

still forum
#

OwO

#

totally not

gleaming cedar
#

lol

meager heart
#

he used to be a werewolf but he feels better nowwwwwww

still forum
#

ouuuuuuwww

#

@gleaming cedar I might be able to make that particle params thingy for you tomorrow in like... 10-12 hours from now.
If I don't forget

gleaming cedar
#

Alright that is cool then I'll go catch some sleep soon

#

I been working on this stupid egg mission for over 12 hours now lol

#

And it's just one scene of the like 10

#

I have an underwater mission which sharkes which I need to give a new AI path

meager heart
#

there was some "particles effects editors" on bif, maybe you can try those

summer wren
#

@copper raven no

frigid raven
#

good morning dudes and dudettes and those not sure yet

compact maple
#

dudettes lmao

sturdy cape
#

Maybe someone can point me in the right direction.i made a vehicle claim / locking addon.i set an inventoryopened eventhandler to lock inventory also and this works fine.but: if you would have a groundholder next to the veh you can access its inv by selecting the crate inv on the top left.anYone an idea what to do about this?

slender halo
#

does it happens on every vehicles ? even vanilla ?

sturdy cape
frigid raven
#

Is there a way to make an UberAddon ? I want to put my Mod plus ALiVE, CBA and ACE3 into one downloadable addon. I am aware of the problems with not having the actual versions of mentioned addons.

#

Just want a way to let ppl not think "omg this server is full of addons I do not know I won't join this"

still forum
#

Sure.. Just put them into a single folder. done.

frigid raven
#

๐Ÿ˜ฎ

still forum
#

all the pbo's into addons folder. And the other stuff into a single @mod folder.

#

But you cannot reupload to steam workshop or anywhere public

frigid raven
#

I see

#

so I can have my 10 @mod folders merged into one and ppl only see this one "@ theOne" addon when joining or browsing eh?

#

will the Arma 3 Launcher still realize what to download?

#

Or will it download a new addon called theOne

still forum
#

Arma 3 Launcher won't be able to auto-detect or download anything

#

As it can only auto-detect workshop mods. And only download from workshop. And as you can't reupload your pack to the workshop that won't help you.

frigid raven
#

I see

#

But it isnt impossible to load it up to steam however eh?

#

I want it to be available on steam, too somehow

#

like a addon called "Xetra11s CoolMod Package"

still forum
#

you can

#

But you risk getting your steam account banned. And getting banned from this discord as soon as someone finds out

#

soooo.. Bad idea.

frigid raven
#

... what?

#

did I missed something?

late gull
#

Just use A3Sync dude

compact maple
#

have you ever tried some oop on arma 3 ?

still forum
#

Yes I tried oop in Arma. Intercept ๐Ÿ˜„

compact maple
#

thats interesting, did you ever wrote something about it ? I would like to see how it works :d

inner swallow
#

It's on GitHub

compact maple
frigid raven
#

@still forum can you enlighten me? What would be the reason for banning if I pack addons to one file addon for convenient reasons?

late gull
#

@frigid raven dude use A3Sync and avoid problems

frigid raven
#

U dont get the point. I have a bunch of whiney buddies who wont join my friggin server if it is filled with more than 5 addons they don't have yet

#

I wanna decrease their cryation by offering just one addon

#

so their little hearts won't break

fringe yoke
#

Can't you just create a collection? Then they hit one button to get the addons.

inner swallow
#

^

#

That is indeed the better way of going about it

frigid raven
#

What is a collection now? In terms of steam workshop?

#

Or something very different

inner swallow
#

Yeah

#

Steam

frigid raven
#

Ah okay

#

Well that sounds like what I wanted to achieve

#

Why is a guy called @fringe yoke needed to direct me to that solution? why

inner swallow
#

Why not? ๐Ÿ˜„

frigid raven
#

You ask the important questions bud

#

Is it possible to kinda create a collection out of four addons and one map tho? ๐Ÿ˜„

#

I mean - Steam does not make any differences what kind of workshop items are uploaded eh?

#

w/e just gonna try it

still forum
#

collections are just... collections of whatever workshop items you want

#

They are basically just a list of items

frigid raven
#

kk

peak plover
#

@frigid raven

#

Best way to do this

still forum
#

As soon as you break out Arma 3 tools to upload someone elses mod to the workshop you become a topic in #ip_rights_violations

peak plover
#

Is to create you mod preset (a mod with nothing in it)

#

And add all the other mods as requirements for it on steam

frigid raven
#

wouldnt a collection do just that?

#

on the workshop side tho

peak plover
#

Using your preset

errant jasper
#

A collection is not a preset. A collection is just a list of mods. You have to manually enable the right mods in the launcher

peak plover
#

You can clikc subscribe to all dependencies

frigid raven
#

๐Ÿค”

errant jasper
#

A preset defines which mods should be enabled so you don't have too many or too few and the right ones activated.

frigid raven
#

alright then

errant jasper
#

But since almost no "organisers" bother to make presets, I use my own tool that takes a url to a steam collection and generates the preset file for me.

peak plover
#

You can make an empty mod

#

And add as many required mod as you want

#

When you then load this mod in arma 3 launcher

#

It will prompt you about subscribing to all required items

#

@errant jasper That seems like a good solution

#

I had a power shell script which downloaded mods and copied keys from the steam workshop. Only thing I had to change was 1 file with a list of steamworkshop IDs

#

For server

#

I'd really like that Bi made some decent implementation before the end of life for arma 3

frigid raven
#

@peak plover ah alright. That seems to be the way I gonna go

peak plover
#

Bi should really make both client and server side of things work flawlessly, it's not like the technology isn't out there

errant jasper
#

Yeah, they should. My tool is a tiny web application so everybody can get the preset. Basically you give a link to my tool where you appended the steam collection url. To sharing the "collection" as a preset was simply sharing a url.

#

Don't understand why they even bother using "only" the steam query language, when it is unsuited for servers with more than a dozen mods.

sturdy cape
#

I cant see how the above is scripting related but what i can say is my question was...

#

Meant the steam part obviously

#

Well guys ill ask the direct way.

Is there a way to lock access to groundholders near a vehicle or to a vehicle when near groundholders?

halcyon crypt
#

if you're able to lock a vehicle then you should be able to lock the groundholder, right?

#

using the same inventory EH

still forum
#

you cannot "lock" but you can immediately close again on inventory opened EH

sturdy cape
#

Well i closedisplay (i think 602) when a variable is on the vehicle right now.

#

But if you access a groundholder next to the locked vehicle and select crate on the left list it will be accessible through this

#

It works for the vehicles inv but then again not with the groundholder "trick"

tough abyss
#

Looking for #LUA scripters working to work current Logitech mouse script, payment will be handed. PM me if you know LUA.

still forum
late gull
#

LUA? on Arma 3? ๐Ÿ˜„

#

you are like in a wrong place

still forum
#

No

#

Intercept-Lua

late gull
#

serious?

gleaming cedar
#

@still forum Hey fake furry man I was wondering if you tried to make the spark thingy

#

๐Ÿ˜›

still forum
#

Ah yes. I'm having fun reading reddit right now tho. I'll do it on the side and see when I'm done

#
particleSource setParticleParams
[
    [
        "\A3\data_f\ParticleEffects\Universal\Universal", /*String*/
        16, /*Number*/
        13, /*Number*/
        2 /*Number*/
    ],
    "", /*String*/
    "Billboard", /*String - Enum: Billboard, SpaceObject*/
    0.00025 //timerPeriod is this correct? Interval?, /*Number*/
    0.15, /*Number*/
    position, /*3D Array of numbers as relative position to particleSource or (if object at index 18 is set) object. 
            Or (if object at index 18 is set) String as memoryPoint of object. ## Modify this##*/
    [0,0,1], /*3D Array of numbers. ## Modify this##*/
    1, /*Number*/
    1.275, /*Number ## This is weight of the particles. You might wanna modify this to change effect*/
    1, /*Number*/
    0.08, /*Number*/
    [0.2,0.2,0.2,0.2,0.2,0.12,0.12,0.12,0.12,0], /*Array of Number ## size over lifetime*/
    [
    [ 1,0.6,0.6,-10 ],
    [ 1,0.6,0.6,-8 ],
    [ 1,0.6,0.6,-6 ],
    [ 1,0.6,0.6,-4.5 ]], /*Array of Array of RGBA Numbers ## color over lifetime*/
    [1000], /*Array of Number*/
    0.5, /*Number*/
    0, /*Number*/
    "", /*String*/
    "", /*String*/
    this, /*Object ##change this##*/
    0, /*Optional Number - Default: 0*/
    false, /*Optional Boolean*/
    0, /*Optional Number*/
    [1,1,1,0] /*Optional Array of Array of RGBA Numbers ## you can modify this to make the sparks emit light in the dark*/
];

I think that should do it. Pay attention to all the things that are marked with ##

#

position and object(this) I've left empty

#

Have fun spending hours messing with this till either it looks like you want it to, or it suddenly doesn't work at all anymore

compact maple
#

(what does it do?)

still forum
#

what does what do?

compact maple
#

the particleSource you posted

digital jacinth
#

one way to find out

peak plover
#

Oooh

#

Thanks

#

This gives me an idea

#

Now it's my ideas

still forum
#

I think I should re-design my apartment in hello kitty style.

#

I think that's a nice Idea

tough abyss
#

#offtopic_homeimprovements

#

you're not allowed to talk in that channel unless your nickname is "Tim Allen"

still forum
#

Well kiddo

compact maple
#

well I dont know what a spark effect is lmao

unborn ether
#

Dedmen: I think I should re-design my apartment in hello kitty style. what year is it? is this #arma3_scripting yet, or we got too much ๐ŸŒˆ correct?

still forum
#

As you might've overread. This is #offtopic_homeimprovements now

frigid raven
#

@still forum ah so you think you are the big boss here who can define room-names or what?

unborn ether
#

oh noes

still forum
#

No @tough abyss did it

calm bloom
#

Hello. Did anyone try adding larger images into a adv hint?

#

looks like they are hardcoded to icon size

queen cargo
#

this always was #the_somewhat_scripting_related_offtopic_channel

meager heart
#

@calm bloom default max size for the "adv hints" pictures is 256x256 and they will be scaled to feet ui size, make your own version of it if you want it bigger ๐Ÿ˜ , that is just couple controls with key down eh...

calm bloom
#

yep it is. Its just a matter of time spend

#

<img image='\pzn_sfx\controls_ru.paa' width='314' align='center' />
haha, that one in text made it like 16x16)

meager heart
#

iirc \a3\ui_f\data\gui\cfg\hints\ < default images (not 100% about the path), use one of those maybe...

#

ui_f_data or ui_f\data ๐Ÿค”

calm bloom
#

size='10' this one makes it better

#

thank you for answers)

gleaming cedar
#

@still forum Thanks just got home from school

#

I am having trouble getting it working

#

@still forum particleSource setParticleParams [ [ "\A3\data_f\ParticleEffects\Universal\Universal", 16, 13, 2 ], "", "Billboard", 0.00025, 0.15, this, [0,0,1], 1, 1.275, 1, 0.08, [0.2,0.2,0.2,0.2,0.2,0.12,0.12,0.12,0.12,0], [ [ 1,0.6,0.6,-10 ], [ 1,0.6,0.6,-8 ], [ 1,0.6,0.6,-6 ], [ 1,0.6,0.6,-4.5 ]], [1000], 0.5, 0, "", "", this, 0, false, 0, [1,1,1,0] ]; I paste it like this in the init of the egg

#

I get nothing ๐Ÿ˜ฆ

still forum
#

I paste it like this in the init of the egg uhhh.. no

#

I guess the left side argument is undefined?

meager heart
#

probably not created ๐Ÿ˜ƒ

queen cargo
#

default value of what toFixed <scalar> is set to, anybody?

tough abyss
#

6 probably

still forum
#

Wiki says str pi; //"3.14159" - 6 significant figures (default)

#

However it also says that default would output [11580.3,11797.7,0.00146675] And 0.00146675 definitely isn't 6

tough abyss
#

Also Arma's default string conversion limits numbers to 6 significant figures

#

0.00146675 is 6 Dedmen

still forum
#

00146675 ๐Ÿค”

tough abyss
#

Yeah

still forum
#

So 0's don't count?

tough abyss
#

I guess

still forum
#

So what's with 0.000001234 ?

tough abyss
#

Dunno

#

It is set to what %g is default

#

In printf

still forum
#

Yes. Just checked

#

Have fun

#

Yes the printf is missing parameters I know. a4 is the number and v6 is the toFixed value

gleaming cedar
#

@still forum You mean like this?
this setParticleParams

#

I don't know what left side means ๐Ÿ˜ฆ

still forum
#

yes that parameter

#

I expected you know how to script

gleaming cedar
#

this setParticleParams [ [ "\A3\data_f\ParticleEffects\Universal\Universal", 16, 13, 2 ], "", "Billboard", 0.00025, 0.15, this, [0,0,1], 1, 1.275, 1, 0.08, [0.2,0.2,0.2,0.2,0.2,0.12,0.12,0.12,0.12,0], [ [ 1,0.6,0.6,-10 ], [ 1,0.6,0.6,-8 ], [ 1,0.6,0.6,-6 ], [ 1,0.6,0.6,-4.5 ]], [1000], 0.5, 0, "", "", this, 0, false, 0, [1,1,1,0] ]; I now do this still nothing

#

I do a little bit here and there

tough abyss
#

What is that code, intercept?

still forum
#

what code?

#

that's SQF. Particle params.

#

And someone failing to use
```sqf
```
properly

tough abyss
#

No in image

queen cargo
#

ok ... sqf-vm will just use 6 and not handle unset tofixed ๐Ÿคฆ

still forum
#

The image is secrit

tough abyss
#

X39 why do you need default?

#

The param is not optional

queen cargo
#

sqf-vm

tough abyss
#

So?

queen cargo
#

alt. syntax allows to change output length of str

#

also, default length simply is important for equality re asons

#

though ... in this case just fuck it ... if one not parses numbers proper anyways, they are fucked on a different level ๐Ÿ™ˆ ๐Ÿ˜„

tough abyss
#

Use sprintf with "%g" for default

#

Then it will convert to scientific notation exactly when Arma does it

queen cargo
#

nah ... will leave it like this

    std::stringstream sstream;
    sstream << std::setprecision(decimals) << mvalue;
    return sstream.str();
tough abyss
#

Otherwise "%0.Nf" where N is 0...20

#

Ok, I thought the idea was to mimic Arma behaviour, no worries then

queen cargo
#

yes ...

tough abyss
#

what is C++ code doing here?

still forum
#

SQF-VM

tough abyss
#

oh

#

brb switching to that

still forum
#

c++ code has many reasons to be here.... Although... I can only really think of 2...

frigid raven
#

when will there be rust support

#

lolz

still forum
#

when someone writes it ๐Ÿ˜„

tough abyss
#

can't wait for all my knowledge on SQF to be thrown into the trash because it's the only language i know

frigid raven
#

I gonna use SQF as a transition to get into the C++ world ... I started with C++ but never had a real usecase writing it

#

Now the time has come

#

Now... finally

still forum
#

Use Intercept to combine your SQF knowledge with your C++ knowledge ๐Ÿ˜„

frigid raven
#

peeked into it

#

Is it like a framework for easier approach to arma 3 ?

still forum
#

It's a Arma SQF SDK essentially

frigid raven
#

So all teh SQF stuff is there available as C++

still forum
#

Don't really know about the easier part

#

ye

frigid raven
#

n-ice

#

think gonna swap to it when my mod has reached the first MVP

#

btw does intercept allow stuff like extensions do?

#

like calling a REST-API on a remote server application?

still forum
#

sure

frigid raven
#

sw33t

still forum
#

you can do everything a extension does

#

plus full SQF availability on top

#

you can also implement your own SQF commands :3

frigid raven
#

who forged this piece of gold?

still forum
#

NouberNou (ACRE maker) and Jay (JayArma2Lib) started it

#

I took over in..... 2016?

frigid raven
#

godlike

#

tbh I am glad to land here and the arma 3 mod stuff. I was always looking for a way to get more active on open source stuff over the years. started to join the rust community in the Chaos Computer Club in Cologne, Germany - but well. This shit was way too advanced for my trainee developer brain

#

Now I have finally reached a progress boost it development thx to arma scripting

still forum
#

are you CCC member? I always wanted to but never found the time

#

I also took off when I started work on TFAR. Before I was mostly doing stuff for myself

frigid raven
#

Nah there is no real membership - but I live in Dusseldorf and my friends live in Cologne so I have major CCC spots around and often visit for talks or when I am drunk roaming around cologne ๐Ÿ˜„

still forum
#

I mean member aka "Vereinsmitglied"

#

I'm in Gelsenkirchen ๐Ÿ˜„

frigid raven
#

Yea - I asked sb. and his response kinda told me u are a member as soon as you show yourself often enough

#

You can just walk in the CCCs

#

and sit down the couch and start hacking stuff

#

I visit the coworking spaces there often when I start tinkering on my microcontrollers tho

#

tools everywhere free for use โค

#

love the IRC room entering device on the door that tells how many people are in the CCC actually via an IRC bot xD

tough abyss
#

@Dedmen so with Intercept could I use some 3rd party C++ libraries? (SQLite, etc.)

still forum
#

yeah sure

tough abyss
#

Sweet

still forum
#

you can make SQF commands to directly issue SQL commands from SQF scripts

#

Only real downside is no battleye support (yet). So if you are trying to do public server clientside stuff that's kinda bad

#

But in my milsim group everyone runs intercept as we don't use BE ^^

frigid raven
#

you have to "run" intercept?

#

can u explain this?

still forum
#

Well it's a mod

frigid raven
#

ah...okay ๐Ÿ˜ฎ

still forum
#

There is the host mod. Which is basically just a library like CBA.
And then you make your own mod with a Intercept plugin.
The host mod is basically just a bridge between your plugin and Arma itself

frigid raven
#

ah okay

tough abyss
#

C++ is love, C++ is life

#

How do I put things inside a listbox?

high marsh
#

lbAdd

tough abyss
#

thanks

#

ah thanks, works nicely

meager heart
#

fast check ๐Ÿ‘€

drowsy axle
#

Any solutions?

tough abyss
meager heart
frigid raven
#

command to get all connected players?

high marsh
#

Allplayers

hollow thistle
#

allPlayers

high marsh
#

:^)

hollow thistle
#

Will also return headless clients tho.

frigid raven
#

wtf I googled for that

high marsh
#

Google powerrrrr

hollow thistle
#

(allPlayers - entities "HeadlessClient_F") or [] call CBA_fnc_players to get only Huuumen players

high marsh
#

Bots are humans too V >:(

tough abyss
#

These will be players joined mission though not connected to the server

high marsh
#

The two go hand in hand. There is no reason to count those in lobby

#

As they're there temporarily

meager heart
#
#define ALL_PLAYERS (allUnits + allDeadMen) select {isPlayer _x && {!(_x isKindOf "HeadlessClient_F")}} 
//or
#define ALL_PLAYERS ((allUnits + allDeadMen) select {isPlayer _x})
#

โœŠ

drowsy axle
#

@tough abyss @meager heart It was to do with my codes

meager heart
#

nice

#

i mean...

#

ok

#

google is free and smart

#

kinda fast too

drowsy axle
#

Yeah..

tough abyss
#

What code?

drowsy axle
#

Ik

#

My Wave Defence

tough abyss
#

Ah wait lemmie look in my crystal ball

drowsy axle
#

lol

meager heart
#

i thought you mean this code 0x0000DEAD ^

#

aka crash code

drowsy axle
#

Nope one sec

#

I had a look through it. Seems legit. However, I'm unsure about the call CAP_fnc's

#

Ah wait... Would this: https://github.com/AxeriusNetwork/EC-Public/blob/master/WaveDefense.VR/init.sqf ```sqf
InstructorGuy addAction ["Loadout: Rifleman.",{
player call CAP_fnc_removeAll;
player call CAP_fnc_RIFLE_West;
}];

InstructorGuy addAction ["Start Next Wave..",{
sleep 2.5;
CAP_StartWave = true;
playMusic "LeadTrack01_F_Bootcamp";
}];``` Has anything to do with my crashing, as the functions aren't read yet.

drowsy axle
#

Ah

#

Why?

meager heart
#

allPlayers - array

drowsy axle
#

Right yes it is

meager heart
drowsy axle
#

Thanks

drowsy axle
#

yeah when dead EVH

#

Okay will do.

meager heart
#

also why not just cfgFunctions ?