#arma3_scripting

1 messages ยท Page 298 of 1

vapid frigate
#

yeah same thing pretty much

#

i think arma3 had 10x10m ones or something

meager granite
#

yeah with Arma 3 user texture objects its much easier

vapid frigate
#

yeah that too

tough abyss
#

Getting a "generic error" when calling the following, any clues? ```SQF
fnc_safeStartOn = {
isSafeStart = true;
safeStartLoop = 1;

ssDelManProj = player addEventHandler ["Fired", {deleteVehicle (_this select 6);}];
ssDelVehProj = (vehicle player) addEventHandler ["Fired", {deleteVehicle (_this select 6);}];
player allowDamage false;

if (isSafeStart || safeStartLoop == 1) then {
    while {safeStartLoop == 1} do {
        sleep 60;
        hint format ["Weapons are cold, wait for admin to trigger start. (%1 minute since briefing stage started)", safeStartLoop];
        systemChat format ["[SafeStart] Weapons are cold, wait for admin to trigger start. (%1 minute since briefing stage started)", safeStartLoop];
        safeStartLoop = safeStartLoop + 1;
    };
} else {
    while {isSafeStart} do {
        sleep 60;
        hint format ["Weapons are cold, wait for admin to trigger start. (%1 minutes since briefing stage started)", safeStartLoop];
        systemChat format ["[SafeStart] Weapons are cold, wait for admin to trigger start. (%1 minutes since briefing stage started)", safeStartLoop];
    };
};

};

chilly wigeon
#

that error message should contain a line number

vapid frigate
#

you spawning the function? (not calling it)

#

i think that error happens trying to sleep in a nonscheduled environment

#

(the alternative would be the game freezing for 60 secs)

meager granite
#

changed animation name?

#

check AnimationSources

halcyon crypt
halcyon crypt
#

aren't animations part of simulation which is disabled for simple objects?

meager granite
#

Yeah good guess, maybe something changed with simulation

little eagle
#

Simulation disabled?

meager granite
#

I got similar reports of doors not opening, no details what and where exactly though

#

Thought it might be my custom spawned buildings with disabled simulation

#

Spawned a building, disabled simulation, doors open just fine

#

๐Ÿค”

#

Try to disable global simulation some time after creation?

#

and see if animations still work

little eagle
#

Makes perfect sense to me. Simulation disabled = no animations.

meager granite
#

Who got their mission broken because of this?

little eagle
#

BIS_fnc_initRespawn adds HandleDisconnect event handler always returning true, resulting in broken missions with disabledAI=1

#

Ahahahaha

#

BIS_fnc_initRespawn (a3\functions_f\Respawn\fn_initRespawn.sqf) adds HandleDisconnect event handler on postInit which always returns true since last called function (BIS_fnc_logFormat) returns true. This breaks any mission with disabledAI resulting in player units remaining in game and breaking mission logic.

#

This is brilliant. I love stuff like this.

meager granite
#

Enable simulation for a frame on clients?

#

I guess client no longer processes animation messages with disabled simulation now

tough abyss
#

spawn worked, thanks @vapid frigate.

compact galleon
#

Why are all the position commands so imprecise? They all give positions in 10cm intervals, which means that if you use it to make a camera follow an object, it's very laggy.

#

I had to use getPosVisual to get a smooth camera.

halcyon crypt
#

seen someone mention that disconnecting players get turned in to AI with 1.68 so that's probably related

#

there also was a workaround, let me find it again

compact galleon
#

All the position commands except getPosVisual are broken. They only return positions in like 10cm intervals

meager granite
#

For those who interested, fix to issue with HandleDisconnect is very simple

#

Have a logic on map with

BIS_initRespawn_disconnect = -1;

in init field

#

EH gets added on post init

#

so having logic with this line in init is sufficent

#

no why remove anything

#

just have this and it will not get added

#

yes

#

it checks if BIS_initRespawn_disconnect is nil before adding though

#

so you just have to define it before code kicks in

#

is there a thread on forums about this?

#

did anyone complain yet?

#

gonna reply there

plucky beacon
#

New channels down there huh

nocturne iron
#

for anyone not already using simpleobject...

#

this will take all classes you specify and make them simple

nocturne iron
#

was the way global variables changed in addAction execs are handled changed?

indigo snow
#

what do you mean?

nocturne iron
#

like

#

if I have variable x

#

and I have an action that changes x's value to 3

#

ie

#

x = 3

#

did they change how it propagates over the network?

#

it suddenly changed for me

indigo snow
#

it wont propagate over the network unless you explicitly send it over

#

using for example publicVariable

tame portal
#

Variables are not synchronised over network unless they are attached to an object and broadcasted with the corresponding parameter or published with publicVariable

nocturne iron
#

Yeah

#

Was working previously doing that..

#

trying a restart, sometimes Arma just pulls shit

#

^ was that

tough abyss
#

It will depend on the extension

#

You will need to recompile the extension for 64bit etc + rename to the correct format i.e _x64

tough abyss
#

Heyho folks, is there any opportunity to change the kick message of kicking via servercommand?

plucky beacon
#

So what mods got updates for 64 bit so far?

still forum
#

TFAR ACE ACRE had it for months. ALiVE has x64 pre-release. extDB don't know. I think extDB3 has x64 support.

plucky beacon
#

Cool

vital onyx
#

@still forum extDB3 has 64-bit dll, tested today, works fine

plucky beacon
#

That feeling when the person in charge of the mods says that version of Ace isn't necessary

#

And cup

little eagle
#

I had to do some fixes for BWA3 on 64 bit, but that also has been out at least a month.

#

The same crash that broke STHUD interestingly.

#

It is.

#

ptsPerSquareSea = 0; crashes the game (map control)

#

Has to be >0 on 64 bit. Works fine 32 bit

jade abyss
#

@velvet merlin โ˜

little eagle
#

Yes.

#

At least that's what I heard. And it's 100% what crashed the old BWA3 versions.

velvet merlin
#

already tried but didnt help in our case

jade abyss
#

hmpf

velvet merlin
#

some ppl say also it doesnt fix sthud for them (but hard to tell if they didnt mess up)

little eagle
#

There is always a possibility of other errors, but this definitely crashes 64 bit.

#

Just don't take it too seriously.

#

Even if you break the fun for thousands one weekend, it's all just games.

jade abyss
#

Was the a native command to check, if the current CargoIndex was taken or not?

#

(Native = not using Crew/FullCrew)

little eagle
#

Iterate through full...

#

๐Ÿ˜ƒ

rotund cypress
#

This new RscTreeSearch will that search a tree automatically without you having to script a search function yourself? If anyone knows

jade abyss
#

damnit

rotund cypress
#

Does anyone know? This new RscTreeSearch will that search a tree automatically without you having to script a search function yourself? If anyone knows

jade abyss
#

No need to post it 30min later, when there are 3 msgs gone by...

#

If anyones knows -> He will answer (if he wants to).

rotund cypress
#

I guess ๐Ÿคฃ

tough girder
#

Hello, am i going insane?

//server
"TEST" addPublicVariableEventHandler {
    (_this select 1) params ["_uid", "_netId"];
    format["Client %1 (%2) UID %3", _netId, name (objectFromNetId _netId), _uid] remoteExec ["systemChat"];
};
//client
TEST = ["12345678",clientOwner];
publicVariableServer "TEST";

replace clientOwner with string - it works, anything else produces no effect, what am i doing wrong here?

still forum
#

I don't see clientOwner anywhere in there

tough girder
#

oh woops, was copypasting array from memory

still forum
#

clientOwner == nil?

tough girder
still forum
#

oh :x

tough girder
#
"TEST" addPublicVariableEventHandler {
    _netId = owner (_this select 1);
    _uid = getPlayerUID (_this select 1);
    format["Client %1 (%2) UID %3", _netId, name (objectFromNetId _netId), _uid] remoteExec ["systemChat"];
};
//client
TEST = player;
publicVariableServer "TEST";

Also doesn't work

#

The Dedicated Server in question does not use BattlEye

#

oh my god i am in fact, going insane

#

Syntax:
objectFromNetId id
Parameters:
id: String

little eagle
#

owner only works on the server machine and the id reported by clientOwner is not guaranteed to be the same as used by remoteExec or publicVariable.

still forum
tough girder
#

yep, that was it

#

objectFromNetId was not what i thought it was

dusk sage
#

@rotund cypress it's written down on the wiki page

#

You have to use a predefined RscEdit to use it

rotund cypress
#

Can you link? Or is it Dialogs Ctrl?

hollow lantern
#

either I'm blind or the wiki rly don't covera it: Is there a command script solution for spawning a module? In particular I want to spawn a zeus (curator) module which I can use later one

little eagle
#

createUnit

hollow lantern
#

ah lol thanks

dusk sage
rotund cypress
#

so they fucked it up gr8

#

I was happy to use it now ๐Ÿ˜ญ

little eagle
#

What's it for?

dusk sage
#

allows searching an rsctree

rotund cypress
#

Searching in RscTree

dusk sage
#

little upsetting it uses a hardcoded RscEdit though

rotund cypress
#

Hardcoded?

little eagle
#

Can't you do that all yourself with a RSCEdit?

rotund cypress
#

Yes you can

#

But the point is that you dont need to make a function yourself now

#

I guess

little eagle
#

O.K.

dusk sage
#

I'm not sure what matching it has

little eagle
#

But that's the fun part about ui.

rotund cypress
#

Well, I've made a search function myself already, but if I can get it without having to do it myself and make a script of mine cleaner without excess code like search, I'll take a premade BIS function

#

Oh @dusk sage so by hardcoded you mean it can only use RscEdit with IDC 645

#

So premade RscEdit

little eagle
#

"excess code" : (

rotund cypress
#

Well, you get the point @little eagle

dusk sage
#

class is hardcoded to be used with RscEdit with idc 645

#

seems that way

little eagle
#

Tbh, no. I mean yeah, but that's not something I'd ever consider.

rotund cypress
#

@dusk sage Hopefully a hotfix patch comes soon

#

Not a new ArmA patch without any bugs or errors or something else amiright?

hollow lantern
#

is there a way to give addCuratorAddons all loaded AddOns? Or how is it done via the module in eden if you set "All AddOns (including official and non-official)"

still forum
#

curatorThingy addCuratorAddons ((configFile >> "CfgPatches") select {configName(_cfg select _i)});
there is a better way. maybe assign instead of select. not sure

#

maybe using configClasses

jade abyss
#

hm.. is moveInCargo broken?

for "_i" from 0 to 12 do
{
    _Unit = "B_Soldier_F" createUnit [position player,(createGroup west)];
    _Unit assignAsCargoIndex [cursortarget, _i];
    _Unit moveInCargo cursortarget;
};

(Unit gets created, but not moved in the Vehicle... hmm)

#

also tried:
_Unit moveInCargo [cursortarget,_i];
&
_Unit moveInCargo [cursortarget,(1-12)];

#

moveInAny also doesn't work with AI. hu? oO Do i miss something?

plucky beacon
#

I remember wanting to make a zeus that ONLY has the remote control option

little eagle
#

@hollow lantern

private _allAddons = "true" configClasses (configFile >> "CfgPatches") apply {configName _x};

// existing curators (server)
{
    _x addCuratorAddons _allAddons;
} forEach allCurators;

// all future curators (createUnit, all machines)
activateAddons _allAddons;

You can run this everywhere or pick apart what you need.

plucky beacon
#

But im pretty sure each option isnt separated by addon

jade abyss
#

Does work

for "_i" from 0 to 12 do
{
    _Unit = (createGroup west) createUnit ["B_Soldier_F", [0,0,0], [], 0, "FORM"];
    _Unit moveInCargo cursortarget;
};```
Does NOT work:
```sqf
for "_i" from 0 to 12 do
{
    _Unit = "B_Soldier_F" createUnit [position player,(createGroup west)];
    _Unit moveInCargo cursortarget;
};```
Note to myself: Always read the small stuff called "Return Value:" down below ...
hollow lantern
#

