#arma3_scripting

1 messages · Page 394 of 1

little eagle
#

The term "suspendable" refers to scheduled environment though (canSuspend command), so you should avoid it when talking about unscheduled environment. To not confuse people.

#

Suspend the script instance, not suspend the game.

still forum
#

@meager granite everything only deltes next frame.
deleteVehicle only set's a toDelete flag. Had a lot of fun with that as deleted eventhandler might fire more than one frame before the thing is actually deleted.
And placing units in Zeus calls the deleted eventhandler but.. you are creating the units and they never become objNull although deleted is called

little eagle
#

Not true. deleteLocation happens in the same frame.

still forum
#

deleteVehicle != deleteLocation

little eagle
#

Yep. You said everything.

still forum
#

squint

little eagle
#

everything only deltes next frame.

still forum
#

Oh... Meh.. 3 hours of sleep apparently not enough

lucid junco
still forum
#

How do you read it? Walk up to it and press a button?

lucid junco
#

yep

#

there is pop up option "press spacebar to examine"

astral tendon
#

this addEventHandler ["killed",{playSound ["Play257C", true];}] how do i make that only the killer hear this sound?

subtle ore
#

Again with the unit inits?

still forum
#

player == killer

#

if player == killer then playSound

subtle ore
#
if(unitInitGarbage) exitWith 
{
    hintSilent format["Don't do it, not even once %1",name player];
};
little eagle
#

Naming a vehicle bis_functions_mainscope and playing in MP, huh.

still forum
#

Sounds fun... I guess

little eagle
#

Throwing a monkey wrench into the system and to observe what happens is always fun.

astral tendon
#

Thanks for the tip Dedmen

still forum
#

That wasn't just a tip that was the solution ^^

astral tendon
#

Sure 😃

spark sun
#

Hello, I only found this really dirty solution to test if a map object is a rock :

(_objects select 0) in nearestTerrainObjects [player, ["Rock"], 20];

Any better idea ?

still forum
#

umpf... I'd say no... Maybe you can get something from it's config class

spark sun
#

How ? typeof and iskindof are not working on map objects 😦

still forum
#

Ouh.. That's a no then 😄

spark sun
#

x) thanks @still forum 😃

wispy patio
#

I'm having an issue with a script on an OnLoad eventhandler in a custom dialog. Within the script I want to change the value of a listbox, the code I use is: ((findDisplay 10212) displayCtrl 1400) lbSetCurSel 2; This works if I set this as the action = in the config on a button, but it doesn't work in the script. Anyone have a clue what is wrong here?

little eagle
#

findDisplay can only access displays after they are created. onLoad is too soon. Just use params ["_display"]; instead to retrieve it.

kindred bane
#

would anyone help me make a simple script

server should start locked, and after 5 minutes unlock (as my mission is having trouble if you join too early)

little eagle
#

I think it will have to boil down to you fixing the mission so it does work from the start.

kindred bane
#

yeah but im making new mission or editing very soon so its just a temporary fix

peak plover
#

Sounds like a locality issue for scripts maybe?

#

have you tried not running all code on all clients?

kindred bane
#

i havent im not really good at coding D:

but i tried putting password on server and waiting for the mission to be at playing, and after that i could join

#

but is there a way to start the server locked and then unlock it after 5 minutes for a temp fix

little eagle
#

Not that I know of.

peak plover
#

Yes

kindred bane
#

#lock and #unlock i know but im not sure how i should make it be locked as the first thing that happends in the mission really

peak plover
#

_isOK = "MyServerCommandPassword" serverCommand "#lock";

#

apparently it's a viable example so it should work

kindred bane
#

hmnmm yeah i guess, but would i place it in the init.sqf?

peak plover
#

You should run that as soon as mission is loaded, @little eagle how is that new lobby coming along?

errant jasper
#

Run serverCommand #lock

peak plover
#

maybe with that and initserver

little eagle
#

https://i.imgur.com/mFCCiqk.jpg

_group = ["Group 1", west] call Lobby_fnc_createGroup;

["Unit 1", _group] call Lobby_fnc_createSlot;
["Unit 2", _group] call Lobby_fnc_createSlot;
["Unit 3", _group] call Lobby_fnc_createSlot;

_group = ["Group 2", west] call Lobby_fnc_createGroup;
...
peak plover
#

Oh my god

#

You make me moist 💦

kindred bane
#

skipLobby? whats that do

#

oh right, but why would i use that?

peak plover
#

So that people can't slot up, but mission loads instantly

#

that way a soon as 1 person is in

#

it will run the init scripts

#

after a slight delay

kindred bane
#

ohhh right, but people need the slot selection its for a life server

little eagle
#

I absolutely hate how I use arrays and synch them for every created slot, so I will have to redo the internals completely and I'll probably reimplement cba hash just to get this to work with reasonable looking code and avoid all mod dependencies.

#

You can also delete the slots.

#

And groups.

peak plover
#

Name grouips

#

no more alpa 2-3

little eagle
#

Sure, that is all details. One has to get the underlying system itself to work.

peak plover
#

Great job

#

👌🏿

kindred bane
#

ok wait so, in the mission folder, init.sqf i added this

