#arma3_scripting

1 messages ยท Page 322 of 1

tough abyss
#

well the execVM has other contents and what not so i threw that action in there

#

but it seems that the action isnt visible

warm gorge
#

Wait what did you say it was working fine in

tough abyss
#

Debug console

limpid pewter
#

so execVM is a command that basically runs a script that you designate, it isn't its own file, so i don't understand what you mean by "in the execVM"

warm gorge
#

Add top of initPlayerLocal add this:

waitUntil {!(isNull player) && (player isEqualTo player)};
tough abyss
#

lol

#

you're right

#

i forgot about this ^^

warm gorge
#

๐Ÿ‘

icy mauve
#

@vapid frigate @limpid pewter Since nothing works, I'll just enable UAVHacker and use the fancy animation for something else.

limpid pewter
#

ok

icy mauve
#

Or I might rename the action "to prepare hacking" and then you can go up to the drone and actually hack it.

limpid pewter
#

yeah sure

icy mauve
#

Or I have an even better Idea that fits the scene

limpid pewter
#

you should still try to look for a comman/function that selects an action of "action name" just to make ssure you can't select the action using a script

icy mauve
#

Well, for the action to be shown in the action menu, it needs to be available. If it's available it's kinda pointless right?

#

But where can I find proper sources in the Arma files? Maybe I can copy the code from the "Hack drone" into my mission.

limpid pewter
#

you can hide action so that the player can't see it, but the script can

#

actually yes, taht sounds like something to investigate, find the Hack Drone script see how it works, and try to use that

#

sounds like the best option

icy mauve
#

How am I supposed to find that?

#

Started Notepad++ to search through my P://a3 folder

jade abyss
#

+when you search for a Function in the A3-Folder:
bis_fnc_FunctionName -> search for "fn_FunctionName.sqf" (via "search" in the Browser)

icy mauve
#

I wish there was a function for that in the first place.

#

I need to copy the source code from Arma for the UAV-Hacking Action.

#

Notepad++ is approximatley 10% done.

jade abyss
#

Thats why i told you the stuff before

icy mauve
#

I aborted it, I will use this for something else and let the UAV-Operator just hack the drone as usual.

tough abyss
#

was this ever implemented?

rancid ruin
#

should take you about 30 seconds to test it and tell us?

tough abyss
#

Well on my end no. Just wondering if it's my issue :P

rancid ruin
#

what's your script?

#

i'm not at my pc but surely this should test it

_tank = createSimpleObject ["a3\armor_f_beta\apc_tracked_01\apc_tracked_01_rcws_f.p3d", [0,0,0]];
_isSimple = isSimpleObject _tank;
diag_log format["should be true: %1", _isSimple];
jade abyss
#

-diag_Log
+systemchat
oO Why is everyone using diag_Log, when Quick-checking someting? Strange.

rancid ruin
#

i always run the game windowed, habit

#

notepad++ takes up more screen space when i play than the actual game does ๐ŸŽ…๐Ÿฟ

jade abyss
#