thanks @little eagle

tough abyss
#

tried to check if there is any lag in createunit i.e check if _unit isnull?

little eagle
#

STRING createUnit reports no object reference

#

There is no lag in creating a unit. It will always report the object reference. But only if the correct syntax is used.

#

Or fixed with A3, including getting rid of the init thing.

#

No one wants back warts.

hollow lantern
#
class CfgFunctions {
    class Aebian_Config {
        class Aebian_init {
            class Aebian_AddActions {
                file = "\ADB\scripts\Aebian_AddActions.sqf";
                postInit = 1;
            };
            
            class Aebian_Zeus {
                file = "\ADB\scripts\Aebian_AddActions.sqf";
                postInit = 1;
            };
        };
    };
};
``` Shouldn't that work? For some reason I get a missing bracket error alltough my code seems fine for me.  ``` 18:22:47 Error in expression <usepos=getPosATL player; hint format["%1",(getPosATL player)]; copyToClipboard (>
18:22:47   Error position: <",(getPosATL player)]; copyToClipboard (>
18:22:47   Error Missing ]
18:22:47 File \ADB\scripts\Aebian_AddActions.sqf [Aebian_Config_fnc_Aebian_AddActions], line 11 ```  thats the code: ``` if (isDedicated) exitWith {};

player addAction ["<t color='#C95849'>[A] Position (Player)</t>", "housepos=getPosATL player; hint format["%1",(getPosATL player)]; copyToClipboard (str (housepos));"];
player addAction ["<t color='#455361'>[A] Direction (Player)</t>", "dirpos=getDir player; hint format["%1",(getDir player)]; copyToClipboard (str (dirpos));"]; ```
little eagle
#

You need to escape the quote marks around %1 in both lines.

#

"dirpos=getDir player; hint format["%1",(getDir player)]; copyToClipboard (str (dirpos));"

#

"dirpos=getDir player; hint format[" %1 ",(getDir player)]; copyToClipboard (str (dirpos));"

#

Maybe that helps you to visualize it. The game thinks your string ends after the second quote mark.

hollow lantern
little eagle
#

It never did, I can guarantee you that.

#

But there is no need to use formatin the first place.

#

hint format["%1",(getPosATL player)];
could just be:
hint str getPosATL player;

jade abyss
#

Oh my

little eagle
#

Or, you just use addAction with CODE, not STRING...

jade abyss
#

That thing is a mess

little eagle
#

yup. It's a mess.

#

Bigly

jade abyss
#

Inside of a String ( " " ) -> You exit it premature with another "
Means:
Inside a String -> Use ' instead of "

#

Means:
"....rmat["%1**"**,(getPosATL pla....

Turns into:
".....rmat['%1**'**,(getPosATL pla....

hollow lantern
#

I know how to escape things lol but thanks

jade abyss
#

Then why didn't you use/do it? ๐Ÿ˜„

little eagle
#

Escaping strings is fun:

QUOTE(QUOTE(QGVAR(forward)) call FUNC(playSignal));
halcyon crypt
hollow lantern
#

because it worked without escaping, I have my pbo here I used before here and there is also nothing escaped but I had the addActions InGame thats why...

little eagle
#

It never worked without escaping.

jade abyss
#

it worked? No way.

hollow lantern
#

...

little eagle
#

No way.

#

It didn't.

#

Pics or didn't happen.

jade abyss
#

.rpt or didn't happen ๐Ÿ˜„

hollow lantern
#

okay I'll do w8

little eagle
#

lol

#

๐Ÿฟ

jade abyss
#

^^ Waiting for ErrorLog. You wanna give me some Popcorn, Commy?

little eagle
#

here:
๐Ÿฟ
๐Ÿ™Œ

jade abyss
#

๐Ÿ˜‚

little eagle
#
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QUOTE(GVAR(DisplayInformation))), nil)]);
#

urg

jade abyss
#

@halcyon crypt Where do you see the .sqf stuff?

halcyon crypt
#

in the chart

#

bit further than the half

jade abyss
#

Ah! Just found it

#

Bottom Center

hollow lantern
halcyon crypt
#

nothing too interesting though, just thought it was funny ๐Ÿ˜›

jade abyss
#

lol

little eagle
#
player addAction ["<t color='#C95849'>[A] Position (Player)</t>",{ housepos=getPosATL player; hint format["%1",(getPosATL player)]; copyToClipboard (str (housepos)) }];
jade abyss
#
 "housepos=getPosATL player; hint format["%1",(getPosATL player)]; copyToClipboard (str (housepos));"```
!=
```sqf
{ housepos=getPosATL player; hint format["%1",(getPosATL player)]; copyToClipboard (str (housepos)) }```
little eagle
#

Those obviously aren't escaped, because they are not inside a STRING ...

hollow lantern
#

hmm well okay then I messed stuff up

jade abyss
#

As we told you

little eagle
#

Just stick with the curly brackets. There is zero benefit in using the STRING syntax and in future, (if they fix a bug), it might even be worse.

jade abyss
#

Yep

#

+If a Blue, Orange or Green Colored Person says something -> 99% of the time its true.

little eagle
#

Hmm.

jade abyss
#

Like: Commy likes me.
Thats the 1%. Everybody knows -> Commy likes noone.

little eagle
#

I love you all.

halcyon crypt
#

that's the spirit โค

jade abyss
#

^^

little eagle
#

I also lie without shame.

rotund cypress
#

Guys, can someone explain difference between IGUI and GUI?

jade abyss
#

Missing "I"

#

Problem solved. Next one.

little eagle
#

ingame generic user interface

jade abyss
#

usier XD

little eagle
#

jesus...

jade abyss
#

๐Ÿƒ

#

what the

#

๐Ÿ˜‚

rotund cypress
#

Some what is the difference? @little eagle

halcyon crypt
#

[12:06 AM] commy2: I also lie without shame.
You can't back up now ๐Ÿค—

queen cargo
#

there is none @rotund cypress

little eagle
#

one is "ingame" (in mission), the other is menu etc.

jade abyss
#

What if that was also a lie, Marcel? hmm

little eagle
#

ingame, e.g. the weapons dialog

rotund cypress
#

Oh so RscDisplayInventory is IGUI? @little eagle

little eagle
#

And if a red name speaks, it's 99% wrong.

halcyon crypt
#

it wasn't, โค is truth!

jade abyss
#

RscDisplayInventory is RscDisplayInventory

#

Its a Dialog

#

๐Ÿ˜„

plucky beacon
#

Problem solved

#

Next

jade abyss
#

sush, my sentence!

little eagle
#

Sure, Sim. But don't take it too seriously. In the end it's just arbitrary folder names.

plucky beacon
#

Than say it sooner dscha

queen cargo
#

in regards of that string escape thingy
SQF uses block text escape for strings
"foo is a string with content ""foo""" will work
though ... i am quite sure SQF is not using proper block text which span above newlines etc.

jade abyss
#

3min ago @plucky beacon
Dscha - Today at 12:06 AM
Missing "I"(edited)
Problem solved. Next one.

rotund cypress
#

Alright @little eagle

plucky beacon
#

Ya but you didn't say it for the rscinventory thingy

jade abyss
#

step on Lego

rotund cypress
#

omg

#

what an argument

queen cargo
#

@halcyon crypt wasnt that based around search machine stats?

jade abyss
#

evil one, aye?

halcyon crypt
#

@queen cargo probably, didn't really read it. Just went to the chart ๐Ÿ˜›

queen cargo
#

ahh no
it was based on github stats

halcyon crypt
#

oh yes but it most likely used the new github search thingy or whatever

queen cargo
rotund cypress
#

If I want to copy an entire config to clipboard I tried this copyToClipboard str (configfile >> "CfgHints") but it actually just copies the path.

halcyon crypt
#

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

rotund cypress
#

Anyone know how I can do it?

queen cargo
#

yes, with a hell lot of scripting you can get there @rotund cypress

#

but copyToClipboard is kinda dull since BI limited max string size

rotund cypress
#

Cause I'm not sure where CfgHints are

little eagle
#

Don't think that is possible with just a few lines, Sim.

rotund cypress
#

In the addons folder

queen cargo
#

use the config browser

#

or use a config.bin export

halcyon crypt
rotund cypress
#

Yes @queen cargo but where is actually that?

#

In what PBO I mean

queen cargo
#

internet

#

arma 3 config dump

#

something like that should lead you to the right one

jade abyss
#

Don't you have a P Drive SimZor?

queen cargo
rotund cypress
#

nah @jade abyss

#

Or yes I do

#

Oh and look

#

There it is ๐Ÿคฃ

jade abyss
queen cargo
#

TotalCommander is the way to go on windows @jade abyss

halcyon crypt
#

findstr is like Windows' grep

jade abyss
#

pff, TotalCommander. Thats so 90's

queen cargo
#

setOwner is depreciated @tough abyss

#

we group now for a hell lotta patches

halcyon crypt
#

oh grepWin is a gui.. lame

jade abyss
#

Yeah, "KlickyBunti" in German

halcyon crypt
#

is that an actual dictionary word? ๐Ÿ˜›

rotund cypress
#

Okey so I converted the bin file but CfgHInts is not in there ๐Ÿ˜ญ

little eagle
#