serverCommand #lock
[] spawn {sleep 300; serverCommand #unlock};

#

would that possible work? lock the server and after 5 minutes unlock?

peak plover
#

do it on initserver

little eagle
#

You need the password syntax I believe.

kindred bane
#

aight hold on

peak plover
#

if you do it on init. it will lock every time someon logs

little eagle
#

And it's either "unlock" or "#unlock", but not without quote marks.

kindred bane
#

ohhh thanks dont want that

#

should be #unlock from wiki

thorn saffron
#

Whats is the condition to check if AI is NOT a member of any player group?

kindred bane
#

aight, so i added it to the initServer like this:

serverCommand #lock
[] spawn {sleep 300; serverCommand "#unlock"};

should work?

little eagle
#

!(_unit in units player)

#

?

#

Same thing about the quote marks with #lock.

#

And I still believe you need the server password syntax.

peak plover
#
if ((allplayers arrayintersect (units _unit)) isEqualTo []) then {
    hint 'unit is not in a playergroup';
};
#

maybe?

little eagle
#

That looks great.

thorn saffron
#

I'm trying to add new setting to ACE medical so the AI uncounciusness can be set to afect only player squad or player side

little eagle
#

Some used set theory 😃

#

Do what nigel wrote.

kindred bane
#

@little eagle ill try that if it doesnt work

thorn saffron
#

Ok, now if I want to set int only for a player side, its it an MP scenario, then what would happen if there were player on all sides? The condition would have to be "if unit is NOT on a side where there are players". Hopefully it would make it work well in any combination, if say players were in co-op only on one side, on BLUFOR and OPFOR (INDFOR is just AI), or playrs in any and all factions.

fringe gull
#

Hey guys I want to understand the AI behaviour and combat stances, how they behave when in careless, safe, aware, combat, stealth and when set to never fire, hold fire - defend only, hold fire - engage at will, fire at will, fire at will - engage at will. And all its variations like when they on foot, when on vehicle etc... can anyone explain me / point me to the proper documentation for that?

thorn saffron
#

if ((allplayers arrayintersect (side _unit)) isEqualTo [])
Would this work as a condition?

cold quartz
#

Anyone know of any references for how to make use of the custom user controls in Arma? I saw something about UserActionGroups but I couldn't find much info on it.

little eagle
#

What is side_unit ?

thorn saffron
#

Sorry, I forgot the space

little eagle
#

Nah, arrayIntersect needs an array on both sides, not a SIDE.

delicate lotus
#

hey guys, if I want to crate a display which works like a additional thing to the hud, like a money bar or something, how can I do this? (I know how to create display but not how to make them unclickable and such)

little eagle
#

Don't. Use the mission display (46) and add controls to it instead.

thorn saffron
#

In editor there is GUI editor AFAIK

delicate lotus
#

yes I know that

#

so just add do display 46?

#

okay

little eagle
#

That's by far the easiest method.

#

Even if it's rarely used, because people rather copy paste what others cooked up.

still forum
#

@peak plover you are dripping

thorn saffron
#

so how can I check if an AI is not on a side where there are any players?

still forum
#

allPlayers select {side _x == side player}

#

something like that

#

Just get all players on that side. And if the array is empty then there are no players on that side

little eagle
#

Makes sense to me.

thorn saffron
#

hmm, I'm not sure this is correct, but then again I cannot script at all 😛

little eagle
#
{side group _x == side group _unit} count allPlayers == 0

You should probably learn it though. It's really not that hard if you understand basic logic and don't apply it to everything BI does.

#
playableSlotsNumber side group _unit == 0

Probably closer to what you need.

thorn saffron
#

Yeah, tried few times, but I just can't wrap my around scripting. I can understand the logic, but I just have no idea how to make stuff the way I want

subtle ore
#
switch(sqf) do 
{
    case "Broken" : 
    {
        if(random 1 > 0.5) then 
        {
            true
        } else {
            false
        };
    };
};
little eagle
#

then {true} else {false}

subtle ore
#

You see, it's a gamble commy

#

👀

#

Hmm

tough abyss
#

Working out how to do stuff is often just searching around in the scripting command listing. After a while you have the basics of SQF itself in your head and a list of the common commands and capabilities and you get a better idea of what you can find and where. When I start a project I often spend time looking for what the API can give me and what it can't

peak plover
#

btw

call {
    if () exitWith {};
    if () exitWith {};
    if () exitWith {};
}; 

is a faster than

switch () do {
    case () : {};
};
jade abyss
#

Switch is slow af

tough abyss
#

There is no magic to learning a new language other than doing stuff in it and gradually leanring more and more. You have to spend time trying to write stuff and time just exploring the things you don't know

subtle ore
#

@peak plover The if statements look like absolute shit

peak plover
#

💩 ```sqf
if () exitWith {};

#

I disagree

#

Doesn't look anything like shit

little eagle
#

if 💩 then 🚾

jade abyss
#
if()exitWith{};```
subtle ore
#

Nu uh, I disagree

tough abyss
#

I dislike the logic of exitWith as most other languages would give us an explicit return or exit command, it doesn't allow you to have the logic the way around that is best for readability all the time.

little eagle
#

Ever looked at scopeName and breakOut?

peak plover
#
if          (     1 >       random 2) 

THEN {
cancer =
true;

            };
tough abyss
#

It is what it is though, sqf is weird in a lot of ways coming from other languages. Being productive in it is a bigger bug bear honestly as its slow to write and test due to game restarts.

little eagle
#

Candle, look at scopeName + breakOut.

subtle ore
#

@tough abyss Bigger bug bear, using that from now on

peak plover
#

breakout is just like break

#

in sqf exitwith depends on what you do, is it a loop? is it a 💩

subtle ore
#

💩

tough abyss
#

What is enfushion using as its scripting language?

jade abyss
#

Enscript

peak plover
#

english script

jade abyss
#

aka Enforce or how it was called

peak plover
#

I really hope it's mostly english this time

subtle ore
#

They have tiny bits of code pieces release from dayz

jade abyss
subtle ore
#

^

little eagle
#

If they kept sqs for so long, then sqf will definitely be part of A4.

jade abyss
#

nah

peak plover
#

Welll

jade abyss
#

All the sqf stuff was removed in Enfusion already (coming with 0.63 iirc)

peak plover
#

They did keep ak's m16's humvees and hinds since ofp, but removed in a3

#

I'm glad it's going to be gone

astral tendon
#

NOTE: "Loaded" event handler should be added BEFORE the mission is loaded from save. Placing it in a function with preInit = 1; usually does the trick.

#

i dont get that, can some one give a exemple?

peak plover
#

class PLUGIN {
    class init {
        file = QPLUGIN_PATHFILES;
        class setParams {postInit = 1;};
        class postInit {postInit = 1;};
        class spawnUnits {};
    };
little eagle
#

It's only for savegames, not what you want.

#

Roque ^

peak plover
#

change postinit to preInit = 1;

little eagle
#

The note is absolute bs.

#

Obviously the one who wrote it doesn't understand how savegames work at all.

peak plover
#

How do they work?

astral tendon
#

nigel, were i put that?

little eagle
#

They work in a way where you can use Loaded everywhere, not necessarily preInit.

peak plover
#

In your functions library

little eagle
#

And preInit is not executed when loading a savegame.

peak plover
#

Ahh

little eagle
#

It's not what he wants. He wants an eh for the loading screen, not for resuming a savegame.

peak plover
#

The note means that if it's not in preinit, it will load the function when you first play it and re-load when you load save

#

So that could cause double units to spawn

astral tendon
#

it is atually to resume a save game

little eagle
#

The note means that if it's not in preinit, it will load the function when you first play it and re-load when you load save
No, loaded will never execute unless you load the savegame.

peak plover
#

Ohh, right

astral tendon
#

becasue i have a problem that the mussic does not play when loading a save game, so i was trying to fix that with a EH

peak plover
#

If you put it somewhere which runs after the game is loaded from save it won't even be processed

little eagle
#

Well then I was wrong and loaded is exactly what you need. Sorry.

peak plover
#

so it kinda makes sense?

little eagle
#

No, it doesn't nigel.

peak plover
#

So you adde the code to the EH, it will only run if it's added. If it's not added it will not run

little eagle
#

Savegames carry over all mission/ object eventhandlers, global variables and scripts that didn't disable serialization.

lone glade
#

that's not how EHs work

little eagle
#

No need to add Loaded after the game was loaded from save once.

#

Would mean that the thing runs twice the second time you load.

peak plover
#
[] spawn {
sleep 600;
>>addeventhandler loaded<<
};
//save game

now when I load the game I won't get code from EH

little eagle
#

Unless you wait 10 minutes I guess.

#

But who would ever do that.

peak plover
#

people! PEOPLE WOULD DO THAT

little eagle
#

Ha

peak plover
#

🤖

little eagle
#

No one can save the game before postInit or any reasonable init.sqf

#

So it's no concern.

peak plover
#

true

#

But if you usually want to do the trick

#

😉

#

preinit

little eagle
#

He probably needs to restart a new game from scratch and not load it, because the saved mission he's testing on still uses the old scripts.

#

Therefore no loaded event.

peak plover
#

I've never used saves so a serious question

#

I spawned a loop to play music.
saved game

#

Does that script 'threaad' save?

#

when I load will it continue loop?

little eagle
#

The loop will continue, unless you used disableSerialization.

#

Which is what the command is used for.

peak plover
#

Ohh

#

That's.... opened up an idea

#

disable serilization vs sterilization, which is faster?

little eagle
#
private _script = 0 spawn {
    disableSerialization;
    sleep 100000;
};

_script spawn {
    waitUntil {scriptDone _this};
    hint "loaded save!";
};
peak plover
#

I gueses this is single player only?

#

disableSerialization

#

Wait... nvm

#

I can save mp games.

little eagle
#

MP hosted games also have saves for the host, but it completely breaks stuff. E.g. clientOwner will no longer be 2 for the server.

peak plover
#

That's why god(jay crowe) invented profilenamsepace. So I can save my game in mp

#

I gotta test the speed for disableSerilization 'tho

astral tendon
#

urg, sorry nigel, i did not get that, there is a better step by step to this?

peak plover
#

Hmm I don't know because I assume music does not save? Did you try if your loop continues 'tho?

#

I assume your song is in a loop lik every few mintues it restarts?

#

Wait until it should restart and see if that works

astral tendon
#

i mean the code you give me

#
    class init {
        file = QPLUGIN_PATHFILES;
        class setParams {postInit = 1;};
        class postInit {postInit = 1;};
        class spawnUnits {};
    };```
dim owl
#

Is there a gridview control in arma 3? like can i have multiple columns in one listbox?

jovial ivy
#

What do you mean by multiple rows?

peak plover
#

You can define functions to run in postinit or preinit there

astral tendon
#

nevermind, i decide to chagne order of saving to save before the handle starts

edgy dune
#

So i know that

#
[_this] joinSilent createGroup INDEPENDENT;
#

changes a units factions to independent

#

but how can I do it for the entire group?

astral tendon
#

ForEach?

edgy dune
#

wat if i want to change a single group

little eagle
#

forEach.

edgy dune
#

ohhh k

#

lemme see if I got it

little eagle
#

Oh, even better.

#
units _group join createGroup INDEPENDENT;
#

join already can take more than one unit.

dim owl
#

@jovial ivy i mean colums sry :D

subtle ore
#

flawless @little eagle

little eagle
#

I try.

subtle ore
#

💩

little eagle
#

😦

subtle ore
#

👁 👄 👁

edgy dune
#

ahh thx @little eagle

#

@subtle ore wat is that O.O

little eagle
edgy dune
#

wheres the nose

little eagle
#

👃

#

here

astral tendon
#

you stole it!

austere granite
#

does the nose know?

peak plover
#

💯 👌🏿 👌🏿🇲 🇸

still forum
#

👁 👃 👁
👄

edgy dune
#

is it or or || for or in a if statement

#

lol

#

which does arma use

still forum
#

both

#

any of them

#

one of them

austere granite
#

or has a habit of reformatting your windows drive

#

so dont use that

edgy dune
#

wait wat

#

how do irs reformat my windows drive?

austere granite
#

it doesnt, but use ||

edgy dune
#
if ((typeOf _x) isEqualTo "O_V_Soldier_JTAC_ghex_F" || ((typeOf _x) isEqualTo "CAA_CIS_magnadroid_E5")) then
{
What ever my code is gona be im lazt to type it i cant spell

}
``` So this is valid
still forum
#

yup

edgy dune
#

gg thx

#

im so smart

austere granite
#

if ((typeOf _x) isEqualTo "O_V_Soldier_JTAC_ghex_F" || ({(typeOf _x) isEqualTo "CAA_CIS_magnadroid_E5")}) then {

#

extra pro

little eagle
#

Hold my beer.

austere granite
#

I wish i had a blue name and putting extra characters in front of your name to raise your spot in the list was a bannable offsense

little eagle
#
if (typeOf _x in ["O_V_Soldier_JTAC_ghex_F", "CAA_CIS_magnadroid_E5"]) then {
austere granite
#

then i'd be first 😦

little eagle
#

If .Ghost can do it, so can I.

still forum
#

But.. Case sensitivity :x

little eagle
#

He used isEqulTo, but I agree. Coding with case sensitive strings is a bad idea.

thorn saffron
#

how do you check if a unit is in any player group?

little eagle
#

I'm having a deja vu.

thorn saffron
#

Yeah, the stuff I was editing before wasn't the thing that kept hostile AI alive

#

in ACE

little eagle
#

But the answers we gave are still true.

thorn saffron
#

turns out its the revive settings

little eagle
#

I think you can scroll back on your own. :/

thorn saffron
#

!((allplayers arrayintersect (units _unit)) isEqualTo [])

#

previously it was a check to see if the AI was NOT in any player group, this time I need to go other way, to check if the AI actually IS in any player group

#

would adding "!" to "((allplayers arrayintersect (units _unit)) isEqualTo [])" give me this result?

little eagle
#

Yes.

thorn saffron
#

I know how the ! works more or less, I was just asking if there wasn't any weird combination with the condition itself. I assume that "(!((allplayers arrayintersect (units _unit)) isEqualTo []))" returns either true or false, right?

little eagle
#

Yes.

#

The lowest priority command including after applying the parenthesis is isEqualTo and that reports a boolean.

#

The last command.

thorn saffron
#

Can I plop a switch&case stack into an IF condition?

#

so some of the cases return true and some return false

#

and the overall condition will use that

little eagle
#

Use a helper variable for that.

private _isX = false;
switch (blah) do {
    case {...};
    case {...; _isX = true};
};

if (_isX) then {
thorn saffron
#
switch (_enableUncon) do {
    case 1 {_isX = true;};
    case 2 {_isX = true; };
    case 3 {_isX = false; };
};

if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == 2)) && !_force  && _isX) then {```
#

dosen't matter now, got it working

little eagle
#

You don't need the _isX = false; part.

#

Inside the switch I mean.

#

And rename it to something reasonable.

#

You will thank me later.

thorn saffron
#

!((allplayers arrayintersect (units _unit)) isEqualTo []) did the job

jovial ivy
#

Is there any way to spawn a grenade and blow it up? Similar to smoke grenades maybe?

little eagle
#

Exactly the same as a smoke grenade.

jovial ivy
#

Alrighty.

thorn saffron
#

How can I embed a script in an addon so I can call it into whatever mission I want?

astral tendon
#

is there a way to make the chat display the unit name?

#

intead of the number?

little eagle
#

No.

astral tendon
#

😦

thorn saffron
#

@astral tendon I think you rename the group in the editor that will be used for radio protocol

#

@little eagle I mean like adding the script to the game script library thing/whatever, not a function, so I can call it with stuff like this:
dummy = [this, units (group this)] execVM "scripts\automedic.sqf";

little eagle
#

Yes. You do that by making an init function.

thorn saffron
little eagle
#

If it's for ace, then you might as well use xeh though:

    class Extended_PreInit_EventHandlers {
        class Taro_init {
            init = "execVM 'scripts\init.sqf'";
        };
    };
#

Less verbose.

thorn saffron
#

Pretty good, it still leaves the issue with units that join you after mission start, or ones you recruit.

#

However that is a less of an issue

#

oh, maybe a CBA button to re-designate everyone as medic, but it still leaves the issue of taking up a keybind

#

maybe I should add a new ACE menu action for that

little eagle
#

Dunno, up to you. Could also be a setting.

#

Edited it, because that script obviously wouldn't work.

tough abyss
#

was wondering it someone could help me with some technical keywords so i can do some wiki/web searches. trying to setup a popup dialog that players will see and have to click accept when they join a public server. (to display rules ts info etc)

astral tendon
#

@thorn saffron That only chage the group call sigh, on the group chat they still being called by the number, on the Team chat by the group and a number

thorn saffron
#

Oh you mean the names of soldiers

thorn saffron
#

@little eagle Sadly due to how the script is set up, it throws an error when loading a map in editor if its on auto initialization

halcyon crypt
#

@little eagle did you add the . so that you're on top of the list? 😁

little eagle
#

To troll Dscha, who apparently trolls back now.

halcyon crypt
#

lol

jade abyss
#

@little eagle Me? Trolling? never

thorn saffron
#

I think I figured out a pretty neat solution to that automedic script thing: I think I would be able to add a new keybind with would let player call out for medic. The script would look for a closest friendly unit and the have it act as the automedic (move to player heal).

#

hmm, but this wouldn't solve the issue of medic not healing other soldiers

kindred bane
#

anyone know which file i could run a script in, so the script is ran before the mission even loads?

#

like at the part where the mission says setting up

little eagle
#

Before the mission loads? I don't think that is possible.

kindred bane
#

ugh, cause the script i got working only locks the missing after the setting up part, which is the point of it D:

#

to be locked when its setting up 😮

little eagle
#

You mean the briefing?

kindred bane
#

uhh i guess, yeah

#

i need the server to start locked, then unlock which works but it locks first when the mission is at playing

little eagle
#

You should instead look into fixing your mission so it works from the start. I told you this before.

kindred bane
#

Yes, but im changing mission soon to altislife 5.0 but for now i need this to work :/

#

can i put a password on the server, and remove it in sqf?

little eagle
#

What has that to do with anything? Fix the mission. A mission that doesn't work for 5 minutes is really really bad.

jade abyss
#

.

little eagle
#

Not acceptable.

kindred bane
#

Cause i dont know how i would fix it

tough abyss
#

You can use serverCommand to lock / unlock server

kindred bane
#

i am

#

but its locking first at playing state

#

and if people join at setting up the server crashes

little eagle
#

I'm out of this. My suggestion is ctrl+A , del.

#

Unbelievable that people cooked up something so bad.

jade abyss
#

Life ¯_(ツ)_/¯

kindred bane
#

can just tell me is it possible to remove the servers password once its started

#

does #unlock do that

tough abyss
#

Nope
Fix the code causing your server to crash, you can add code to kick players off server if they join to fast (before its locked)
If you want to lock server faster, you will need to use 3rd party rcon application to lock via rcon

still forum
#

@little eagle before the mission loads __EVAL in description.ext

#

limited but.. In theory it's a script

little eagle
#

I wonder if that could lock it.

#

But seriously. How crappy has your mod to be that it breaks the server for 5!!! minutes. xD

kindred bane
#

@tough abyss thanks, what code to kick players off if they join to fast?

#

crappy

#

very crappy

#

thats why im changing to altis 5.0 asap

little eagle
#

I don't even know how one could manage to do that.

jade abyss
#

Commy:
Life

little eagle
#

I blame excessive (>0) use of the scheduler.

jade abyss
#

That whole thing is a clusterfk

tough abyss
#

Simplest method is a publicvariable user gets kicked for.
Or remoteexec killing the main display i think works awell.
Or exile method is loop through kicking all the player slots via servercommand, after locking server
Few different ways of doing it

kindred bane
#

aight thank you
would this work? in the description.ext
__EVAL("password" serverCommand "");

#

woops i forgot #lock in the cmomand but u know

tough abyss
#

test it out and see

kindred bane
#

aight thanks

#

but wait wouldnt this be risky to have in missionfile too cause people can download it and get the command password

little eagle
#

Would be hilarious to find a use for EVAL like this.

#

Yes, yes it would.

#

lol

kindred bane
#

aight then, what if i put it in lifeserver and executed the script from the description.ext int he eval

tough abyss
#

Just execute from your server code in some init sqf file, ideally whatever is started sooner
But would like to know if EVAL method works, but not ideal for security reasons

kindred bane
#

but then it would still lock it after the setting up?

tough abyss
#

So you unlock it afterwards

kindred bane
#

yeah

#

the unlock part i got

river meteor
glad pendant
#

im looking at trying to edit certain animation speeds within the ace mod any ideas?

limpid pewter
#

Anyone know where this file "\bin\dikCodes.h" is in the arma directory, if it is in there at all?

tame portal
#

@limpid pewter UI pbo

limpid pewter
#

No idea where that is. I found core.pbo, bin.pbo and languagecore_f.pbo under the steamapps\common\Arma 3\Dta\ directory. With regards to the arma folder in steam apps, do you know where it is?

still forum
#

addons folder

#

ui pbo

limpid pewter
#

ahh yep, i found ui_f.pbo, ui_f.pbo and ui_f_exp.pbo. Thanks OPTiX and Dedmen

jovial ivy
tough abyss
#

Switch out the dll with the debug version & check extDB3 logs to see what commands you are sending it & what its returning

#

Also check your not running the sqf code on clients etc

jovial ivy
#

Alrighty, i’ll test it out in the morn.

south pasture
#

Hi, what command makes AI units go through walls (for easier path-finding)?

peak plover
#

I think that is in some cases default behavior

cedar kindle
#

try setDestination with LEADER DIRECT

peak plover
#

Interesting

limpid pewter
#

Any tips on how to best handle when a player presses ESC while in a menu? Atm i have an onUnload EH that will destroy the camera (The menu needs the camera as a backdrop) when the menu closes. The problem with this method is that it will also destroy the camera if i open up a small sub-menu off of that origianl menu (because it technically was unloaded i guess).
So if anyone has anyone experience with this sortof this can you tell me how you have/would go about it.

lone glade
#

does that menu have a close button?

rotund cypress
#

Attach an keyhandler to it (the display) and then handle escape in that handler.

#

onKeyDown eventhandler.

lone glade
#

not needed

limpid pewter
#

yes, but if they don't press the close button, but rather press ESC it will cause the bug that i don't want

#

It's sort of user error handlign i guess

lone glade
#

shortcuts[]= {"0x01"}; in the close button class

limpid pewter
#

Ahh nice, i shall check this out

#

much more elegant than what i was going to do

lone glade
#

an onKeyDown EH wouldn't have worked either

#

escape is kinda special in that regard

limpid pewter
#

yeah, it's a bit of a pain that it closes menus by default

#

If you disable the ESC key while in a menu, then you can't exit that game : (

rotund cypress
#

@lone glade onKeyDown handles escape very well. How do you mean its kind of special in that regard?

peak plover
#

display eh key down? Wonuldn't that stop if you close the display?

rotund cypress
#

It would.

peak plover
#

Also

#

Have a on closed eh

#

That checks how the dialog was closed

rotund cypress
#

You are thinking of onUnload

peak plover
#

So if s1 close it without pressing (X) it will reopen isntantly

#

Yes

limpid pewter
#

@rotund cypress onUnload is what i am using atm

rotund cypress
#

What is the purpose? What are you trying to do exactly?

limpid pewter
#

nigel, i have tried that method too, and without a sleep statement in it, it will not reopen the menu

peak plover
#

you have to spawn it

limpid pewter
#

@rotund cypress Read the original post

peak plover
#

old code incoming

limpid pewter
#

hmm... maybe will try that if this doesn't work

peak plover
#
_force = missionNamespace getVariable ['BRM_insurgency_respawn_force',false];
if (_force) then {
    if !([player,true] call BRM_insurgency_respawn_fnc_evaluateRespawnTime) then {
        [] spawn {
            //uiSleep 1;
            createdialog "RscInsurgencyRespawn";
        };
#

worked when I spawned it

rotund cypress
#

Oh use createDisplay @limpid pewter

#

If you do not want the original display to unLoad

#

_parentDisplay createDisplay "newDisplayClass"

lone glade
#

thefuck is that horror nigel

rotund cypress
#

^^

peak plover
#

old code but I had a simliar issue

limpid pewter
#

tooo many tags haha

#

i just use mld_ 😃

peak plover
#

or

#

macro

rotund cypress
#

@peak plover tbh, that just don't seem to have anything todo with his issue.

#

macro

#

wtf?

lone glade
#

in general ignore nigel

peak plover
#

I wanted display to close only if the display was allowed to be closed

limpid pewter
#

wow , bit mean XD

peak plover
#

Pressing escape does nto close the display

limpid pewter
#

yeah i get what you're trying to do

rotund cypress
#

Hope scripting that is called.

limpid pewter
#

I did try this before but never with a sleep statement

peak plover
#

Nah I ended up gfetting rid of sleep

#

Just need to spawn it

limpid pewter
#

hm..

peak plover
#

Otherwise it won't create it because it already exists or sth

limpid pewter
#

yeah

lone glade
#

not needed to spawn it

rotund cypress
#

Heheh, new thread which doesn't need suspension. @peak plover

lone glade
#

it just needs to be executed the next frame

peak plover
#

sssure

rotund cypress
#

There is always better solutions to making a new thread or putting a random sleep.

lone glade
#

[{[_this select 0, _this select 1] call FUNC(openBox)}, [_target, _player]] call CBA_fnc_execNextFrame; I use this for ACE Arsenal through ACE interactions

peak plover
#

cba next frame

#

Yeah that one^

limpid pewter
#

@lone glade That shortcut thing worked as you said it would thanks

rotund cypress
#

Can someone send a link to CBA_fnc_execNextFrame, I am quite curious on that function.

#

I don't use CBA so not really familiar with their folder structure.

rotund cypress
#

I mean the code

#

Not the documentation

#

I dont use CBA.

limpid pewter
#

niether

peak plover
rotund cypress
#

Cheers

#

GVAR(nextFrameNo) that is just diag_frameNO + 1?

limpid pewter
#

@peak plover I was just looking for that google tutorial thing haha.

rotund cypress
#

Anyways @limpid pewter try createDisplay instead. It might solve your problem.

#

IIRC it wont unload the parent display

#

I take that back, it will not unload parent display.

lone glade
#

nope it won't

limpid pewter
#

Yeah thanks for all the tips. Will need to use a combination i think, the setup i have is a bit funky.

lone glade
#

it's because you create the child on the same frame and the parent is tasked for deletion

rotund cypress
#

A funky language requires funky solutions.

peak plover
#

^

rotund cypress
#

Funky and reckless are two different things though, keep that in mind.

limpid pewter
#

In one situtation i want it to close on ESC and the other i don't. Like i said a bit weird. Thanks everyone

lone glade
#

doesn't matter how you do it, it has to be on the next frame (or after)

limpid pewter
#

just testing now

rotund cypress
#

doesn't matter how you do it, it has to be on the next frame (or after)
if not using createDisplay, correct?

#

@lone glade

lone glade
#

nope

#

createDisplay would execute on the same frame

rotund cypress
#

Yes, but it would not unload the previous display

lone glade
#

yes it would 😄

limpid pewter
#

It works 👌

lone glade
#

i'm fairly sure you can't delete and create a display on the same frame

rotund cypress
#

That i am not sure of, but I know that if you create a display on the game display, obviously it wouldn't unload the game display.

#

Maybe if you are creating them at the same frame.

lone glade
#

nope it wouldn't, but I had that issue with the ACE interaction display when creating the arsenal one

#

and they are not linked in any way

rotund cypress
#

Cannot really comment on that since I don't use it.

lone glade
#

ACE Arsenal hasn't been release 😄 it's tasked for 3.12.0

rotund cypress
#

I don't use CBA or ACE at all.

peak plover
#

That's in test already with st NVG?

lone glade
#

yep

#

RC is available

peak plover
#

👍🏿

rotund cypress
#

@limpid pewter did you use createDisplay or did you exec next frame?

#

(or both)?

lone glade
#

you NEED to use createDisplay on the next frame

#

I even tried with createDialog, same issue

rotund cypress
#

createDialog will unload previous display though IIRC

limpid pewter
#

Neither, in one situation the menu jsut closed, the other i close the current one and opened a new one with createDialog

#

Again it's funky.

peak plover
#

When I ussed createdialog

#

just used 10x in debug

#

Had to close it 10x

lone glade
#

that's not the issue here, he's trying to create a UI element on the same frame an other one is deleted

peak plover
#

Can you not create 2 different elements on the same frame as well?

little eagle
#

I remember the game crashing when doing that alganthe.

lone glade
#

yeah, same here

#

altho it also simply didn't create the new UI element in some cases for me

#

better than crashing but worse than working I guess

little eagle
#

Also neither createDialog nor createDisplay unload anything. That's false.

#

createDisplay does hide the parent display though.

lone glade
#

nah

little eagle
#

That's the point.

lone glade
#

it depends actually, I have to hide the parent in ACE Arsenal's case

limpid pewter
#

Anyway it works now. I didn't end up needing any createDisplays,CBA_fnc_execNextFrame's ,etc... Just executes code to destroy camera on the condition that certain buttons haven't been pressed and willnot destroy camera if those buttons were pressed,etc... Simple, not elegant, but works

lone glade
#

3DEN display -> hides
Game UI -> doesn't hide
Arsenal display after loading the loadouts display -> doesn't hide

little eagle
#

By game ui, do you mean RscDisplayMission?

lone glade
#

all the HUD elements

little eagle
#

The RscUnitInfo thingies?

lone glade
#

yeah

little eagle
#

shrug

rotund cypress
#

Guys, Laws of War map objects are available to everyone right?

#

If it's on map people can still connect, yes?

lone glade
#

only some apex objects have that limitations

#

it's the exception instead of the norm

peak plover
#

I though apex items are now on all clients?

little eagle
#

I think he meant LoW.

#

Wow. I just noticed. Apex and Low.

peak plover
#

LOW should be, because it's just like (((karts))) everyone gets it. But not sure

#

What does that mean commy

inner swallow
#

everything is with everyone now

#

there's only one dataset

little eagle
#

apex
the top or highest part of something, especially one forming a point.

Low is bottom is the opposite of top.

inner swallow
#

well...it's the opposite of "high"...

little eagle
#

The top is usually the highest point, mate.

#

I cracked the code.

peak plover
#

Ohh no

inner swallow
#

not the code!

tough abyss
#

When writing a dll extension, is the working directory the root of the server's directory? So say I was writing to a file, I would write to say: logs\log_file.log

rotund cypress
#

What would you guys say is the best way to lock doors for a certain playerside only?

willow basin
#

Buildings or vehicles? If buildings:

_numberofdoors = getNumber(configFile >> "CfgVehicles" >> (typeOf _building) >> "numberOfDoors");
...
            for "_i" from 1 to _numberOfDoors do {
                _building animate [format["door_%1_rot",_i],0];
                _building setVariable [format["bis_disabled_Door_%1",_i],1];
            };

and if you want it for all players, do _building setVariable [format["bis_disabled_Door_%1",_i],1,true];

#

oh crap, playerside ^^ not player sorry there. but you should be able to adjust

rotund cypress
#

Yeah I know how to disable doors.

#

I know how to disable it for playersides as well, but I am thinking what best way of doing it for one playerside would be.

astral tendon
#

How reliable is Unit capture and Unit play is in a coop scenario wtih 4 players in?

peak plover
#

I don't trust it. Not sure

#

I've had problems even in sp

#

What are you trying to do?

astral tendon
#

In my mission the truck we are riding is followed by 2 tecnicals and we are in the back shooting

#

wile in SP its seens to work fine, i try to test it in MP with 2 armas open, my PC lagged like hell

#

so the shooting on the back was verry akward

copper raven
#

"2 armas open"

astral tendon
#

yes, so i imagine that unit capture depends allot on the host PC to run well

#

than a AI actually driving

#

but you know how relible AI is for drivng...

#

Also, i got to test with 2 Armas because i need to be the host and the client, so i know the effects.

lucid junco
#

ABOUT LEAFLETS. To exec something after object is inspected: [missionNamespace,"objectInspected",{ hint "exec whatever you
need"}] call bis_fnc_addScriptedEventHandler; for example put this code to inspected object init field.

rancid pecan
#

hello 22:27:03 Message ID without message 22:27:03 Message ID without message 22:27:03 Message ID without message 22:27:03 Message ID without message 22:27:03 Message ID without message 22:27:03 Message ID without message 22:27:03 Message ID without message

#

what problem ?

still forum
#

Message ID doesn't have a message

rancid pecan
#

and 22:26:44 Server: Network message 5950972 is pending 22:26:44 Server: Network message 5950972 is pending 22:26:44 Server: Network message 5950972 is pending 22:26:44 Server: Network message 5950972 is pending 22:26:44 Server: Network message 5950973 is pending 22:26:44 Server: Network message 5950973 is pending 22:26:44 Server: Network message 5950973 is pending 22:26:44 Server: Network message 5950973 is pending 22:26:44 Server: Network message 5950974 is pending 22:26:44 Server: Network message 5950974 is pending

still forum
#

The Network message is pending.

rancid pecan
#

😄

jade abyss
#

sounds like wrong basic.cfg settings

rancid pecan
#

how to fix it?

still forum
#

Use the right basic.cfg settings

rancid pecan
#

yes

#

i open basic.cfg

still forum
rancid pecan
#

MaxMsgSend=2048; //MaxSizeGuaranteed=64; //MaxSizeNonguaranteed=64; MinBandwidth=16384000; MaxBandwidth=73886080; MinErrorToSend=0.001; //MinErrorToSendNear=0.04; MaxCustomFileSize=0; 3D_Performance=93750; Resolution_W=0; Resolution_H=0; Resolution_Bpp=32; Windowed=0; adapter=-1;

still forum
#

You should leave everything on Default and not mess with it if you have no Idea what you are doing

rancid pecan
#

my basic.cfg

tough abyss
#

But delete it and allow the engine to determine proper settings.

#

If you have issues you can manually work with it.

thorn saffron
#

I'm trying to fix a left shoulder weapon mod/script. I get this error when putting on a shoulder. The line bellow is reported as the source of the error
player setUnitTrait ["loadCoef", (player getUnitTrait "loadCoef") + _mass];
This is what RPT has to say on this matter:

sleep>
21:18:24   Error position: <getUnitTrait "loadCoef") + _mass];
sleep>
21:18:24   Error Foreign error: Unknown enum value: "loadCoef"
21:18:24 File AALSSW\aalssw_fnc_leftWeapon.sqf, line 75```
Odd, I checked the BIki and loadCoef is something that exist, with leads me to believe that the script is doing something goofy
lone glade
#

it's not an error

#

it's just a message telling you BI fucked up, it's fixed on the dev branch / perf branch

#

it's not the origin of your issue

thorn saffron
#

Well, I'll just comment out the line then, it will stop it from breaking the inventory weight

lone glade
#

it doesn't

#

outside of being logged to RPT and annoy you it works as intended

astral tendon
thorn saffron
#

@lone glade Not really, it breaks the weight bar in the inventory

lone glade
#

nope, it doesn't, I can 100% assure you that error doesn't do that

south pasture
#

Hi, how to prevent AI units from going through the walls?

little eagle
#

You can't.

peak plover
#

Good job @astral tendon

pulsar anchor
#
a = "Land_Pier_F" createVehicle [0,0,0];
a setposasl [0,0,50];
player setposasl (a modelToWorld[0,0,8]);
d=0;
f=0.001;
onEachFrame{
    a setVectorUp[d,0,1];
    d=d+f;
    if ((abs d)>1)then{f=f*-1};
    hintSilent str d;
};
#

With this you can walk on air

#

Is this a new problem?

#

Or even intended?

tough abyss
#

I think the incremental increase is small enough to where it feels natural

pulsar anchor
#

You have to execute it and move around to understand what I mean 😉

little eagle
#

It created a pier below me, and when I walked off the pier, I fell and died.

candid jay
#

[_foreman] remoteExec ["SCAR_UCM_fnc_addActionRequestMaterials", 0, _foreman]; is my understanding correct that this will be executed on every JIP client that connects, as long as _foreman is still there?

little eagle
#

If you trust in our overlords and their wiki.

candid jay
#

lol

#

ok, my question is what happens if a player leaves the game, chooses another slot and reconnects

#

still run?

lone glade
#

nope

candid jay
#

ah

#

why not?

lone glade
#

to be sure you can check the jip stack

#

i'm assuming _foreman is the player's unit?

candid jay
#

no

#

it’s an invincible AI

lone glade
#

who's the owner of that AI?

candid jay
#

server

lone glade
#

then it'll keep working

candid jay
#

it’s there in mission on game start

#

ok

#

that’s what i expect but i am seeing issues. trying to tackle why this does not work.

#

might be related to something else.

errant jasper
#

So if locality changes for JIP target, then it breaks?

little eagle
#

It shouldn't.

lone glade
#

^ as he said

errant jasper
#

Then why it matter who is the owner?

little eagle
#

It doesn't.

#

Tbh, the description is very strange on the wiki.

#
Object or Group or netId - The persistent execution of the given remoteExec statement will be attached to the given Object or Group, passed directly by reference or by their netId: _netId = "this is my car" remoteExec ["hint", 0, car]; or _netId = "this is my car" remoteExec ["hint", 0, netId car];Upon success, the command will return netId of the used Object or Group or netId. When Object or Group is deleted and becomes objNull or grpNull, the persistent remoteExec statement is automatically removed from JIP queue. Manual removal of the JIP statement could be done by passing either Object, Group or netId as usual:remoteExec ["", car]; or remoteExec ["", netId car];When JIP param is String in format "Number:Number", the string will be tested first whether or not it is the valid netId of an existing Object or Group, and if not the execution will be aborted, if yes, that Object or Group will be used to set persistent execution.
#

Seriously. I have no idea what they're talking about.

lone glade
#

you know what, it's probably because the punctuation is fucking terrible in that block of text

little eagle
#

Doesn't help, yes.

errant jasper
#

To be honest, I am quite skeptic about the system. Reading the part you link to .commy2 suggest the system is very fragile. You can attach the "execution" to an object or group. And you can cancel it by passing "". So you can only have one JIP entry for an object.

#

So if addons, or scripts, try to do more than one thing with the same object it breaks?

lone glade
#

no

#

that's not how the stack works

little eagle
#

This doc was written on friday afternoon. I can tell.

rotund cypress
#

Hey guys, I currently have a bug within my mission, and my mission is quite large so it could be a lot of things. Here is the issue: sometimes players get bugged out, they cannot scrollwheel on things, for example cant scroll in / out of map, cant scroll on actions (addAction) etc. Does anyone here have any clues of what this can be? I know this can be a hundred different things but maybe someone has any ideas.

lone glade
#

dialog issues ?

errant jasper
#

Then how do the stack work:
if I do:
[data] remoteExecCall ["myFunc", 0, ObjX]
[data2] remoteExecCall ["myFunc2", 0, ObjX]
[] remoteExecCall ["", 0, ObjX]

#

And what if I leave out the last line.

lone glade
#

you use different IDs

errant jasper
#

So what you say is I can use a string as a key as long as it does not match "Number:Number", like "jip_123" and "jip_124". For objects, e.g. Blufor 1-4 are automatically coerced into say "1:4" as the key?

candid jay
#

id is the differentiator to remove a jip stack

lone glade
#

damn, the more I think about it the more I prefer CBA EHs

errant jasper
#

To me it is all just a mess. If I use a non-netid string, it will not be attached to the object. Then the JIP ticket will remain forever, and I have to manually do a check in the callback to see if the object is still around. And for a group target, what will be a mess since they might be recycled.
And if I do use a direct object target, I risk collision with other mods/scripts.
Unless I misunderstand.

little eagle
#

remoteExec isn't meant for mods.

#

You can clearly tell.

#

Everything about it.

lone glade
#

it's half finished

#

i'm fairly sure remoteExec setting mode 1 is still broken

#

aka transforms the jip stack into a spamfest for everyone else that isn't the JIP player

little eagle
#

"Mode 1"?

river meteor
#

What is a good way to transfer data between a client and the server without remoteExec?

lone glade
#

whitelisted commands / funcs only

#

CBA EHs

little eagle
#

setVariable public and publicVariable

errant jasper
#

I still use CBA-style event handler for logic, regardless of the underlying command to transport.

lone glade
#

BIS_fnc_MP taps forehead

river meteor
#

But the client might still need to be told to act on those variables at a specific time and that would require a remoteExec?

lone glade
#

nope

river meteor
#

I suppose it could use looping and waiting for a variable to change

lone glade
#

what

little eagle
#

publicVariableEventHandler

errant jasper
#

Though I did recently switch the underlying command from publicVariable to remoteExecCall because publicVariable sendings were no longer being broadcast. If anything I would have thought it the other way around. (at least in my particular scenario - no idea what would block it)

river meteor
#

Ah. Good thing to know

errant jasper
#

I regularly see people on the forum and github making claims that remoteExecCall is much more efficient than publicVariable(Client). But don't see why, the same efficiency could then be implemented for publicVariable* commands. So I treat it as unsubstantiated.

lone glade
#

that's stupid

#

why would anyone say that?

little eagle
#

It's newer, so it must be better, right?

lone glade
#

also remoteExecCall is just a 100% this is gonna run unscheduled variant of remoteExec

#

they were made at the same time 😄

little eagle
#

No, they were not.

river meteor
little eagle
#

Reading comprehension.

#

Tried the debug mode it has?

#

Manason.

river meteor
#

No, but I'll do that now and see if I get anything

lone glade
#

i'm faiiirly sure they got added by the same patch, 1.48 or 1.50 can't remember

little eagle
#

publicVariable and friends is from OA 1.62

#

RE is from A3.

lone glade
#

oooh, I thought you mean remoteExec and remoteExecCall

little eagle
#

Reading comprehension.

lone glade
#

😄

little eagle
#

:facepalm:

subtle ore
#

🍪 🥛

lone glade
#

🥗

errant jasper
#

:empty-bottle: 😦

lone glade
#

🍻

rotund cypress
#

@lone glade how do you mean dialog issueS?

subtle ore
#

💳 🍺 @errant jasper

lone glade
#

as in a dialog not being closed is blocking the scrollwheel

errant jasper
#

@subtle ore Remind of the Simpsons, where Homer wants peanuts, but only have 20 dollars, and his mind intervenes and explains he can trade money for goods or services, including peanuts.

#

Unfortunately most is closed, and I am in a foreign country.

subtle ore
#

@errant jasper Hey everything here is still open. It may arrive in two weeks lol. Where do you buy 20 bucks worth of peanuts?

errant jasper
#

@subtle ore Dunno, the same place you buy 2 bucks worth of peanuts. Do it ten times 😃

subtle ore
#

@errant jasper LOL. Usually it'll only be a pack for me. Homer must've loved his peanuts. I tried paying for breakfast at a place in dimes before (12 bucks) and the lady gave me a strange look

errant jasper
#

@subtle ore He just wanted one. Dunno if you may post videos here, but it is youtube ID: dgct3Jn8pFA

lone glade
#

I buy tissues in bulk, same for anything that has a super long shelf life

#

just saves you trips to hell

river meteor
#

Tried running it in debug mode @commy2 and doesn't appear to be anything out of the ordinary on the extdb3 side. I can only assume it's either a problem with the API I'm using or I'm passing incorrect arguments. Do you know why it's giving me returns in this format: "extDB3: Output to Server: [1,[[Numair Fogel]]]"

#

@little eagle

little eagle
#

Isn't that correct?

river meteor
#

I assume so. I don't know what the 1 means though, the name is

little eagle
#

I don't know either.

tough abyss
#

0=ERRO, 1 = OK, 2=Multi Message (you can ignore that, it should be handled by your sqf code)
The issue is your returned result isn't wrapped in quotations, so when arma call compile / parseSimpleArray its going to be null

#

Depending on if you are using SQL or SQL_CUSTOM different ways to fix it

rotund cypress
#

@lone glade thanks, that is probably the issue 😉

#

Didnt think of that.

river meteor
#

I assume I can just fix it by inserting it with quotes in the sqf, using SQL

rotund cypress
#

Most likely some full screen one as well

tough abyss
#

What are you storing in the database ? Player name?

river meteor
#

yes

tough abyss
#

The idea with SQL Protocol, you store strings in VARCHAR & arrays etc in TEXT datatype (Its basically legacy method)
If you use SQL_CUSTOM, you got alot more fine tuned control for what it will do

river meteor
#

Is extdb3 expensive to use? I want to avoid actually storing arrays and using relationships between tables instead, but this will result in more queries

tough abyss
#

If you are using async method talking to extension, those queries are happening in another thread.
Best way is to just try it out, but you should be fine

river meteor
#

Cool, appreciate the solution for my lack of quotes problem. Would have taken me a long time to figure that one out

tough abyss
#

Pretty sure thats the old method for writing c# extensions for arma, better ways todo c# extensions these days.
(Maca134 has a blog entry showing how, and same method used in a3 samples)

If you are talking about the c# database that used A2Net, i i was under impression extDB extensions replaced using it for Database communication.
(Firefly actually helped me out with intial switching over to CMake Build system)
Also under impression it was awkward todo multiple queries and it couldn't handle results that went over extension return size limit
But i never used it myself.

tough abyss
#

That is there issue, yeah a2net life servers had some bad code to make queries safe & make sure only 1 query ran at a time.
Also its completely beyound your ability to fix thoses issues, since you aren't server owner or dev

#

Also extDB extensions are flexible if something isn't working for something in particular i.e crates on a server. Its 99% because someone messed up SQL Queries or SQF code.

rocky marsh
#

is there anyway to log the computers time in arma?

lone glade
#

outside of extensions no

crude temple
#

anyone have time to help me with a few grenade scripts?

#

mustard, tear, and sleeping gas

tough abyss
#

@rocky marsh there's time stamps in the rpt logs which are based off of the computers time, so technically sure

ivory nova
#

Am able to cycle through this loop fine, but only one marker gets made, the first one. Any obvious tells as to why that might be?

#
    for "_i" from _y0 to _y1 step _secY do {
        _y0 = _y0 + _secY;
        _secArr set [1, _y0];
        private _markerName = toString _secArr;
        [_markerName, _secArr, _markerName, "hd_dot", "ICON", 1, [1, 1], "ColorBlack", 1] call RND_fnc_getMarker;
    };
    _x0 = _x0 + _secX;
    _secArr set [0, _x0];
};```
#

getMarker just creates a marker with optional params

#

(Attempt was: start at xy coords, create markers at predefined intervals along y axis, return to x position, increment x by predefined number, repeat y increments, repeat all this until stepped through all increments of x. hoping to end up seeing a grid of markers, etc.)

little eagle
#

Shouldn't it be createMarker, and not getMarker?

ivory nova
#

yep, but that's a function i wrote myself for practice

little eagle
#

I don't see _x0, _x1, _y0 etc. being defined anywhere.

ivory nova
#

I defined those earlier on in the function

#

Am I still able to use them in a loop?

little eagle
#

Error is probably somewhere not shown here.

ivory nova
#

Hm

little eagle
#

Sure it only creates one marker and not thousands all in the same spot?

ivory nova
#

Nope! I should check that

#

I'll double check the variable logic too, thanks!

little eagle
#

What is _secX supposed to be anyway? Distance between points on the x axis?

ivory nova
#

Yep

#
private _secY = _height / _rows;```
#

From

#
private _columns = floor(sqrt(_sectors));
private _rows      = ceil(_sectors / _columns);```
little eagle
#

Then why do you increment _x0? (x0 + _secX;) and not just use _x from the for loop?

#

For loop already increments it, so you're doing it twice for no reason. Making the function look more complex than it has to be and therefore harder to debug.

ivory nova
#

Hey good point

#

That really should decrement y0 back to x0 for the next loop I spose

little eagle
#

Also using floats as step in a for loop a bad decision imo. They usually operate with integers. I don't trust the rounding and how the game might handle the iterator being slightly larger than the final value.

ivory nova
#

Hm

#

Could I get around this with floor/ceil? Or is there a better way?

little eagle
#

for "_x" from 0 to (_colums - 1) do {
is usually what is done.

ivory nova
#

I'll give it a shot

#

Thanks!

#

Also I noticed this

#

"private <array>" and "private <string>" are deprecated. Consider using the private modifier directly at variable initialization i.e.: private _var = "value";

#

Does that mean I should be using private like this from now on? ```private _x0 = _p1 select 0;
private _y0 = _p1 select 1;
private _x1 = _p2 select 0;
private _y1 = _p2 select 1;

private _length = (abs(_x1 - _x0));
private _height = (abs(_y1 - _y0));```

little eagle
#

Where does it say that?

ivory nova
#

The private tooltip in the VSC SQF extension I have

little eagle
#
_p1 params ["_x0", "_y0"];
_p2 params ["_x1", "_y1"];

private _length = abs (_x1 - _x0);
private _height = abs (_y1 - _y0);

imo

ivory nova
#

Didn't see it on the wiki so thought I'd ask

#

Oh, wow, I can do that?

little eagle
#

I wouldn't call private string and array deprecated, but there is no reason to use them as the keyword version is better in every way. And everyone who disagrees is a fraud or contrarian.

#

Oh, wow, I can do that?
Yes.

ivory nova
#

😮

#

Awesome

#

Way more elegant

little eagle
#

Agreed.

tough abyss
#

Hell arma still supports SQS 😃

little eagle
#

For everyone who wants to use goto I suppose.

ivory nova
#

I remember hearing about a big update to the scripting language not too long ago, is that still planned?

little eagle
#

Not in A3.

ivory nova
#

Ahh

tough abyss
#

You are hearing voices

ivory nova
#

It told me to burn things

#

It forced me to make this script shit

#

Was described as C# like, which was nice

little eagle
#

I think it actually tries to tell you to get some sleep xD

ivory nova
#

😃

#

Not 4PM here yet

#

But good recommendation either way

#

@little eagle By, not in A3, I assume that means you have info on A4

#

hmu with the secrets

little eagle
#

There is no announcement for A4 afaik, ánd the C#-ish language is called EnScript or EnForce and they make it for the Enfusion engine iirc.

#

Which is a split from RV before A3.

ivory nova
#

Ahhhh, that's right, remember hearing that name

#

Guess I better add learnC# to the list

little eagle
#

If I had to make a bet then I'd say sqf (and sqs) stays in A4. But what do I know.

ivory nova
#

I bet you're right!

little eagle
#

Oh, as of today, Enfusion/DayZ game is 4 years old.

ivory nova
#

Was that ever usable by the public?

little eagle
#

DayZ? Sure. They call it Alpha, but might as well call this game Alpha.

ivory nova
#

Oh, I meant Enfusion 😃

#

I haven't touched DayZ since launch though, maybe time to see what has changed

peak plover
#

They kept developing and releasing 'dlc'. Which is pretty much another word for `It's alpha

#

Should do same for dayz, so we could get our hands on enfusion propper

little eagle
#

I haven't touched it either. Don't own it and have no interest in it. And afaik, EnScript is still wip.

peak plover
#

Also PUBG said they 'might' get modding in the future very early on

#

So I'm sure if they do, some modders move to that

little eagle
#

I don't even know. Does DayZ have mods like A3?

peak plover
#

Noooo

#

I heard door locking was a mod before they added it to game

little eagle
#

So yes it does have mods?

peak plover
#

Previous engine was copy pasta from like ToH

#

or some shid

#

So I assume everything for mods worked like in normal games

little eagle
#

Can't find any news on EnScript that aren't like a year old. Who knows, maybe they've given up. ¯_(ツ)_/¯

peak plover
#

Yeah, been quiet

#

i think dayz has been to release (current year) + 1

#

since first a release

little eagle
#

4 years as of today.

#

That's mind boggling.

#

Also I'm getting old.

peak plover
#

Meanwhile modders have most of the dayz features in arma mods

little eagle
#

That's what drives Arma. The scripting support. (Mission or mod is secondary)

#

So if you drop that = game is dead on arrival.

peak plover
#

Yeah

#

So

#

Either they fully fledge it out 100% autist mode with deep features like clipping your toenails which grow to cleaning your gun and having to assemble a gun 1 splint at a time.
Or they have mod support so people can have features they would really like to have

little eagle
#

We got enum warnings in an update 2 weeks ago. I can't believe they're going to get rid of SQF and waste time on stuff like that.

#

Although you never know.

#

Or they have mod support so people can have features they would really like to have
Really strange that what was essentially a mod forgot about that apparently.

little eagle
#

ARMA3 The very first game to graduate from Early Access.
The oldest game still unfinished has been in Early Access for 4 years, 8 months, 22 days. DayZ in particular has been in Early Access for 3 years, 11 months, 26 days.
Funny how these things work out.

peak plover
#

I liked the mod. Literally every other mod turned game

still forum
#

Well it's not like enum errors would be hard to add...

#

We already know they did it "quick quick" instead of implementing it properly

little eagle
#

And how do we know that?

#

And even if it's easy, doesn't explain why you'd add it to something that's being phased out.

tough abyss
#

Alot of dayz has been rewritten, it prob would require to much work to add support for SQF i.e look what happend with java support in arma3.
Plus its alot easier to drop support for it when doing a new engine, otherwise why bother making up a new scripting language in first place.
I would suspect they would use/fork dayz sa engine, for next arma game (if/when they announce it)

Imo they prob just have some people to maintain arma3 to keep community alive until they release dayz modding support / announce arma4.
On plus side some of the small changes they been doing are aimed at content creators / catching common errors i.e skeleton errors / enum errors etc

still forum
#

it prob would require to much work to add support for SQF You mean no SQF in Enfusion because too much work to add?

#

@tough abyss

tough abyss
#

That is what I would assume, last I heard they were/had stripped out last bits of sqf. Or that could in next patch.
But I don't keep up in dayz SA Dev blogs

still forum
#

Enfusion engine already has SQF support.
Enscript has a executeSQF command.

#

so...

peak plover
#

getDammage 2001-2017 'You've dammaged my brain

#

rip

#

Hmm

#

So.... everything sqf works in enscript?

#

Or only commands?

still forum
#

Until now yes. Might be removed later but we don't know that

tough abyss
#

Am on phone will link later. But they plan on complete sqf support removal from days sa

peak plover
#

okay good

still forum
#

I know that they want to remove all SQF scripts. But I didn't hear a word about removing SQF support

tough abyss
#

That's what they wrote one sec

#

On
DayZ Status Report Highlight: 7 Feb. 2017 - 0.62, Beta & Animations Update

still forum
#

"complete removal of SQF support" interesting

jade abyss
#

i told you, Dedmen

#

¯_(ツ)_/¯

lone glade
#

interesting

P.E.R.F.E.C.T

rancid pecan
#

hello everybody

#

if ((typeOf _container) in ["Box_IND_Grenades_F","B_supplyCrate_F"]) exitWith { _house = nearestObject [player, "House"]; if (!(_house in life_vehicles) && (_house getVariable ["locked",true])) exitWith { hint localize "STR_House_ContainerDeny"; true; }; sleep 3; [] call SOCK_fnc_updateRequest; };

#

how to add delay sleep 3; ?

#

sleep 3; [] call SOCK_fnc_updateRequest; don't work

still forum
#

add sleep 3 and don't run in unscheduled

warm gorge
#

Are there any known issues with radioChannelAdd? Im using it to add players to a few channels when they first spawn as well as respawn/get revived but for some odd reason the channels their meant to be in wont be available randomly. radioChannelAdd is being called on the client, using publicVariable'd channel ID's created on the server btw.

still forum
#

problem after respawn?

warm gorge
#

Honestly cant say ive identified when it happens, just that randomly people will complain that they dont have the certain channels. Issues only started happening when I changed from calling radioChannelAdd from the server to the client, but surely thats not the issue

subtle ore
#

@warm gorge Then have the idiots that complain a reason to give you when it happends

warm gorge
#

Yeah I wish it was that easy haha

subtle ore
#

Lol :D

lone glade
#

it is, add logging, ask for RPTs -> done

subtle ore
#

The biki doesn't specify local or global effects for radioChannelAdd

#

@lone glade I am assuming in this case there were none

warm gorge
#

Yeah I think ill just add in some diag_log's to the script and whenever someone reports it just get em to send it to me. And yeah theres not much info on the command, however ive seen some people execute it on the server, and others on the client.

lone glade
#

make 2-3 tests to determine if it's AG / AL and, or EG / EL and be done with it.

warm gorge
#

How could I do that in regards to this issue?

lone glade
#

check if the command works when giving local arguments that aren't local to the machine running the command

#

check if the channel is added remotely if it's ran on an other machine

peak plover
#

run command on server. see if there are resulkts on client

#

Why did I not think of this? What a trick

subtle ore
#

The radioChannelAdd takes clients in an array, so it's possible it's a global command

lone glade
warm gorge
#

I used to run it on the server and it was fine. Now I run it on the client and its fine 99% of the time except it somehow bugs out every now and then

peak plover
#

It says SE

#

Meaning it MUST be executed on server

warm gorge
#

Thats for radioChannelCreate

lone glade
#

I also wanna point out those are TKOH commands

subtle ore
#

Adding the channel though is different

lone glade
#

considering radioChannelAdduses the ID returned by create the same limitations would apply

subtle ore
lone glade
#

otherwise it'd be completely stupid design

warm gorge
#

If it could only be run on the server, I wouldnt be able to add units to them on the client which I can

subtle ore
#

That would make sense

peak plover
#

radioChannelAdd should work on client

lone glade
#

woops, wrong one

#

huh, I was sure there was an other way to create custom channels, apparently not

peak plover
#

radioChannelCreate?

#

create on server and then use add on client to add that one to the client

tame portal
#

@little eagle Wait wait wait

subtle ore
#

Gross

tame portal
#

C#-ish language?

wind sapphire
#

looking for tips for referencing jpgs located in A3\addons\editorpreviews_f\data\cfgvehicles. does anyone know how I should format the path? For example:

#

_pic = format["a3\editorpreview_f\cfgvehicles%1.jpg",_picClassName];

peak plover
#

macrs are fine

subtle ore
#

@wind sapphire You shouldn't be having to do this:

private _classes = "(configName _x) isKindOf 'Car' && isClass _x" configClasses(configFile >> "CfgVehicles");
{
    diag_log format["%1's Editor Preview Path %2",_x >> 'displayName',_x >> 'editorPreview'];
true
} count _classes;
#

I haven't had coffee yet so don't shoot me quite yet

tame portal
#

@still forum I actually thought they had already removed all of SQF code

#

But I can still find plenty of them in the game files

still forum
#

they want to

#

they still didn't push that to release

peak plover
#

There's only so much 1 man can do

#

Dan halls have his arms full juggling multiple games, removing sqf is last thing on his mind

subtle ore
#

iirc Dan Halls left

#

and for the better

#

BUT

peak plover
#

true

#

Well, time to make the most of sqf while it still lasts

subtle ore
#

Honestly, I thin we still have a few years left

lone glade
#

dean hall for one, and he left years ago

#

not only that, he wasn't a lead dev

subtle ore
#

👀

#

@lone glade You may wake Dwarden 😦

lone glade
#

and removing the sqf layer is a massive but required undertaking

tame portal
#

Ermagherd

#

The new UIs are made with XML files

#

lol

#
// ---------------------
CGame CreateGame()
{
    Print("CreateGame()");
    g_Game = new DayZGame;
    return g_Game;
}

peak plover
#

Wait whaat

tame portal
#

Wait im so confused

#

What the hell

#
class PluginDeveloper extends PluginBase
#

What kind of mix is this

#

This is more and more looking like a high level C language/java

jade abyss
#

Enfusion?

tough abyss
#

looks sexy

#

is enfusion released?

jade abyss
#

DayZ SA?

tough abyss
#

no like the rework they were working on, is it realeased?

still forum
#

no

wind sapphire
#

@subtle ore, I'll try that. I did before but perhaps I was using the wrong syntax. Thanks for the feedback and quick reply.

velvet merlin
#

is there a function or simple to way if a vehicle has a proper gunner?

still forum
#

gunner vehicle is not proper?

velvet merlin
#

or is one to iterate all turrets for hasGunner and skip the FFV ones

#

sorry - speaking of parsing cfgVehicles

little eagle
#

fullCrew

velvet merlin
#

primaryGunner = 1; should be it

quartz coyote
#

Hello Friends,

Is there a way of displaying the vanilla score at the end of a mission without pressing "P" ?

#

like on Debrief or something

peak plover
#

Yes

quartz coyote
#

but this is for only one player ... how can i get the full scoreboard ?

simple solstice
#

foreach it for allPlayers

errant jasper
#

You will probably have to let the server store the information, if you want it to work at the end for players who disconnect ingame.

quartz coyote
#

@simple solstice like this ?

{getPlayerScores _x;} foreach allPlayers;
errant jasper
#

Yeah, but you probably want to store it somewhere:
_scores = allPlayers apply {getPlayerScores _x;};

quartz coyote
#

and then how do I display them on the screen ???

errant jasper
#

If it has to look better ugly, you probably have to make your own dialog.

#

Maybe the best approach would be to find out how to active the original scoresboard dialog, via scripting instead of pressing the key.

quartz coyote
#

that's what I originaly intended to do ...

#

I'll do it another way. thanks anyways !

errant jasper
#

@quartz coyote Found it: createDialog "RscDisplayMPScoreTable";

quartz coyote
#

@errant jasper you rock dude... Thanks a lot

little eagle
#
createDialog "RscDisplayMPScoreTable";
private _display = uiNamespace getVariable "RscDisplayMPScoreTable";

private _ctrlGroupPlayers = _display displayCtrl 102;
private _ctrlGroupScores = _display displayCtrl 103;

private _y = 0;

{
    private _name = name _x;
    private _scores = getPlayerScores _x;
    _scores params ["_killsInfantry", "_killsVehicle", "_killsTank", "_killsAircraft", "_deaths", "_killsTotal"];

    private _ctrlScores = _display ctrlCreate ["RscDisplayMPScoreTable_LineTemplate", -1, _ctrlGroupPlayers];
    _ctrlScores ctrlSetPosition [0, _y];
    _ctrlScores ctrlCommit 0;

    private _ctrlRanking = _ctrlScores controlsGroupCtrl 106;
    private _ctrlPlayerName = _ctrlScores controlsGroupCtrl 107;
    private _ctrlKillsInfantry = _ctrlScores controlsGroupCtrl 108;
    private _ctrlKillsVehicle = _ctrlScores controlsGroupCtrl 109;
    private _ctrlKillsTank = _ctrlScores controlsGroupCtrl 110;
    private _ctrlKillsAircraft = _ctrlScores controlsGroupCtrl 111;
    private _ctrlDeaths = _ctrlScores controlsGroupCtrl 112;
    private _ctrlKillsTotal = _ctrlScores controlsGroupCtrl 113;

    _ctrlRanking ctrlSetText "";
    _ctrlPlayerName ctrlSetText _name;
    _ctrlKillsInfantry ctrlSetText str _killsInfantry;
    _ctrlKillsVehicle ctrlSetText str _killsVehicle;
    _ctrlKillsTank ctrlSetText str _killsTank;
    _ctrlKillsAircraft ctrlSetText str _killsAircraft;
    _ctrlDeaths ctrlSetText str _deaths;
    _ctrlKillsTotal ctrlSetText str _killsTotal;

    _y = _y + (ctrlPosition _ctrlScores select 3);
} forEach allPlayers;

@quartz coyote
Maybe this helps you to find a place to start. This display is fun to work with.

quartz coyote
#

@little eagle awesome ! Thanks guys !

errant jasper
little eagle
#

Seems to work, but I see no scores.

#

Maybe it only works in MP.

errant jasper
#

I think in SP, it won't show anything

little eagle
#

Yeah.

#

Guess mine is the more customizeable approach, while this might show the default in MP.

errant jasper
#

Agree. Dunno, if kill counters (kill events) are still broken with ACE, but if it is, you use a workaround, and then use your appraoch to display the real counts.

little eagle
#

They are. : (

#

It should be better with the medical rewrite, but who knows if that ever finishes.

lone glade
#

after arma 5 I think

#

at least between now and the heat death of the universe 😄

little eagle
#

Seems like that if you want something, you have to do it yourself. ¯_(ツ)_/¯

lone glade
#

why'd you think I wrote an arsenal clone

little eagle
#

You got sick of the vanilla one.

lone glade
#

me after using ACE Arsenal for a month while coding it:
"now that I think about it BI Virtual Arsenal can't be that bad"
30s later
"nevermind"

errant jasper
#

Remember, I had to tweak Arsenal also. Recall, it had some weird scope (config) issues

#

Think it has something like arsenalScope. And if it wasn't defined it would not be in the default arsenal. But if you made your own whitelist, it would still forbid items without the proper config scope.

#

I liked the concept. Just not the execution. And I also think it should work with limited amount as better way (cooler interface) to access an ordinary crate.

lone glade
#

I should've named the project arsenal 2.0

little eagle
#

Armory.

lone glade
#

nah

#

A3: Alganthe's ACE Arsenal

#

😄

subtle ore
#

@lone glade ACA?

little eagle
#

AAA

subtle ore
#

I'm obviously dislexic