#arma3_scripting

1 messages ยท Page 233 of 1

queen cargo
#

me being lazy and dump at the same time :facepalm:

#

the object was created on each client ...

#

for sure i wont get the variable then on my local instance of that object :3

little eagle
#

oh, that makes sense

sacred fox
#

why is it so hard to make say global.. i mean its very easy using CBA's globalsay function, otherwise it doesnt seem to work

#

i wonder if it can be done with remoteexec or BIS_fnc_MP i just dont have a clue on how to call it the right way

tough abyss
#
"hello" remoteExec ["hint"];```
sacred fox
#

yeah, i have been struggling, but there is one more vairable in say, and i dont know where in the array to put it :S

tough abyss
little eagle
#

[_unit, _params] remoteExec ["say"];

sacred fox
#

ah, gonna try that

tough abyss
sacred fox
#

yh ofcourse im looking trough that aswell, but sometimes the exmaples doesnt match up with my ideas ๐Ÿ˜›

tough abyss
#

Think outside the examples.

little eagle
#

RE is pretty simle for binary commands

_whateverIsOnLeftSide command _whateverIsOnRightSide
[_whateverIsOnLeftSide, _whateverIsOnRightSide] remoteExec ["command"]
little eagle
sacred fox
#

i seem cant get #lighpoint to work on a server.. on local it works flawless, it seems though that i cant get it globally should i use remoteexec on setlightbrightness and such?

sacred fox
#

nvm, solved it with remotexec

lone glade
#

any idea how I could sort multiple subarrays without having to reverse them, sort them, and then reverse them again ?
I want to avoid this >

    {
        _buildingPos = _x buildingPos -1;

        {
            reverse _x;
        } foreach _buildingPos;

        _buildingPos sort false;
        
        {
            reverse _x;
        } foreach _buildingPos;

        _buildingsIndexes pushback _buildingPos;
    } foreach _buildings;
#

(sorting the positions by height)

little eagle
#

sort?

lone glade
#

nah, some building positions have different x and y positions.

main matrix
#

sort by distance to player

#

or you need something special?

nocturne bluff
#

what ya dtalking about

#

He wants to sort them by high

#

t

main matrix
#

???

#

where he say something about height?! x/y - map pos

lone glade
#

around 8 posts above ?

little eagle
#

sort by "lowth" and you don't have to reverse it :kappa:

main matrix
#

i don't see anything but your post about sort

lone glade
#

I wish I could commy :^)

sacred fox
#

so.. when you create local variables, and make them private, can you then use the same script to create more isolated instances of the same variables. cuz im trying to create instances of lightpoints, but if i create more than one it only affect the last one, and the first is there but forgotten.. i am using global vars atm, so thats why i wonder about the nature of the local namespace :)

lone glade
#

privatizing push the variable into the innermost scopes, doesn't work the other way.

indigo snow
#

you can have one global variable per namespace, and one local variable per scope, unless you private it

sacred fox
#

so if i for example create a #lightpoint object called _light createvehicle and i want to create another one, i guess i need to rename the variable for each instance? for an example beacons on a building or lightbars on cars

#

if i want to be able to either deletevehicle or set brightness or whatever

#

basically what im trying to figure out is a way to generate lightpoints, and still maintain the control of the variables on each instance.

#

and thats why i wonder how the local namespace really works, ive read on biki, but i couldn't really figure out if it can use the same variables in different instances of the script

indigo snow
#

yes if you private the var in your script

sacred fox
#

ok, thanks! :)

tough abyss
#

Hi guys ! I've got a problem and maybe you can help me. I dev an Altis-Life server but when people connect them on it, the are seagulls. Any ideas ?

indigo snow
#

check if the group limit for their side hasn't been reached

tough abyss
#

i tried with something like " {if !(count units group > 0) then {deleteGroup _x}} foreach allGroups".. Seems to work.

prime valve
#

Does anyone know the command to modify the "AccFPS" parameter ? Like in the CAMERA, you can define the "slow-motion" thingy, is there a scripting command for this ? I have a mission scene in my game background, and I wanted to slow down the time a bit. // SOLVED: setAccTime 0.1

sacred fox
#

im having trouble to attach lights to my car, when i create the lightpoint and attach it, it doesnt seem to attach, doesnt matter if i use lightattachobject or attachTo..

[_light,_auto,[2,3,-1]] remoteExec ["attachTo"];
or
[_light,_auto,[2,3,-1]] remoteExec ["LightAttachObject"];
#

the object is just spawned in place, and the script runs as it supposed to, just that it doesnt attach to the car.. im talking about lightbars

#

i guess it could be my remoteexec structure thats wrong though.. ill try to rebuild it without the structure to see if it even works then ๐Ÿ˜ƒ

#

ok, so apparently its something wrong with my structure as the regular command did work

#

hm maybe [_Light,[_auto,[0,3,-0.5]] remoteExec ["LightAttachObject"]; will try that ๐Ÿ˜ƒ

#

got it!

daring geyser
#

I'm trying to understand if there is a way to force drawIcon3D with "onEachFrame" to update position smoother?
Here is an example:

_on_each_frame =
{
_pos = getpos Unit1;
_colorGreen = [0.5,1,0,1];

drawIcon3D ["", _colorGreen, _pos, 0, 0, 0, "UNIT", true, 0.03, "PuristaLight"];

};

["Mrk", "onEachFrame", _on_each_frame, nil] call BIS_fnc_addStackedEventHandler;

When Unit1 runs, marker update rate is about 10 FPS when overal FPS is 60. How to make it smoother?

split coral
#

Use getposVisual instead of getpos.

daring geyser
#

Will it help to improve update speed?

thin pine
#

Yeah I tested this yesterday

daring geyser
#

Thanks!

thin pine
#

It had to do with the interpolation system bohemia introduced in arma2

#

The rendering is interpolated ahead of the simulation or something like that. there's an ancient blog about it on bohemia blogs page ;)

daring geyser
#

Wow! Works great. Thanks!

sacred fox
#

anyone familiar with exile and infistar?. i tried my scripts and functions on a local server and everything worked fine, but on our dedicated server we have infistar and the server seems to silently block all remoteexec commands :S, they are not even showing up in any logfile.. i guess there is som remoteexec config for infistar somewhere?

thin pine
#

Just look for config files or headers. Just search for Cfgremoteexec

sacred fox
#

is it cfgremoteexec.hpp?

thin pine
#

Likely, yes. Did you fix it?

main matrix
#

Hi, Guys! I want to attach to all wheeled vehicles on server script that controls veh's state and position on road. How to implement looping for each instance of script without or less lags? I prefer to run independent spawn for each veh. Is it correct?

indigo snow
#

how many vehicles are we talking about?

main matrix
#

And what is best way to implement global loops in Arma, i.e. control all states of mission. while(true) or waituntil is the bad way i suppose.

#

10-20 maybe

indigo snow
#

well if you want to go for state control you could try putting together a FSM

main matrix
#

i think that many stuff I can solve with triggers, but I want to know right way to implement some global loop like permanent check health for all bots of becti mission

#

internet is lack of scripting architecture for Arma. Many stuff how to SQF, but no information how to construct correct MP mission or mission architecture

#

is it possible to make MVC pattern in Arma?

main matrix
#

funny because you can't?

#

or impossible?

nocturne bluff
#

I dunno

#

You brought it up?

indigo snow
#

what does that have to do with this channel

nocturne bluff
#

Noone knows

agile pumice
#

I've got a list of arrays in xyz format, and I want to compare all of them to another and return which is the closest, how can I accomplish this? http://pastebin.com/raw/Q8KenQki

nocturne bluff
#

If only this was C# ;D

agile pumice
#

updated the code

thin pine
#

so did u fix it?

agile pumice
#

the code is only conceptual

#

i have no idea what to do

#

lol

thin pine
#

what is colorArr?

agile pumice
#

_colorList is in [[x.y.z],""]

#

color arr is [x,y,z]

thin pine
#

colorlist is an array with both arrays and strings?

nocturne bluff
#

wait

agile pumice
#

yes, but i only compare with select 0

#

to return select 1

nocturne bluff
#

werent we talking

#

distance

#

and now your claiming fucking color

thin pine
#

there are many ways to go about this really

agile pumice
#

color is rgb value

nocturne bluff
#

Yes.

agile pumice
#

which can also be used with distance

nocturne bluff
#

yes

agile pumice
#

so theres your answer

nocturne bluff
#

And now you are not getting my answer

#

Go figure it yourself.

agile pumice
#

nice

thin pine
#

putin is grumpy

#

:p

agile pumice
#

the name of the variable is completely irrelevent

nocturne bluff
#

Eagleblade should stop relying on this channel to script his things

#

He's been doing this since the skype chat started

thin pine
#

blade or dude?

nocturne bluff
#

eagledude~

thin pine
#

right

agile pumice
#

seriously, whats your deal?

thin pine
#

well i was cooking up this; _arraySortedFromClosestToFurthest = [_colorList,[_colorArr],{_input0 distance (_x select 0)},"ASCEND"] call BIS_fnc_sortBy; - I only recently found this function and i've used it a couple of times. Like I said, there are many ways to sort arrays...this BIS functino is one of them

#

don't expect it to work outta the box. I obviously didn't test it nor spent much time on it ๐Ÿ˜›

agile pumice
#

never thought of using that lol

#

was just looking for a proof of concept

thin pine
#

I used it for a couple of things in my gamemode so yeah it works proper. Not sure if it'll work with your multi-datatyped-array though, so yeah gl

indigo oracle
#

so, looking to start getting into scripting in arma.. where do I start? have previous experience in easy languages like php and vb.net, just unsure what sorta thing I should be starting on?

thin pine
#

any c experience?

#

@indigo oracle

agile pumice
#

this should be the ticket sanchez, thanks

indigo oracle
#

no mate, I'm keen to learn though;)

thin pine
indigo oracle
#

I understand logic well, guess it's just syntax that I should be learning?

#

sort of wondering what sort of project to start off with

thin pine
#

yeah syntax will be quite different from vb.net & php ofcourse

#

hmm

#

have you made missions w/ the editor before?

indigo oracle
#

not even tried to

#

I mean I've seen script code

#

and it doesn't look awfully difficult

#

but ofcourse I couldn't do it myself by any means

#

I'd need to work up

thin pine
#

well the editor is like a graphical UI that does 80% of the (very common) scripting for you. You can make missions without any sqf knowledge basically... I started out making missions that way. Only when I found out that certain things were only possible by actually scripting them, did I start learning how to script these specific things.

#

Like - if a truck driving by is shot - make all crew immediately disembark and engage the enemy was one of my first scripts ๐Ÿ˜›

#

So I suggest that you find an use for your scripting first.

agile pumice
#

my google search lead me to spending 10 mins researching k-nearest neighbor algorithm before posting here btw ๐Ÿ˜›

wicked vale
#

yeah...you need a goal and then learn how to do it and as you learn more, do it better, more efficient etc

thin pine
#

Yeah. As a beginning mission maker - scripts are to assist your editor-created missions.

#

Ofcourse, you can use scripts in mods too (so no need for mission making) - but that's very hard to start out with if you have no prior experience on that field

indigo oracle
#

ah

#

alright

#

I'll give it a go tonight when I'm home then I guess

#

making a mission

thin pine
#

Yeah. Doesn't have to be hard, nor long (o.o). My first mission took max 15 mins. ๐Ÿ˜ƒ

indigo oracle
#

alright cheers mate

thin pine
#

Goodluck

#

@indigo oracle One more thing. The community wiki and the bohemia forums(combined w/ Google) are your best friends once you start scripting.

indigo oracle
#

Alright

#

and say I'm storing data

#

what's the best type of database or is it preference

agile pumice
#

there's a couple addons for mysql

#

arma2net & extdb2 for example

thin pine
#

Big plans eh. ๐Ÿ˜›
Afaik there are many different database extensions/mods out there. I think that's a preference thing but not sure. Inexperienced on that field I'm afraid.

indigo oracle
#

I wanna realistically make a mission that is going to have to store data, so why not find out how now:p

#

cheers @agile pumice said what I wanted to hear haha

agile pumice
#

you're welcome

agile pumice
#

works like a charm, thanks sanchez

thin pine
#

np

gusty flame
#

Hey! Could anyone point me in the direction of how to get the armor and pass-through values of vests and uniforms? I've found spreadsheets with these properties for the default Arma gear, but I have not found it for gear from RHS etc. so I would like to be able to extract this information myself.

austere granite
#

What's the fastest way these days to determine whether an object is a vehicle or soldier?

_source isKindOf "CaManBase"
``` or anythign else?
fallen locust
#