18:15:35 Script command setOwner cannot be used for object 'B_T_LSV_01_armed_F'. Use setGroupOwner instead.
what?

jade abyss
#

@halcyon crypt Don't think so^^ Its a "childish" mix of words like "Klick" (click) -> "Klicki" and "Bunt" (colorful) -> "Bunti". So a 1to1 translation: "ClickyColorfully" (sounds lame)

queen cargo
halcyon crypt
#

@rotund cypress git clone git://git.withsix.com/cmb.git <- all configs and scripts unpacked for pretty much everything made by BI and maintained by kju ๐Ÿ˜ƒ

#

it's big though.. 1.3gb

#

(unpacked)

rotund cypress
#

So does this have the latest files, latest patch?

halcyon crypt
#

up to 1.66 at this point

rotund cypress
#

I need 1.68

halcyon crypt
#

copies to clipboard

rotund cypress
#

Its not just cfgHints I need either

#

Someone has to know where I can find them

halcyon crypt
#

which ones do you need?

rotund cypress
#

CfgHints mainly

#

But not the only ones

halcyon crypt
#

BIS_fnc_exportCfgGroups BIS_fnc_exportCfgHints BIS_fnc_exportCfgMagazines BIS_fnc_exportCfgPatches BIS_fnc_exportCfgVehicles BIS_fnc_exportCfgWeapons

#

these are available

tough abyss
#

heyho, anyone knows how "DynSimGrid" works? can't find any further information

halcyon crypt
#

https://community.bistudio.com/wiki/Arma_3_Dynamic_Simulation#DynSimGrid

DynSimGrid
Displays the map overlay with the most detailed Dynamic Simulation grid. The individual grid cells are coloured by the side colour of units that are present there. In case there are multiple different sides present in the same cell, the resulting colour is the summation of all present side colours; e.g. greed (Independent) + red (OPFOR) colours the cell to yellow.
tough abyss
#

I know that ;D I mean how to activate this command tbh

halcyon crypt
#

hmm you'll probably need to run the diag exe from the dev branch for that

As the part of the Dynamic Simulation system 3 new diagnostic modes were added to the debug console. All 3 diagnostic modes overlay map with an extra information. The modes can all be active at the same time, if needed.
tough abyss
#

hmm, so nothing new to me ๐Ÿ˜„ - so trial and error

rotund cypress
#

Okey I have now looked through most of the PBOs where CfgHints could be but without any luck

#

Hahah lol okay I foudn it

#

Turn out its in ui_f_curator

#

I couldn't find CfgHintCategories though

little eagle
#

@rotund cypress

configSourceAddonList (configFile >> "CfgHintCategories") //["A3_Language_F"]
rotund cypress
#

How did you find that?

#

oh god

#

daaaamn

#

Just the command I needed

#

โค @little eagle

plucky beacon
#

how many cases can I have in my switch case before I have performance hit

little eagle
#

1?

jade abyss
#

multiple if()exitWith{}; -> faster than 1 Switch()do case

plucky beacon
#

lol

#

thanks

open vigil
#

O(n)

plucky beacon
#

alright then

little eagle
#

Put to most common "case" at the top, etc.

jade abyss
#

THEN (but just then) it could be a little tiny bit faster.

#

But after that -> nope

plucky beacon
#

I mean if O(n) = O(50) is that a problem?

#

Probably should categorize these into type then

#

Air, Land, Sea

open vigil
#

Ignore me and follow commy2's advice ๐Ÿ˜‰

dusk sage
#

Not sure why you're asking if it's a problem. The linearity will still apply to anything else

plucky beacon
#

Just thinking about performance

#

It will only run a couple of times per mission so maybe it's not awful

#
    case "B_MRAP_01_gmg_F": {"O_MRAP_02_hmg_F"};
    case "B_MRAP_01_hmg_F": {"O_MRAP_02_gmg_F"};
    case "B_G_Offroad_01_repair_F": {"O_G_Offroad_01_repair_F"};
    case "B_G_Offroad_01_F": {"B_G_Offroad_01_F"};
    case "B_G_Offroad_01_armed_F": {"O_G_Offroad_01_armed_F"};
    case "B_Quadbike_01_F": {"O_Quadbike_01_F"};
    case "B_Truck_01_transport_F": {"O_Truck_03_transport_F"};
    case "B_Truck_01_covered_F": {"O_Truck_03_covered_F"};
    case "B_Truck_01_Repair_F": {"O_Truck_03_repair_F"};
    case "B_Truck_01_medical_F": {"O_Truck_03_medical_F"};
    case "B_Truck_01_ammo_F": {"O_Truck_03_ammo_F"};
    case "B_Truck_01_fuel_F": {"O_Truck_03_fuel_F"};

I'm sure you can put together what I'm categorizing here

#

oh wait my GMG and HMG are switched

#

rip enemy team

dusk sage
#

And why don't you favour a dictionary type scenario?

#

A lookup instead

plucky beacon
#

what diffrence would it make?

nocturne iron
#

Bit faster

#

you can make a pair of arrrays and use their indexes

#

really good for massive amounts of variables too

dusk sage
#

At worst your switch is O(n), as FM pointed out. A lookup shouldn't be

plucky beacon
#

I could make a pair of arrays

#

but I like how this is more readable

nocturne iron
#

Fair enough

#

I usually keep a spreadsheet for this stuff so it's not a problem :p

dusk sage
#

Either way, it won't have any perf impact

#

So don't worry about it

plucky beacon
#

๐Ÿ‘Œ

#

question, I want to make the default output make an error but it still wants to return something in the switch case

private _enemyClassname = switch (_classname) do {
    case "B_UAV_02_CAS_F": {"O_UAV_02_CAS_F"};
    default {if (true) exitWith {_error = format ["Classname %1 is not available in script, edit vehicleCreator.sqf",_classname]; systemChat _error; hint _error;}};
}:

_enemyClassname doesn't get anything from default obviously.

#

I could output _classname and if _enemyClassname == _classname do thing?

dusk sage
#

use breakOut

plucky beacon
#

hmm

dusk sage
#

If you want to fully exit the file or scope(s)

plucky beacon
#

so it keeps getting out of blocks until it's in the base file and then exits file

#

interesting

dusk sage
#

hm?

plucky beacon
#

oh but I need to identify scopeName?

dusk sage
#

It'll breakTo (and then out) the scope defined

plucky beacon
#

So BreakTo is how you can skip around in a single file

#

I've been wondering how to do that

dusk sage
#
scopeName "main";
if (true) 
{
    if (true)
    {
         breakOut "main"
    }
}
#

etc

plucky beacon
#

neat

plucky beacon
#

_error = str parseText format ["Classname<br/>%1<br/>is not available in script, edit vehicleCreator.sqf<br/>Identical vehicle has been spawned on the enemy side instead.",_classname];

#

isn't this supposed to make new lines?

#

oh, you can't do multi lines in hints?

#

wat

#

no that doesn't make sense, it just appears to stop after the first break

jade abyss
#
hint "abc \n def"```
plucky beacon
#

dats it

#

tanks

#
_error = str parseText format ["<t size='1.25' font='Zeppelin33' color='#ff0000'>Classname\n%1\nis not available in script, edit vehicleCreator.sqf\nIdentical vehicle has been spawned on the enemy side instead.","O_G_Van_01_transport_F"]; 
hint _error;
#

MFW no text color, font or size changes

jade abyss
#

nonon \n is for normal text....

#

Thats why i gave you that example

#
hint parseText format["<t font='RobotoCondensed' size='1.2' align='center' color='#FFFFFF'>%1 - %2</t>","Thing1", "Thing2"];```
plucky beacon
#

so thing1 and 2 can have \n

jade abyss
#

No ffs

#

Listen you Penguin

#

hint "abc \n def" != parseText

#

So you little Apple:

hint parseText format["<t font='RobotoCondensed' size='1.2' align='center' color='#FFFFFF'>%1 <br/> %2</t>","Thing1", "Thing2"];
plucky beacon
#

๐Ÿง

#

honk

jade abyss
#

๐Ÿ‘Š

#

๐Ÿคœ @plucky beacon ๐Ÿค›

plucky beacon
#

sideways penguin

jade abyss
#

Story:
A Little Pinguin walked into a club.
End of Story.

#

๐Ÿ

nocturne iron
#

Yeah

#

servers seem to have a sticky view distance

#

although, I've managed to change it using the TAW script

little eagle
#
private _ran = 5; 
 
switch (true) do { 
    scopeName "switch_scope"; 
    case (_ran <= 5) do { 
        systemChat str ["<=5", _ran]; 
        breakTo "switch_scope"; 
    }; 
    case (_ran <= 4) do { 
        systemChat str ["<=4", _ran]; 
        breakTo "switch_scope"; 
    }; 
    case (_ran <= 3) do { 
        systemChat str ["<=3", _ran]; 
        breakTo "switch_scope"; 
    }; 
    case (_ran <= 2) do { 
        systemChat str ["<=2", _ran]; 
        breakTo "switch_scope"; 
    }; 
    case (_ran <= 1) do { 
        systemChat str ["<=1", _ran]; 
        breakTo "switch_scope"; 
    }; 
}; 
#

Weirdly, this executes all do-blocks.

#

Probably because case sets a flag only if the condition is true, but doesn't ever reset it if it's false.

#

I tried to make an "anti-break"

#

Undefined behavior.

#

lol

#

I did it wrong

#

:

#

not do

#

๐Ÿคฆ

#
private _ran = 2; 
 
switch (true) do { 
    scopeName "switch_scope"; 
    case (_ran <= 5): { 
        systemChat str ["<=5", _ran]; 
        breakTo "switch_scope"; 
    }; 
    case (_ran <= 4): { 
        systemChat str ["<=4", _ran]; 
        breakTo "switch_scope"; 
    }; 
    case (_ran <= 3): { 
        systemChat str ["<=3", _ran]; 
        breakTo "switch_scope"; 
    }; 
    case (_ran <= 2): { 
        systemChat str ["<=2", _ran]; 
        breakTo "switch_scope"; 
    }; 
    case (_ran <= 1): { 
        systemChat str ["<=1", _ran]; 
        breakTo "switch_scope"; 
    }; 
};
#

breakTo doesn't work. Still exits the switch scope.

#

Only one is shown.

meager granite
#

Addon solution for player disconnect issue

plucky beacon
#

thanks SaMatra

cerulean whale
#