Same, Windowed Mode (hell, i couldn't imagine anymore to test/do stuff in Fullscreen^^)

#

As long as you just check -> Systemchat.
If you wanna copy stuff out of it -> Diag_Log ๐Ÿ˜„ (or even better: copyToClipboard)

rancid ruin
#

i feel so uncomfortable when i run arma 3 fullscreen, and not just cos the fps is lower

jade abyss
#

Also takes "ages" (~1-2s) to switch out, switch in, switch out, switch in... annoying ๐Ÿ˜„

rancid ruin
#

all my profiles are named by the size of the window, so whenever i join a server in MP (rarely) my dude is called "window-small" or "window-medium" or something

#

people must think i'm so cool

delicate lotus
#

wait the fps is lower in fullscreen

#

?

jade abyss
#

Lower Res = More FPS?!

vague hull
#

are u kidding now?

#

ofc that is

still forum
#
_test = _object setPos (position _object); if (isnil "_test") then {_test = false};
_test2 = _object playMove ""; if (isnil "_test2") then {_test2 = false};
if (_test || _test2) then {0 call (compile (preprocessFileLineNumbers "a3\functions_f\misc\fn_initCounter.sqf"))};

Here you see some beautiful Bohemia Interactive SQF code. Isn't it wonderful?

#

initCounter creates a Arma copyright splashscreen, plays music and creates a Distortion ppEffect.

vague hull
#

I mentioned it earlier, I assume this was in there for dev builds

still forum
#

Dev builds? Playing music with a distortion ppEffect?
There is another "system" in initCounter. Which waits a random amount of seconds, then plays music. Forces the player into a dancing animation and makes him smile. And tells all nearby AI's to watch him dance

vague hull
#

dev builds in like, early alpha builds or builds for events

still forum
rancid ruin
#

i'm surprised they're still relying on something made by codemasters after all these years

still forum
#

They are not. Atleast in the Steam version FADE is completly disabled

#

They just didn't clean up the leftovers

rancid ruin
#

legacy code? in a bohemia game? that doesn't sound right

delicate lotus
#

@still forum how did you do that

#

I mean, whats the code for that

#

SQF?

#
_test = "test" createVehicle [0,0,0];
#

ui

#

noice

muted hill
#

Hi chaps, it was recommended I ask here: has anyone been able to get getCompatiblePylonMagazines to work, or know if it's actually real? It is only mentioned in passing as part of the 1.70 Vehicle Loadouts article and nowhere else in the wiki or the forums, and I can't seem to get it to work with any combination I try. It's the final piece in the jigsaw of me getting my servicing functionality to support 1.70

still forum
#

How did I do what?

delicate lotus
#

the thing

still forum
#

What thing? ^^

sharp jay
#

How can i save something to the server's profile? I know i can save to each player's personal profile, but i want to save something serverside

still forum
#

execute your code serverside

#

profileNamespace setVariable ["var",value]

sharp jay
#

just use that in init.sqf?

#

or initServer.sqf?

#

Follow-up, where does missionnamespace save things to? And is it persistent across sessions

simple solstice
#

It's not saved anywhere on the disk, after disconnecting you lose the set variables.

#

On client of course

sharp jay
#

Alright, thanks

simple solstice
#

of course profileNamespace can be 'persistent', as the "documentation" shows

#
By default the variables set in this namespace will exist while the game is running. In order to make variables save permanently, use saveProfileNamespace before the game is over.
#

but if you want things to be persistent extDB is your friend

sharp jay
#

I tried extDB but i couldn't understand how to use it as i was not familiar with databases what so ever and nobody wanted to explain this shite to me. I have a lot more experience now though @simple solstice

still forum
#

@sharp jay initServer.sqf executes on the server (as the name says) sio in there profileNamespace will be the servers profile

sharp jay
#

But anyone wanna help with extDB then?

#

@still forum Thanks

simple solstice
#

well, first you need to know what do you need.

sharp jay
#

Alright

simple solstice
#

create all the tables in MySQL first that you think you will need

rancid ruin
#

just use iniDBI and move to an SQL solution later if you need to

simple solstice
#

or you can do as @rancid ruin says. but if you would like to learn how extDB works, then just check out the altis life github. i don't think there's a simpler solution.

rancid ruin
#

running an SQL database is just total overkill for small missions in my opinion

#

and if he's making missions for large groups then he'd already know how to use extDB and SQL

sharp jay
#

Thing is i'm somewhere in between

simple solstice
#

yeah it is, but its an option. it's easier to manage a mysql database than INI files imo.

sharp jay
#

i am at the stage where i need to learn how to use sql and i dont really know where to start

simple solstice
#

mysql just opens MAANY ways you could use the data from arma

rancid ruin
#

well there is about 20 million SQL tutorials on the internet, what with half the internet running on SQL

simple solstice
#

the one I used to learn from (and still visit if i don't know something)

#

but I just recommend you using a GUI based editor for MySQL (eg. Navicat)

sharp jay
#

I currently have a headless server. Could i access a database remotely with Navicat?

#

On the same LAN

simple solstice
#

Sure

sharp jay
#

Oh, neat

simple solstice
#

If you need some help/have questions about MySQL and ArmA feel free to PM me, as this is not really related to #arma3_scripting

rancid ruin
#

to be fair, if you're gonna run him through setting up extDB then you should copy/paste the basic setup of it in here because quite a few people ask how to get going with it

icy raft
#

Hi! I have a question! Is texture tiling for interfaces something that can be done in Arma 3? I haven't seen anything about it anywhere. My idea was to pack a few UI element in the same image, or maybe make an UI animation with a tiled PNG image. Thanks in advance!

I want to try to do a stacked OnEachFrame that updates an RscImage changind it's frame... But I fear of the IO lags

rancid ruin
#

tiling as in repeating a texture, or like an atlas where there is multiple sprites within one image?

icy raft
#

Atlas

rancid ruin
#

not possible as far as i know. i don't think there's any way to mask an image

icy raft
#

As far as I know of, I can't set UV pos for a RscImage

rancid ruin
#

but i reckon you could animate fine with oneachframe - it's all client side, should be fine

icy raft
#

But maybe there's a hack for it

rancid ruin
#

i wanted to test that idea a while ago but never got round to it

simple solstice
#

@rancid ruin well extDB setup is fairly easy, but the trick is how to use it. read/update/insert the DB

icy raft
#

Well, @rancid ruin, I will try to do it with a pure stackedOnEachFrame

#

Will try it

#

But each time it loads any image from HDD the game usually freezes from IO

#

Oh! Just readed the topic on hand!

rancid ruin
#

load them all up on screen at like +9999,+9999 position, then just reposition them when needed. that's the method i would try

#

people have done crazier shit in this game than animate an image, that's for sure

icy raft
#

@rancid ruin Oh!, Nice one! Didn't though of that one

rancid ruin
#

also, you could always just use a video. that's a pretty good solution if you want moving pictures generally

#

only disadvantage would be no alpha channel

icy raft
#

@rancid ruin but transparent video in RV is not a thing ๐Ÿ˜ฆ

rancid ruin
#

yeah exactly

icy raft
#

Will try the offscreen loading

rancid ruin
#

report back with how well it works pls

icy raft
#

okay

#

Another thing I'm working on: Anyone is interested in making a clientside .dll that connects with a remote NodeJS server?

#

I'm still looking into it, but I wanted to do an extDB like extension, but client side that opens a session with a remove server and queries directly through https

#

As extDB puts lots of stress in the A3 server

#

I'm looking into micovery's code and he did achieve connecting to a nodejs server locally

rancid ruin
#

ah yea i was about to link you that

icy raft
#

yeah, i am still analizing his code

#

But it want to take the ticketing system idea from extBD2 and make a https client for clientside

#

I would drastrically improve the current extDB-missions servers, as all the load would be distributed to each client

#

it*

#

Anyone interested? ๐Ÿ˜„

dusk sage
#

Whitelisting might be a pain

icy raft
#

No whitelisting, real accounts like in a webpage

#

with session tokens

dusk sage
#

I mean BE

icy raft
#

ooh

#

yeah, true that

still forum
#

Could also rewrite extDB using Intercept. And use that to take a lot of load from the server :u

icy raft
#

Oh wow, it looks good

#

Wow! I didn't know about this library!!! Looks amazing!

icy raft
#

@rancid ruin Works with no offscreen!

#

And no input lags ๐Ÿ˜„

subtle ore
#

๐Ÿค”

still forum
#

with no offscreen? ๐Ÿ˜„

still forum
#

LUL

subtle ore
#

Well. This is neat.

icy raft
#

Just loading the images on the go, a single control with no need of puting eachframe out of the screen

rancid ruin
#

nice, that's about 4FPS though. wanna try it at 60?

icy raft
#

Hmm

#

Do you have that big enough of a tileset?

#

I wanna try that lol

#

i+m going to try find one that big

#

or just decompose a video or something

rancid ruin
#

just copy/paste the same ones 60 times? the content doesn't really matter if you're just testing

icy raft
#

hmm

#

yeah

#

will color the image each time it repeats itself

#

so we can tell when it repeats

rancid ruin
#

you can export gifs to separate frames in software like imageready

#

or probably some free tool online

icy raft
#

photoshop does that too

icy raft
#

success!

#

A total of 212 frames playing 60 FPS (no FPS compensation cos I'm lazy), each is PNG-24 1024x1024 (11MB total, 75kb frame)

#

Not real 60 FPS, but close enought

#

UI animations are real!

rancid ruin
#

nicely done, i had a feeling it'd work just fine

frosty cave
#

nice work

rancid ruin
#

knowing arma, displaying the hints probably uses more processing power than displaying the images

icy raft
#

hahaha

#

true that

#

Maybe I refine the code a bit and publish it in the forums or whatever

#

But I am usually too lazy

young current
#

Combine that with heavy load of other scripts runnign amok for some stress testing!

icy raft
#

Hmm

#

Don't have anything like that

#

Bah, will just spawn tons of AI and let them fight over

icy raft
#

Well, having 80 soldiers fighting each other does some rubberbanging in the animation if set at 60 FPS, but can be corrected with a good motion blur in the frameprocessing and dropping the frames to 24 FPS

#

or even a frame compesation algorithm, but im too lazy for that

vapid frigate
#

couldn't just use playVideo?

subtle ore
#

wasn't this some sort of sprite compilation though? like 4 images that played on aloop?

icy raft
#

@vapid frigate no alpha channel on videos ๐Ÿ˜ฆ

vapid frigate
#

ah ok, just saw your example and thought a video would make more sense

#

but i guess that's just a test

icy raft
#

@subtle ore Each frame is a single PNG, works well ๐Ÿ˜„

#

yeah, it was a test, but it could be used to make somewhat more interactive interfaces or screen effects

#

just learning new stuff everyday

subtle ore
#

That works

icy raft
#

The test has 212 individual frames at 60fps

nocturne basalt
#

hi. I dont know if this is the right place to ask this. Is it possible to make a more dynamic damage system to where damage is shown on a vehicle? I think it looks bad that the whole vehicle is suddenly full of bulletholes

#

can I add bulletholes directly to where Im firing?

vapid frigate
#

it's probably possible, but not really feasible

nocturne basalt
#

ok. maybe feasible to cut out smaller parts and only apply damage texture there?

vapid frigate
#

that's the only way i could think of doing it.. having lots of models or maybe modular parts or something

#

still wouldn't be very accurate without a crazy number of models though

#

and would likely hurt performance

nocturne basalt
#

yeah. wouldnt be worth all the trouble I guess

#

I dont expect to see BI add a similar system like that of GTA V in Arma ^^

vapid frigate
#

yeah i sorta think you've got better chances of Rockstar making a milsim game

#

(not that they're very good still)

limpid pewter
#

Hey, im trying to createDialog a menu as soon as a player spawns into the server. To do this i run a script called menuInit.sqf which calls the necessary functions. When i put nul = execVM "menuInit.sqf"; and a respawn EH to run same script on respawn, it doesn't bring up menu until i run the script through debug or the player respawns. Why might this be?

#

Btw i have tried putting it into the initPlayerLocal.sqf and it still didn't work

#

I am thinking that it is trying to run the script before the player's unit has spawned into the world, hence why the script doesn't do what it is supposed to.

vapid frigate
#

it's not really immediate, but that's an event for after the loading screen(s)

limpid pewter
#

ok, so instead of putting the execVM in the unit's init, i should have an event hanlder and then run script from that?

vapid frigate
#

you can also do stuff like waitUntil {sleep 0.1; player == player }; or waitUntil { sleep 0.1; !isNull (findDisplay 46) };

#

yeah, if you add the event handler in initPlayerLocal (or any init/preinit), it should work

limpid pewter
#

ok cool thanks dude

#

its weird tho coz it was working fine a little while ago from tthe uni

#

t's init, but then now it failed

vapid frigate
#

yeah it might depend on timing

#

what other scripts are running, what AI is loading, etc

#

and your PC speed

limpid pewter
#

no ai, all players on server, and that's the first script running

#

anyway that EH will work

#

thanks

vapid frigate
#

np

#

it's a bit later than i'd like

#

would be good if it ran the instant the loading screen faded (for like a splash screen)

limpid pewter
#

yeah that may be a problem, will look into it

limpid pewter
#

I have an array _spawnpoints = [ [[13772.8,18906.2,7],nato_base_camtarg,[13774.1,18931.3],"Base"], [[14242,18298.2,5],aflag_camtarg,[14270.6,18284.8],"A-Petrol Station", [[14016.8,18499.9,7.59484],bflag_camtarg,[13988,18442.4],"B-Playground"], [[14029.7,18626.7,8.86074],cflag_camtarg,[14053.4,18605.5],"C-Church"], [[13977.4,18907.4,10.6956],dflag_camtarg,[13996.9,18807.9],"D-Contrustion Site"], [[14436.6,18639.3,10.0369],eflag_camtarg,[14404.7,18632.4],"E-Cemetry"], [[14373.4,18916.9,11.9863],fflag_camtarg,[14384.8,18879.6],"F-Industrial Area"] ];

#

i need to take the spawn name from each index of the array,

#

spawn name is the fourth index of each array

#

will this script grab that spawn name from each array and put it into an array called _spawnNames {_spawnNames = _x select 3;} forEach _splist;

#

?

halcyon crypt
#

no

#

it'll constantly overwrite _spawnNames with whatever is in _x select 3

vapid frigate
#

_spawnNames = _spawnPoints apply { _x select 3; };

halcyon crypt
#

or that ๐Ÿ˜„

limpid pewter
#

ok thanks, idk why, but working with arrays confuse me

vapid frigate
#

unfortunately you're gonna have to get very used to it for SQF

icy mauve
#

@limpid pewter if you ever worked with PHP, all you can think of are arrays and SQF is in some parts similar unfortunately.

#

I always liked advanced Data structures such as HashMaps as you can find them in Java.

#

In JavaScript you can make an Object on-the-fly and put those in an array, that's even better.

#

But SQF doesn't have such a thing as far as I know.

icy raft
#

Hi! What's brewing here?

scarlet temple
#

Is there a way to make a script online one time executable? I added some menus to ace and put an exec command in my init.sqf.. but when a player dies or even respawned the init.sqf will be executed again and i have every menu point twice in my ace....

#

nothing ๐Ÿ˜›

icy raft
#

Okay hahaha

cedar kindle
#

init.sqf does not run on respawn

scarlet temple
#

hmm....

#

what can i be then....

#

thx anyway !

cedar kindle
#

you have a script that runs init.sqf on respawn? ๐Ÿ˜›

scarlet temple
#

no

#

No.. just checked.. nope ^^

icy raft
#

But wait, you want it to execute once in mission load or you want to execute it for each player once? or how does it work?

icy mauve
#

@scarlet temple but to answer your initial question: You can alwyas set a boolean at the end of a function and check for the boolean on startup.

#

That way it can only execute once

scarlet temple
#

But when i set a request for that on the beginning like "If (_executed) exitwith ()" it calls "unknown expression in variable"... so i had to add _executed = false in front.. what make this wothless ^^

icy mauve
#

use setVariable

still forum
#

_executed is a local variable. And you expect a local variable to be global? ^^

scarlet temple
#

i know.. it was just a example...

still forum
#

you should use isNil to check if the variable is undefined

#

if (!isNil "executed") exitWith {}
And after your code just executed = true;

scarlet temple
#

thx.. i ll give it a try... i forgot !isNil

warm gorge
#

Anyone know a workaround for camera glitches when using switchMove. Ive got a jump script which uses the AovrPercMrunSrasWrflDf animation and setVelocity to mimic a jump, but the camera jitters slightly when this is done

limpid pewter
#

quick question, is _spawn a reserved var?

still forum
#

@limpid pewter no. I'm not aware that there is any reserved local variable

limpid pewter
#

ok thanks, just having alot of trouble with something that should be simple : (

#

shall i explain, or is someone else asking quesiton?

still forum
#

Well. This channel is for scripting help so. ask away

limpid pewter
#

kk

frosty cave
limpid pewter
#

nvm Wallop u go

frosty cave
#

nah you first ๐Ÿ˜›

still forum
#

@frosty cave Can't download.

frosty cave
#

sec

still forum
#

And.. It's not like multitasking is a thing.. right?

frosty cave
#

k updated perms

still forum
#

You are using CBA-like headers. But without CBA? Interesting.
I don't see any problem here. Maybe setting the file parameter in your function entry to point directly to the script file would do it

limpid pewter
#

how i insert script properly into a discrod msg? i have been using triple back tick

frosty cave
#

Ok I'll try that next thanks. And yeah, borrowed the idea in case anything needed preprocessing (which it doesn't, but wanted to get a mod folder skeleton set up for future projects)

#

triple backtick followed by sqf highlights it

still forum
#

```sqf
code
```

limpid pewter
#

sooo sqf hint "does this work";

#

no

still forum
#

Just do it like I wrote

limpid pewter
#
hint "does did work ";
#

cool thanks

#

Ok so i am trying to pul the forth element from every element in an array (Code Below) ```sqf
_spawnpoints = [
[[14335,18046.7,13],csat_base_camtarg,[14334.2,18070.2],"Base"],
[[14242,18298.2,5],aflag_camtarg,[14270.6,18284.8],"A-Petrol Station"],
[[14016.8,18499.9,7.59484],bflag_camtarg,[13988,18442.4],"B-Playground"],
[[14029.7,18626.7,8.86074],cflag_camtarg,[14053.4,18605.5],"C-Church"],
[[13977.4,18907.4,10.6956],dflag_camtarg,[13996.9,18807.9],"D-Contrustion Site"],
[[14436.6,18639.3,10.0369],eflag_camtarg,[14404.7,18632.4],"E-Cemetry"],
[[14373.4,18916.9,11.9863],fflag_camtarg,[14384.8,18879.6],"F-Industrial Area"]
];

_spawnpoints;

#

and i use the code below to create a menu and then populate with the 4th element from each array. ```sqf
menuOpen = true;

createDialog "mainSpawnMenu";

waitUntil {!isNull (findDisplay 12034)};

if ((side player) == east) then {

_splist = [] call mld_fnc_listCsatSpawnPoints.sqf;

{spawnNames pushBack (_x select 3);} forEach _splist;

} else {

_splist = [] call mld_fnc_listNatoSpawnPoints.sqf;

{spawnNames pushBack (_x select 3);} forEach _splist;
};
_ctrl = (findDisplay 12034) displayCtrl 1500;

lbClear _ctrl; // may need to comment this out

{_ctrl lbAdd _x;} forEach spawnNames;

lbSetCurSel [1500,0];

_ctrl ctrlAddEventHandler ["LBSelChanged", {call mld_fnc_moveMenuCamera}];

#

For some reason i doesn't want to work : (

#

it seems to get errors for the calling of the functions even tho the functions are a simple array return

warm gorge
#

What errors

limpid pewter
#

1 sec

warm gorge
#

mld_fnc_listNatoSpawnPoints.sqf;

#

??

limpid pewter
#

undefined variables

still forum
#

_splist = [] call mld_fnc_listCsatSpawnPoints.sqf; invalid

limpid pewter
#

ok how?

still forum
#

is that a function or a sqf file?

limpid pewter
#

lol

#

nvm

#

just figured out ffs

#

after 2 hours of troubleshooting haha ffs

#

i need sleep haha thanks for patience

#

oh yeah, while i have got you guys there, is there any other rreason as to why the script wouldn't put 4 element of each array into the var called "spawnNames" that you can see?

#

or that is do you think it will work?

still forum
#

_spawnpoints select {_x select 3} returns array of every 4th element of spawnpoints

#

your code does the same though

limpid pewter
#

isn't _x a reserverd var tho?

#

how could your code there work?

still forum
#

no it's not.

#

okey yeah.. select might not work..

#

_spawnpoints apply {_x select 3}

#

there. Applies statement to each element in array and returns resulting array

limpid pewter
#

ok

#

but isn't _x only for when using the forEach command tho?

still forum
#

no

limpid pewter
#

oh?

still forum
#

you can use it everywhere you want

#

It will just get overwritten when you use forEach

limpid pewter
#

so if im selecting 3 of array _x, where is _x defined?

still forum
#

Not even sure if forEach would overwrite it.. I don't think so. It will just be different inside the forEach code

#

_x is the element of the array

#

just like forEach

#

apply works like forEach. But returns an array of what you return in the apply statements

limpid pewter
#

ok so that makes sense, because im using multi-dimensional arrays. _x is an array

#

thanks, i think i may be able to work with this

#

DUUDE @still forum you're legend mate, fixed my code and taught me stuff about var

still forum
#

Ok.. Take a ๐Ÿช

limpid pewter
#

haha

#

thanks

frosty cave
#

ok @still forum I misunderstood how the CfgPatch attrs work. now have my servermod running but throwing errors

diag_log format ["antiAFK starting"];

_name = name player;
while { hasInterface } do {
    _lastpos = getPosATL player;
    _c = 0;
    sleep 60;
    while { (getPosATL player) isEqualTo _lastpos } do {
        _c = _c + 1;
        switch _c do
        {
            case 5:
            {
                player systemChat (_name + " you have not moved for 5 minutes and will be kicked if stationary for another 10.");
            };
            case 10:
            {
                player systemChat (_name + " you have not moved for 10 minutes and will be kicked if stationary for another 5.");
            };
            case 14:
            {
                player systemChat (_name + " you have not moved for 14 minutes and will be kicked if stationary for another 1.");
            };
            case 15:
            {
                player systemChat (_name + " you have not moved for 15 minutes and are being kicked.");
                sleep 5;
                ("#kick " + profileName) remoteExec ["serverCommand", 2];
            };
        };
        sleep 60;
    };
};

yields

15:40:54 Error in expression <_c + 1;
switch _c do
{
case 5:
{
player systemChat (_name + " you have not moved>
15:40:54   Error position: <systemChat (_name + " you have not moved>
15:40:54   Error Missing ;
15:40:54 File \WALOP\functions\events\fn_antiafk.sqf [Wallopafk_fnc_antiafk], line 14
still forum
#

systemChat only accepts one argument

frosty cave
#

ah i assumed it would concat those into a string, very very new to arma scripting

still forum
#

it would

#

you are giving systemChat player and a string as argument

#

but it only takes one argument on the right side

frosty cave
#

ah ty

frosty cave
#

it runs, log happens, but no systemChat fired. am I missing the init order of things? is it possible this isn't being run on the client since loaded as servermod?

still forum
#

servermod ofcause doesn't run on client

#

how would it?

frosty cave
#

LOL. i got the impression that servermod code could run on client (dudas rapelling mods etc)

austere granite
#

Those usually have some specific way of sending the require code to the cilent

frosty cave
#

ah ok that makes sense

still forum
#

you can remote exec the function on all players

#

if you set the remoteExec JIP thingy you only have to remote exec once on all clients

#

and it will get added to the JIP queue

frosty cave
#

hits the books

sharp jay
#

I have extDB3 on my server connected to a database, but how do i actually use it?

frosty cave
sharp jay
#

So, i wanna have persistent player inventories, and i already have a script that gets the inventory data from the players, but how do i add that to the database

loud python
#

After setting an AI to green combat mode, how can I keep it from just switching back to yellow?

#

(because it actually does that)

muted hill
#

Hi chaps, tried asking this yesterday but no reply: has anyone been able to get getCompatiblePylonMagazines to work, or know if it's actually real? It is only mentioned in passing as part of the 1.70 Vehicle Loadouts article and nowhere else in the wiki or the forums, and I can't seem to get it to work with any combination I try. It's the final piece in the jigsaw of me getting my servicing functionality to support 1.70

#

Aaaand disregard, just seen my thread got replied to. Ta anyway! ๐Ÿ˜ƒ

loud python
#

Is there really no command to check if a unit can see another? or am I just too stupid to find it?

boreal edge
jade abyss
#

Okay: anybody willing to lend me hand/some time with the VectorStuff?

oblique spoke
scarlet temple
#

Me... again ... i try to check if value in a variable is a number or not.. IsNumber is something else and IsNil can work only with strings.. any idea?

still forum
#

_variable isEqualType 1

#

read as value in variable is equal type as number

scarlet temple
#

If(_variable isequaltype1) Then ??

still forum
#

Why would you ever get to the Idea to use isNil to check what type something is?

#

No.

#

if (_variable isEqualType 1) then

#

spaces are important

scarlet temple
#

a found

#

thx

still forum
#

And making everything lowercase is bad for readability

scarlet temple
#

<--- linux idiot... ^^ all in lower cases

#

but k ๐Ÿ˜„ I'll give it a try.. thx for the hint

loud python
#

Still struggling with this problem, how can I keep AI from just changing its own combat mode back to whatever it wants?

lunar mountain
#

Greetings! Help me out here. I want to export some asset previews, although the screenshot command is not working at all. It does create the folder structure, but it does not save the actual screenshot. Any known issue about the screenshot command? Now I'm trying with the "normal" profile (arma 3 folder instead of Arma 3 - Other Profiles) but I get the same issue.

queen cargo
loud python
#

you mean autocombat?

#

does that also disable changing combat mode?

queen cargo
#

"AUTOCOMBAT" - disables autonomous switching to COMBAT when in danger Available only since Arma 3 v1.56.

#

you still can switch to combat mode
you just have to do it yourself

loud python
#

not that combat mode, the other one

ionic hemlock
#

why does BIS_fnc_findSafePos return a number instead of an array sometimes?

loud python
#

setCombatMode not setBehaviour

ionic hemlock
#

I'm running that command and sometimes it spits out an array, sometimes a number

#

but it should never be a number

#

hm just had to increase the range

vague lichen
#

@sharp jay presuming you have the database configured and a table made ... and your mission is configured to properly initialize and use it ... just write the code you need to send whatever you want to the database.

#

Check out Exile or Alive mods if you want to see how they use extdb3 in practice.

tough abyss
#

@tough abyss @tough abyss regarding the ai balancing tool. shame that network costs eat up the benefits.. it is 'released' as a part of this mission: http://steamcommunity.com/sharedfiles/filedetails/?id=926135666 if I work on it some more, learn how to make a ui properly with more options, I'll put it out standalone.

#

@tough abyss thanks will try it out ๐Ÿ˜„

nocturne iron
#

@tough abyss that's still pretty cool, means there's less of a 'hard limit' on performance of servers, as one could theoretically get a much faster connection than a more powerful server

kindred kayak
#

I probably missed it, but did the latest 1.72 patch / RC change the way that aiming precision is handled? (in wind or any other situation) I'm noticing a lot of randomization in aiming through optics with x,y as the mouse is moved.

limpid pewter
#

Not sure ;\

#

Hey if anyone knows, how would i go about making displays that stay on the screen. Kinda like the ones found in KOTH or Life for the money, score, etc...

#

I could create dialogs for it, but i have a feeling thats not the best way to do it

#

i want these dispays to show the score at the top of the screen, player

#

player's health %, etc...

vapid frigate
limpid pewter
#

ok, but will this display be interactable? because that would defeat the purpose

#

ok

#

cool,

#

i really didn't want the display to go away when a player presses esc.

#

thanks

#

also, what is display 46? i know its used for keydown EHs, is it just a generic player display?

vapid frigate
#

yeah that's where your ammo, etc are

limpid pewter
#

so it's kinda like the over arching display for the whole UI in arma yeah or no?

vapid frigate
#

for the ingame HUD

limpid pewter
#

aahh thanks cool

#

that makes alot of sense

limpid pewter
#

I know at this point my endless questions are probably starting to get annoying, but does anyone know of way to dis allow calibers smaller than .338 from damaging the tyres of a vehicle like a marid?

nocturne iron
#

@limpid pewter use cutRsc and a script that updates the text controls of the display to reflect a change in score

#

Also, feel free to ask questions - that's what we're here for

limpid pewter
#

haha ok will do then

nocturne iron
#

I'd read up on the handleDamage EH for your marid case

#

I personally don't have a ton of experience with it

limpid pewter
#

ok

nocturne iron
#

But you should be able to implement a check that detects the class of the ammo hitting it, and denying ammos smaller than .338

limpid pewter
#

i was thinkin there may be a what to use the vehicle cfg to change the damage recieve for te wheels

#

aahh

#

thats sounds like the way to go, nice an simple

nocturne iron
#

That would be the best way to do it if you're modding, but the EH is pretty performance light

#
  • you only need to apply it to marids
limpid pewter
#

ok thanks

nocturne iron
#

And the scriptโ€‹ will only be an if () then statement so you'll be fine

#

Making a mp gamemode?

limpid pewter
#

yeah, a little battefield like gamemode for my bf3 friends to come try, hopefully it will convince them to play arma ๐Ÿ˜›

#

thanks for the help anyway

#

will look into it

nocturne iron
#

No worries, keep a look out for sample Configs too

limpid pewter
#

oh?

#

nvm, just googled, i understand, thanks

limpid pewter
#

is this a valid cFg functions? ```sqf
class mld
{
tag = "mld";
class spawnSystem
{
file = "functions\spawnSystem";
class spawnMenuCamera {};
class selectCamPosition {};
class listNatoSpawnPoints {};
class listCsatSpawnPoints {};
class spawnPlayer {};
class moveMenuCamera {};
class createSpawnMenu {};
};

class kitSelection
{
    file = "functions\kitSelection";
};

};

limpid pewter
#

hey quiick question, what is the muzzle name of a weapon, and what is it's significance?

nocturne iron
#

Muzzle is the munition fired I think

limpid pewter
#

ok thanks

limpid pewter
#

so how would i add to unit

#

ok, i only wanted to use addWeapon, coz larrow on the forrums said it would work, addWeapon Command not function btw

nocturne bluff
#

They are magazines

limpid pewter
#

ok thanks, if i know that they are magazines, i can add magazine

#

or start there atleast

leaden summit
#

So I just learnt I should be using this setVariable ["Ace_medical_medicClass", 1]; in a units init rather than listing names in the module due to JIP issues.
Doe s anyone know where exactly I can find a list of these ACE variables? Because I would like to find out what the engineer one is as well. I had a look on their wiki but it's not obvious there

vapid frigate
#

(ACE_IsEngineer)

leaden summit
#

Ok that doesn't quite fit the same format, but I guess I can dig around now you've pointed me in the right direction thanks

vapid frigate
#

yeah, it's in that function.. usually they use GVAR in which case it'd be ace_repair_isEngineer.. but i guess it's legacy code from before they did that or something

leaden summit
#

All this time I've been wondering why I've had to use Zeus to actually make my medics medics. Frustrating when there's modules in the editor and they just don't work (which as I understand it is no fault of the ACE team)

leaden summit
#

Ok so it seems while this setVariable ["Ace_medical_medicClass", 1]; is correct, this setVariable ["Ace_repair_engineerClass", 1]; is not

indigo snow
#

Well yes if you read the code on that Github page the variable is called "ACE_IsEngineer"

leaden summit
#

Yes but the code to check a medic is [player] call ace_medical_fnc_isMedic

#

It just doesn't seem consistant

indigo snow
#

The names might not be internally consistent, especially if the components were coded by different people

leaden summit
#

That's my point, while I โค the ACE guys sometime it gets a little frustrating. But that's ARMA too I guess, always feels like it's fighting you

indigo snow
#

Feel free to shoot them a pull request and fix it i guess

leaden summit
#

Oh and the code I ended up using in case anyone else is reading this and wondering
this setVariable ["ACE_isEngineer", 2, true];

#

Oh if I had the knowledge I most certainly would. That's probably why it's frustrating. when you only know enough code to "get by" things like this make it that much harder

#

Oh and just to be clear, I am in NO way ragging on ACE or the guys that work on it. The game just wouldn't be the same without them and the work they put in for free. This is more just me venting my frustration at my lack of knowledge more than anything I guess

vapid frigate
#

problem is if they fix it, it'd mess with people like yourself who are now using it

#

the 'allVariables' command is good for working out what they use too

still forum
#

AFAIK you should be able to just set a checkbox in the Eden Attributes of a unit to make them Engineer or Medic.
They probably won't accept a pullRequest that changes that variable name because many people already use it like that.

leaden summit
#

Yeah I'm not going to request anything like that, I was just venting.
I've had hit and miss experiences changing the eden attributes which is why we switched to naming the units and putting the names in the modules. Now apparently that's unreliable too, I assume due to the start up of the mission (ALiVE can take forever first server start)

limpid pewter
#

hey, is there a way to make a player climb ladders faster?

indigo snow
#

setAnimSpeedCoef whilst the player is climbing?

limpid pewter
#

nah, doesn't work

#

allthough it looks funny, they just waggle their butt faster XD

hasty matrix
#

Hey guys , i have problem on our server. Some People connecting on our Server, hanging in a deathloop. On this Server you can change sth in the Database over mySQL. I Type this to fix the Problem :CREATE EVENT Spawn_Bug_Fix
ON SCHEDULE Every 300 second
Enable
Do
DELETE FROM player WHERE damage = 1 Ialso reboot the Server to put the scheduler ON. I need help pls . Greetz Evil

dusk sage
#

๐Ÿ˜Ÿ

still forum
#

Uhm. Okey.

limpid pewter
#

Hey, anyone wanna help me fix an infinite loop?

still forum
#

if (true) exitWith {} Put that inside your loop (Obviously trolling)

limpid pewter
#

i am making a jump script, that makes the unit jump when space is pressed. The function is initialised with this code in the file initPlayerLocal.sqf ```sqf

waitUntil {!(IsNull (findDisplay 46))};

keyd = (findDisplay 46) displayAddEventHandler ["KeyDown", "(if (_this select 1 == 57) then {[] spawn mld_fnc_jumpOnSpace;});"];

#

The jumpOnSpace fnc is this ```sqf
_pSpdKH = speed player;
_pDir = getDir player;
_pSpdMs = (_pSpdKH*1000)/3600;
_Zvel = 5;

player setVelocity [sin _pDir * _pSpdMs ,cos _pDir * _pSpdMs,_Zvel];
(findDisplay 46) displayRemoveEventHandler ["KeyDown", keyd];
sleep (2);
keyd = (findDisplay 46) displayAddEventHandler ["KeyDown", "(if (_this select 1 == 57) then {[] spawn mld_fnc_jumpOnSpace;});"];

still forum
#

Why...

#

Why readd the eventhandler?

#

Just to have it disabled for 2 seconds?

#

These variable Names hurt

limpid pewter
#

lol

still forum
#

How does it loop? You keep jumping?

limpid pewter
#

i want it to allow a player to jump, then for two seconds disable the jump, then jump and so on

#

yeah

still forum
#

also keyd is a bad variable name. Any mod could overwrite that. mld_jumpKeyHandler would probably be better

limpid pewter
#

this was my orignial effort ```sqf
_pSpdKH = speed player;
_pDir = getDir player;
_pSpdMs = (_pSpdKH*1000)/3600;
_Zvel = 5;

player setVelocity [sin _pDir * _pSpdMs ,cos _pDir * _pSpdMs,_Zvel];
sleep (2);

#

ok, sorrry for my shitty var names, but it doesn't really matter too much

still forum
#

I don't see how that could loop. Besides the player just spamming spacebar

limpid pewter
#

so the last bit of code i posted didn't loop, the first did. The only reason i tried to use the first, was because i wanted to make it so the player could only jump every two seconds

still forum
#

I don't see a reason for any of them to loop :x

limpid pewter
#

me niether, i thought that once the space key was pressed, the player would jump, the Eh will be removed (so player can't press space) then after 2 seconds, the EH created againb

#

is my logic wrong or?

still forum
#

looks completly fine to me

limpid pewter
#

something to do with using spawn instead of call or something?

#

maybe something*

still forum
#

No. As I said I don't see any reason why that could loop

limpid pewter
#

ok thanks anyway

still forum
#

The only way that would get called again would be if the KeyDown eventhandler fires again

#

You can try putting some logging into your KeyDown eventhandler. Then you know if that's causing it

#

If the eventhandler is not triggering and your function still executes then it's something completly different

limpid pewter
#

ok

#

thanks will try

vestal mortar
#

can someone please upload a .sql file for arma 3 lakeside the sql file im trying to execute for my DB is failing

#

can someone answer why my sql files aint working to execute them for the DB>

still forum
warm gorge
#

@limpid pewter Set a variable like mld_jumping and check it before calling your jump script and then within the jump script [] spawn {sleep 2; mld_jumping = false;} or something

limpid pewter
#

wow yeah, i was thinking i could do something like that, wasn;t sure how, that might jsut work,

#

i will try and get back

#

@warm gorge As usuall, you are a great help, thanks

#

it worked well

warm gorge
#

Sweet

icy mauve
#

Hi, just a question. How do I remove the Actions from an item lying on the ground. I want to add an Action instead of the ability to pick it up.

limpid pewter
#

why were there actions in the first place?

#

When do you want to remove them?

limpid pewter
#

k

still forum
#

getCameraPosition ?

#

No.. How is that thing called.

limpid pewter
#

hey does anyone know the idd for the AI control/Radio menu?

frosty cave
#

I forked a mod and want to sign it for testing MP. when I pbo, and start server I get errors like \xz\foo\bla not found where xz is the previous prefix. I have tried setting the prefix to xz, and my own 'WALOP'. What am I missing?

still forum
#

@frosty cave What packer did you use to pack that pbo?

frosty cave
#

tried pbomanager and armatools

still forum
#

Both don't read PBOPREFIX files afaik. I think Arma 3 AddonBuilder has a setting for the prefix. PBO manager I dunno

frosty cave
#

hm ok I'll try again tonight - tried both prefixes in Arma 3 AddonBuilder options afaik

still forum
#

You can open the pbo in a hex editor or in notepad++. Right at the beginning it should say prefix and after that the actual prefix that the file has

#

you can compare that to the original pbo

frosty cave
#

awesome. as usual, thanks for the help @still forum - edit - confirmed it had my prefix and not the proper one, thanks for hex tip

sharp jay
#

Does getUnitLoadout and setUnitLoadout work for crates and shit?

sharp jay
#

Is While {true} do { Whatever }; Valid?

indigo snow
#

yes

sharp jay
#

Alright

#

@indigo snow And does getUnitLoadout and setUnitLoadout work for crates?

indigo snow
#

idk, try it

#

probably not

frosty cave
#

try addItemCargoGlobal

#

if trying to add stuff to your crate

indigo snow
#

thats different from trying to save and restore contents, though

sharp jay
#

Exactly

jade abyss
#

getUnitLoadout = Unit, not crate

sharp jay
#

well, a crate is an empty unit so

jade abyss
#

No

#

It's a Vehicle

sharp jay
#

i dont know how i could go about saving crates then

sharp jay
#

read through it, couldn't find anything

indigo snow
#

youll jsut have to script more

jade abyss
#

I doubt it

indigo snow
#

getItemCargo etc

indigo snow
#

save that and readd it

frosty cave
#

that example is overkill but saves vehicles with ammo and damage

jade abyss
#

hmm.. i can find alooooot functions...

#

So much for "i read through it"

sharp jay
#

didnt think about search term cargo

jade abyss
#

Anything else?

#

...

#

Read that Page, click around any Commands. Read some example. Below those, are mostly the couterparts of it linked (e.g. getPos has setPos, setPosWorld etc linked below)

#

75% of the time, you will end up in the editor, testing around Scripts.

warped fractal
#

How can I get an addaction or a holdactionadd to be global? Or atleast be local then the removeaction to be global so it can only be activated once

I've tried this

[laptop1,"Upload Proteus Coordinates","","","_this distance _target < 3","_caller distance _target < 3",{},{},{hint "test"},{},[],4,0,true,false] remoteExec ["BIS_fnc_holdActionAdd", [0,-2] select isDedicated, true];    

But that creates an interaction option for the amount of clients connected, had a headless client connect and a friend so the option appeared three times in the scroll bar

Also tried

[laptop1,"Upload Proteus Coordinates","","","true","true",{},{},{"scripts\arty.sqf" remoteExec ["execVM"]},{},[],5,nil,true,false] Call BIS_fnc_holdActionAdd; 
rotund cypress
#

In cfgRemoteExec, does anyone know what headless client would be for a number? Or would it just be either 2 or whatever the variable name is?

reef grove
#

How can I make a script that will execute functions only on the first join?

dusk sage
#

the first one to join

#

or the first time one joins?

reef grove
#

The first time someone joinsd

dusk sage
#

Well, just monitor theirs connections

#

And only execute something on their first

#

Use the server to handle it

formal jetty
#

Had a couple questions that i have been trying to solve on my own but my arma knowledge hasn't allowed me to figure out and was hoping someone on here could point me in the right direction. This is on a dedicated MP server, and im using a addaction to allow a player to spawn a vehicle on a invisible helipad. MenuObject addAction ["<t color='#FF0000'>UH1Y FFAR/MG</t>", {createVehicle [(_this select 3), (getPosATL chopper), [], 1, "NONE"];}, "RHS_UH1Y"];

#

The issue i am running into is it always spawns facing north and i cant figure out where or how to change this

#

My next question is i have tried to find a way to make the time either not change so as it always stays daylight, or a way for a member to be able to go to a addaction to advance time, this is for use on a training server also dedicated, and it uses ACE. I have tried several things but it only seems to take effect for a few moments then switches back, it does however work when testing off of the dedicated server.

nocturne iron
#

Just try adding a setDir command after the huey is spawned

#

Try a script that checks if the ingame time is past say, 17:00

#

if (_time > 1700) then {setDate 09:00)

#

ofc that's not real code so don't use it

#

but that line of programming is a good way to approach it

formal jetty
#

ah so use set date instead of set time thats probably where i was going wrong

nocturne iron
#

pretty sure setDate isn't a real command :p

formal jetty
#

On the setdir im just putting this info into the init line of the sign with the setdir still work

nocturne iron
#

if it is, I got the syntax wrong

#

Call a function that creates the huey and then sets it's direction

#

cleaner init box too that wat

#

way*

#

and it'll stop duplication of vehicle in mp environment

formal jetty
#

ah ok i will have to go do some more learning havn't got into the functions yet

#

thanks for the help, will go do some more research

nocturne iron
#

no worries

#
    _marker = _this select 0;

    _selectedVehicle = "RHS_UH1Y" createVehicle [0,0,0];
    _selectedVehicle setDir (getDir _marker);
    _selectedVehicle setPosASL (getPosASL _marker);
};```

something like that would work
formal jetty
#

k i can backwards engineer it from that after i look up functions thanks for the help

nocturne iron
#

where the function is called by [helipadname] call fnc_spwn_huey;

formal jetty
#

looks like it will clean it up alot because just one sign has 3 differnt versions of the one huey so this could make it look alot better and im guess will work alot more efficient

nocturne iron
#

you can also pass the classname of the vehicle you want to spawn to the function too, so the function works for all vehicles; but I'll let you figure that one out

formal jetty
#

sounds good won't ever get no where if I don't figure it out just needed a nudge in the right direction

#

So far ive just been taking other scripts and trying to understand them and making small changes to get to understand them been working decent but when it comes to something i cant find that makes it impossible to figure out, guess the addage that cheating will get you no where is true

nocturne iron
#

something like that :p

#

That's the best way to do it

formal jetty
#

Alright back off to the editor, thanks again

nocturne iron
#

remember biki and copying/adapting other people's scripts isn't cheating, it's just how you learn

#

cya

limpid pewter
#

Hey is there any reason why this would only add 1 grenade instead of two (yes the player has plenty of space in vest) ```sqf
player addMagazine ["HandGrenade",2];

nocturne iron
#

Anyone got an idea of how to find the impact point of an artillery strike before it's hit?

#

Trying to detect player ordered strikes too so I can't just pass the location that was ordered to strike

#

Nvm I'll just capture placed 'fire mission' waypoints ordered by zeus

thin pine
limpid pewter
#

Oh ffs haha sorry

#

thanks for tah

#

@nocturne iron If you still want to do want you said, you can use some fancy projectile motion equations, where you will need the muzzle velocity, the weight of the project, the game simulated gravity, etc...

#

with that you can figure out the range, and from the direction you can figure out the hit point

nocturne iron
#

I thought so, but MLRS rounds sort of ruin that

#
  • 2D co-ordinates suck for that on non-cardinal trajectories
sharp jay
#
_box1s = profileNamespace getvariable "box1";
box1 addItemCargo [_box1s];
_box2s = profileNamespace getvariable "box2";
box2 addItemCargo [_box2s];

while {true} do {
_box1 = getItemCargo box1;
_box2 = getItemCargo box2;
profileNamespace setvariable ["box1",_box1];
profileNamespace setvariable ["box2",_box2];
saveprofileNamespace;
sleep 60;
};```
#

Anyobdy see what is wrong with this? It is in initServer.sqf

vapid frigate
#

don't think object references could be saved to the profile namespace like that

sharp jay
#

how do you reckon i can do it then?

#

@vapid frigate

vapid frigate
#

you're trying to store the contents of boxes?

sharp jay
#

Yes

vapid frigate
#

i guess save _box1s instead

#

(i guess that's an array of strings or something)

sharp jay
#

oh

#

i knew i messed up somewhere

#

thanks

#

Wait, no

#

_box1 is the contents of box

#

and i am trying to save that to profilenamespace

vapid frigate
#

ah ok, misread sorry, that should work afaik

sharp jay
#

It is not working though :/

vapid frigate
#

itemcargo is only items.. you're not testing with a gun or something?

sharp jay
#

i put several items in the boxes

#

but it was not saving

#

Wait, so itemcargo doesnt save, say magazines?

vapid frigate
#

that'd be getMagazineCargo

#

there's also getWeaponCargo and getBackpackCargo

limpid pewter
#

Hey, does anyone know how to make a trigger activate seperately/idependently for each player in a MP mission?

#

So if a player enters the trigger, it will run the code in the statment for that player only, and then if another player enter, it will run it again, but only for that other player

#

it would be good if anyone knew of a createTriggerLocal command type thing

narrow musk
#

Hello i have a huge problem... i am using game logic markers on the map to delete buildings it works perfectly in the editor however when i move the sqm to the live server and spawn in the buildings are there... this is the code used within the game logic inside the init if anybody has any idea i would really appreciate it
{ _x hideObjectGlobal true } foreach (nearestTerrainObjects [this,[],10])

nocturne iron
#

@limpid pewter use remoteExecCall

#

@narrow musk try changing this to _this

narrow musk
#

It prompts a warning init: local variable in global space.

#

assuming that is ok to dismiss?

#

Ah dose not allow me to dismiss @nocturne iron

#

I don't have anything within the Variable Name i just placed the code required in the init maybe its that?

narrow musk
#

It just shows "***** HIDE OBJECT GLOBAL * SERVER *****" @tough abyss nothing below it

narrow musk
#

Just replaced it with the line you sent and now im getting

#
16:02:31 """Logic"""```
#

And using a file how would i go about that assuming i would need to use the map location of the house? would it work to use a uiSleep 60;

#

And thank you so much for the help @tough abyss this is the most i have got anywhere so far haha

#

I'll give that ago thank you haha :p

narrow musk
#

Ugh! its not working ill email bohemia maybe they will reply around 2020 asked a ton of people nobody could get it working spending too much time on it.

indigo snow
#

hideObjectGlobal seems broken on a dedicated server

#

remoteExec hideObject to all clients instead

#

or just put hideObject in the init box

#
    sleep 60;
    {
        _x hideObject true;
    } foreach (nearestTerrainObjects [_this,[],10]);    
};```
narrow musk
#

(O)_(O) It works!

#

Hahahaha thank you so much!! and to you too @tough abyss

indigo snow
#

Stable

#

on dedicated MP?

#

I can't but thats an interesting fact

#

i mean i might

#

but not at pc atm

#

aight, i'll take a look into it then

rotund cypress
#

Hey guys, if I want to create a child display from a parent display, yet I still want it overlapping the other display, so I then see both displays. Is this possible through createDisplay somehow? Is putting everything in a controlsGroup the only option maybe?

serene vector
rotund cypress
#

selectionPositions cursorTarget maybe? @serene vector

serene vector
#

@rotund cypress cheers

rotund cypress
#

Did that do the job? ^

serene vector
#

yes thank you ๐Ÿ˜˜

rotund cypress
#

โค

jade abyss
#

2x Inch? Erm...

rotund cypress
#

Ye ikr ๐Ÿ˜„

serene vector
#

You means 5,08 centimeters ๐Ÿ˜‚ ๐Ÿ˜‹

jade abyss
#

You should consider renaming (check "@Veterans" Userlist)

rotund cypress
#

Hey guys, if I want to create a child display from a parent display, yet I still want it overlapping the other display, so I then see both displays. Is this possible through createDisplay somehow? Is putting everything in a controlsGroup the only option maybe?Anyone know ^? I know in 3DEN they do not close the other display when opening the other one, and they seem to use createDisplay without controlsGroup, but I cannot see how they are not hiding the parent display.

subtle ore
subtle ore
#

@hasty violet yes?

#

What exactly were you looking for?

thin pine
subtle ore
#

No no no, that is a hardcoded config entry for that unit. entry is named "displayName" i believe under the CfgVehicles entry.

#

ex: displayName = "Little billy bob joe";

#

Thes aren'tchangeable via any script or mission modification keep that in mind.

#

shakes head , that was a confusing approach. It'd be nice to know you were trying to pull from a config lol.

limpid pewter
#

hey, how would i go about re-edting a dialog with the GUI editor? I have the exported the gui in the form of control classes, how would i use that as a starting point to re-edit it?

nocturne iron
#

I'm fairly certain you can put the config in your clipboard and there's a keyboard shortcut to load the gui back in

limpid pewter
#

yeah Shift+o

#

but i asks for a path or something

#

its path: config/

jade abyss
#

e.g.:

configFile >> "RscDisplayInventory"
OR
MissionConfigFile >> "RscDisplayInventory"
limpid pewter
#

ok, so if i have an allready made GUI using the control classes, i can just say what you have said to re-edit it?

#

or is that how i would find the path name for my gui?

jade abyss
#

Then saving that stuff in the *.cpp / .hpp / *.WhateverYouNamedIt

#

Or export

limpid pewter
#

im still not quite, sure but i will try to fumble my way arround for a bit, see how i go

jade abyss
#

Just to make it clear: You can only move stuff around in there. It WILL NOT be saved! You have to add it to your files by hand!

limpid pewter
#

yeah, but i can still export to clipboard once done right?

#

ok, so if i press ctrl +i to import from config, if i type missionConfigFile/diaglogname will that bring up my dialog or not?

jade abyss
#

missionConfigFile <- e.g. when you have that stuff loaded in the Editor/On a Server

#

configFile <- when inside an Addon

limpid pewter
#

ok, i think i get it thanks

jade abyss
#

rgr

limpid pewter
#

ok i got it tanks, it was missionConfigFile >> "dialogname"

jade abyss
#

yep

tough abyss
#

@jade abyss

#

delete that if you can

ocean hare
#

he's posting it in every channel

tough abyss
#

^

#

hes posting hacks and stuff

ocean hare
#

a ban would remove all of them in one go, just saying

tough abyss
#

@lavish ocean

#

@meager ember or @drowsy skiff sorry to tag all of you but trying to end that spread

subtle ore
#

Yep he posted it in every single channel

warm gorge
#

Any idea why setObjectTextureGlobal on players for clothing textures only works when used with remoteExec globally? I thought its meant to be synced for everyone, including JIPs

vapid frigate
#

it should be, but i don't think it works very well on uniforms

#

taking off the uniform/putting it back on will reset the texture

open vigil
#

And no one tagged me... Banned

limpid pewter
#

hey, how would i get all classnames of all sights, muzzle attachments and other attachments, and put them into an array?

#

@open vigil there you go, i tagged you ๐Ÿ˜›

drowsy skiff
#

I miss all the fun!

vapid frigate
#

@limpid pewter i thnk it'd be SQF _attachments = "getNumber (_x >> 'itemInfo' >> 'type') in [101,201,301,302]" configClasses (configFile >> "CfgWeapons")

#

err that returns an array of configs, so then

_attachmentClassNames = _attachments apply { configName _x };```
limpid pewter
#

ok

#

so this would return all attachments, but then i would have to seperate into muzzle, sight, and other afterwards yes?
\

#

which is fine

vapid frigate
#

yeah, or you could just get those numbers individually

limpid pewter
#

ok?

vapid frigate
#

ie SQF _scopes = "getNumber (_x >> 'itemInfo' >> 'type') == 201" configClasses (configFile >> "CfgWeapons")

limpid pewter
#

im listening ๐Ÿ˜ƒ

#

aahh cool ๐Ÿ˜„

vapid frigate
#
#define IIT_SCOPE 201
#define IIT_RAIL 301
#define IIT_BIPOD 302```
limpid pewter
#

just wat im looking for, thanks

vapid frigate
#

you probably also want to check the scope = 2 depending on what you're doing

#

like ```SQF
_scopes = "getNumber (_x >> 'scope') == 2 && getNumber (_x >> 'itemInfo' >> 'type') == 201" configClasses (configFile >> "CfgWeapons")

limpid pewter
#

im just putting all scopes class names, and putting them into an array, so that i can list them ina GUI

vapid frigate
#

yeah for that, you'll probably want to include that first bit to check scope == 2

limpid pewter
#

ok thanks a bunch

limpid pewter
#

sorry, but i have another question. I am trying to save two loadouts to profileNamespace, one for each team. Each loadout is set out like this : sqf _csatLoadoutProfile = [_medicLoadout,_supportLoadout,_sniperLoadout,_engineerLoadout]; _natoLoadoutProfile = [_medicLoadout,_supportLoadout,_sniperLoadout,_engineerLoadout]; Then i am saving it to profileNamespace like this sqf profileNamespace setVariable [_natoLoadoutProfile, _csatLoadoutProfile]; How would i go about geting certain elements from each array, i thought it would be something like this for the _medicloadout ```sqf
_csatLoadout = profileNamespace getVariable "_csatLoadoutProfile";
_medicLoadout = _csatLoadout select 0;

warm gorge
#

You're not defining these variables correctly. You can do it through either of the following options. Just make sure if you use the first one the _medicLoadout/_supportLoadout etc are in the correct scope to be accessed.

with profileNamespace do {
    _csatLoadoutProfile = [_medicLoadout,_supportLoadout,_sniperLoadout,_engineerLoadout];
    _natoLoadoutProfile = [_medicLoadout,_supportLoadout,_sniperLoadout,_engineerLoadout];
};

OR

_csatLoadoutProfile = [_medicLoadout,_supportLoadout,_sniperLoadout,_engineerLoadout];
_natoLoadoutProfile = [_medicLoadout,_supportLoadout,_sniperLoadout,_engineerLoadout];

profileNamespace setVariable ["_natoLoadoutProfile", _natoLoadoutProfile];
profileNamespace setVariable ["_csatLoadoutProfile", _csatLoadoutProfile];
#

@limpid pewter

#

The first option executes the code within {} in that namespace, so those variables would be declared in profileNamespace and could be accessed through getVariable

#

Either should work fine

limpid pewter
#

i like the second one, but will i still be able to access with the way i have shown above?

warm gorge
#

As long as you retrieve the variable through the correct name with getVariable, yes. Give it a go and let me know if you have any issues

limpid pewter
#

ok thanks man, will try soon

indigo snow
#

I dont think you can store local variables in the main Namespaces

#

Save them as a global var

limpid pewter
#

ok yeah, that would make sense, but i am going to try this way first, just to maybe save some time

#

thanks for the heads up tho, will try if other fails

#

@indigo snow would you know if there would be any issues with storing things in profile namespace when im the one hosting a game with two people in it?

indigo snow
#

Just keep in mind on whose profiles they actually get saved I guess

#

You cant directly get variables from someone elses profile

limpid pewter
#

is it automatic, will arma automatically know that i want a specific players namespace if i use getVariable in a local script on the player's pc?

indigo snow
#

You can only directly acces your own (profile)Namespaces

limpid pewter
#

ok, but if the server wants to retrieve a variable from a specific player's profileNamespace, then will it automatically know which player i want the variable to be taken from? Like if i try to getVariable from withing a locally run script?

#

or have i misun understood the whoole profilenamespace thing?

indigo snow
#

I just told you in two different ways you cant directly access namespaces on someone elses machine

#

Youll need to set up functions to request them and send them

limpid pewter
#

ok, so if i run a function to request var, that runs loacally on the users PC, then send that var to the server, will that work?

#

to a sever = to annother function

indigo snow
#

Yes

limpid pewter
#

ok thanks, and sorry fo being slow ๐Ÿ˜ƒ

indigo snow
#

No worries, its sunday after all

limpid pewter
#

haha yeah

limpid pewter
#

my questions just seem to keep coming, i was just wondering what the correct syntax is for spawning/calling a function in the action property of a GUI's button. Here is what i have got,

#
action = "kitSel = 0; spawn mld_fnc_kitSetup;";
#

i do have to set kitsel to 0 there if possible

vapid frigate
#

did you try onButtonClick instead of action?

#

spawn requires arguments too ([] spawn mld_whatever)

limpid pewter
#

ok

#

isn't onButtionClick an eh tho?

#

so i would have to put that somewhere in initalisation?

vapid frigate
#

nah you can put event handlers in the config

#

just like that action

limpid pewter
#

can you put up an example so my slow mind will understand

vapid frigate
#

onButtonClick = "kitSel = 0; spawn mld_fnc_kitSetup;";

limpid pewter
#

so it is that simple>?

vapid frigate
#

yeah

limpid pewter
#

ok wow thanks, that helps

limpid pewter
#

ok so all these can go straight into the config?

#

sorry, into the config for each control

spark phoenix
#

Yes

#

Just pay attention to what events work on what control types.

limpid pewter
#

ok will do

sharp jay
#

So any way of saving something on a server without using extDB3 or iniDB?

vapid frigate
#

could use profileNamespace

sharp jay
#

Doesnt work on server though ๐Ÿ˜ฆ @vapid frigate

vapid frigate
#

hmm ok.. i assumed it would since servers also have profiles

#

haven't tested though

sharp jay
#

The post on the bug tracker is gone though, so maybe

vapid frigate
#

should be easy enough to test with debug console

sharp jay
#

Gonna test it in a couple of minutes

vapid frigate
#

if it's important stuff to save, you would be better to use iniDB or extDB3 (or some other database) though

#

assuming the server profiles die as often as client ones do

delicate lotus
#

Is there a way to make a dialog less ugly?

vapid frigate
#

can make it look however you want

delicate lotus
#

what

vapid frigate
#

it's a bit like saying 'is there a way to make paintings not look crap?'

delicate lotus
#

okay

vapid frigate
#

you can change fonts, colours, backgrounds and sounds.. so if you can draw it in photoshop you can build it as a UI

delicate lotus
#

oh okay

limpid pewter
#

hey, i am getting this error "error zero divisor" yet i am not using any arithmatic at all in the script on a variable, what could that mean?

warm gorge
#

@limpid pewter Show the code where this is arising from please

sharp jay
#

@vapid frigate Profilenamespace on server works

vapid frigate
#

sweet

limpid pewter
#

ok, it from that code we were talking about before, i have two arrays that i am trying to store into profileNamespace, but i get a "zero divisor error" for natoLoadoutProfile, and i assume for csat as well, here is the code and its long, sorry ๐Ÿ˜ซ ```sqf
csatLoadoutProfile = [_medicLoadout,_supportLoadout,_sniperLoadout,_engineerLoadout];
^thats the first array
natoLoadoutProfile = [_medicLoadout,_supportLoadout,_sniperLoadout,_engineerLoadout];
^second array

this is were the error occurs

profileNamespace setVariable ["natoLoadoutProfile",natoLoadoutProfile];
profileNamespace setVariable ["csatLoadoutProfile",csatLoadoutProfile];

#

@warm gorge

#

also here is how one of the elements are entered into array ```sqf

if (kitSel == 2) then {
if (!isNil "loadoutarray") then {
_primary = ((loadoutarray select 0) select _primSel) select 2;
_secondary = ((loadoutarray select 0) select _secSel) select 2;
_gadget = ((loadoutarray select 0) select _gadgSel) select 2;
_perk = ((loadoutarray select 0) select _perkSel) select 2;
_sniperLoadout = [_primary,_secondary,_gadget,_perk];
};

vapid frigate
#

that error generally means you're trying to select something from an array that's not big enough

#

like [] select 0

limpid pewter
#

ahh ok that would make sense

#

for the global array called loadoutarray, i haven't populated all the arrays yet, so thats proabaly why they don't work haha thanks

#

will have to fill array then will try

sharp jay
#

Because i am trying to get the cargo of a crate with getItemCargo and re-add ut with addItemCargo, but it doesnt work

vapid frigate
#

the syntax is on that link

#

box addItemCargo [item, count]

#

so multiple of 1 item

sharp jay
#

Yes, but getItemCargo returns an array of arrays. I can't use that to add the items @vapid frigate

narrow musk
#

Are you trying to spawn a box with items inside?

sharp jay
#

Yes

#

Well, i am trying to get the contents of the box from profilenamespace and adding it back

narrow musk
#
_box allowDamage false;
_box addItemCargoGlobal ["arifle_AKM_FL_F",10]; 
_box addItemCargoGlobal ["30Rnd_762x54_Mag",10]; 
_box addItemCargoGlobal ["srifle_EBR_MRCO_pointer_F",10]; 
_box addItemCargoGlobal ["20Rnd_762x51_Mag",10]; 
_box addItemCargoGlobal ["LMG_Zafir_pointer_F",10]; 
_box addItemCargoGlobal ["150Rnd_762x54_Box",10]; 
_box addItemCargoGlobal ["arifle_Katiba_ARCO_pointer_snds_F",10]; 
_box addItemCargoGlobal ["arifle_MX_Holo_pointer_F",10]; 
_box addItemCargoGlobal ["arifle_MXC_Holo_pointer_snds_F",10]; 
_box addItemCargoGlobal ["30Rnd_65x39_caseless_mag",10]; 
_box addItemCargoGlobal ["30Rnd_9x21_Mag",10]; 
_box addItemCargoGlobal ["10Rnd_762x54_Mag",10]; 
_box addItemCargoGlobal ["launch_RPG32_F",10]; 
_box addItemCargoGlobal ["RPG32_F",10]; 
_box addItemCargoGlobal ["srifle_LRR_LRPS_F",10]; 
_box addItemCargoGlobal ["7Rnd_408_Mag",10]; 
_box addItemCargoGlobal ["LMG_Mk200_MRCO_F",10];   
_box addItemCargoGlobal ["SatchelCharge_Remote_Mag",4];```
#

I created this to attatch an ammobox to a player so you can place it

#
_box allowDamage false;
_box addItemCargoGlobal ["arifle_AKM_FL_F",10]; 
_box addItemCargoGlobal ["30Rnd_762x54_Mag",10]; 
_box addItemCargoGlobal ["srifle_EBR_MRCO_pointer_F",10]; 
_box addItemCargoGlobal ["20Rnd_762x51_Mag",10]; 
_box addItemCargoGlobal ["LMG_Zafir_pointer_F",10]; 
_box addItemCargoGlobal ["150Rnd_762x54_Box",10]; 
_box addItemCargoGlobal ["arifle_Katiba_ARCO_pointer_snds_F",10]; 
_box addItemCargoGlobal ["arifle_MX_Holo_pointer_F",10]; 
_box addItemCargoGlobal ["arifle_MXC_Holo_pointer_snds_F",10]; 
_box addItemCargoGlobal ["30Rnd_65x39_caseless_mag",10]; 
_box addItemCargoGlobal ["30Rnd_9x21_Mag",10]; 
_box addItemCargoGlobal ["10Rnd_762x54_Mag",10]; 
_box addItemCargoGlobal ["launch_RPG32_F",10]; 
_box addItemCargoGlobal ["RPG32_F",10]; 
_box addItemCargoGlobal ["srifle_LRR_LRPS_F",10]; 
_box addItemCargoGlobal ["7Rnd_408_Mag",10]; 
_box addItemCargoGlobal ["LMG_Mk200_MRCO_F",10];   
_box addItemCargoGlobal ["SatchelCharge_Remote_Mag",4];
_box attachTo [player, [1, 1, 1]];```
#

Sorry thats the full script, ill create you one for ur needs.

sharp jay
#

It is supposed to be persistent storage so if a player adds an item to the box and the server restarts i want it to still be there

narrow musk
#

Ohhh

sharp jay
#

I have been at this on and off for several months and it is starting to piss me off now

sage belfry
#

need to save the data in a persistent storage, could be the profil of the server or even a datatable like in a database

sharp jay
#

How do i add the items again

narrow musk
#

Yeah i was just thinking i think you would need to create a table in the database to store the items.

sharp jay
#

It is already saving to the profile of the server

#

What i need is a way to load them

sage belfry
#

just write a script to iterate over the whole stack of items. In any case you need a reference to the container

narrow musk
#

Use a call fnc

#
        _crate addItemCargoGlobal [_x, 2];
        _crate addItemCargoGlobal [_ammo, 5];```
#

I did a similar thing

sharp jay
#

So getItemCargo returns [[item1,item2,item3][amount1,amount2,amount3]] but addItemCargo can only add one item at a time

narrow musk
#

addItemCargoGlobal ["item", 5];

#

,5 = the amount.

vapid frigate
#
_cargo = getItemCargo box;
for [{_i = 0}, {_i < count (_cargo select 0)}, {_i = _i + 1}] do {
       box addItemCargo [_cargo select 0 select _i, _cargo select 1 select _i];
};```
sage belfry
sharp jay
#

@vapid frigate What does that do?

vapid frigate
#

first line gets the item cargo from a box

#

next 3 lines loop through them and add them back

#

err hang on

#

now it does

sharp jay
#

Okay so if i do ```

_cargo = profileNameSpace getVariable "box1";

for [{_i = 0}, {_i < count (_cargo select 0)}, {_i = _i + 1}] do {
box addItemCargo [_cargo select 0 select _i, _cargo select 1 select _i];
};```

#

that would work?

vapid frigate
#

assuming cargo is an array like you said above

sharp jay
#

yeah

#

it is an output from getItemCargo

vapid frigate
#

yeh, should work then

#

you might wanna add a default for if it's not saved though

#

_cargo = profileNameSpace getVariable ["box1", [[],[]]];

sharp jay
#

Im probably gonna need to add four of these for ItemCargo WeaponCargo, magazineCargo and backpackCargo too, right?

sage belfry
#

if you wanna save a whole unit, yes, you need to do

#

btw

sharp jay
#

That only works for units, not boxes

sage belfry
#

well, does a box have a magazineCargo o.O

sharp jay
#

Returns all magazines types and count from the cargo space

#

Cargo space

vapid frigate
#

so yes, you have to to all 4

sage belfry
#

nvm

simple solstice
#

Why use for... if there's forEach

#

Which comes to my mind first if you want to pass all arguments from an array

vapid frigate
#

it's sorta clearer with for in this case because there's 2 arrays [[item1,item2], [count1,count2]]

#

you could use foreach but it'd be uglier/harder to understand i think

sharp jay
#

@vapid frigate Holy Shit!!! It finally worked! I dont even know how to thank you. If you want free server hosting HMU

vapid frigate
#

no worries

sharp jay
#

if (isnil "_inv") then
{
    execVM "functions\basic.sqf";
}
else {
execVM "functions\load.sqf";
};``` this never goes to else, it always goes to basic.sqf
coarse ocean
#

Hey, quick question. In the editor, you can give a waypoint a name, when trying to access that waypoint within a script as any other normal global variable the function is unable to find that waypoint name. Any tips on how to get that waypoint name to be used in a function?

indigo snow
#

Waypoints domt really get stored that way

#

Youd need to pass the unit they belong to and use iirc the waypoints command on them

limpid pewter
#

hey, does anyone see any issue with this, ```sqf

_primary = ((loadoutarray select 0) select _primSel) select 2;
loadout array looks something like this,sqf
loadoutarray = [
[
[].[],[],[],[]
],
[
]
];

#

oh yeah, primSel is a value set but a lbCurSel (i have tested it is returning correct values)

tough abyss
#

There's a dot (.) where a comma (,) should be.

limpid pewter
#

yeah, that isn't the case in the reall code

#

that was just mee showing the format of the array

simple solstice
#

Did you try isNull @sharp jay

sharp jay
#

@simple solstice Nope, will try it out tomorrow though

halcyon crypt
#

@limpid pewter I think you're going 1 level too deep

#

or your example array is the shittiest example ever ๐Ÿ˜

limpid pewter
#

@marceldev89#4565 ok i will format better with descriptibve text ๐Ÿ˜›

#

array should be structured like this: ```sqf
loudoutarray [
[ Within each array there are many small arrays with 2 elements, like this ["",""] ], //array of all primary weapons
[ ], //array of all secondary weapons
[ ], //array of all gadgets
[ ] //arrary of all perks
];

#

and lets say i want to get the 2nd primary weapon in array, i thought i would use this ```sqf

_primary = ((loadoutarray select 0) select 2) select 2;

#

nvm just fixed it XD

#

i put blahblahlblah select 2; instead of blah blah blah select 1;

dry egret
#

need a bit of help

#

working on an addon rejection script for the public server but its not working

#
if (isServer) exitWith {};

player sidechat "INITIALIZING";
addonclear = false;
naughty = false;

da_arsenal = isClass(configFile >> "CfgPatches" >> "A3_Anims_F_Config_Sdr" >> "PA_arsenal");



sleep 0.5;

while {!addonclear} do
{

    if (da_arsenal) then {
    hintc "***ADDON DISALLOWED***\n\nPersonal Arsenal\n\nPlease disable this if you wish to play here.\n\nREASON: Equipment Exploiting";
    player sidechat "***ADDON DISALLOWED***  Personal Arsenal   Please disable this if you wish to play here.   REASON: Equipment Exploiting";
    naughty = true;
};
sleep 0.25;

if (naughty) then 
{
    player sidechat "YOU WILL NOW BE DISCONNECTED";
    player action ["eject", vehicle player];
    removeallweapons player;
    removeallitems player;
    player setPos (getmarkerpos "jail");
    sleep 5;
    endmission "end3";
};

if (!naughty) exitWith 
{
    addonclear = true;
    player sidechat "INITIALIZATION COMPLETE";
    //nul= [player] execVM "scripts\tkcheck.sqf";
    hint "Remember to check the ''Mission Information, and Server Rules'' section in your briefing notes for information on unique features and Server Rules.";
    player sidechat "Remember to check the ''Mission Information, and Server Rules'' section in your briefing notes for information on unique features and Server Rules.";
};

sleep 0.5;
};
#

this script worked for me back in arma 2 but im not sure why its not working in arma 3. i can only think that something has changed ware you cant look at what addons players have loaded anymore

vapid frigate
#

it only sets da_arsenal at the start, not during the loop (so there's no point havng the while loop)

#

i don't think you can add config entries after it starts anyway

#

you can check that isClass thing in A3 fine.. when you say it doesn't work, what happens?

dry egret
#

its still letting me stay in the server and it seems to clear

#

if the addon is loaded it should set naughty to tru and kick the player from the server

vapid frigate
#

so you're not getting any of the hints?

dry egret
#

i get the hints for the addon check clearing

#
class CfgPatches
{
 class A3_Anims_F_Config_Sdr
 {
  units[] = {};
  weapons[] = {};
  requiredVersion = 0.1;
  requiredAddons[] = {"A3_Anims_F"};
 };
 class PA_arsenal
 {
  units[] = {};
  weapons[] = {};
  requiredAddons[] = {};
  author[] = {"Drakeziel"};
 };
};
vapid frigate
#

ah there you go.. PA_arsenal isn't inside A3_Anims_...

#

so just da_arsenal = isClass(configFile >> "CfgPatches" >> "PA_arsenal");

dry egret
#

ill try that

vapid frigate
#

or da_arsenal = isClass(configFile >> "CfgPatches" >> "A3_Anims_F_Config_Sdr");

#

guessing you don't wanna ban that one though

dry egret
#

no lol

#

just want to keep people from loading stuff that should not be loaded

vapid frigate
#

you would have to list every possible cfgpatches though?

dry egret
#

just for the mods i dont want people loading

#

now if they repack the mod and change the cfgpatch name that im checking for they would be able to bypass it

#

but i figure if someone is going to go that far then they will just hack the server if they really wanted to

vapid frigate
#

yeh or make their own mod that just has player allowdamage false in init

dry egret
#

yep

vapid frigate
#

but yeah depends what it's for

#

we don't use any anti hack for our closed community

dry egret
#

well this is to stop people from using this mod on unit missions lol

#

and none of them really know how to mod

limpid pewter
#

hey, if i had an array that lists a whole bunch of weapon class names, and i wanted to find all the ones that start with launch, how would i do that? ```sqf
i was thinking i would do something like this,
alllaunchers = array find "launch*";

vapid frigate
#

you want to find all launchers, or all items with names that start with launch?

#
alllaunchers = array select { getNumber (configFile >> "CfgWeapons" >> _x >> "Type") == 4 };

or

alllaunchers = array select { (_x select [0, 5]) == "launch" };

respectively

dry egret
#

thanks @vapid frigate that was my issue ๐Ÿ˜ƒ

vapid frigate
#

np

dry egret
#

may have to use this on the public server to help cut out some of the addons that spam RPT

vapid frigate
#

yeh i dunno.. if i was running a pub server i'd probably want to use keys to stop people using random crap

dry egret
#

iv never been able to get keys to work correctly when downloading mods from workshop

#

Carrier based Alive mission on Tanoa

vapid frigate
#

i've never really tried

limpid pewter
#

@vapid frigate yeah that looks good, i will try what you have written thanks

warm gorge
#

Why do some people call a waitUntil {!isNil "_vehicle"} after spawning a vehicle with createVehicle. Is that even needed lol?

vapid frigate
#

i think it is with one of the syntaxs

#

the one that has an init script

#

err nvm that's units

warm gorge
#

lol yeah was just wondering because I dont see any point in it, as soon as its made a variable it shouldnt be nil

delicate lotus
#

is there a way to force AI units to fire at a given direction?

cedar kindle
#

doSuppresiveFire

delicate lotus
#

okay

#

will they fire even if friendlys are in the way ?

#

or the position is behind a building?

cedar kindle
#

i think they need LoS when i tested it earlier

limpid pewter
#

hey, is there an issue with trying to put a sleep command into the code part of a "Fired" EH?

delicate lotus
#

@cedar kindle mmh, is there a way to force an AI to look at an position / aiming there?

#

afterall I could just force them to shoot then

indigo snow
#

No, suspending is not allowed then. Youll need to spawn whatever code you need.

simple solstice
#

@dry egret why don't you just use battleye filters?

dry egret
#

@simple solstice battleye doesnt like ACE mod and stops parts of it from loading

simple solstice
#

well ACE should be whitelisted on BE

#

it's always been

dry egret
#

not when they update its not

simple solstice
#

it you have a public server it's not a good idea to disable battleye

#

also you could just use an older version that's whitelisted.

#

or you know, just use signatures check and it won't allow people to join with mods other than yours

delicate lotus
#

well the signature check tends to time out

simple solstice
#

not running signature check on a public server is asking for "cheaters"

dry egret
#

yep, and keys dont work worth a damn when workshop doesnt put the key in the correct folder or people who are using armasync dont want to take the time to put keys in the correct folder

simple solstice
#

players don't have to put keys

#

only server needs them

#

all they need is bisign to every pbo

limpid pewter
#

hey, is there an issue with trying to put a sleep command into the code part of a "Fired" EH?
something like this ```sqf
this addEventHandler ["Fired", {
sleep (3);
Do something;
} ];

indigo snow
#

No, suspending is not allowed then. Youll need to spawn whatever code you need.

#

EH code "needs" to finish in the same frame

limpid pewter
#

@indigo snow so does that mean, my only option is to write another script, and spawn that script from EH?

indigo snow
#

Yes or just put it in there together with your spawn

#

Definitively less messy to make it a separate function in my opinion both both works

limpid pewter
#

so i could put somthing like this ```sqf
this addEventHandler ["Fired", {[] spawn {
sleep (3);
Do something;
};}];

#

@indigo snow

indigo snow
#

Might complain because of the spawn return value but overall yea

limpid pewter
#

okie dokie thanks

warped fractal
coarse ocean
#

So, i've just done some testing for a project im doing and just want to confirm something. What is the max size on an array? I've just done 2 tests and both tests crash when reaching 5 million elements in the array.

#

Is this correct? as the wiki states 9,999,999 elements in the array

delicate lotus
#

is there a way to change the time a target is surpressed?

queen cargo
#

@coarse ocean the problem with that size is, it is just the hard limit

#

there are other limits too

#

eg. memory consumtion

#

wich probably is the reason why your arma crashes

coarse ocean
#

@queen cargo I understand that but the RAM or VRAM usage wasnt hitting the limit. The only thing im asking is is the limit 5 Million or one less than 10 Million?

queen cargo
#

what was the crash reason?
limit should be 10mio

dusk sage
#

Just loop filling an array

#

RPT will tell you when it's finished

#

Or just systemChat the count etc

coarse ocean
#

The game kept crashing at 5 Mil for me

queen cargo
#

game should never crash

tough abyss
#

Can some one help me? i was 23+ lvl. and now 1 agayne/
how can i fix this

rotund cypress
#

Hey guys, if I want to create a child display from a parent display, yet I still want it overlapping the other display, so I then see both displays. Is this possible through createDisplay somehow? Is putting everything in a controlsGroup the only option maybe?

queen cargo
#

display & dialog are pretty much the same
you have to "merge" those displays to have them both displayed at the same time (HUD displays is a different thing)

icy mauve
#

Anyone has experience with ACE Scripting?

still forum
#

It's SQF. Like any other SQF.

icy mauve
#

Obviously.

#

But I have this piece and nothing happens:

_pickup_ams = ["pickup_ams", "AMS (Sandfarben) nehmen", "\a3\weapons_f_mark\Data\UI\gear_acco_ams_snd_CA.paa", {}, {true}] call ace_interact_menu_fnc_createAction;
[scope_ams, 0, ["ACE_MainActions"], _pickup_ams] call ace_interact_menu_fnc_addActionToObject;```