_isSoilder = _object isKindOf "Man";

austere granite
#

Actually, while I'm asking here anyway: Is there an easy way to determine who actually killed someone, if the killer object is a vehicle? Killed EH returns the killer vehicle, but it would be nice to establish whether it was the gunner or the commander that shot someone.

lavish ocean
#
Bohemia Interactive Forums

Page 5 of 5 - Development Branch Captains AI Log - posted in ARMA 3 - DEVELOPMENT BRANCH: 14-09-2015EXE rev. 132389 (game)DATAFixed: B_127x108_Ball audible/visibleFireAll anti-material rifles should now be heard and seen by the AI on a similar distance.ENGINEFixed: AI does not switch to combat mode when they see an entity killed by script(Also applies to suicides and similar) Solves: http://feedback.arma...ew.php?id=2479215-09-2015EXE rev. 132404 (game)Fixed: AI co-pilots hiding in cockpit...

little eagle
#

_isSoilder = _object isKindOf "Man";

#

That is not completely correct

#

Animals like snakes, fish and rabbits are "kind of Man"

#

class Animal: Man {

#

correct would be:
_object isKindOf "CAManBase";

austere granite
#

Yeah that's what i had already, just wondering if there was another way, I prefer not to use config in case someone fucks up inheritance, but I guess i don't have a choice

fallen locust
#

You heard it here first arma confirmed:
Animal is a type of Man

#

I forgot that logic excapes arma ๐Ÿ˜›

little eagle
#

In theory someone could totally ignore the established inheritance.

#
CBA_fnc_isPerson = {
    params [["_unit", "", [objNull, ""]]];

    if (_unit isEqualType objNull) then {
        _unit = typeOf _unit;
    };

    private _config = configFile >> "CfgVehicles" >> _unit;

    isClass _config && {getNumber (_config >> "isMan") == 1}
};
normal citrus
#

Sounds like some devilish stuff to me.

little eagle
#

^ this is the only way to firgure it out 100%

austere granite
#

Basically i just want to figure out which player actually killed someone as opposed to the vehicle

#
params ["_killer"];

// -- Allows resetting the saved killers on respawn and similar -- //
if (isNull _killer) exitWith { [objNull] };

// -- If soldier save the soldier -- //
if (_killer isKindOf "CaManBase") exitWith { [_killer] };

var(_killerUnits) = [];
// -- If not soldier check crew of source -- //
{
    _x params ["_unit", "_role"];
    if (toLower _role in ["commander", "gunner", "turret", "driver"]) then {
        _killerUnits pushBack _unit;
    };
} forEach (fullCrew _killer); // Note: crew of a person returns [person].

_killerUnits;
little eagle
#

I think the killed eh returns unreliable stuff when the units are inside vehicles

austere granite
#

It returns the vehicle, not the units yea

little eagle
#

Sometimes it reports the drivers

#

I think the same logic as with effectiveCommander is used

fallen locust
#

And if you die from lets say by assistance of gravity it also returns null as a killer

austere granite
#

or grenades in some cases

#

In other cases it does return the person who threw it

fallen locust
#

or any explosion for that matter

little eagle
#

Also when crashing it reports different killers on different machines

austere granite
#

Mortars are null half the time (Because they trigger like 50 times handleDamage EH ๐Ÿ˜„ )

fallen locust
#

i think any explosion does

austere granite
#

Anyway I guess I'll put reliable kill reporting out of my head and keep what I have now which seems good enough for what's possible

little eagle
#

This has always been an issue.

#

Engine is to limited / to ambiguous with what it reports

austere granite
#

Also kind of prevents me from doing automated teamkill kicking...get shot down in a helicopter with 5 people? Pilot gets kicked from server ๐Ÿ˜„

little eagle
#

This is stupid anyway. Probably better of implementing a vote kick sytem

#

Doesn't that already exist? I can remember something like that

#

Maybe different game... That would be ideal though.

austere granite
#

I'll probably do that eventually

#

There is vote kick within vanilla arma, just like there is vote mission

little eagle
#

use that?

austere granite
#

Yeah I'll probably end up with something like that

#

Anyway thansk for help

sacred fox
#

remoteexec is not working, doesnt throw anything into the RPT, the functions and commands are whitelisted in the cfgremoteexec class.. what is going on!? :P it does work on a listen server , and also all the clients get the commands as supposed. but on our dedi box. its just... NOTHING, very weird! anyone have a clue?

#

the thing that bothers me most is the lack of logs..

lone glade
#

whitelisting is borked afaik

#

BI disabled whitelisting on 1.54 because reasons

sacred fox
#

gah.. so how would i allow some remoteexec commands without risking the security? :S

lone glade
#

dunno, they might've fixed it in the meantime, who knows.

sacred fox
#

thats borked as you said

sacred fox
#

ok, good to know.. i guess i have to continue digging! ^^

sacred fox
#

ok, well im starting to think there is something very special with exile, as even if i whitelist the functions and commands where exile has its whitelisted, which is in cfgremoteexec.hpp which is included in description.ext instead. i still can get any single remoteexec command to work from the admin console ingame. and the functions itself are dead, and logs are silent, its so weird and im out of clues.. next thing ill try is to rework the functions and scripts so they are adapted to be run from the missionfile instead of the mod itself. because when i dig in the exile functions, they use remoteexec, so the command itself should be allowed, even if they made everything kinda cryptic with all functions. but atleast from clientside nothing happens when you try to run a remoteexeec cmd, and iam an high admin so it should work!

spring stone
#

Can I somehow get "BIS_fnc_ambientAnim" to work in Multiplayer? Atm it doesn't do anything in MP!

jovial nebula
#

@spring stone use remoteExec

#

Does anyone know how can i attach in an universal way a vehicle to another vehicle?(to the rear)

spring stone
#

I tried tha:
[this,"SIT_AT_TABLE"] remoteExec ["bis_fnc_ambientanim",0];
But it did not work. I'm still not familiar with remoteexec

jovial nebula
#

change it to 2

#

And make sure to test it on mp,not on the editor

spring stone
#

I test it on the MP editor :3 (on the SP Editor it works, on the MP one not) Will try...what does the 2 actualy do?

jovial nebula
#

Execute it only on server

spring stone
#

Ahh okay

jovial nebula
#

You tried 0 and 2

#

Lol try -2

spring stone
#

Nono...have not tried 2 yet. Will do it when my mission decides to load! ^^

jovial nebula
#

Oh got it

#

Sorry didnt read the will try D:

spring stone
#

Okay, 2 doesn't seem to work. -2 is next then :3

#

oKay, doesn't work either. May need to test it on a real server then @.@

lunar mountain
#

Greetings, is it possible to remove a specific item from cargo, or only with clearing the whole cargo and adding the new inventory back?

indigo snow
#

()

lunar mountain
#

What is the script command for that? Magazine with unique ID? That's kind of new for me.

indigo snow
#

Commy was talking about it a while ago, there might not be a variant for vehicle cargo detailed magazines

lunar mountain
#

But cannot do anything with the IDs whatsoever . Also tried removing items from cargo, none of the commands work. What's the command?

indigo snow
#

im talking shit late at night ><

#

sorry i misremembered

lunar mountain
#

I mean all topics on this I only find clearXYcargo commands, not remove one specific classname ๐Ÿ˜„

#

yeah, so it's not possible. Too bad ๐Ÿ˜ฆ

#

anyways, thanks for the help

jovial nebula
#

@spring stone lol sad it didn't do the trick,going to try it tomorrow,in the meanwhile please check your logs for anything strange and use remoteExecCall instead

sacred fox
#

i have been struggling with my remoteexec call for days now, and i cant get it to work! i have set the cfgremoteexec accordingly, tried to run simple remotexec function on the server, and it doesnt work. and no logs, im really clueless! :S

sacred fox
#

maybe its something in the infistar admin console. thats prevents remoteexec or something, but what other console could i use to test commands on a debugbasis?

#

or is it so that infact, remoteexec havent yet been added since they removed it temporarily?

sacred fox
#

actually got it to work.. now im just curious about how the postinit functions work.. if i have a function in postinit and the function itself loads from a addon.. when the client triggers the eventhandler will it execute on the server or the clientmachine?

#

this is just a snippet of the function fomr the top

if (hasInterface) then
{
  vehicle player AddEventHandler ["Fired",
    {
      if (!isNull cursorObject && currentWeapon vehicle player == "Immobilizer" && vehicle player distance cursorObject < 200) then {
      IBZ_targetHit = True;
      hint 'Keep on target!';
      player say "immobilizer_locking";
      IBZ_target = typeof cursorobject;
#

the confirmed working version, atleast locally is using the hasinterface.. but it doesnt work on our dedicated box.. sp that why im wondering, from where the execution happens

#

the script postinit fine.. but it seems that it get stuck on the eventhandler somehow or that hasinterface part

#

now imagine it on a dedibox.. nothing happens when you "fire"

#

so i think its something with the fist statements, either something with the eventhandler not being applied mp, or the first hasInterface statement needs to be isDedicated or something

vapid frigate
#

postinit should run everywhere. the event handler should fire on the client where you added it.

#

so it sounds like you said, for some reason the event handler isn't being added.

#

maybe 'vehicle player' is changing at some point?

#

and it happens before that script in single player and after that script in multiplayer

#

Is this designed for use in a vehicle? If not you just need player

#

if that doesn't work i'd probably try something like waitUntil {player == player}; to make sure it's being called after the player exists.

sacred fox
#

ah ok.. yeah its supposed to be ran in a vehicle, and only in a vehicle, if you look at the video i posted above you will see th efull functionality ๐Ÿ˜ƒ thanks though!

meager granite
#

How exactly configProperties works? For example when I pull all classes off weapon's WeaponSlotsInfo it returns following list:

config.bin/CfgWeapons/hlc_rifle_SAMR/WeaponSlotsInfo/rifleSAMROpticrail
config.bin/CfgWeapons/hlc_rifle_SAMR/WeaponSlotsInfo/MuzzleSlot
config.bin/CfgWeapons/hlc_rifle_SAMR/WeaponSlotsInfo/asdg_OpticRail_RU556
config.bin/CfgWeapons/hlc_rifle_SAMR/WeaponSlotsInfo/asdg_FrontSideRail_RU556
config.bin/CfgWeapons/hlc_rifle_SAMR/WeaponSlotsInfo/asdg_MuzzleSlot_556_RU556
config.bin/CfgWeapons/hlc_rifle_SAMR/WeaponSlotsInfo/CowsSlot
config.bin/CfgWeapons/hlc_rifle_SAMR/WeaponSlotsInfo/PointerSlot

But if I do it with count and select it only returns single children config:

config.bin/CfgWeapons/hlc_rifle_SAMR/WeaponSlotsInfo/rifleSAMROpticrail

If I take all classes from WeaponSlotsInfo and each of inherited WeaponSlotsInfo I get yet another list:

config.bin/CfgWeapons/hlc_rifle_SAMR/WeaponSlotsInfo/rifleSAMROpticrail
config.bin/CfgWeapons/hlc_rifle_RU556/WeaponSlotsInfo/MuzzleSlot
config.bin/CfgWeapons/hlc_rifle_RU556/WeaponSlotsInfo/asdg_OpticRail_RU556
config.bin/CfgWeapons/hlc_rifle_RU556/WeaponSlotsInfo/asdg_FrontSideRail_RU556
config.bin/CfgWeapons/hlc_rifle_RU556/WeaponSlotsInfo/asdg_MuzzleSlot_556_RU556
config.bin/CfgWeapons/hlc_ar15_base/WeaponSlotsInfo/MuzzleSlot
config.bin/CfgWeapons/hlc_ar15_base/WeaponSlotsInfo/CowsSlot
config.bin/CfgWeapons/hlc_ar15_base/WeaponSlotsInfo/PointerSlot
config.bin/CfgWeapons/Rifle/WeaponSlotsInfo/MuzzleSlot
config.bin/CfgWeapons/Rifle/WeaponSlotsInfo/CowsSlot
config.bin/CfgWeapons/Rifle/WeaponSlotsInfo/PointerSlot

Anybody has idea what exactly configProperties does and if its logic can be replicated using other commands?

lone glade
#

Looks like it just dumps whatever is defined under the class

meager granite
#

If I look into weapon config that I'm testing with it only has:

    class WeaponSlotsInfo : WeaponSlotsInfo {
        mass = 90;
            
        class rifleSAMROpticrail : asdg_OpticRail1913_long {};
    };

Which is exactly what I get when I use select and count on the config:

config.bin/CfgWeapons/hlc_rifle_SAMR/WeaponSlotsInfo/rifleSAMROpticrail
#

How configProperties gets other subclasses then?

#

I assume select and count that work with configs do not take inherited classes into account then?

lone glade
#

Dunno, you might want to do some testing to find out.

meager granite
#

I just did and above list is result, it seems that configProperties does things differently from select and count

#

Scripts that I used in case anyone is interested

#

configProperties:

_br = toString [13,10];
_str = "";
_cfg = configFile >> "CfgWeapons" >> (currentWeapon player) >> "WeaponSlotsInfo";
{
    _str = _str + str _x + _br;    
} forEach (configProperties [_cfg, "isClass _x"]);
copyToClipboard _str; _str

Iterating through config with select and count:

_br = toString [13,10];
_str = "";
_cfg = configFile >> "CfgWeapons" >> (currentWeapon player) >> "WeaponSlotsInfo";
for "_i" from 0 to count _cfg - 1 do {
    if(isClass(_cfg select _i)) then {
        _str = _str + str(_cfg select _i) + _br;
    };
};
copyToClipboard _str; _str

Iterating through config and each parent class of it with select and count:

_br = toString [13,10];
_str = "";
_cfg = configFile >> "CfgWeapons" >> (currentWeapon player) >> "WeaponSlotsInfo";
while{isClass _cfg} do {
    for "_i" from 0 to count(_cfg) - 1 do {
        if(isClass(_cfg select _i)) then {
            _str = _str + str(_cfg select _i) + _br;
        };
    };
    _cfg = inheritsFrom _cfg;
};
copyToClipboard _str; _str
#

You'll get same results for stock A3 weapons since these mostly share attachments, problem is apparent with addon weapons like HLC or RHS which add more weapon slots classes and use stock A3 slots as well.

#

If I iterate through parent classes of the weapon itself, not WeaponSlotsInfo and get WeaponSlotsInfo off each I get even bigger list as a result

#

I just want to know what exactly configProperties does

#

Well I guess I figured it out, configProperties checks through inheritance but returns found subclasses for base class instead of associated parent classes

#

And in case anybody bothered to look through my wall of text here is pretty much what configProperties does implemented with select, count:

#
_basecfg = configFile >> "CfgWeapons" >> (currentWeapon player) >> "WeaponSlotsInfo";
_cfg = _basecfg;
_result = [];

while{isClass _cfg} do {
    for "_i" from 0 to count(_cfg) - 1 do {
        _class = (_basecfg >> configName(_cfg select _i));
        if(isClass _class) then {
            if!(_class in _result) then {
                _result pushBack _class;
            };
        };
    };
    _cfg = inheritsFrom _cfg;
};

_br = toString [13,10];
_str = "";
{
    _str = _str + str _x + _br;
} forEach _result;

copyToClipboard _str; _str
spring stone
#

@jovial nebula remoteExecCall doesn't work either. I'd love to check my Log (and will do it later) but its cluttered with information (Big mission, many mods.... @.@)

lavish ocean
jovial nebula
#

@spring stone going to test it right now e.e

spring stone
#

Very nice... thank you >.<

jovial nebula
#

I need it even for my mission

spring stone
#

Yeah, stupid immersion...xD

valid dew
#

Hey does anybody know what seat a co-pilot appears in when using the GetIn Event Handler?

#

Nevermind, turns out that it is a gunner seat

#

In the Ghost Hawk, at least

sacred fox
#

yeah its gunner :)

marsh storm
#

Anyone know how to make the VR obstacle blocks dark? They give off ambient light and have orange edges and I'd like to have a pitch black VR map

grizzled cliff
#

i think you have to set their materials to something that doesn't have any self illuminating values

marsh storm
#

Do you have any idea how that might be done?

#

Thanks for getting back to me

grizzled cliff
#

setObjectMaterial or whatever the command is

timber shore
#

Q: what would be a simple script to check what addons someone is running? ( _banana = civ_1 activatedAddons; hint format ["%1",_banana];

tribal crane
#

There's a script on the Wiki page for activatedAddons to do it.

austere granite
#

How does one properly use paths for ctrlSetText? I'm trying to use someting within my mission now and for some reason I can't get it too work whatsoever.

#

Even putting it in the root of the mission gives no luck. Using ctrlSetText with images from A3 files works fine.

vapid frigate
#

in a mission, it should be "folder_in_your_mission\pic_ca.paa"

#

or just "pic_ca.paa" if it's in the root

grizzled cliff
#

Added inline SQF to Intercept tonight.

#

You can now write SQF in the middle of your C++ code (if you really wanted to).

#
void __cdecl intercept::on_frame() {
    __SQF(
        _str = "";
        for "_i" from 1 to 3 do {
            _str = _str + _this;
        };
        player sideChat format["Rick says: %1", _str];
    ).capture("WUBA LUBA DUB DUB!");
}
grizzled cliff
#

More details there!

#

๐Ÿ˜„

meager granite
#

Cool stuff

pliant stream
#

@grizzled cliff do you have a discord server for intercept?

jade abyss
#

@pliant stream I think there was a link posted, some days (weeks?) ago.

vagrant kite
austere granite
#

Is there a way to properly determine how many magazines of a certain type are in a uniform container (Vest, uniform or backpack?). There is vestMagazines and so, but it doesn't return the actual class of it.

wanton acorn
#

can anyone tell me how i can add an " \ " in the end of multiple marked rows at the same time?

#

in notepad ++

vagrant kite
#

in extended character recognition you can replace \n with \\\n

jade abyss
#

@austere granite
Example: (gives the _unit a Magazine, if MagazineCount is below 2)

_unit addEventHandler
["Take",
    {
        _player  = _this select 0;
        _Mag = _this select 2;
        if ( ({_i == _Mag} count(magazines _player)) < 2 ) then { _player addMagazine _Mag; };
    }
];```
Should give you a hint in the right direction
austere granite
#

Unfortunately it doesn't. Magazines is not container specific ๐Ÿ˜„

#

I'll probably end up having to loop through magazines, creating a list of their display names, then splitting up the returns of vestItems and comparing them to the magazine name list or something like that.

jade abyss
#

You didn't asked for "specific" container.

#

nvm

austere granite
#

๐Ÿ˜„

austere granite
#

nice. ๐Ÿ˜ƒ

austere granite
#

Except.... that it's not actually correct

#

It doesn't return the names ๐Ÿ˜„

#

I'll just split names up and check for matching display names probably.

vagrant kite
#

that doesn't sound like a good idea

jade abyss
#

hint str getMagazineCargo uniformContainer player; ...

austere granite
#

It's for a gear export script, won't be used within the mission other than dev purposes. Not too worried about performance related things

#

Fucking A

#

Thans ๐Ÿ˜ƒ

jade abyss
austere granite
#

I got it

jade abyss
#

It was a 1min search, incl testing.

spring stone
#

How can I add a Backpack with a Toolkit in it to a Vehicle Cargo?

I have this:


if (typeof _x == "IP_B_AssaultPack_EFAltis") then {
    _x addItemCargoGlobal ["Toolkit",1];
} forEach (everyBackpack this);```

But I always get:
```Init: Local Variable in global space```
I think I know its due to the _x but I have no clue how to do it on another way >.<
jade abyss
#

cause the 2nd part is wrong

#

if (typeof _x <-- Where do he gets that _x?

spring stone
#

Yeah, makes sense. There does my lack of scripting skill comes to light >.<

little eagle
#

I advice against using the activatedAddons. Some BI modules use activateAddons and ignore modded addons, thereby "turning them off" for the command.
Actual check if addon is present:
private _isACE = isClass (configFile >> "CfgPatches" >> "ACE_common");

cold quartz
#

Has anyone established a 'format' for aar data? I saw a Shacktac video and the UO leaflet js test but I wasn't sure if the community had coalesced around a format that was interchangeable?

spring stone
#

Ohhh appearantly the only thing missing was a { }


{if (typeof _x == "IP_B_AssaultPack_EFAltis") then {
    _x addItemCargoGlobal ["Toolkit",1];}
} forEach (everyBackpack this);```
Thanks anyway
runic heart
#

anyone here use extdb2 whitelisting within your database?

deft zealot
cold quartz
#

@deft zealot The map looks awesome

#

I'm working on a server side mod/logger and I wasn't sure if there was an agreed upon format that others were using for their AAR

#

Athena to this point has mostly been client side/real time

jolly bridge
#

someone know a good paradrop script where u can go to an object and then paradrop the 1 i had did work but did mess up everything else on the map that i am using is losis armory ๐Ÿ˜ƒ anyone ?

#

the paradrop script i had was ATM airdrop i think it was

#

@cold quartz ?

cold quartz
#

Na, sorry. I don't really get into mission design anymore.

jolly bridge
#

ah ok

cold quartz
#

Yea, all of my references would be years old at this point ๐Ÿ˜ฆ

jolly bridge
#

i need some help with it bcs losis has some tons of scripts and shit in INIT file + Description.EXT ๐Ÿ˜ฎ

#

if i had my pc running maybe u could help me remove the TFR`s radios on spawn that also messes up all the stuff idk where in the file to put it ๐Ÿ˜ญ it works whenever i am on other missions like ya @cold quartz

cold quartz
#

tfar has some variables you can set. Check out their wiki.

jolly bridge
#

ya ik but it messes with all other codes but idk where to put it ๐Ÿ˜ฆ

prime valve
#

@jolly bridge in the userconfig folder, you have some variables to tweak

jolly bridge
#

for TFR ? ya but its for my mission or not my mission but ya ๐Ÿ˜›

prime valve
#

In userconfig, you have the file radio_settings.hpp

#

There is that one variable that might interest you: TF_give_personal_radio_to_regular_soldier = 0;

#

Same for long range radios, squad leaders, etc.

jolly bridge
#

ah but what about my friends and stuff ?

prime valve
#

Same

#

Oh

#

You can set this server side

#

Yeah, my bad, these are server side values

#

You change this in the userconfig of your server, and you're good to go

jolly bridge
#

ya but its not a server its that i am hosting missions ๐Ÿ˜›

prime valve
#

Then change it on your ArmA 3 setup

#

On your own userconfig

jolly bridge
#

and then just send it to my friend ?

#

friends

prime valve
#

if (server == _playerPC) then {change _userConfigValues;};

#

no, just change it on your own userconfig, that's it

jolly bridge
#

ah ok

prime valve
#

As your PC is running the missions, it hosts the missions. So the game consider your PC as the remote server for your friends

jolly bridge
#

ah ok i understand

prime valve
#

Try that and see if it works

jolly bridge
#

btw u know any working paradrop script that u got to a pole and then click paradrop and the map comes up and u click and u drop ๐Ÿ˜› ? ATM airdrop is out of date http://www.armaholic.com/page.php?id=21307 idk how it dosent work :;( trying to add it to NMD sandbox mission but nop my friend told me this: Sometimes it works perfectly and you don't understand why, most of the time it doesn't work at all.

#

@prime valve like this ? tf_no_auto_long_range_radio = 1;

prime valve
#

Yes, this value will not give a long range radio to squad leaders

#

It's like answering yes or no to questions

jolly bridge
#

or any other right ?

prime valve
#

For others, you have the two next values

#

TF_give_personal_radio_to_regular_soldier = 0;

#

TF_give_microdagr_to_soldier = 0;

#

put that in

jolly bridge
#

@prime valve this is whats it here tf_no_auto_long_range_radio = 1;
TF_give_personal_radio_to_regular_soldier = 0;
TF_give_microdagr_to_soldier = 1;
tf_same_sw_frequencies_for_side = 0;
tf_same_lr_frequencies_for_side = 0;
tf_same_dd_frequencies_for_side = 0;

#

microdagr is used for the walkie talkie we gonna use :;P

prime valve
#

You could just arsenal the radio you like. Or yes, leave it like that

jolly bridge
#

ok

vapid frigate
#

sheria: you can add those settings to your mission's init script too

#

if you want it to be mission-specific rather than server-wide

jolly bridge
#

@vapid frigate ya thats what i wanted to have it to my init file

#

but i fixed it mr @prime valve did help me :;)

prime valve
#

Glad to help folks !

jolly bridge
#

๐Ÿ˜„ @prime valve

spring stone
#

Can someone help me: I need a Trigger Condition.
Trigger should be triggerend when a player is inside and the player is not in a height above 2 Meter.

indigo snow
#

singleplayer? something like this && (((getPosATL player) select 2) < 2)

spring stone
#

Multiplayer

indigo snow
#

something like {isPlayer _x && (((getPosATL _x) select 2) < 2)} count thisList > 0

spring stone
#

okay, I'll try...thanks

prime valve
#

Hey, me and a collegue are working on a 100% handmade survival gamemode. Any scripter help would be appreciated ! Contact me via PM if you want more infos about this (to not spam the channel)

little eagle
#

the param command is what select should've been in the first place.
hopefully they'll fix the -1 index bug with it eventually

austere granite
#

on param... can you actually make it so it only checks the default value if there is actually no param given?

#
[1,2] param [0, ([blabla] call FRL_fnc_getDefaultValue)];
little eagle
#

_a = []; _a param [0, "default"];
?

austere granite
#

I mean... why is getDefaultValue run there?

little eagle
#

IDK

#

You can do crazy shit with it though:
magazinesDetail _unit select {_x find _displayName == 0} apply {_x = _x splitString "[:]"; _x select (count _x - 1)};

#

oh wrong one. cool too though

austere granite
#

... that's apply ๐Ÿ˜„

little eagle
#

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

#

the more commands SQF gets the more cryptic it becomes

#

test passed

austere granite
#

i do like the select true ๐Ÿ˜„

little eagle
#

Yeah, but it's the reverse order of then else, which always throws me off

austere granite
#

That can help to keep shit pretty readable in some cases

#

... no shit about that

#

I started replacing a lot of if then returns and was so confused why everything was constantly fucking up

coral pasture
#

Is there a way to drag and drop from a treeview to another treeview?

#

Or do I need to come up with another solution?

little eagle
#

https://community.bistudio.com/wiki/inArea

This command also supports hexagon area which can be created from ellipse when both a and b are negative. Hexagon ellipses are also supported by both marker creation and drawEllipse
Oh god. It's like grade school geometry class all over again.

grizzled cliff
#

why didn't they just give us an array of positions so we could test any polygon

#

oh wait

#

they have an inPolygon too

austere granite
#

They do. Quite nice me thinks

#

Just gotta test how fast it is

#

Gotta make a simple Eden script to draw polygons on the map

lone glade
#

Do it like the old cba ways, place invisible helipads at each positions supposed to be a point ๐Ÿ˜„

jade abyss
#

hmpf... why is BoundingBox so fkd up?

split coral
#

Never had much use for it, so I'm curious: how is it f*ucked up?

indigo snow
#

boundingBox has a really "generous" size

#

boundingBoxReal is generally more precise

jade abyss
#

Both are shitty

#

iirc it also takes the RoadwayLOD in, wich is... hmm.. lets call it "less optimal"

spring stone
#

I have yet another trigger related question: I'd like a trigger that triggers when the rating of a player is lower then one. If it triggers the rating should be resetted to 1000.
I have never worked with the rating, so I'm not sure how I'd accomplish that :3 (It would be great if one could turn of the rating completely @.@)

split coral
#

Could you handle it by adding a HandleRating event handler to players?

spring stone
#

Mhhh sounds good. From what I can read, "HandleRating" we look if the engine will give rating to a unit. If rating is a number (e.g. 1000) then the "HandleRating" will take over and gives the rating defined by the Handler to the unit instead (e.g. in my case 0 would be good)...am I right?

rocky cairn
#

Anyone know if its possible to get a script to read part of a player placed marker on the map. IE if marker name contains LZ create a waypoint for ai group on that marker

indigo snow
rocky cairn
#

Thanks

placid root
#

(configfile >> "CfgWorlds" >> worldName >> "Names") select 0 works strangly

#

(there might be a few more errors but the one of interest is the discribed one)

indigo snow
#

i assume its because of the domain of your for loop

#

assume an array with 6 elements

#

count _array will be 6

#

_array select 6 will be selecting the 7th element

#

since arrays are zero-indexed

placid root
#

damn ... is it because i've forgot the -1...

#

... jup this was the error....

#

thx ๐Ÿ˜›

indigo snow
#

you should consider using configProperties though

placid root
#

Hmm the command sounds interesting. Didn't know it existed :) I will give it a try . A few lines less

lavish marsh
#

Hey I was wondering if i could speak to someone with experience in Arma 3 life server scripting?

jade abyss
#

altis life forum?!

lavish marsh
#

no arma 3 life

jade abyss
#

...

tame portal
#

Another copy cat? :s

runic heart
#

Arma 3 Life is Altis Life @lavish marsh

#

You probably not gonna find any help here for specific scripting for that genre.

indigo snow
#

As long as theres specific questions i dont see why they wouldnt belong here

prime valve
#

Just please guys do not re-open that cursed debate again

austere granite
#

Mainly because their bad name in not respecting licenses.

normal beacon
#

I've got a question about remoteexec, I'm trying to call a script on who ever the vehicle is local to. Would this be the correct format?
"crash.sqf" remoteExec ["execVM", Heli];

jaunty drift
#

pretty sure you want to do this: _client = owner Heli; "crash.sqf" remoteExec ["execVM", _client];

#

if you are running that code on the server

thin pine
#

@jaunty drift You don't need to check for owner if the target is an object. The function will only be executed where the object is local. Besides, the owner command only works on Server afaik. ๐Ÿ˜‰

#

@normal beacon So you should be fine. Although I thought it was BIS_fnc_execVM instead of execVM - but things may've changed and I didn't pay attention...or it always worked ๐Ÿ˜›

jade abyss
#

+runs in unscheduled envirobla

normal beacon
#

ahhh... so instead of excevm it would remoteExec
nul = [Heliname] remoteExecCall "crash.sqf";

jade abyss
#

?? Why changing the example

#

"" [params1, params2] remoteExecCall ["command", targets, jip]; ""

normal beacon
#

Sorry, I'm in way over my head here, super novice at scripting

jade abyss
#

Then just read, what was written before

#
"crash.sqf" remoteExec ["bis_fnc_execVM", _client];```
normal beacon
#

Thanks

prime valve
#

How do you make those code blocks in Discord ?

jade abyss
#

3x ` code 3x

prime valve
#

code lmao

#

wat

jade abyss
#

fk this^^

prime valve
#

izi

#

oh

#

nice

jade abyss
#

3x

prime valve
#

3x

#

yes

#

I look like a new born discovering the world

blazing zodiac
#

Does anybody know of a way to manually close the menu from the menuPosition respawn template? I'd like to close the menu when the player is out of respawn tickets and put him into spectate mode.

jade abyss
#

hmm... to do a constant check (max. 1-2min)
OnEachFrame StackedEH OR While?
I am very undecided

#

Not so sure, whats more taxing

#

(needs to be pretty accurate / reacting quick)

tribal crane
#

Does the check need to happen every frame or approximately every frame?

#

(Not sure what you mean by 1-2min)

#

waitUntil with no sleep should be slightly more efficient (because it is just suspending an SQF code block) but it isn't guaranteed to run every frame.

#

waitUntil with a sleep is even better, the per-frame overheads of sleeping scripts is tiiiiny.

#

Far better than a OnEachFrame that's set up to only run sometimes.

jade abyss
#

It needs to check the distance (1m)

austere granite
#

While Eden attributes' expression are not globa yet, is there another way to access the values on client without having the server broadcast it?

#

Maybe I'm overlooking something, but for now only mission attributes are accessible everywhere?

tribal crane
#

Are you doing a custom attribute? You should be able to setVariable on the object globally.

austere granite
#

Yeah i guess that'll work for now

indigo snow
#

yea and it's shit since itll be unreliable

#

no replies to the thread tho

#

:/

austere granite
#

Still haven't figured out getting custom connections to show up either

tribal crane
#

Why would a global setVariable be unreliable? It's how modules work.

#

They're broke too? ๐Ÿ˜ƒ

indigo snow
#

network traffic

#

its a pubVar

#

you cant have a global thing like with modules is the point

#

only runs on server

#

so you need to pubVar all attributes that clients need

tribal crane
#

Modules appear to do the same thing in Eden; there's an expression="..." that does setVariable.

#

I guess they could have a special case that ignores that and does module attributes locally, but that doesn't seem likely.

indigo snow
#

modules have an isGlobal switch

#

even still if its how modules do it

#

having to realy on network traffic at mission start

#

not ideal

tribal crane
#

The isGlobal setting in the config controls where the module gets run; you can read the bis_fnc's that implement modules and see how it does that.

#

It isn't engine magic.

#

(Where the module script gets run, I mean; it doesn't change where the object or attributes exist)

indigo snow
#

sure, cool, but that doesnt change you need to pubVar all attributes which isnt always reliable

tribal crane
#

When does it fail?

austere granite
#

I can't for the life of me figure these custom connectoins out. Does anyone have a working exxampe later? Even running add3DENConnection ["Custom",get3DENSelected "Object","marker_23"] from debug console does nothing (Got empty object selected and marker selected just like the default custom connection type in 3den configs)... nothing

#

You gotta love that even the include examples don't work.

tribal crane
#

If you put:

isClass (configFile >> "Cfg3DEN" >> "Connections" >> "Custom")

In a watch in the debugger, does it return true?

austere granite
#

returns error, but if i add configFile in front it does ๐Ÿ˜‰

#

... beat me ๐Ÿ˜ฆ

tribal crane
#

Heh.

austere granite
#

All my own custom configs show up fine as well

#

Using the same command with RandomStart works fine, but I can't get anything else to work... might be something in conditions or so, but obviously(!!) there is no documentation on it and the provided example doesn't work

tribal crane
#

Oh, "Custom" is already defined.

#

The condition on it is "objectEmpty * objectAI", both of which never appear anywhere else in Eden (nor in the docs) and would seem to be hard to satisfy if you took their literal meaning. ๐Ÿ˜‰

austere granite
#

Yeah I know

tribal crane
#

Tried changing it?

austere granite
#

I have examples with object

#

ObjectBrain

#

Trigger

#

Marker

#

Etc

tribal crane
#

Ah, right.

austere granite
#

:(:

tribal crane
#

Tried condition1 = "1" and condition2 = "1" ? ๐Ÿ˜ƒ

austere granite
#

I did try True, but I guess I'll try that as well

austere granite
#

I give up

tribal crane
#

Yeah, sounds borked.

#

They aren't showing up in get3DENConnections at all are they?

austere granite
#

Nope

#

add3DENConnection ["Custom8",[get3DENSelected "Object" select 0],(get3DENSelected "Object") select 1] trying to add like this now, but no luck

#

Also did with marker and trigger, same story

#

Replace by Sync and all good

lunar lichen
#

anyone know an easy-ish way to transfer AI ownership from my server to my HC?

#

tryed a few methods but they dont work

wispy kestrel
little eagle
#

anyone know an easy-ish way to transfer AI ownership from my server to my HC?
Curiosity. For what purpose? Why not create them on the HC in the first place? Zeus?

lunar lichen
#

@little eagle mainly for load balancing between HC's and Server

warped thicket
#

Use my headless mod

signal flume
#

make me

#

๐Ÿ˜‰

warped thicket
#

Ok, let me paste the doc I wrote for it

#
Enables automatic passing of AI groups to (up to 3) Headless Clients using round-robin system, with automatic Headless Client recognition. Due to the fully event-based transferring (on unit spawn and on Headless Client connect and disconnect) the performance impact is minimal. It transfersgroupsย of units and not each unit separately!

The system works on the basis of unit spawning, when a unit is spawned it will schedule a rebalance after the specified delay (described below), after the delay rebalance runs on all groups. Groups already local to any Headless Client are skipped, also those blacklisted (described below) and in the same group as any player are skipped. All others applicable for a transfer are then transferred in round-robin fashion, equalizing the number of groups on each Headless Client (most effective with 3 Headless Clients). In an event when a Headless Clients disconnects during the mission (is kicked, loses connection or similar) all units on local to that Headless Client are automatically transferred to the server by Arma 3 and a full rebalance will be forced, meaning all units, including those already on other Headless Clients, are transferred again to equalize the load. Same happens when a Headless Client connects during the mission.
#

Available with this mod (just main and headless pbos are necessary for headless)

vagrant kite
#

@warped thicket it adds settings to ace serverconfig.hpp tho :]

warped thicket
#

Yes ACE is required

#

Might have forgot to mention that :d

warped thicket
#

You are running ace somewhere for sure

little eagle
#

how are we supposed to know what you are doing with your server?

#

ace_common_fnc_addEventHandler is compileFinaled in the latest version, so you can't overwrite it on clients

#

both

#

So this log is from clients with ACE joining your server? I think that's all the explanation you need

#

Nothing we can do about that

#

Server keys?

#

So clients with mods can't join?

#

So they get kicked anyway?

indigo snow
#

Filepatching is something else dude

vagrant kite
#

checkSignatures = 2 is what you need

little eagle
#

^ this probably

vagrant kite
#

in your server's config

little eagle
#

That's what signature check does

#

I think this is the latest, might be wrong

vagrant kite
#

verifySignatures, sorry; exactly what commy2 posted

little eagle
#

Then they can't play with mods enabled

#

Maybe this is logged before they are kicked? Never messed around with that

vagrant kite
#

what's your onDifferentData?

#

so you don't do anything to players with different data (if I understand that correctly)

#

try: kick (_this select 0)

little eagle
#

onDifferentData = "kick (_this select 0)";

vagrant kite
#

same for onUnsignedData

little eagle
#

also
onUnsignedData = "kick (_this select 0)";
onHackedData = "ban (_this select 0)";

#

jep

vagrant kite
#

^

#

๐Ÿ˜„

little eagle
#

ODD is empty, they have signatures locally, but they are not on the server

#

matches what you described

#

You want to kick those with different addons that the server, so set ODD

#

I've never done this myself, but this sounds pretty logical

vagrant kite
#

one way to find out ๐Ÿ˜ƒ

little eagle
#

That's what signature implies

#

haha

vagrant kite
#

sounds like a Grey Hat

little eagle
#

You mean he just wanted to adjust the mission to make it harder/better?

#

I understand it as not black and white - not purely bad

#

He got carried away?

#

Just ban him. Changing the mission as client not allowed

#

signature check with kick would've prevent this

#

probably

#

nice

#

can't prevent that I guess

austere granite
#

How does one return what 3den camera is pointed at?

#

I want to make a little 'Copy camera position' button so that position can be used as starting point for intro camera

indigo snow
austere granite
#

Managed to work all that out. Next up: Is there a magical prayer you need to say for setVariable broadcast to actually work.

            class FRL_zOwn {
                displayName = "Zone Owner";
                tooltip = "Sets the owner of this zone at the start of the round";
                property = "FRL_zOwn";
                control = "Combo";
                condition = "true";
                expression = "_this setVariable ['%s', _value, true];";
                defaultValue = 4;
                typeName = "NUMBER";
                class Values {
                    class zOwnerBlu {
                        name = "BLUFOR";
                        value = 1;
                    };
                    class zOwnerRed {
                        name = "OPFOR";
                        value = 0;
                    };
                    // class zOwnerGreen {
                    //     name = "INDFOR";
                    //     value = 2;
                    // };
                    class zOwnerNeutral {
                        name = "Neutral";
                        value = 4;
                        default = 1;
                    };
                };
            };

Not available on connecting client for some reason. That's a attribute on a trigger

indigo snow
#

in my experience, broadcasting in the expression would be available on all clients including JIP on postInit

austere granite
#

allVariables on the trigger doesn't show anything at all on client ๐Ÿ˜ฆ

little eagle
#

trigger commands are local even though createTrigger is global by default

austere granite
#

meh, i'll just work around it for now. Just need global expressions and things would be a lot better

#

Ideally even just a getObjectAttribute or something like that that actually works in-game

proven sequoia
#

Hi, is there an easy way to detect when the loading screen in a multiplayer mission is finished? (the screen where you see the map and the loading bar)

austere granite
#

The one before or after briefing?

#

Both use BIS_fnc_endLoadingScreen so you might be able to add something there. If it's a mod you can also make an adjustment to the dialogs 'onUnload' script

still forum
#

there is BIS_fnc_isLoading

#

returns true/false

#

doesnt work everytime tho

frail dune
little eagle
#

doesnt work everytime tho
hysterical

proven sequoia
#

Thank you, I will see how it works

little eagle
lunar lichen
#

@warped thicket @vagrant kite tanks for the info, sos for the delay lol

frail dune
#

I don't mean to spam or anything, but would anyone want to look at my issue with "CBA_fnc_globalSay3d" and an EH on an object?

#

I just want the "plink" sound when I hit a target, damnit T_T

earnest valve
#

@frail dune have you ever tried say3D? :/

frail dune
#

Yeah

#

Wouldn't run globally, which is why I used the cba function instead

#

But at this point they work pretty much just as well lol

deft zealot
austere granite
#

yes

#

Unless you're talking about on the client itself, in that case no. It's server only

lunar mountain
#

Greetings, is the Simulation manager module any good? Was thinking about dynamically manage object simulation and I've just found there's a built in module for this.

earnest valve
#

It's no different to the code enableSimulation. Probably safer-wise and less-hassle if you use the code version. (But I guess other members don't give a fuck about me, idk :( )

cold quartz
#

Anyone know if there are any string length limitations that would limit a string to either 8165 or 8122?

#

In Arma 3 the max length of String returned by format command seems to be 8191 characters

cold quartz
#

Hmmm, I had asked a few weeks ago if there was a limit on the string size being sent 'out' through the extension to the DLL and we had thought it was just the string limitation itself (10m) but that doesn't appear to be the case. I was limited to ~8000 characters and had to cycle through the string to get the complete message out.

#

just fyi

little eagle
#

depends on the command you use. a string itself can be 1E6 or 1E6-1 characters long. can't remember

runic heart
#

how long does the earthquake last for bis_fnc_earthquake?

#

i know i can set intensity but dont see time

tough abyss
#

@cold quartz use joinString or just + a string together. that way there is basically no limit on output to extension.

#

last time i checked output from an extension is around 10k in Arma3 (cant remember what Arma2 was), but this can change

cold quartz
#

Yea, I was able to build a really long string (<10k) but I wasn't able to get all of it out of arma to the extension. I just set a low limit at 2k and sent it out in chunks. It'd be nice if there was something to check like outputSize (or whatever the var is) gives to the extension.

#

er, >10k

#

sry, beer

tough abyss
#

There is no limit on output to the extension

#

You can sent it a 65k string if you want

#

Just don't use format

cold quartz
#

Yea, I'm able to build a long string using + or format or formatText but the extension doesn't receive the whole string....

tough abyss
#

Well your extension is broken then (or hardcoded at 2k inputsize)

#

Format cuts a string at 8 or 10k
The only string limit with extensions is when the extension is returning a string back to arma i.e outputsize

#

You might have an extension make for arma2 that is hardcoded at 2k. I believe arma2 extension was around 2k outputsize, i could be wrong

cold quartz
#

Na, it'll accept ~8k. I just was overly cautios and set it to 2k.

tough abyss
#

I kinda spent when to much time making extensions.
You can output whatever size string you want to an extension (once you dont hit arma max string size)
Its only when you are fetching a result from an extension, then there is a limit. Believe its 10k size atm.
That is when an extension needs to split up the result if its larger than outputsize limit

#

for arma3

#

So you saying extension only accepts 8k input.
Makes no sense unless you are using format.
Or the extension is hardcoded to max inputsize of 8k

cold quartz
#

It appears so. I didn't set a limit on the acceptance but ... it was only receiving ~8k characters that the extension received from the sqf.

queen cargo
#

@cold quartz that is litterally bs ... @Torndeco is right here ... ouput is limited ... and if your extension is not getting the full string then you did bullshit with your extension or sqf

compact galleon
#

Wiki says 4k

#

eh. nvm. 10k

#

eh.. nvm. it's contradicting itself

compact galleon
#

I was kinda expecting spoiled underwear throughout the scripting community

fallen locust
#

Pretty cool... you hooking the script interpreter?

still forum
#

Skills to do that were present for years... Just no one did it...

#

Even i know where to hook what to build something like that.. Just wasnt really worth the work.. Because i know someone else would do a better job

#

And most of the guys with that Knowledge are eigther BI devs (obviously) not having the time.. Or Hackers.. Who just build it for their own.. to Reverse Engineer obfuscated scripts...

#

@fallen locust i guess just the Scheduler ExecStatement function... It gets source file and location in file + Variable Namespace and tons other stuff but thats really all thats needed

fallen locust
#

@still forum but with that you cant really get local variable contents

still forum
#

yes you can

#

there is a namespace for the current scope

fallen locust
#

Really? interesting

cold quartz
#

@queen cargo, why don't you build an extension, a giant string and try it out yourself?

#

I wasn't arguing with torndeco, just explaining what I was seeing.

queen cargo
#

@cold quartz how fast you want that extension

#

and with what exact purpose?

#

will start tomorrow (and that time just becaue i am not able to write today apperantly due to coldness)

cold quartz
#

Here is how I'm building my string: _ink = "{""netid"":""" + netId _x + """,""player"":""" + name _x + """,""strokes"":""" + _ath_strokes + """}";

#

The _ink contains the entire string w/o limit

lone glade
#

good lord use ' '

cold quartz
#

ha, will do

#

When I call: "Athena.Extension" callExtension "ink " + _ink;

#

the extension receives only part of the string

#

I'm not saying that it's hard coded. I'm not saying anyone is wrong. All I'm saying is when I do that, the extension doesn't receive the full _ink

tough abyss
#

@cold quartz have made around 6 different extensions not including linux extensions. that is how they work. there is no limit on inputsize.
sounds like your extension is cutting off the string

cold quartz
#

That very well could be

still forum
#

Arma just gets the pointer to the data in the string and sends that to the Extension... I dont even think its creating a copy of the original.. But i hope they are.. otherwise you could modify ingame string variables in extension ^^

#

but its not truncating anything

cold quartz
#

K, I'll keep poking. Thanks for the hospitable environment.

iron mist
#

So what's the word about sqf. I keep hearing that it's going to be phased out.

indigo snow
#

not for Arma 3

#

who knows about arma 4

iron mist
#

so my source is full of shit like usual

blazing zodiac
#

Is there any way to reliably check if a unit was killed by an explosion?

jovial nebula
#

Try using EH MPKilled,but you will have to create a static array of things that could have killed your unit

blazing zodiac
#

It doesn't return the weapon used though does it?

#

Doesn't it just return the killer and the unit killed

compact galleon
#

@blazing zodiac And ammo type, IIRC

compact galleon
jovial nebula
#

...i'm having an orgasm

deft zealot
#

whats the command to get the selected string of RscToolbox?

little eagle
#

Is there any way to reliably check if a unit was killed by an explosion?
No

normal citrus
#

_doors = 5;
doorName = str "Door"; _source = str "_source";
hint format ["%1%2%3", _doorName, _doors, source]; Output = "Door"5"_Source" - including all quotes. how do I get rid of the quotes around the number 5?

indigo snow
#

by getting rid of the ones around _doorName and _source, most likely

austere granite
#

don't do str("Door")

#

That just adds double quotes which is what you don't need here.

little eagle
#

parseNumber "5"
-> 5

fallen locust
#

doors = 5;
doors = int

#

parsenumber int = int

little eagle
#

Oh, do as Adanteh said. remove the str s

#

@lone glade are you by chance related to adanteh ?

lone glade
#

nope

normal citrus
#

Got it, thank you for the responses.

agile pumice
#

noticed a problem with eden. Unchecked enable simulation on a unit, but when I do simulationenabled cursorTarget, it's returning true

#

anyone else experience unit attribute checkboxes not having an effect?

#

Okay, I disabled simulaiton via init line, so I know for a fact that its disabled, yet simulationenabled still returns true

indigo snow
#

Your cursortarget is a null object? Thats not right.

tame portal
#

Use cursorObject instead, it doesn't require the use of reveal

agile pumice
#

Has anyone had success using the removeActionFromObject ace function? (I'm having issues getting in the slack channel so I'm asking here)
I can only seem to get removeActionFromClass to work

earnest valve
#

@agile pumice why don't u use the standard commands like addAction or removeAction. ACE, btw, is only a mod...not a game.

agile pumice
#

I know rawner, but I've been redirected to the slack thing a few times already (reasonably). I also don't have any intention on using the vanilla actions.
Thanks for the reply though.

vapid frigate
#

@agile pumice: I just tested it, it works.

#

But I'm guessing only on actions that were added via addActionToObject, not addActionToClass or via configs.

#

You can test with this to add it: [cursorObject, 0, [],["test","action test","","hint 'test'", {true} , {}, [], [0,0,1], 10] call ace_interact_menu_fnc_createAction] call ace_interact_menu_fnc_addActionToObject;

#

and this to remove it [cursorobject,0,["test"]] call ace_interact_menu_fnc_removeActionFromObject;

lone glade
#

Removing actions works, always. actions are added locally so it needs to be executed on every machine.

#

(be it vanilla or ACE3 actions)

tulip summit
#

I'm trying to use the onPlayerConnected with a stackedEventHandler, and from my understanding this would work and fire my script. Any idea whats wrong here? ["REV_playerConnected_Id", "onPlayerConnected", {[_name, _uid, _owner] spawn REV_fnc_retrievePlayerData;}] call BIS_fnc_addStackedEventhandler;

lone glade
#

your arguments all return any

#

use params.

tulip summit
#

are they? because my script isn't even firing

#

nor do I get any errors.

lone glade
#
["REV_playerConnected_Id", "onPlayerConnected", {
   _this params ["", "_name",  "_uid", "_owner"];
    [_name, _uid, _owner] spawn REV_fnc_retrievePlayerData;
}] call BIS_fnc_addStackedEventHandler;
tulip summit
#

ahhh, i see what you mean now

#

let me try thta

#

unfortunately that did not work either

#

this works, but doesn't pass the name or owner: [{[_name, _uid, _owner] call REV_fnc_retrievePlayerData;},[]] call bis_fnc_onPlayerConnected;

#

or the uid*

fallen locust
#

please use 3x"`"

spiral trench
#

@cold quartz with your extension input issue, you mentioned only getting around 8k characters. Were you using format? Pretty sure it has a ~8k character limit.

cold quartz
#

Yep, that's all it was. I may have been building my original var using + or working around the format limitation using structured text but the actual call to the extension was using format. My eyes just didn't want to see it.

#

And I was concerned that because i had written the extension in c# that it may have been a marshalling issue behind the scenes but nope, it was a simple issue. Thanks to everyone that helped!

still forum
#

format output is max 8191 chars AFAIK

#

yep... Its even on the Wiki entry in the Notes

cold quartz
#

Yea, I saw that in the wiki. Then i switched to +, still only got 8k, then to formattext and still got 8k and then was like, ok, i'll just work around it. Because I was only getting 8k, i was only focused on how I was building the original var, not how I then went and used that var in feeding it to the extension.

#

In my head, it was, I'm getting 8k, there must be something wrong w/ building the string so I focused exclusively on how I built the string and not what I did with it. Like I said, my eyes just didn't want to see 'the problem'.

#

then when I got pushback in here, I figured most of you are developing your extensions in C++ wherewas I'm using C# so perhaps it's some marshalling issue behind the scenes that I don't have control over so I dropped it. Then I was going about cleaning up the sqf after all the messing around w/ the original string variable, no longer focused on why my string was being limited to 8k that I finally figured out why my string was limited to 8k. Even though what I referred to as my string variable was whole, the 'actual' string that was being passed to the extension was being 'format'ed and silently limited to 8k.

#

which it kind of sucks that it silently fails btw but I'm sure there's a good reason for it.

#

or silently truncates

#

So there's the story of how focusing on my assumptions wasted so much of my time and generated lines of code to compensate for a simple mistake.

warped thicket
compact galleon
#

I hate headache. It feels like someone shoved a metal bar inside my head and then melted it.

keen stream
#

I love how Nou keeps spamming every channel at its disposal! ๐Ÿ˜‰

grizzled cliff
#

๐Ÿ˜›

hasty pond
#

I'm probably just broken and stupid, but I can't figure out how to get ExtDB2 to work with any of my missions. Just literally a mission with the server inserting a new table or anything, I just can't get it to work or get to output errors. Please send help.

#

If you would be willing to write me a short piece of text/tutorial with info on how to use it I would โค you + @tough abyssntion me if you do this

fallen locust
#

run debug version of EXTDB2

#

anyways.... could anyone explain this Fix?

Fixed: The one parameter of the remoteExecCall command was not called in a scheduled environment

#

it literally makes no sense from first word to last

tough abyss
#

@hasty pond Check extDB2 logs for error messages.
If you cant figure it out, pastebin extDB2 logs from debug version

hasty pond
#

Alright, I'll make sure to do that tomorrow! Thanks ๐Ÿ˜ƒ

thin pine
#

@fallen locust They had a long day at the office.

compact galleon
#

for..do is interesting

#

in terms of scope

#

Eg.

{
    systemChat str _holySh;
};```
#

Which scope is parent to which scope? Or do the for paramters have no parents, and their variables are just transfered to the do code block?

#

Or maybe the initialization code block is the parent of all

compact galleon
#

Seems that may be the case

#

for [init, condition, afterthought] do X - variables defined in init can be accessed in all code blocks. variables defined in X can only be accessed in X (and not, for example, afterthought).

#

Likewise, variables defined in condition and afterthought cannot be accessed from X

normal citrus
#

Can someone help me with a little scripting trouble. I want to run a script, but while the script is running, I want it to stop if my player has moved > 5 meters from where he was when the script started.

compact galleon
#

@normal citrus Either perform checks in the script, or make another script that terminates the first when the criteria is met

jade abyss
#

@normal citrus quick example:

_DidExit = false;
_PPos = getPosWorld player;
while{true}do{
sleep 0.5;
if( (_PPos distance (getPosWorld player)) > 5)exitWith{_DidExit = true;};
};
if(_DidExit)exitWith{hint "moved to far away, blablabla";};```
compact galleon
#

Or if it's a long script without loops, and many sleeps that you don't want to place a condition after each one, eg.

sleep 10;
do_whatever;
sleep 10;
do_whatever;```

You can spawn code in your script to do it, then make the calling script terminate it.
```_script = _this spawn
{
    do_whatever;
    sleep 10;
    do_whatever;
    sleep 10;
    do_whatever;
};

_startPos = getPos player;
waitUntil { scriptDone _script || player distance _startPos > 5 };
if (!scriptDone _script) then
{
    terminate _script;
};```
normal citrus
#

Thank you for the responses.

compact galleon
#

wtf. I don't remember Arkham Knight being 55GB..

#

my GTA V installation is 95GB...

hasty pond
#

So yesterday I asked about extDB and I'm still getting an error like this it seems like:
2016/03/17, 20:50:35 "extDB2: Version: 71"
2016/03/17, 20:50:35 "extDB2: Connected to Database"
2016/03/17, 20:50:35 "extDB2: Error Database Setup: [0,"Failed to Load Protocol"]"

#
  • This is the array I'm sending to the default init example ["test", "SQL_CUSTOM_V2", "test"]
tough abyss
#

Where is your test.ini file located ?

hasty pond
#

Arma 3@extDB2_DEBUG\sql_custom_v2

tough abyss
#

i.e should be @extDB2/extDB/SQL_CUSTOM_V2/test.ini

hasty pond
#

Even if I'm running the debug version?

tough abyss
#

@extDB2_DEBUG/extDB/SQL_CUSTOM_V2/test.ini

#

notice the extra extDB directory

hasty pond
#

Yeah, do you think that'll solve the problem?

tough abyss
#

Well it would bad if it didn't considering i wrote the extension.
Next version will have error output when SQL_CUSTOM_V2 directory doesn't exist

hasty pond
tough abyss
#

Well you broke the SQF Code ๐Ÿ˜›

#

It randomizes up the Protocol Name & compileFinals it in extDB_SQL_CUSTOM_ID
To make it harder for hacker to directly call the extension
Look @ fn_async.sqf to see the example method

#

You should go over the wiki & use the test application the exe
Much easier to test it out and see how it works, before you mess around with sqf code

hasty pond
tough abyss
#

_checkstr = format ["0:test:existPlayerInfo:%1", getPlayerUID player];
->
_checkstr = format ["0:%1:existPlayerInfo:%2", (call extDB_SQL_CUSTOM_ID), getPlayerUID player];

#

But you should really use the example fn_async

Or use the test application if you are going to rewrite your own sqf functions.
That way you will figure out how to test stuff out, like handling ASYNC talking to the extension.
Or what todo when the extension output is greater than 10k, or error handling etc

hasty pond
#

Where can I find the test application on github? And what would be the array I send to async with this goal that I had with this script because I just couldn't figure it out

tough abyss
#

Its in the download zip file in folder called test

#

Look @ the examples and the wiki, am kinda busy.

hasty pond
#

Alright, Thank you so much for all your help!

hasty pond
#

Finally got it to work correctly with one of the prepared statements. Thank you Torndeco! โค

cerulean cargo
#

I've got a little question I've been troubling over. I'm trying to make it such that players go into a spectator camera on death, but if they manually choose to respawn , it will bring them to the respawn menu instead of that happening after a set amount of time

#

or rather to the "MenuPosition" style respawn when they choose

tough abyss
#

Hello I'm having trouble getting ACE3 and Infistar to play nicely together, but nothing I've done works. The problem I'm having is the ACE3 Menu's (Medical Menu, ect.) dissapearing after popping up, I've tested it with Infistar not loaded and it works perfectly. I've tried disabling most of the Anti-Hacks settings and this problem still persists. Any help would be greatly appreciated.

waxen finch
#

turn on kylemode

#

also

#

infistars discord

tough abyss
#

thanks, i will try

#

@waxen finch your link is down :/

deft zealot
#

whats the best way to generate an unique identifier in SQF? (unique for all clients + server)

still forum
zealous solstice
#

i think that its a random and format and a array is the only way

still forum
#

depends what you mean by unique... Per session that would be random.. but unique so its the same after reconnect.. then only playerUID

zealous solstice
#

i think he want to generate multible UID per Client

deft zealot
#

Random is not unique

zealous solstice
#

i mean like this:

globalUID = [""];
private _uid = "";

while {_uid in globalUID} do {
    _uid = format ["%1%2%3%4%5%6%7%8%9%10", random 100, random 100, random 100, random 100, random 100, random 100, random 100, random 100, random 100, random 100];
};
globalUID pushBack _uid;
_uid
vapid frigate
#

that would be an infinite loop?

#

err nvm, no it wouldn't

deft zealot
#

any bugs known with allVariables on a logic?

#

looks like variables with value nil dont get removed from allVariables on objects (its working fine with missionNamespace)

tribal crane
#

That isn't necessarily a bug, private variables are the same.

runic heart
#

anyone know if i can execute bis_fnc_earthquake with CBA in the console?

#

server-wide

#

not local

#

doesnt have to

#

just thinking that was the only way i could do it

#

admin_d0 needs STRING code!

#

infistar doesnt seem to like it im guessing

#

same

#

out of luck

#

ill add some stuff server side so it passes it

deft zealot
#

If its not a bug the docs are wrong cause they say setting a variable to nil removes it

earnest valve
#

@deft zealot nil does remove the variable.... to check, use the condition: isNil "variable"

deft zealot
#

but its still listed in allVariables

earnest valve
#

Then allVariables must be recording 'used' variable names, then. But technically It doesn't exist.

deft zealot
#

i just wanna tell you that the behaviour of allVariables is different when used on objects vs missionNamespace.
When executing allVariables missionNamespace there are no nil veriable names listed

#

this is inconsistent and not documented anywhere (maybe BI want to change it)

earnest valve
#

Wait, so the nil variables do not show up on allVariables missionNamespace?

zealous solstice
#

jep

earnest valve
#

But nil is designed to remove the variable from total existence :/

#

If nil variables don't show up on allVariables, then it prooves the variable is deleted. If it does show up on allVariables missionNamespace, then it must be reported on the feedback tracker.

zealous solstice
#

feedback tracker is still down

earnest valve
#

@zealous solstice down? I didn't know, lol. I've been off ArmA for like 2 months (still haven't touched 3DEN xD)

zealous solstice
#

jep still down sinse 3den release

earnest valve
#

Wow

quick summit
#

Hi, i need a scipt to spawn items in front of a player, in a weaponholder. can anyone help me?

hasty pond
quick summit
#

thanks

lone glade
#

that's everyone except the server there quicksilver

agile pumice
#

how can I wait for this to complete? "call compile PreprocessFileLineNumbers"

still forum
#

it returns when its complete

lone glade
#

no because it's a call compile.

#

that thing will complete when it reaches the end of the file.

#

(or block of code supplied)

agile pumice
#

how do I check if its completed was what I meant to ask

queen cargo
#

would not be unique @zealous solstice
@deft zealot in which term it has to be unique?
mission runtime or persistent global?

deft zealot
#

mission runtime

queen cargo
#

how long you want your UUID to be?

deft zealot
#

as short as possible ๐Ÿ˜ƒ

queen cargo
#

time + random 100000 hf

#

there was also a diag tickwhatever command

#

but i do not memorize that right now :3

lone glade
#

diag_tickTime

queen cargo
#

found it diag_tickTime

deft zealot
#

i used diag_Ticktime but i got the same value when i run it twice in a short period of time

queen cargo
#

thats why you add random to it

#

as short as possible means more potential dups

deft zealot
#

but random is random not unique

queen cargo
#

longer => less chance of dups

#

random just has to serve you enough randomness to not have two times the same value in a single frame eg.

#

thats why you have to use more or less what joko did

#

with multiple random calls

#

but as you want to use pure SQF

#

thats as unique as you can go

deft zealot
#

if i execute your example 100001 times per frame i get a duplicate

queen cargo
#

however ... can also get some more fancy

deft zealot
#

gimme something without random pls

queen cargo
#

if you exec it 100001 times per frame you will get a million $$$

#

as said: you wont get around the random command due to native SQF having nothing for it

indigo snow
#

if you have an identifier with a fixed length youre gonna run into duplicates at some point anyway

hasty pond
#

Quick question, will ExtDB2 Allow this kind of SQL statement "SQL1_1 = SELECT * FROM users WHERE uid=?;"

queen cargo
#

can write you together something proper ... but that still would have the random command in it

#

but the chances of dups will be quite low

#

i wont even dare to answer that @hasty pond ...
that pretty much is an idiots question ...

fading gorge
#

i'm entering half way through this conversation but why can't you just....check if the UID is unique before assigning it?

queen cargo
#

@fading gorge good question
easy answer
you cannot because you might generate thousands of UIDs --> cross checking is time consuming more and more

if you do it on a non-local level you are even more fucked as you would have to sync em

hasty pond
#

@queen cargo ๐Ÿ˜„ Not that familiar with extDB and how it deals with everything

queen cargo
#

@hasty pond does not matters ... extDB is a database frontend ...
its just as dump to ask if it is possible as it would be dump to ask if callExtension supports dlls

#

@deft zealot gimme 10 minutes and you will have some proper generator for it ๐Ÿ˜ƒ

tough abyss
#

@hasty pond
Easier to just test out your SQL Statements, if there an error check extDB logs for info.
But once its a valid prepared statement it should work (minus the odd unsupported datatype)
There is even a command line test application. (So you don't even arma running).

You can also check out exileserver + a3wasteland sql_custom_v2 ini files

queen cargo
#

untested

#

so ... might have some syntax error

#

but you wont get much more unique

#

be aware that you cann still add another layer of uniqueness if you only generate them on playerside

#

and never on server

#

the function there is suitable for both

#

chances for dups is quite low

#

or more: extremly low

#

but i have to edit it again ...

#

you can get more uniqueness into it

#

by randomness ๐Ÿ˜ƒ

#

updated

nocturne bluff
#

X39, missing some macros there.

queen cargo
#

what should i use macros in there for?

nocturne bluff
#

define entire script as a macro

queen cargo
#

that is the biggest bullshit i was forced to read in my entire life

#

thanks

#

thanks for this experience

queen cargo
#

i personally look extremly forward to that tool ๐Ÿ˜ƒ

agile pumice
#

I need this in my life

queen cargo
#

right now however ... it does not supports macros at all so ... kind of a downside ^^

warped thicket
#

@queen cargo does it lint correctly and build the script like engine would?

#

if not there is nothing more to it than yet another editor

queen cargo
#

@warped thicket just can speak from what i got from the offficial dev
it hooks arma (no building the script itself) and provides a basic linting to it

debuging with breakpoints and viewing the contents of variable XYZ is also possible (just check his channel for more info)

warped thicket
#

hmh

#

I'll be interested when it's released I guess ๐Ÿ˜„

queen cargo
#

to be more precise: it is still ArmA running everything (from inside the game etc. no action provided by the tool yet)

warped thicket
#

yeah

#

it probably just adds diag_logs and reads those or something for variable reading

#

any idea if it needs Arma running in the background or?

queen cargo
#

nope
it hooks the SQF functions for debugging

#

ArmA has to run if you want to debug a script

#

and the script has to be ran in ArmA

#

the tool itself does not seem to provide a way for it yet

warped thicket
#

thought so

nocturne bluff
#

he teasead

#

it so long

#

like a year

#

So long infact

#

I consider it vaporware

#

heeeh

#

i recongize that UI middleware

grizzled cliff
#

just write addons in c++ and use a normal good debugger. ๐Ÿ˜›

deft zealot
#

@grizzled cliff you wear glasses?

grizzled cliff
#

i wear glasses and contacts

#

why do you ask?

deft zealot
#

cause you dont c#

grizzled cliff
#

oh.

#

c++ > c#

#

garbage collectors are for people who can't count backwards

deft zealot
#

or just lazy ones

grizzled cliff
#

also you can write c++ now without ever using a new statement

deft zealot
#

you have to teach me some basics in a codin session

grizzled cliff
#

in C++11/14/17 almost everything in the STL/STD library has move semantics.

zealous solstice
#

@grizzled cliff did you get the c# == see sharp ?

grizzled cliff
#

You declare everything on the stack and just pass it around until it finally just goes out of scope forever, releasing it's memory in it's destructor.

#

and yes @zealous solstice ... of course... lol

#

RAII + move semantics, and using shared_ptr (basically a ref counter wrapper for any dynamically allocated object) makes memory leaks something you really need to try and create on purpose.

#

and compilers can do some amazing optimizations with move semantic rvalues now too, just really slick, fast code

#

like before rvalue type variables, doing something like

std::vector<some_obj> make_list() {
    std::vector<some_obj> my_list;
    for(size_t i = 0; i < 10000; ++i)
        my_list.push_back(some_obj());
    return my_list;
}

auto returned_list = make_list();
#

would mean that the return statement would execute a copy constructor on returned_list

#

instead now using move semantics it knows it can call the move constructor and instead of copying the data, it just takes the pointer to the data in my_list in the function and moves it to the pointer in returned_list.

#

Then it nulls it out in my_list and when my_list goes out of scope it just frees up everything except it's data, because returned_list is now the owner of that data.

#

and compilers often can optimize that entire move out (even though its super cheap anyways) and just use returned_list as my_list

#

when that function is called via inlining (or possibly in some cases passing an extra variable address to the function)

#

c++ is neat.

jade abyss
#

NetFusion - Today at 1:44 AM cause you dont c#
Oh my god... badumm tss

nocturne bluff
#

C++ is fun

#

But C# is fun

keen stream
#

I am happy with just /bin/sh.

queen cargo
#

Yes @tough abyss

#

Still its callen high level lang

lone glade
#

wait, you mean nobody writes everything in binary ? ๐Ÿ˜„

tough abyss
#

What is SQF derived from?

lone glade
#

mish mash of around 4 languages

tough abyss
#

That isn't used for anything else other than BI Games

lone glade
#

TKOH arma 2 and arma 3, maybe VBS products too dunno. Take on mars is pretty interesting and low level, dunno for Ylands

tough abyss
#

Can't forget DayZ SA

#

Uses the ToH engine

#

ToH was an upgrade to A2/OA's engine

lone glade
#

nope, it uses a modified branch of RV from arma 2, which has been heavily modified and renamed enfusion

#

Ylands uses unity.

tough abyss
#

I thought that was what ToH uses

lone glade
#

pretty sure TKOH is just a branch of A2 with rope physx and whatever the flying lib is.

tough abyss
#

Doesn't ToH use RotorLib?

lone glade
#

yes that

tough abyss
#

It's exactly the same as A3's AFM

lone glade
#

A3 afm IS rotorLib ported to A3 from TKOH