Hey, when I do this```SQF

veh = vehType createVehicleLocal [14760.3,9148.35,1];
veh allowDamage false;
veh setpos [14760.3,9148.35,1];
veh setDir 200;

#

The vehicle I am spawning clips with the ground an sends dust flying everywhere... even though I am creating it in the air.. How would I work around thaT?'

plush cargo
#

also try setdir before position

peak plover
#

also create vehicle at [0,0,0]

#

and then setpos

little eagle
little eagle
#

allVariables doesn't work on controls. Always reports []. Is this new?

proven crystal
#

Can i find out from a dead unit who the killer was?

little eagle
#

No.

proven crystal
#

Too bad. Not sure if eventhandler is the way to happiness in my case

little eagle
#

How so?

proven crystal
#

I want to have a small lootscript that spawns stuff around units killed by players. But im using alive and that wont save the eventhandlers when virtualizing

little eagle
#
params ["_unit", "_killer"];

_unit setVariable ["myTag_killer", _killer, true];
systemChat str (cursortarget getVariable "myTag_killer");
#

Seems simple enough and you can even get the killer on remote machines.

#

But im using alive and that wont save the eventhandlers when virtualizing
wait...

proven crystal
#

So my way now would be to have a script that periodicalky checks for new units and attaches the eventhandler to those that dont have it yet

little eagle
#

check out this:

["CAManBase", "killed", {
    params ["_unit", "_killer"];

    _unit setVariable ["myTag_killer", _killer, true];
}] call CBA_fnc_addClassEventHandler;
proven crystal
#

Can do. I just thought it would be less ressource intensive to check dead units for the killer

little eagle
#

It doesn't matter, because it's not like there are units dying all the time.

#

Like every second or frame or something like that.

proven crystal
#

Exactly. But there are units spawning/despawning all the time

little eagle
#

Eh.

proven crystal
#

Which is why i thought checking dead bodies would be less work than repeatedly attaching eventhandlers

#

I mean both is not a real load i guess, just dead body checking would be nicer than alive units checking.

little eagle
#

There is no other way to do this afaik.

proven crystal
#

Ok. Thanks

proven crystal
#

hm can i add stuff itno the victims backpack and stuff or will that throw an error? id otherwise just use the location

#

other than that, does this look abot right? ```_unit addEventHandler ["killed",{

        _victim = _this select 0;
        _killer = _this select 1;
    

        if (_killer == _victim) then {
            //hint "suicide!";
        } else {
    
            if ((side _victim != side _killer) && (isplayer _killer)) then {
            
                    _victim addItemToUniform "blabla_item";
                    for "_i" from 1 to 2 do {_victim addItemToBackpack "SmokeShell";};
                    
            } else {
                //hint "friendly fire!";
            };

        };

}];```

#

ah no MPkilled i guess

little eagle
#

side group _victim
and
side group _killer

#

Your logic is flawed btw. Any kill by AI would be reported as friendly fire.

proven crystal
#

true. im copying around from an older script

#

there is a more elegant way to do random selects right? im doing stuff like _Array select floor random count _Array atm

#

a got it

little eagle
#

selectRandom _Array
for anyone wondering

proven crystal
#

oh thats even better. i used _Array call BIS_fnc_selectRandom

hollow lantern
#
theCurator  = curGrp createUnit ["ModuleCurator_F", player, [], 0, "NONE"];
``` shouldn't that work?
little eagle
#

lgtm, if curGrp is defined

hollow lantern
#

thanks commy oversaw that

tough abyss
#

@lavish ocean Is there anyway to get to the previous version of the Arma3 tools? The latest version of the addon builder has changed and is producing PBO's that don't work with the 1.66 version. Arma3Legacy166 branch didn't work. PS it also has a bug now with the PBO name where it makes a directory named the .PBO and puts the PBO with the same name in that directory

polar folio
#

dang. you can only select year going back to 1982 in the editor? that's lame

plucky beacon
#

trying to figure out why my rsclayers aren't working since update

tough abyss
#

I'm having trouble check if an EH exists. ```SQF
// Check if player is in vehicle, if so - assign EH
if (vehicle player != player && {player in [gunner vehicle player, driver vehicle player, commander vehicle player]}) then {
ssDelVehProj = (vehicle player) addEventHandler ["Fired", {deleteVehicle (_this select 6);}];
};

// In another function, check if EH's global variable(?) exists, if so - remove EH
if ({isNil ssDelVehProj}) then {
player removeEventHandler ["Fired", ssDelVehProj];
};

#

I seem to have misunderstood index.

#

objectName removeEventHandler [type, index]

#

How do I find the index, though?

still forum
#

it's returned by addEventHandler

#

you are not check.. wtf are you doing ๐Ÿ˜„

#

// In another function, check if EH's global variable(?) exists, if so - remove EH
And then you have a syntax error in a code statement in an if statement that doesn't even try to check if the variable exists

#
if (!isNil "ssDelVehProj") then {
    player removeEventHandler ["Fired", ssDelVehProj];
};
#

Before you tried to do "If variable doesn't exist then try to use it" and even failed at doing that ๐Ÿ˜„

#

Also you need to remove the variable from the vehicle not the player.

#
// Check if player is in vehicle, if so - assign EH
if (vehicle player != player && {player in [gunner vehicle player, driver vehicle player, commander vehicle player]}) then {
    ssDelVehProj = [(vehicle player),(vehicle player) addEventHandler ["Fired", {deleteVehicle (_this select 6);}]];
};

// In another function, check if EH's global variable(?) exists, if so - remove EH
if (!isNil "ssDelVehProj") then {
    (ssDelVehProj select 0) removeEventHandler ["Fired",  (ssDelVehProj select 1) ];
};
jade abyss
#

Shouldn't vehicle player != player be replaced with isNull objectParent player

still forum
#

commy is AFK right now so. Doesn't matter

little eagle
#

I'm reading everything.

tender fossil
#

What's the best SQF scripting guide nowadays? I'm reading one from Arma 2 days

still forum
#

BI Wiki :u

tender fossil
#

Yeah, but in addition to that ๐Ÿ˜ƒ

still forum
#

KillzoneKid writes nice stuff. But I don't think he has a general tutorial on SQF

jade abyss
#

BI Wiki again.

tender fossil
#

Yeah, I'm fan of KK

#

Maybe I'll just settle with BI wiki

tough abyss
#

Thanks @still forum. I'm not the brightest "coder".

#

My snippets probably made commy facepalm real hard.

proven crystal
#

so im trying to add a few items to a dead units uniform after it was killed by a player.
it is supposed to loop every 60 seconds, check if the unit already has been set up this way, and if if not, add the eventhandfler. what am i doing wrong?

i start this script from the initserver.sqf:


while {true} do {

    sleep 60;
    
    {

        if (!(_x getVariable ["MyUnitDeathSet", false])) then { 
            
            _x setVariable ["MyUnitDeathSet", true];

            _x addEventHandler ["MPkilled",{
                        
                _victim = _this select 0;
                _killer = _this select 1;
            
                if ((side _victim != side _killer) && (isplayer _killer)) then {
                
                        _fooditems = ["kss_bread","kss_caviar","kss_chicken","kss_chips","kss_corn","kss_cucumbers","kss_mre","kss_mushrooms","kss_pea","kss_red_beans","kss_losos","kss_sausage","kss_soup_chicken","kss_soup_vegetable","kss_kilka","kss_shproti","kss_steak","kss_tushenka_beef","kss_tushenka_pork","kss_tomatoes"];
                        _drinkitems = ["kss_cocktail_patron","kss_bottle_big","kss_bottle_small","kss_soda_coke","kss_beer_dark","kss_beer_light","kss_soda_mdew","kss_mre","kss_soda_pepsi","kss_vodka"];
                        
                        _victim addItemToUniform selectrandom _fooditems;
                        _victim addItemToUniform selectrandom _drinkitems;
                        
                        
                        //for "_i" from 1 to 2 do {_victim addItemToBackpack "SmokeShell";};
                        //_pos = getpos _victim;
                diag_log "death handled";
                };    
            }];
            diag_log "death setup handled";
        };
    } foreach allUnits;

    
    
};```
tough abyss
#

To be honest they made me facepalm.

still forum
#

That script looks correct to me so far. What part of that is not working?

proven crystal
#

there dont seem to be items in the end...

#

cluld it be that _victim is dead and thus does not have a uniform as a normal unit would?

#

so additemtouniform wouldnt work

little eagle
#

I'm busy facepalming at myself and Arma

still forum
#

add more diag_log stuff maybe? It will tell you if the script is even executing

tough abyss
#

I mean... aren't we all? ๐Ÿ˜„

proven crystal
#

spelling mistake in the line that i call the script with.... lets see now...

proven crystal
#

i dont get the output from diag_log "death handled";

#

the others show up... and the loop is running

#

if i run isplayer _killer on the server it should return a bool also righgt? or am i screwing things with locality up again?

meager granite
#

MPKilled will execute code on each client and server on death

#

plus copy of this code will be broadcasted over network for each unit you add it to

#

Oh wait, it is not addMPEventHandler

#

Can you even use MP* events with addEventHandler?

#

I don't think you can

jade abyss
#

shouldn't

little eagle
#

Can you even use MP* events with addEventHandler?
No

plucky beacon
#

waaaaaat, remote exec to -2 in singeplayer doesn't work anymore

#

laaame

proven crystal
#

so i should used the 'killed' not 'mpkilled'?

#

hm yep appears so

cerulean whale
#

Ye

#

Mpkilled is different to killed I believe

#

Check the wiki if you need

#

I just recall that

plucky beacon
#

MPkilled is run on every machine

#

@proven crystal @cerulean whale

#

killed is local to the unit it's tied to

proven crystal
#

ye just saw that

plucky beacon
#

k

proven crystal
#

thanks

plucky beacon
#

๐Ÿ‘

proven crystal
#

_x addEventHandler ["killed",{
                diag_log "handeling death";
                            
                _victim = _this select 0;
                _killer = _this select 1;
            
                if ((side _victim != side _killer) && (isplayer _killer)) then {
                        diag_log "killed by player";
                        _fooditems = [...];
                        _drinkitems = [...];
                        
                        diag_log "adding itemCargo";
                        _victim addItemCargo [selectrandom _fooditems, 1];
                        _victim addItemCargo [selectrandom _drinkitems, 1];
                        
                        diag_log "adding items to uniform";
                        _victim addItemToUniform selectrandom _fooditems;
                        _victim addItemToUniform selectrandom _drinkitems;
                        
                        
                        
                diag_log "death handled";
                };    
            }];

#

that part doesnt do anything

#

whats wrong with it?

#

tried item cargo becasue i thought maybe the dead bodies are boxes rather than units

still forum
#

doesn't do anything means? The eventhandler doesn't get executed?

little eagle
#

_fooditems and _drinkitems are undefined

still forum
#

no they are not commy

#

right after the if block

proven crystal
#

i just took the list out for readability

little eagle
#

hmm, edited ?

still forum
#

no ^^ When I wrote my message they were in there

little eagle
#

addItemCargo does not work with dead bodies

proven crystal
#

so the uniform bit should do?

little eagle
#

Does it log?

still forum
#

Fetzen what part of that code doesn't work?

proven crystal
#

no outputs

little eagle
#

So nothing works

proven crystal
#

so even diag_log "handeling death"; does not fire

still forum
#

are you running that serverside?

proven crystal
#

yep

little eagle
#

Error is somewhere outside of the code then

proven crystal
#

probably

little eagle
#

killed only triggers on the machine that owns the unit

still forum
#

DriftingNitro told you killed is local to the unit it's tied to and MPkilled is run on every machine

little eagle
#

You need to add the killed eventhandler on every machine

still forum
#

killed doesn't work serverside

#

use MPKilled or add them clientside

proven crystal
#

diag_log "deathhandler started";

while {true} do {

    sleep 60;
    diag_log "deathhandler loop started";
    
    {

        if (!(_x getVariable ["MyUnitDeathSet", false])) then { 
            
            _x setVariable ["MyUnitDeathSet", true];
            diag_log "variable MyUnitDeathSet set";
            
            _x addEventHandler ["killed",{
                diag_log "handeling death";
                            
                _victim = _this select 0;
                _killer = _this select 1;
            
                if ((side _victim != side _killer) && (isplayer _killer)) then {
                        diag_log "killed by player";
                        _fooditems = ["kss_bread","kss_caviar","kss_chicken","kss_chips","kss_corn","kss_cucumbers","kss_mre","kss_mushrooms","kss_pea","kss_red_beans","kss_losos","kss_sausage","kss_soup_chicken","kss_soup_vegetable","kss_kilka","kss_shproti","kss_steak","kss_tushenka_beef","kss_tushenka_pork","kss_tomatoes"];
                        _drinkitems = ["kss_cocktail_patron","kss_bottle_big","kss_bottle_small","kss_soda_coke","kss_beer_dark","kss_beer_light","kss_soda_mdew","kss_mre","kss_soda_pepsi","kss_vodka"];
                        
                        diag_log "adding itemCargo";
                        _victim addItemCargo [selectrandom _fooditems, 1];
                        _victim addItemCargo [selectrandom _drinkitems, 1];
                        
                        diag_log "adding items to uniform";
                        _victim addItemToUniform selectrandom _fooditems;
                        _victim addItemToUniform selectrandom _drinkitems;
                        
                        
                        
                diag_log "death handled";
                };    
            }];
            diag_log "death setup handled";
        };
    } foreach allUnits;

    
    
};```
little eagle
#

Yes it does. For AI that belong to the server

jade abyss
#

initPlayerLocal.sqf -> addEH "stuff"

proven crystal
#

thats the full script

#

i launch it from initserver.sqf

jade abyss
#

@proven crystal
```sqf
CODE
```

little eagle
#

initserver.sqf is insufficient

#

The eventhandler will only be added on the server

jade abyss
#

InitPlayerLocal.sqf -> AddEH

little eagle
#

And that means that the killed event will never be executed on all player owned objects

jade abyss
#

(in the missionfile, obv.)

still forum
#

use addMPEventhandler with the MP variant of that eventhandler.
Or use the clientside Eventhandler on the clientside

proven crystal
#

the ones at the moment should all be server sided units i suppose

little eagle
#

Pretty sure the MP one doesn't work either if it's not added on the machine that owns the unit

#

dedmen

#

Difference is that the code will be executed everywhere if it's added on the local machine

#

Not what you want at all

still forum
#

Triggered when the unit is killed. EH can be added on any machine and EH code will trigger globally on every connected client and server.

little eagle
#

That would mean one item per connected client

#

Still, one item per connected client is not what you want

#

Just add the killed eventhandler on every machine.

jade abyss
#

Just use the one in initPlayerLocal.sqf, why beeing so fancy?

player addEventHandler ["killed", {call Tag_fnc_MyFunction} ];```
#

Yeah Commy.

proven crystal
#

but if the units are owned by the server?

still forum
#

Every unit inside allPlayers is not owned by the server

jade abyss
#

โ˜

#

Or do you use AI?

still forum
#

Oops ๐Ÿ˜„ Yeah.. He's using allUnits not allPlayers. So the old code with the killedEH should still work for AI's

proven crystal
#

too late for this now ^^ thanks guys ill try stuff again tomorrow

little eagle
#

lbSetCurSel triggers the LBSelChanged event

#

great way to lock up your game

#

And apparently the event does not happen if there is only one element in the listbox, despite it happening when you select what is already selected via lbSetCurSel

#

Weird stuff

turbid thunder
#

I have a question. Is there a way to detect that a certain model is a tree or a rock? Like, when cursorobject returns the object of a tree or a rock, or a bush, is that detectable that it is a tree or a rock or a bush?

little eagle
#
private _isTree = _object in nearestTerrainObjects [ASLToAGL getPosASL _object, ["TREE", "SMALL TREE"], 1, false];

This is the best I have, but it only works for map trees, not spawned trees.

turbid thunder
#

Map trees are going to do just fine though someone just told me about getModelInfo and it seems that through that I MIGHT be able to detect it too. Thx for the answer I'm gonna see if I can accomplish what I'm attempting here, if not, well, then I'll be back soon ๐Ÿ˜„

little eagle
#
private _isRock = _object in nearestTerrainObjects [ASLToAGL getPosASL _object, ["ROCK"], 1, false];
#

O.K.

plucky beacon
#

If i do an onplayer connected event handler on a client side, it'll work when other players join a server right?

little eagle
#

No, it only fires on the server.

plucky beacon
#

gr

#

I could make the server remote execute to the client in question I guess

little eagle
#

That is what you'll have to do.

plucky beacon
#

for context this is for an addon, trying to make a mod version of a script

compact galleon
#

Anyone know how to get helicopters to fly to a precise point?

#

move will make them complete the waypoint within like 500 meters

still forum
compact galleon
#

@still forum Doesn't move at all then, unfortunately

still forum
#

Place a helipad and place the waypoint on that? Maybe they behave diffently then. Arma Campaign can do it so...

compact galleon
#

@still forum I doubt it. I was thinking of using that with land though, and then cancel when he's close enough

#

Trying to get it to fly over a car to sling load it

still forum
#

Ouh. Fly not land... Missunderstood then

compact galleon
#

Yea, they stop when they're like 200 meters away

#

so you can't get them to a precise position

#

aaaaaand of course he detects there's a car there, and lands somewhere else.......

#

Now it works

#

but can't cancel the landing, and he refuses to move on until he's landed......

#

insertion_chopper_pilot action ["cancelLand", insertion_chopper_pilot]; is not working

#

oh

#

land: "NONE" (cancel a landing) Available since ArmA 2 57463 build.

#

great

#

thank god. that works. "cancelLand" action didn't

compact galleon
#

And now all of a sudden it refuses to fly while it has a load

#

...........

plucky beacon
#

Confirmation that setdriveonpath don't work on aircraft?

subtle ore
#

is it possible to force a briefing? Say, each side had to come up with a plan then confirm the plan. Then they would be able to continue.

plucky beacon
#

I don't know about forcing a briefing but you can force a map

subtle ore
#

Okay, from there then would it be possible to see if a line has been drawn on the map? etc?

subtle ore
#

Nevermind, I'll just make a onscreen button for that

hollow lantern
#

hey does someone has a good attachTo solution? I mean I can place a object onto a vehicle in 3DEN but how can I get the cordinates codes for attachTo command from it?

turbid thunder
#

I haz a question. Is it somehow possible to detect if two static objects collide with each other? Or, would collide?

#

Trying to figure out a system where the player can build stuff but preferably in a way where he can't build everything in one and the same spot with the models overlapping each other

#

Ahhhhhh

#

I see

#

Unfortunatly for me, buidlings arent physx handled

#

For the better I guess ๐Ÿ˜„

#

I've made a horror mission with fully custom AI and pathfinding and waypoint system in a fully enclosed area before which used lineintersect to detect if the enemy can see the player ๐Ÿ˜„

#

I can handle

#

Hopefully

vital onyx
#

@compact galleon there should be a waypoint completion radius, dor helicopters it is around 200m by default

#

@turbid thunder just curious, does your AI hunts inside buildings?

turbid thunder
#

@vital onyx I took the VR map and built my own corridors and hallways using walls in vanilla

#

No winning condition though

hollow lantern
#

well you will die anyway haha

#

but another short question: is there a way to tell a trigger that I don't need to be fully inside with my Truck? As far as I see my trigger activation fires only if i'm completly inside with my truck (HEMTT A4)

compact galleon
#

@vital onyx It's fixed 200m for air vehicles

#

I tried

subtle ore
#

is there a way to check if a variable is a string, or boolean?

#

can't find anything obvious in the docs

turbid thunder
#

I wonder what you are doing that you would have one variable that can have multiple types

hollow lantern
subtle ore
#

Well. What I'm doing is, if I wanted an area defined by a marker. Then it'll use a marker, if not then it'll use the map size as the entirety of the area

#

@hollow lantern Oh, cool. Thanks.

hollow lantern
#

Example 4 should match your needs, yw

subtle ore
#

Indeed it does, awesome.

turbid thunder
#

Ok I made some good bounding box progress. Managed to get cans on all 8 edges of the bounding box, however I did notice that even boundingBoxReal was a bit abstract with the sizing

hollow lantern
#

Whats a good solution to turn a turret of the tigris AA directly into the sky? It's empty and I just want the gun to look straight in the air without any gunner. There is a method available with placing a soldier first and in his init this assignAsGunner tank; this moveInGunner tank; 0 = this spawn {_this doWatch player; sleep 2; (vehicle _this) engineOn false; deleteVehicle _this}; but therefore I need to create a object above the AA

#

hmm didn't work

little eagle
#

A class with the same source name should also be present in main config in CfgVehicles AnimationSources and have to be bound to the "user" controller for the command to work. If in order to animate door in example below using animate command it would require 2 calls:

#

Cannot animate turrets with scripts. If that were possible, I would've made a hunter-killer system ages ago.

#

It will work if you create a simple object aa tank though iirc. Can't shoot with those though.

hollow lantern
#

hmm ok thanks

turbid thunder
#

Well as a matter of fact, the UGV can have its turret animated

little eagle
#

Yes, because:

A class with the same source name should also be present in main config in CfgVehicles AnimationSources and have to be bound to the "user" controller for the command to work. If in order to animate door in example below using animate command it would require 2 calls:

turbid thunder
#

As like, the only vehicle

little eagle
#

It works with simple objects too.

#

I just tested it.

turbid thunder
#

Simple animated killer systems?

#

I dunno about you but that sounds like a plan to me ๐Ÿ˜„

little eagle
#

Nah, doesn't help me, but maybe the AA tanks of @hollow lantern are for scenery only anyway.

hollow lantern
#

well kindOf but I will try that tomorrow, maybe I will make him scenery or just quit haha

little eagle
#

AI inside would aim all over the place anyway and if it's empty, might as well make it a simple object.

turbid thunder
#

I like how you typed the "kind of" as "kindOf" as in like, the scripting command. Btw I remember that in the campaign, there once was an AA tank just shooting into nothing just for the looks. With AI though

#

@little eagle Oi, you're smart, soo I have question for you ๐Ÿ˜ƒ If you would have to make a script that allows players to place objeccts but restrict them into not placing objects inside objects, how would you do that?

little eagle
#

place how?

turbid thunder
#

Currently trying smth out with bounding boxes but the returning bounding box for some objects seem to be way larger than the object itself

#

Like, I dunno, addAction or smth doesnt really matter, but mayby imagine you have an addaction to place something, then a local preview of the object you want to place spawns, you walk to the place where you want it placed and confirm. Should work inside buildings but deny placing things like boxes into the wall or other boxes

little eagle
#

hmm

turbid thunder
#

Although I could probably manually adjust the size of the bounding box to be more fitting of the actual model and then lineintersect my way to victory buuuuuuuut the way I know arma, there is always more than one way of doing it and knowing me, I'm likely to not do it in a way that would be optimal

little eagle
#

There is no command to check if two objects are touching.

turbid thunder
#

Well I'll just try it with the bounding box and see how well those coordinates really work out of the box. Tomorrow that is. Also need to find a good way of doing a lineintersect check from every point to every point to make absolutly sure that there is no way my object is touching anything.

meager granite
#

Wish there was <entity> boundingBoxesIntersect <entity> command

little eagle
#

Well, bounding boxes are pretty useless and that could be scripted in 5 minutes.

meager granite
#

and it will work 100 slower if you need to do it on each frame

little eagle
#

Eh. like 10 lines max.

#

It's also probably something you can do once and twice a second and have a final check before placing.

jade abyss
#

โ˜ Yep, thats MORE then enough

tough abyss
#

3.50 lines you got a deal

tough abyss
#

Nope. Three fiddy

vague hull
#

Depending on the size of the bounding boxes, thats not enough

#

I would go for 1 line each meter (width) for each of the sides of the box and 4 vertical lines

plucky beacon
#

Charge extra for comments

tender fossil
#

I know that RP isn't the most appreciated gamemode here, but would here be anyone who might be interested in developing lightweight open source RP mission? I'm starting to develop it soon and I'm looking for gents that might be interested in developing RP as open source.

jade abyss
tender fossil
#

Oh, there's channel for it now? Thanks for the tip @jade abyss

jade abyss
#

2-3 Days ago.
+it's not the RP-Mode, its the Attitude of 99% of their selfproclaimed "creators/modders/scripter" (aka ABadWordThatIWillNotWriteDownInHere)

tender fossil
#

I agree that the RP community is pretty toxic

hollow lantern
#

hmm is the usage of params or the usage of BIS_fnc_param better?

dusk sage
#

One's a command, one isn't

#

One privates for you, one doesn't

#

๐Ÿ˜ƒ

hollow lantern
#

ah ok

jade abyss
#

"native" commands > Functions

meager granite
#

BIS_fnc_param is now a wrapper for params

#

so use params instead

tough abyss
#

Just a note if you have a mission with persistence & are using getAllHitPointsDamage + setHit
Arma Units now have hitpoints with the same selection name i.e "HitBody" + "Incapacitated" both use "body" selection name

mortal shoal
#

How does dynamic simulation work with lights?

#

The light go off when simulation is disabled?

#

So lights should not use the dynamic simulation?

little eagle
#

variable name

grand berry
#

Does anyone the ACE3 event handlers for broken tyres? When using setHit on the wheels it does destroy them but ACE does not detect the tyre is broken and you can still remove the missing tyre.

subtle ore
#

@grand berry I don't think ACE has any documentation for that last I checked. But I guess you could always go digging

turbid thunder
#

targets seems like a simple way of detecting hostiles nearby without having a giant array like nearTargets. I wonder if it sorts the list based on the distance you are away from it

subtle ore
#

can you look for specific targets?

turbid thunder
#

You can filter by side

subtle ore
#

Cool.

little eagle
#

No one will ever use the command, but everyone that uses "targets" as variable will get their script broken.

turbid thunder
#

Good that I'm not "No one" and good thing that I never did that

tough abyss
#

I'm assuming targets will be used by AI modders, like every other AI related command.

turbid thunder
#

Can someone explain to me what kind of difference it makes to use getPosVisual instead of getPos? It seems several commands have also a "Visual" variant but I'm not sure exactly what it changes / what benefit I would have from using one over the other

grand berry
#

@subtle ore thank - yea looked in the wiki and had a dig though the git hub. Not found what i need yet.

little eagle
#

@turbid thunder
getPosXVisual reads the position from the render scope instead of the simulation scope.
simulation scope: where the object is
render scope: where the object appears to be, where it's drawn

The position in simulation scope is updated more frequently, so moving objects, especially fast moving ones, aren't choppy.
You would use the "visual" variant for example when drawing nametags.

turbid thunder
#

ahhhh ok thx commy

rancid pecan
#

helo

#

"XXX was killed." How can we change this post?

turbid thunder
#

In the difficulties setting, there is an option to disable death messages

rancid pecan
#

No i just want to change

rancid pecan
#

Hello again

#

21:38:03 Error compiling '' in 'HitArms'
21:38:03 Error compiling '' in 'HitLegs'
21:38:03 Error compiling '' in 'HitPelvis'
21:38:03 Error compiling '' in 'HitAbdomen'
21:38:03 Error compiling '' in 'HitDiaphragm'
21:38:03 Error compiling '' in 'HitChest'
21:38:03 Error compiling '' in 'HitArms'
21:38:03 Error compiling '' in 'HitLegs'
21:38:03 Error compiling '' in 'HitPelvis'

#

what is the problem ?

little eagle
#

Nothing, ignore

rancid pecan
#

okey thank you

little eagle
#

Please use the public chat and not PM's. If it's a question, maybe someone who lurks knows the answer, or maybe learns from it.

rancid pecan
#

Hello

#

"XXX was killed." How can we change this post?

#

@little eagle

little eagle
#

remove the message per server config and substitude it with your own via killed eventhandler

rancid pecan
#

yes

#

Okey "DeathMessages = 0;" I closed it. How do I write myself? I do not know :((

hollow lantern
#

Was the best approach to pass a group to a script? params does not work with a group as far as I know, right?

little eagle
#

It does

#

Why wouldn't it?

hollow lantern
#

well it returns a false array to me

rancid pecan
#

@little eagle I work 3 days
I have a headache ๐Ÿ˜ฆ please help

little eagle
#

Shouldn't sit in front of the PC with a headache.

#
group player call {
    params ["_group"];
    systemChat str (_group isEqualTo group player);
};
#

This should work just fine.

#

Should print "true".

hollow lantern
#
_null = [TAIGA, Helo22, "A_ONSTAT", Landing22] execVM "itsAebian\ru_airsupport.sqf"```

``units TAIGA`` in the debug console returns my two soldiers: Leader22 && Gunner22
```sqf
params["_group", "_vehicle", "_cond", "_helipad"];```
If I do a format on _group here I instead get ``O TAIGA`` && ``any``

Because I want to extract the two soldiers via 
```sqf
_group params ["_leader","_gunner"];```
still forum
#

you can't extract from a group using params.. As far as I know

#

params only accepts array as parameter

hollow lantern
#

okay but why is the group TAIGA I just give not equal to the _group ?

little eagle
#

_group params ["_leader","_gunner"];

#

Yeah, that is not how it works

#

Try this:

(units _group) params ["_leader","_gunner"];
#

Although I doubt it's guaranteed that the first unit in the group is the "leader".

#

@rancid pecan maybe

vague hull
#

@rancid pecan get used to it

#

and browse the wiki for dificulty setting as well as addMPEventhandler (MPKilled) if you want to do you own killmessages

hollow lantern
#

well it seems that the first param is taking the group and creating an array since 17:39:04 Error units: Type Array, expected Object,Group

little eagle
#

Can you cp what you did exactly?

hollow lantern
#
params["_group", "_vehicle", "_cond", "_helipad"];

(units _group) params ["_leader","_gunner"];```
#

thats at the start of my script which generates the error

#

I just executed it with _null = [TAIGA] execVM "itsAebian\ru_airsupport.sqf"

little eagle
#

What error

hollow lantern
#

for testing and that above was the output of the rpt

little eagle
#

please paste everything

hollow lantern
#

17:39:04 Error units: Type Array, expected Object,Group

#

ok

#
units _group params ["_leader","_gunner">
17:39:04   Error position: <units _group params ["_leader","_gunner">
17:39:04   Error units: Type Array, expected Object,Group
17:39:04 File C:\Users\Aebian\Documents\Arma 3\missions\[A]_Cuda.Woodland_ACR\itsAebian\ru_airsupport.sqf, line 10
17:48:46 Error in expression <p", "_vehicle", "_cond", "_helipad"];```

```sqf
/*
    author: @Aebian
    description: Airsupport script for my test mission.
    returns: nothing
    // _null = [TAIGA, Helo22, "A_ONSTAT", Landing22] execVM "itsAebian\ru_airsupport.sqf"
*/

params["_group", "_vehicle", "_cond", "_helipad"];

(units _group) params ["_leader","_gunner"];```
little eagle
#

Debug console, WATCH fields:

TAIGA

What does this report?

hollow lantern
#

units TAIGA returns : [Leader22, Gunner22] but just watching TAIGA returns: O TAIGA

little eagle
#

So TAIGA is not actually a group, but an array of units.

hollow lantern
#

it is, I did : TAIGA = group this; in the init of the group leader

#

is that wrong?

little eagle
#

No, it's correct, but for some reason, it is an array and not a group

#

Do you by chance have the same variable defined somewhere else?

hollow lantern
#

maybe in the Callsign? I just changed it now

#

there was also TAIGA set

#

ah yes

#

hmm

#

I renamed the callsign to RU_TAIGA and now its O RU_TAIGA

#

if I watch TAIGA

little eagle
#

Yeah that's it!

#

If you use these as "group names" or "object names", that is the same as when you use them as variable.

#

O RU_TAIGA

#

This looks like a group now. Now it should work.

#

O stands for "opfor"

hollow lantern
#

works, thanks @little eagle

little eagle
#

yw

little eagle
#
player action ["getInGunner", cursorTarget];
#

Does this still work?

#

I guess you can work around it for now.

#

hahaha

#

Sure

turbid thunder
#

Luckly there is an alternative way of disabling weapon disassembly

little eagle
#

With the new setActionText commands, you can make it indestinguishable from the vanilla actions.

#

I do this in the Eagle, because all moveToX actions are bugged in vehicles with FFV slots when in the driver position

plucky beacon
#

do sounds need titles now? This didn't happen before the 68

#
        name = "beep1";
        sound[] = {"\sound\beep1.ogg", db+0, 1.0};
        title = "";

I added title and it still comes up to the error. I don't know what it's asking for

little eagle
#

title[] = {};

#

"title" as in "subtitles" I think. They correspond with the sounds by array position.

plucky beacon
#

I don't remember sound cfg involving subtitles

little eagle
#

Well, "titles".

#

titles: Array of Number, String - Delay and subtitle text shown when sound is played. If the delay is longer than the sound itself, then the sound will be repeated until the time limit has been reached. Can be empty.

plucky beacon
#

WTF, so now I added them and it's running the sound four times?

#

oh dear

polar folio
#

was it always this hard to get a dead unit out of a vehicle? not even setpos is working for me

plucky beacon
#

ya basically

#

Also note to self, adding a delay to the subtitle on CFGSounds makes the sound play multiple times

tulip cloud
#

I'm working on an addAction script. Basically I'm trying to figure out the most effective way of having the player select the Select Helicopter option which will add 8 additional options which will be a list of helicopters. Then out of the list of helicopters they should be able to select one of them and it spawns it in. Though my problem is I'm unable to figure out how to effective give the spawned helicopter a variable name.

Once the player spawns the helicopter in they will select which city to fly at. As soon as they get into the vehicle both them and the vehicle will be teleported to that city and they will begin flying. To do this correctly I believe I need to assign a variable to the helicopter. Correct me if I'm wrong.

plucky beacon
#

that's a lot of text

#

Select helicopter? have you considered the VVS framework?

tulip cloud
#

googling VVS framework

tough abyss
#
    vehicle triggerDynamicSimulation true;```
This will stay simulated all the time or just when unit's are nearby
plucky beacon
tough abyss
#

lol

#

i misread triggerDynamicSimulation

#

that should be attached to player ๐Ÿคฆ

plucky beacon
#

You use this, replace the create vehicle with create unit, and plug in a new script that sends the helicopter on it's way to the location

tulip cloud
#

ok I'll test it out...Thanks for the direction. ("that's a lot of text" <-- Because I'm so lost)

plucky beacon
#

You want a filtered list of aircraft for someone to spawn, jump into, and be flown to a location right?

#

I don't know if I get the teleporting thing is all

#

but you can start with having the filtered list of vehicles to spawn and work from there

tulip cloud
#

VSS works perfectly

plucky beacon
#

nice

hollow lantern
#

was the best approach to have a condition that in a certain trigger there need to be lets say 20 blufor units simultaneously active? I guess something with count allUnits?

little eagle
#

cond: count thisList >= 20?

hollow lantern
#

hmm yeah, pretty simple lol , thanks

plucky beacon
#

thisList ๐Ÿ‘Œ

tulip cloud
#

Is there any good Teleport scripts out there? I'm going to make it so you pick your city and then a 30 second countdown. You basically have 30 seconds to run to your spawned helicopter and start the engine so that when you are teleported you are full RPMs so you don't crash.

#

Right now I'm planning on it just being a simple list of all the cities and once you select one it starts the countdown and then teleports you. (It would be cool if it could be linked to the map or something more visual.

plucky beacon
#

I would put a wait until the helicopter is off the ground then teleport

polar folio
tulip cloud
#
_towns = nearestLocations [getPosATL player, ["NameVillage","NameCity","NameCityCapital"], 25000]; 
systemChat str _towns;

This script is returning "Location, NameCity at x,y"

I'm trying to pull all the location names so I can Teleport the player/helicopter to LocationName. It is giving me the X,Y coordinates but the actual location name is just returning the type (NameCity)

plush cargo
#
    _locTypes = ["NameCity","NameCityCapital","NameVillage","NameLocal"];
    _worldCenter = getArray (configfile >> "CfgWorlds" >> worldName >> "centerPosition");
    _worldSize = getnumber (configfile >> "CfgWorlds" >> worldName >> "mapSize");
    _locNames = [];    
     _locations =  nearestLocations [_worldCenter, _locTypes, _worldSize];
    {
        _locName = text _x;
        _locPos = locationPosition _x;
        _locSize = size _x;
        _locNames pushBack _locName;
    }forEach _locations;
    hint format ["%1", _locNames];
#

@tulip cloud

tulip cloud
#

I tried this out in debug but I used diag_log format to return the response to .RPT from there I was able to get a list.

18:00:31 "[""Lami"",""Lifou"",""Yani Islets"",""diesel power plant"",""cocoa plantations"",""Lobaka"",""lumberyard"",""Lakatoro"",""La Foa"",""Savaka"",""Regina"",""ferry"",""railway depot"",""Katkoula"",""ferry"",""Moddergat"",""Lรถsi"",""Tanoa Sugar Company"",""Tanouka"",""Tobakoro"",""Georgetown"",""Kotomo"",""Rautake"",""plantation"",""temple ruins"",""Harcourt"",""Buawa"",""Yasa Island"",""Saint-Julien"",""sawmill"",""Balavu"",""Namuvaka"",""Vagalala"",""Imone"",""Sosovu Island"",""fuel depot"",""Leqa"",""Galili"",""Sosovu"",""lumberyard"",""Blerick"",""ferry"",""lumberyard"",""banana plantations"",""Yanukka"",""Oua-Ouรฉ"",""harbor remnants"",""Comms Alpha"",""Cerebu"",""roadhouse"",""Laikoro"",""Saioko"",""Belfort"",""Mont Tanoa"",""Tuadua Island"",""Oumรฉrรฉ"",""Red Spring surface mine"",""forest clearing"",""Comms Bravo"",""Muaceba"",""Nicolet"",""Lailai"",""Doodstil"",""maze"",""Tavu"",""Lijnhaven"",""Ile Saint-George"",""Nani"",""Petit Nicolet"",""Port-Boisรฉ"",""fortress ruins"",""Saint-Paul"",""Nasua"",""

This is a great start but I need the coordinates also. I see you have _locPos = locationPosition _x; not sure how to use that with the names.

little eagle
#

position reports the position of a location.

hollow lantern
#

hmmm is there a solution for getting the animation or animationSource of an object? especially doors and gates

plush cargo
hollow lantern
#

@little eagle yeah but I need a animation for that don't I? like in animationSourcePhase there is this example sqf _phase = house animationSourcePhase "Door_1_source"; and well at the end is the source. I remember in ArmA 2 I just had a small code snippet where I just had to look at the door/ gate and I was given the animation that could be used with obj animate ["", 1] and so on

jade abyss
#

With Sources -> No, not possible. You have to know the name of the Sources.
With "AnimationSources" from the Config -> Possible.
๐Ÿ‘‡ use that

hollow lantern
#

@little eagle yep, that animationNames command works, thx

tough abyss
#

BIS_fnc_someFunction is better than it's counterparts right? so like BIS_fnc_execVM vs execVM

little eagle
#

Other way around

spring ravine
#

wait so for example, selectRandom is better than BIS_fnc_selectRandom?

#

and if so why?

tough abyss
#

i thought it was speedier if we used BIS

hollow lantern
#

because selectRandom is a direct command and BIS_fnc_selectRandom is a function. Sidefact: isEqualTo is faster then ==

compact galleon
#

BIS_fnc_selectRandom is a script

#

selectRandom is native C++

spring ravine
#

hmm ok (notice how newbie I am)

tough abyss
#

danke. thought the native was the other way around

little eagle
#

No. A function is written whenever you don't have a direct command implementation.

tulip cloud
#

Is _locNames = []; a built_in function? It is returning for example CfgWorlds >> Tanoa >> Names >> Georgetown01 >> name = "Georgetown";

But I want just Georgetown01 because I can then use that classname to get Georgetown01 >> position[] = {5396.22,10334.7};

little eagle
#

No, that's a variable.

tulip cloud
#

So I can't do getPos Georgetown01 and return 5396.22,10334.7 ?

little eagle
#
getArray (configFile >> "CfgWorlds" >> "Tanoa" >> "Names" >> "Georgetown01" >> "position")
tulip cloud
#

brilliant ok, now to plug this in...

#

The one question that still hasn't been answered is how do I create an Array that is filtered with only capitol/city/village types. I don't want it to return the name ("Georgetown") but I want the variable name ("Georgetown01")

little eagle
#
private _filter = ["NameCityCapital", "NameCity", "NameVillage"];
private _names = configProperties [configFile >> "CfgWorlds" >> worldName >> "Names", "isClass _x"];

// filter out all non-cities
_names = _names select {getText (_x >> "type") in _filter};

// convert array of configs into array of classnames
_names = _names apply {configName _x};

_names
#

works on every map

steep matrix
#

were these mentioned yet being in 1.69?

b:CONTROL ctfindheaderrows SCALAR
b:CONTROL ctfindrowheader SCALAR
b:CONTROL ctheadercontrols SCALAR
b:CONTROL ctremoveheaders ARRAY
b:CONTROL ctremoverows ARRAY
b:CONTROL ctrowcontrols SCALAR
b:CONTROL ctsetcursel SCALAR
b:CONTROL ctsetdata ARRAY
b:CONTROL ctsetheadertemplate CONFIG
b:CONTROL ctsetrowtemplate CONFIG
b:CONTROL ctsetvalue ARRAY
b:CONTROL ctvalue SCALAR
u:ctaddheader CONTROL
u:ctaddrow CONTROL
u:ctclear CONTROL
u:ctcursel CONTROL
u:ctheadercount CONTROL
u:ctrowcount CONTROL

n:getcursorobjectparams
u:isdamageallowed OBJECT```
meager granite
#

ct? ๐Ÿค”

#

Controls Template

#

Hm, interesting

#

And here I am still wishing we had commands to control scrollbars

bright coral
quasi rover
#

Is it right that only the units in heli can listen to music?, but all the clients can listen to music even not on board .

// _ari1 is pre-defined heli object
// "fnc_playMusic" is function name for playing Music
{ if (_x in _air1) then { remoteExec["fnc_playMusic",-2];};} forEach allUnits;
halcyon crypt
#

not sure what you're asking?

#

you want the music to only play for people in that heli?

quasi rover
#

yes right. @halcyon crypt

compact galleon
#

@quasi rover No. -2 will execute on every client except the server

halcyon crypt
#
{
    if (isPlayer _x && {vehicle _x == _air1}) then {
        ["the_music_file_or_class"] remoteExec ["fnc_playMusic", _x];
    };
} allUnits;
#

something like that

compact galleon
#

So it'll play for everyone but the server times the number of units in _air1

#

^ and I believe @halcyon crypt's code can be reduced to

{
    if (vehicle _x == _air1) then {
        remoteExec["fnc_playMusic", _x];
    };
} forEach playableUnits;```
halcyon crypt
#

playableUnits includes AI and dead units though

compact galleon
#

Alright. sqf { if (isPlayer _x && {vehicle _x == _air1}) then { remoteExec["fnc_playMusic", _x]; }; } forEach playableUnits;

#

I believe it's an optimization non-the-less, not having to iterate all units in the world

halcyon crypt
#

true

compact galleon
#

Which reminds me I need to add suggestions to use lazy evaluation into my tool

vital onyx
#

is there still a group limitation, max 144 groups?

quasi rover
#

thx guys, I'll try it later. @compact galleon @halcyon crypt

halcyon crypt
#

@vital onyx wasn't it increased to 288?

vital onyx
#

well, I would like to see kind of proof, if possible)

compact galleon
#

Coming right up

#

I'm surprised I still get >20 fps after ordering all 288 groups to move to my position

#

I killed a few, now they're all firing at me

turbid thunder
#

144 groups per side was already a lot but 288?

compact galleon
#

not much

#

if you don't want grouped units, that's a maximum of 288 people

peak plover
#

But if you have groups that are bigger, it's infinte ๐Ÿ˜„

#

100 groups of 10 vs 100 groups of 10. You run out of FPS before you run into a group limit now

#

I enjoyed 20 x 2 man patrols instead of 3x8 man patrols, because it feels more dynamic and cooler. This update is a really great. Haven't really tested out anything too extreme yet.

plucky beacon
#

Ya, having 5700 units might be overwhelming

still forum
#

I checked how BI increased the Group limit and they did it exactly as I thought.
CfgWorlds >> GroupSquad and GroupPlatoon and GroupCompany just create more entries in these and you get more groups.
in 1.68 they added 2 squads. So if you add more Squads in your own Mod you get even more groups.
Atleast I thought thats how the limit is determined before they increased it. And them adding more squads after they increased the limit kinda confirms that

little eagle
#

You thought?

#

Or did you try?

still forum
#

Adding 4 more squads doesn't change anything now. Maybe the limit is made before Mod PBO's are loaded

little eagle
#

now

#

Did it ever?

still forum
#

I didn't try before

tough abyss
#

There was a tweet mentioning the group count was doubled to 288 in dev branch. Not sure if it made it in stable

little eagle
#

I checked how BI increased the Group limit and they did it exactly as I thought.
Doesn't sound like you exactly know after all.

#

They could've just added these to comply with the new gorup limit (regardless of it's in stable yet or not).

#

So you don't get missing string errors when making use of it or whatever.

#

Could still be a magic number define in the source.

still forum
#

Well.. I changed the groupNameFormat and added a few Squads but these are ignored when placing down groups. Even if there was a hardcoded limit it should respect my changes on the name format

#

So there is something else going on

little eagle
#

Oh, what's the classes access?

still forum
#

0

little eagle
#

If it's set to ReadOnly, then you cannot add sub classes iirc.

still forum
#

But the sub classes are showing up in configViewer

#

It's CfgWorlds. You should be able to add your Map to that if you are making one so it should be editable right?

little eagle
#

true

#

ReadOnly would be 2

still forum
#

๐Ÿ˜ฎ The first 4 squads are from A3_ui_f. The 2 new squads are from "".. nothing?

little eagle
#

0 ReadAndWrite additional values can be added
1 ReadAndCreate only adding new class members is allowed
2 ReadOnly no modifications enabled
3 ReadOnlyVerified no modifications enabled, CRC test applied

still forum
#

But that's exactly how it works.
http://prntscr.com/em8nbs
Those are not 288 groups. That's just what the message is showing. Check on the left. There are so many groups that there weren't enough names and it created 5 Alpha 1-1 groups

little eagle
#

So you did increase the group limit, but the error message you get when hitting the limit is displayed wrong.

still forum
#

The error message is apparently hardcoded

little eagle
#

Yeah, why not. It's probably a string in stringtable and they didn't bother to %1 the group limit.

runic spoke
#

5:11:09 Warning: Adding units to a remote group is not safe. Please use setGroupOwner to change the group owner first. Anyone know if that creates a new group?

still forum
#

http://prntscr.com/em8spt 1336 Server slots. I just modified the output of the algo that scans the entries in CfgWorlds. So BI could easilly double the group limit again if they wanted to. But why let players kill their fps ^^

#

@runic spoke calling setGroupOwner to yourself transfers the group to you. It doesn't create a new one. Then you can add the new Unit and transfer the group back if you want

runic spoke
#

Doing that will cause so many problems.

#

I'm not going to do that.

still forum
#

Just execute the code that adds a new member to the group on the group owners machine using remoteExec

runic spoke
#

I'm litreally just asking if that creates a new group, not how to fix it.

still forum
#

As I already said. no

runic spoke
#

Ok, thanks.

still forum
#

you are adding units to an existing group. No reasing for it to create a new one. It warns you that stuff could be messed up. But most likely thing I can think of is the new group Member ignoring his Leaders orders

runic spoke
#

Zombies ignoring a leaders orders, exactly what i want! ๐Ÿ‘๐Ÿผ

still forum
#

Okey confirmed. Group Limit is calculated after loading dta\bin.pbo and before all other Mods are loaded.
after adding a few squads and platoons to bin.pbo I got a group limit of 432.
I wonder what happens if you only increase the group Limit serverside....
You can also square the group Limit by editing 1 byte with a hex-editor in the binary

runic spoke
#

lol

still forum
#

Okey if the server has increased group Limit and already has over 288 groups. Every joining client will think he can't create anymore groups and will spawn as a seagull.
Except if respawn type is set to RespawnToGroup and the group the player is joining in already exists.
These are assumptions though.... Can only really find out by testing this.
If a player join and creating his group is done serverSide everything is fine. If a player creates his group clientSide it will fail.
If that doesn't work you can still fill the player slots with AI and enable respawn. And if a player disconnects teleport the AI to spawn and disableSimulation it. That way it will always make sure a Players group already exists when someone joins.
But if you are some big server or something with a modpack for all players you could just build a Extension that increases the groupLimit at gameStart. If you really wanted to.

runic spoke
#

@still forum Is the group a "hardcoded" config value?

still forum
#

several config values

runic spoke
#

class CfgGroups{}; is the only thing that i can find "about it"

plucky beacon
#

it has something to do with CFGworlds if I remember

still forum
#

there are 3 config classes. for Name,Platoon and Squad. Alpha 1-1 Name Platoon-Squad
total group count = Count of Names * Count of Platoons * count of Squads
previously there were 9 names, 4 platoons, 4 squads. 9*4*4 == 144. Now they added 2 squads and 3 Names 12*4*6 == 288

#

It is CfgWorlds >> groupNameFormat and the classes mentioned in there

plucky beacon
#

ye that

#

it's all done with math not just a value

#

so much meth

little eagle
#

wew

halcyon crypt
#

๐Ÿ”ฅ ๐Ÿฅ„

#

wait, meth is smoked with a pipe ๐Ÿ˜

runic spoke
#
[_zombie] joinSilent _group;
_group setGroupOwner (owner _player);
if (_zmbGroup != _group) then
{
    _zmbGroup setGroupOwner -2;
    deleteGroup _zmbGroup;

    diag_log "SM_Zombz (Hard Coded Debug): Deleteing old zombie group (Result of spawning on a remote group)";
}; ```
In the RPT: 10:30:25 "SM_Zombz (Hard Coded Debug): Deleteing old zombie group (Result of spawning on a remote group)"
#
if (isNull _group) then
{
    _group = createGroup [SM_ZombieSide, true];
    _player setVariable ["SM_ZombieGroup", _group];
    _group setVariable ["SM_IsZombieGroup", true];
};```
little eagle
#

-2 ???

#

Owner Ids are positive numbers.

runic spoke
#

server = 0 right?

little eagle
#

2

#

owner _player
also looks weird. owner only works on the server and there is no "player" on a dedicated server

plucky beacon
#

in remote exec it's 2

runic spoke
#

ok

tough abyss
#

0 is global.

plucky beacon
#

-2 is all clients but server

runic spoke
#

for remexec

plucky beacon
#

ye

little eagle
#

setGroupOwner doesn't work with 0 obviously

#

Or negative numbers

plucky beacon
#

just use owner command?

little eagle
#

The whole thing looks weird

#

_zmbGroup setGroupOwner -2;
deleteGroup _zmbGroup;

#

Why?

#

Why transfer it, then delete it?

plucky beacon
#

lol

runic spoke
#

You can't delete groups that are not local

plucky beacon
#

wait what

runic spoke
#

And i don't want to send a network message to delete a remote group

plucky beacon
#

this is news to me

little eagle
#

You can't delete groups that are not local
True, but wait

#
_group remoteExec ["deleteGroup", _group];
#

Why not like this?

tough abyss
#

Any good resources about remoteExec besides the wiki?

little eagle
#

The wiki is fine?

#

The wiki is the best resource.

tough abyss
#

If you insist.

little eagle
#

It is tho.

#

KK's passion project

#

One of them.

tough abyss
#

Yeah well I'm having a hard time wrapping my head around it.

little eagle
#

params remoteExec [functionName, targets, JIP];

#

says it all, no?

zealous arrow
#

I +1 @little eagle and @tough abyss The documentation for remoteExec/Call is abosolutely brilliant.

#

What is it you're stuck on?

dusk sage
#

wrong person

tough abyss
#

Explain the parmas part of this: ```SQF
[obj, [primaryWeapon obj, 1]] remoteExec ["setAmmo", obj];

#

Oh I get it.

#

unit setAmmo [weapon, count]

#

The order of things confuses me...

#
param someCommand [param, param]
// Turns into...
[param, [param, param]] remoteExeC ["someCommand", param]
#

It's bizarre.