#arma3_scripting

1 messages ยท Page 308 of 1

glass temple
#

Like if I wanted to damage said objects

vapid frigate
#

{ _x setDammage 1 } foreach _allowedObjects;

glass temple
#

Ah

#

I haven't written sqf in ages.

#

Doesn't seem to work

vapid frigate
#

can u paste what blacklist and whitelist are?

#

nvm i see it

#

they shouldn't have quotes i think

#

if they're variable names

#

_blacklist = [mapobj1, mapobj2, mapobj3];

glass temple
#

Whitelist is classnames and blackist is variable names.

#

I tried whitelist as classnames rather than strings and it doesn't work.

vapid frigate
#

oh ok.. i thought both were variables

glass temple
#

Sorry

#

Should've been more clear.

vapid frigate
#

_allowedObjects = (nearestObjects [player, ["All"], 200]) select { (typeof _x) in _whitelist && !(_x in _blacklist)};

#

or since they're class names, you can pass thems traight into nearestobjects

#

_allowedObjects = (nearestObjects [player, _whitelist, 200]) select { !(_x in _blacklist)};

glass temple
#

Hm

#

error

#

idek lol

vapid frigate
#

yeh idk, would need to see what you have for blacklist and whitelist

glass temple
#

whitelist is random buildings around the map

vapid frigate
#

i thought it was class names?

glass temple
#

Was strings as I was using str _x find "name" > -1

#

|| str _x find "name2" > -1

#

Which was gross looking lol

#

Trying to clean this up into an array

#

instead of having a ton of || blah || blah || blah

#

etc

vapid frigate
#

that's not class names though?

#

is that names you put in the editor on objects?

glass temple
#

No

#

Regular objects placed by BI

vapid frigate
#

how are you getting the references to the objects?

glass temple
#

getting the names via nearestObjects

vapid frigate
#

(what do you have for _whitelist = )

glass temple
#

_whitelist = ["chairplastic_f"]; for instance

vapid frigate
#

i guess first thing is to try this (ignoring blacklist):

#

_allowedObjects = (nearestObjects [player, _whitelist, 200])

glass temple
#

Type Array expected String

#

It works when I used find etc and the blacklist

#

Which this is annoying lol

vapid frigate
#

u certain _whitelist = ["chairplastic_f"]; there?

#

when u get that error

glass temple
#

Yes

#

Along with a ton more

#

(str _x) find "chairplastic_f" > -1

#

If I use that and change it to other names it works

#

No idea why I can't cycle through an array

vapid frigate
#

you could?

glass temple
#

It's not working is what I mean

#

Hm

vapid frigate
#

this isn't an error > (nearestObjects [player, ["chairplastic_f"], 200])

#

so your _whitelist must not be ["chairplastic_f"]

#

must have a different format/layout

still forum
#

I already said that before. You need to assign variables to your black/whitelisted objects and use these in the array

#

because nearestObjects returns the objects. Not their classname

vapid frigate
#

it takes class names though

glass temple
#

Couldn't I use find to search the whitelist?

still forum
#

You could also filter by classname but then you have to convert the array of objets to classnames first

glass temple
#

_whitelist find _x > -1 etc

#

something like that anyway

still forum
#

I don't see why. find just makes it more complicated

vapid frigate
still forum
#

Remember to not set it to never expire :x Please ^^

glass temple
#

Don't let it expire?

#

Why? It's example code.

vapid frigate
#

let it expire after a month or something

glass temple
#

Does that explain better? haha

vapid frigate
#

yeh, should work like this i think

blazing zodiac
#

Does anyone know the fastest way to sort an array by distance?

#

An array of objects that is

vapid frigate
#

took the quotes off the blacklist (so it's objects, not strings)

glass temple
#

Nope

#

If I remove the quotes from the whitelist it doesn't work.

#

Same with blacklist

vapid frigate
#

in your foreach, _x is an object

#

not a "string"

glass temple
#

yes

vapid frigate
#

so _blacklist needs no quotes

#

_whitelist is a list of class names (which are "strings" though), so it needs quotes

distant egret
glass temple
#

Works

blazing zodiac
#

Yea that's quite slow however @distant egret

#

I found a much quicker way to be _coverObjs = _coverObjs apply { [_x distance _unit, _x] }; _coverObjs sort true;

distant egret
#

Depends how many objects you got

blazing zodiac
#

it's about half the time in my case

#

There's quite a few objects in the array most times

distant egret
#

Ah k, I use it with like 3 objects so doesn't matter for me.

vapid frigate
#

@glass temple those aren't full class names though are they?

glass temple
#

They're picked up by nearObjects

#

No they're not

#

tl;dr

vapid frigate
#

yeh that'll be why it won't work with 'in'

#

or passing in the array

glass temple
#

Full would be something like Land_cages_f

#

So best way to do this without adding full classname?

#

Rather is it possible to get rid of the (str _x) find "name" > -1 bs?

vapid frigate
#

the 'find' is the only way to search for a partial string afaik

#

well easiest/fastest way

glass temple
#

How can I replace it here though?

#

I tried something like the first example

still forum
#

gosh man..

#

give me an example for a real blacklist

#

not test1 test2 and so on

glass temple
#

That is my real blacklist

#

No joke

still forum
#

what is test1? a object variable?

glass temple
#

It's the name of an object I placed in eden

still forum
#
{
    _x setDamage 1;
} forEach (nearestObjects[player, _whitelist , 100] select {!(_x in _blacklist)});
#

and blacklist is without quotes

glass temple
#

Uhm

vapid frigate
#

that would work, but the white list is partial classnames

#

not full classnames

glass temple
#

^

#

pls no scream at me

still forum
#

then.. Make it full classnames and add the missing ones into there

glass temple
#

Couldn't I use find to get around getting full names?

#

As I have been?

still forum
#

If you really wanna kill performance.. But as I said doesn't matter anyway

glass temple
#

It only runs on server init so...

#

Unless this runs everytime a player joins then...

vapid frigate
#

you could but its a lot harder

#

something like

#

also a lot slower as dedmen said

still forum
#
{
    _x setDamage 1;
} forEach (nearestObjects[player, [], 100] select { !(_x in _blacklist) && {_dedmenYeah = _x; count (_whitelist select {(typeof _dedmenYeah ) find _x > -1}) > 0 }   });
glass temple
#

So uhm

#

I give up. lol

vapid frigate
#

just use full class names.. much easier

glass temple
#

Well thanks for spoon feeding me guys. I appreciate it.

still forum
#

My method works fine. Performance crappy but.. works. Except if I have some typo in there

glass temple
#

I'm just reverting to my default version.

#

It works fine, just ugly lol.

still forum
#

Why not mine ^^

glass temple
#

Didn't work

still forum
#

aww ._.

glass temple
#

inb4 trolling me

#

lel

tough abyss
#

Does anyone know what ADDON = false and ADDON = true mean in CBA's XEH_preInit?

#
#include "script_component.hpp" // Macros and what not

ADDON = false; // ?

#include "XEH_PREP.hpp" // Function preps

ADDON = true; // ?
still forum
#

It's a macro

#

evaluates to cba_common = true or whatever. specific to each module

tough abyss
#

And CBA_common is?

#

Also, does ADDON affect scripts in any way? Should stuff like keybinds be put after or before them?

still forum
#

what is VarName = true ? ๐Ÿ˜„ I think you can answer that yourself

#

You cannot realisticly execute code while ADDON == false.

#

it's just so you can easilly check if the Mod is loaded. Instead of looking in cfgPatches you can just check that variable

tough abyss
#

So keybinds, etc. should be placed after ADDON = true.

still forum
#

No. Doesn't matter in any way

#

It's just setting a variable.

#

It doesn't matter if you don't know you that you need it

tough abyss
#

Weird. I placed mine between #include "XEH_PREP.hpp" and ADDON = true, though no keybind is added.

still forum
#

Are you sure keybinds should be set at preInit?

#

Oh yeah.. That's also what I'm doing ^^

#

diag_log to check if your code is being executed?

tough abyss
#

diag_log "my keybind is running" kind of thing?

still forum
#

yeah...

tough abyss
#

Ok. I'll report back.

#

Yep, it's running: ```
15:52:04 [735,66.294,0,"XEH: PreInit started. v3.2.1.170227"]
15:52:04 "my keybind is running"
15:52:04 [735,66.843,0,"XEH: PreInit finished."]

#

Just to be on the safe side - if will work within the keybind function, currect?

#
[
    "Debug Menu",
    "debug_menu_key",
    "Open debug menu",
    {if (serverCommandAvailable "#logout" || !(isMultiplayer)) then {call FUNC(openDebugMenu)};},
    ""
] call CBA_fnc_addKeybind;
#

XEH_preStart doesn't add a keybind as well.

#

And I guess the differance between XEH_preInit and XEH_preInitClient is global vs. local? Idk.

#

Does _modName need to be the same on as in CfgPatches?

#

Do this in your init.sqf or XEH client-only event handler to ensure that it is registered when your mission/mod is initialized. Hm, ok.

loud python
#

is there an easy way to access eden editor layers through scripting, or is that just an editor thing?

tough abyss
#

Using XEH_preInitClient worked ๐Ÿ‘Œ

sharp jay
#

how do i run getunitloadout and get the output in my clipboard

rancid ruin
#

copyToClipboard getUnitLoadout player

sharp jay
#

alright

#

that easy, huh?

#

thanks anyway

rancid ruin
#

actually you need to make it a string

#

copyToClipboard str getUnitLoadout player

sharp jay
#

thanks

rancid ruin
sharp jay
#

already did

#

just dint understand the copytoclipbgoard str part

#

i dont script a lot anymore

rancid ruin
#

ah fair enough

#

you don't understand why it works, or it's not working?

sharp jay
#

i didnt understand why i couldnt just copToClipboard getUnitLoadout player

rancid ruin
#

getUnitLoadout returns an array, and copyToClipboard expects a string

sharp jay
#

oh

#

okay

rancid ruin
#

in a sensible world copyToClipboard would work with arrays, but this is arma

#

anyone know what in the fuck this magical line of code does?

#
teamMember _agent deleteResources ["Legs"];
cedar kindle
#

probably not used

rancid ruin
#

it's just...so weird...and so SQF

still forum
#

It's obvious that XEH_preStart doesn't add the keybind. Keys are stored in missionNamespace. Which doesn't exist at preStart.
Why wouldn't you be able to use if inside a SQF code statement? There is literally no reason it would not work.
preInit and preInitClient are both executed locally. There is no Global. Just preInitClient is not executed on Servers probably.

tough abyss
#

Thanks @still forum.

drowsy hollow
#

Does anyone have experience with (hundreds of) thousands of markers in arma?
I decided to do some plotting in arma and noticed that the performance gets worse and worse the more markers there are.
e.g. this picture has 160000 markers: https://i.imgur.com/2BgXkWn.jpg
the first 1/4 took 80 secs, the next 1/4 was 300 sec, then 500 sec, then 800 sec (around 8 sec per quarter was for calculation of colors)
Is there any way to improve performance when using this many markers?

jade abyss
#

I mean, what do you expect ๐Ÿ˜‚ They are all objects ๐Ÿ˜„

#

I am impressed it handled that much without crashing

drowsy hollow
#

The thing is: Once they're created performance is great. but createMarker seems to get slower and slower depending on the number of markers.

#

Should I open an issue on the feedback tracker for it? (But I guess I'm the only one who does crazy stuff like that :/ )

still forum
#

How "great" is performance? I'd expect a fps drop to <10fps

#

Yeah.. It's kinda correct that createMarker shouldn't get that much slower but... No one creates so many markers

rancid ruin
#

aha, i create so many markers

#

it does indeed get quite slow

#

it's about 20x faster if you don't have the map open while the markers are being created @drowsy hollow

#

what's that plotting, anyway? slope?

#

iirc i had 40fps fully zoomed out looking at a map with 32,000 markers @still forum

#

for comparison, i can't maintain 60fps on tanoa in jungles

drowsy hollow
#

@rancid ruin thanks for the tip. i always had the map open when creating them.
Yes, the plot is slope.

rancid ruin
#

looks good

#

basically, higher fps = markers get created faster

#

you might get highest FPS looking up in to the sky, or zooming in to the max with the map open, test them out

final vessel
#

Funny that I was just going to ask about roughly the same thing as Shado, So let me just hijack your question (a little bit) and ask:
Is there a way (using extensions or not) to create a dynamic overlay on the map screen? Something like that could take a texture either dynamically created by an extension or fetched through http, for example (also served by an extension). Right now, the only function that I see that could display an image is drawicon but that doesn't seem to take arbitrary images...

drowsy hollow
#

@still forum I'm not at 240.000 markers and have 15fps in map

final vessel
#

...and I'm not planning on patching the texture in the exe memory @still forum so don't suggest that ๐Ÿ˜›

still forum
#

Would actually be an option

#

Enable filePatching and load from arma folder ^^

rancid ruin
final vessel
#

I know but... c'mon! There has to be another way of doing that. Legally.

rancid ruin
#

oh you already know about that command, never mind

final vessel
#

@rancid ruin Sure, but there is still the most important part that is missing: how to get the custom texture/image

rancid ruin
#

you'd need to have it in an addon, or the mission file

final vessel
#

to create a dynamic overlay <- unfortunately, I'm aiming for something more ambitious ๐Ÿ˜ฆ

rancid ruin
#

"dynamic overlay" isn't very descriptive

#

you can do quite a lot using custom fonts and stuff

#

design wise

final vessel
#

No, no, no. I mean: I would like to put dynamic custom images on the map. Those images will change often (a dozen of times in a minute)

rancid ruin
#

yeah, filled polygons would be cool one day. i use polygons for a few things, would be nice to have them fleshed out. wrote a script which distributes small markers inside polys, makes them kinda filled.

final vessel
#

So, to recapitulate: you can't use polygons on the map, putting thousands of square markers is also pointless. Also, trying to draw using simple lines is slow and ugly.

If there was a way to have an extension create a texture and then show that texture on the map it would be great.

You could do stuff like anti-aliasing, gradients, smooth bezier curves, etc...

rancid ruin
#

i've found creating markers isn't actually that slow if you have them all defined first

#

i could get through 32k in like 1 min i think

#

although i guess that is kinda slow in the grand scheme of computing

final vessel
#

That's kinda slow if you're limited to 0.003s (afaik) every frame for scripting

rancid ruin
#

people have made mods which load youtube videos and display them on billboards, so i'm sure what you're asking for is at least technically possible

final vessel
#

Besides, I'm saying I want to change that overlay, so those markers are going to need to change color anyway

still forum
#

That youtube video thingy is with filePatching. Which I already recommended before

rancid ruin
#

ah, download video, convert to ogg, play in normal fashion?

#

that's not very exciting

still forum
#

yes

final vessel
#

Thank you but I really can't use filePatching for public servers and mods (and that's what I'm working on :D)

still forum
#

I know. But most People don't know that and think it's a huge new thing. Already had that in Arma 2 and no one cared back then. The guy that lately got a bunch of YT clicks with that was just some Life guy that copied an old script from someone else...

rancid ruin
#

arma's UI system is totally fkn archaic and old school anyway

#

probably hasn't been changed since ofp days

still forum
#

That might very well be true

final vessel
#

Yes, but a custom texture (on the map!)isn't that much to ask, isn't it? ๐Ÿ˜

rancid ruin
#

the map display technically does quite a lot of stuff fairly well if you compare it to GIS software. it just does it...slowly

#

arma must be the only game where your FPS can go DOWN when you open the map

jade abyss
#

nono

#

think about... erm...

rancid ruin
#

i'd consider yourself lucky that you can draw lines and polygon outlines to be quite honest @final vessel

jade abyss
#

nvm. Yeah, you're right.

#

I remember the Arma 2 times, where the pilot was forbidden to open the map, since the loadingtime to be back ingame was sometime > 30s ๐Ÿ˜„

rancid ruin
#

i installed arma 2 again a few weeks ago

#

instantly uninstalled when i remembered it had separate sliders for mouse x and y sensitivity

#

so fucking clunky and strange. dunno how i spent thousands of hours in that game now

#

even getting your mouse sensitivity right is a fucking mission

jade abyss
#

There was nothing better +I don't mind the Slider oO

rancid ruin
#

just, who thought anyone needed that?

jade abyss
#

why not?

rancid ruin
#

who's ever been like "i love this game but i wish i could reduce my vertical mouse sensitivity" lol

jade abyss
#

How often did you aimed up and instantly downwards? ๐Ÿ˜›

#

You didn't need to uberVertSpeed.

#

And when you are a movementlegasthenic -> Helps alot =}

final vessel
#

Can't find that word in google ๐Ÿ˜

rancid ruin
#

crazy BI doing BI things

final vessel
#

Anyway, so I take it there is no way to generate custom textures on the fly for Arma? Is that true?

rancid ruin
#

you can use procedural textures

still forum
#

You can generate custom... yeah that

rancid ruin
#

but you've not really explained what your "dynamic overlay" would look like so who knows if it'd suit your needs

jade abyss
#

On the fly? You can create them, but won't be able to load them oO

final vessel
#

You could do stuff like anti-aliasing, gradients, smooth bezier curves, etc... @rancid ruin

still forum
#

loading textures via HTTP or other means and displaying them on the map. I think :u

final vessel
#

And I want those things to move so I can't just generate them and embed them in a PBO

jade abyss
#

Is that http command even enabled for MP?

rancid ruin
#

there's a thread on BI forums where some mad cunt made a load of functions to draw bezier curves

#

using map markers lol

final vessel
#

And we go back to the "performance" part of the discussion ๐Ÿ˜

#

Okay, let's try again:
I want to have a filled polygon, with hundreds of vertices, spawning a few kilometers and that will be changing shapes each ~5 seconds

rancid ruin
#

draw the image using a proper programming language, then read it pixel by pixel and recreate it using 1 marker per pixel in arma ๐Ÿค”

still forum
#

You could... Just draw an overlay over the game from your extension. Like the Steam overlay or Fraps

final vessel
#

That could actually be a good solution

jade abyss
#

What are you trying to achieve in the end?

rancid ruin
#

a headache

final vessel
#

Point is I don't want to tell everything because someone else will beat me to it then ๐Ÿ˜›

jade abyss
#

Aw cmon

#

Don't be a life'r

drowsy hollow
#

But now we're all really interested and want to see what you're up to

#

can you pm me something if i promise not to steal your idea? :D

rancid ruin
#

i demand full transparency

final vessel
#

Let me find a screenshot

jade abyss
#

A short description is enough^^

drowsy hollow
#

no, we want pictures!

jade abyss
#

shush Whitey

still forum
#

I'm already eagerly await... freezes because he used await in main thread

tough abyss
#

If a marker is an object, can you turn it into a simple object? ๐Ÿค”

jade abyss
#

๐Ÿคฆ

final vessel
tough abyss
#

[5:02 PM] Dscha: I mean, what do you expect :joy: They are all objects :smile:

still forum
#

No. Dude... The Facepalm is atomic Another Synchronization joke

jade abyss
#

So a Weathermap

dusk sage
#

stolen!!!

#

gotcha

rancid ruin
#

bagsee weathermap

final vessel
#

Yes, a weathermap. And the presence of soldiers creates rain

jade abyss
#

Why don't you just say it?!

#

A Weathermap

dusk sage
#

What do you think ๐Ÿ˜ƒ ?

tough abyss
#

All of this marker art is really neat.

rancid ruin
#

you can do that fine with markers, just not at high resolution

final vessel
#

So now, there are 1300 squares and that alone takes 1-2 seconds to draw or update ๐Ÿ˜

jade abyss
#

@tough abyss And? Aren't they Marker-objects? Or how would you call them?

still forum
#

The wheathermap is not markers. It's polygons and rectangles

final vessel
#

Kudos for @austere granite for the SQF part of the job

rancid ruin
#

you can make rectangular, elliptical and hexagonal markers dedmen

still forum
#

Yes. Just saying the weathermap is not made with a ton of markers

drowsy hollow
#

@final vessel Are you drawing those rectangles based on the black line? Can you explain how you did that? Maybe I just don't get what's going on in this picture

final vessel
#

Anyway, it's slow. Using one big polygon could do the trick if only... it worked. I would lose the gradients inside but could gain performance

rancid ruin
#

here's some of my marker art

tough abyss
#

@jade abyss [yourMarker] call BIS_fnc_replaceWithSimpleObject ๐Ÿ’ฏ

little eagle
#

๐Ÿคฆ

jade abyss
#

๐Ÿคฆ

still forum
#

@tough abyss Please stop. Facepalms kill braincells

tough abyss
#

Ok ok.

jade abyss
#

๐Ÿคฆ

rancid ruin
#

how do you upload images to discord?

jade abyss
#

You don't, you dirty Whiteypeasant

still forum
#

drag and drop them into chat. But it's disabled here

jade abyss
#

(btw. i think we BlueManGroupGuys also can't)

rancid ruin
#

ah i thought i was going mad

#

i will finish my hex game one day

still forum
#

๐Ÿ˜ฎ C&C Generals <- first thought :x

austere granite
#

Stack what's that?

tough abyss
#

Tanoa through the Predator's eyes.

jade abyss
#

Oh, we can.
*deleted

austere granite
#

can i rip your thing

final vessel
#

@drowsy hollow everything is in python, in memory. Both square values and the line are calculated in python and then given to Arma where a script updates the squares and draws the line

drowsy hollow
#

@rancid ruin we can have hexagonal markers?

tough abyss
#

^

rancid ruin
#

yeah, negative elliptical shado

drowsy hollow
#

I never figured out how to draw lines using a script. Is there a documentation for this?

rancid ruin
#

drawLine

still forum
austere granite
#

Use drawline for sweet 1px width lines

drowsy hollow
#

oh

#

lines

#

right

austere granite
#

or you can make a function

still forum
#

There is documentation for everything in Arma script... Except how to write them correctly ๐Ÿ˜„

drowsy hollow
#

i was thinking ... setMarkerShape "POLYLINE"

still forum
#
assert (true == true); 

๐Ÿ˜„

final vessel
#

So, now that I've got your attention... how the eff' can I do that more efficiently? As I said before, using a custom dynamic texture overlaid on the map would allow me to have smoother lines and a more detailed map

jade abyss
#

You don't, give up.
Problem solved, next one.

final vessel
#

Thanks! ๐Ÿ˜—

austere granite
#

Make it happen Dscha

jade abyss
#

that... was unexpected

austere granite
#

you have a blue name, i trust you

#

to solve this problem

jade abyss
#

I do some magic here and some wizardry there

rancid ruin
#

do it with normal map markers at a low resolution and rate, keep upping resolution and rate until it kills FPS, report back here with your findings @final vessel

jade abyss
#

in the end i call @little eagle to do some macromagic, done -> We got a Coffeemachine.

little eagle
#

Just like the Linux Kernel.

#

2000 lines of defines and includes

#

and at the end one single function call

jade abyss
#

great.

#

anyway @final vessel No clue, tbh. First of all, i wouldn't create all Marker at once. Just the area wich is beeing seen + Next thing is -> Is THAT much detail rly needed? What if you double the size of the marker (you can count for yourself, how many would be removed, when doing that ๐Ÿ˜‰ Hint: 4 != 1)

still forum
#

lol just noticed the Emoticon to the right of the chat box changes everytime you hover over it ๐Ÿ˜„

jade abyss
#

๐Ÿ‘

rancid ruin
#

i've not tested it but i'd presume that the expensive part is creating the markers. changing their colour would be faster.

jade abyss
#

Of course!

#

I thought it would be done like that? oO

austere granite
#

yes

#

it just makes the markers on init, after that it only updates colors

final vessel
#

@jade abyss thanks for the answer. Hmm... pfff... Is that much detail really needed? I'd say yes. If it weren't for arma's engine, I would have put even more detail in there. Python handles that map in microseconds

austere granite
#

however there's also the line in the middle and it's 2017 and we want it to look fancy : ')

jade abyss
#

Python != Arma
Python = Only handles that part
Arma = Also AI, Physic, 1000000000 other scripts/commands/nudepics/whateveryourgotrunninginthebackground

#

in one thread. So comparing them is like...

#

comparing a 50t-Truck vs. Ferrari. Makes no sense.

rancid ruin
#

you just just fuckoff the whole dynamic idea, and instead pre-generate a shit load of these images, then pack them in to an addon along with some meta data?

still forum
#

Chickenfeed and Drums!

austere granite
#

yea no

final vessel
austere granite
#

anyway its not possible obviously, but it's a shame that there's no way in arma to draw in image on map like that

#

i loved that shit

final vessel
#

Yeah, but as you said, it's not 1990 anymore

still forum
#

Ni pagody! Elektronika!

jade abyss
#

Nu Pagadi

final vessel
#

Wolfenstein 3D is out already ๐Ÿ˜›

rancid ruin
#

is that like poor man's gameboy or something?

#

ruski gameboy?

final vessel
#

@jade abyss Also, I refuse to believe that updating 1300 markers has to take 2 seconds

jade abyss
#

early 90s arcade Handheld Oneoh

final vessel
#

With ONE soldier on the map

jade abyss
#

Refuse to believe what you want ๐Ÿ˜„

rancid ruin
#

how many seconds does it take if you're not looking at the map?

final vessel
#

Anyway, that was exactly the reason we started doing that in python instead of SQF. We want the computations to be done this century

rancid ruin
#

around 0.2 i reckon

halcyon crypt
#

@final vessel why did you remove the album?

rancid ruin
final vessel
#

Because everyone knows what a weather map is, huh? ;P

halcyon crypt
#

that's a 404 as well

austere granite
#

just imgur being weird

#

gut now

halcyon crypt
#

w/e ^^

rancid ruin
#

maybe it's faster to modify other UI elements instead of map markers, have you tested that @final vessel ?

#

cos you can position ctrls over the map

austere granite
#

The problem is loading the image, not anything else

final vessel
#

That's not really the way I want to take TBH. I can see getting a 2x speedup tops, with changing markers.
I'm looking for something that could work 100x faster

austere granite
#

Which is impossible without filepatching, so that's about it

halcyon crypt
#

update the map in unscheduled if you aren't already and possibly distribute the work over multiple frames

dusk sage
#

I'm looking for something that could work 100x faster
Oh boy ๐Ÿ˜›

final vessel
#

People, please read the thread before answering.

tough abyss
#

Sorry.

outer plover
#

Can anyone tell what the intended boundaries for random [min, mid, max] is ? Because the midpoint can move the result ouf of the array (random [0, -1, 10] produces negativ numbers) and more critical, random [0, 10, 10] can produce 10, even though random used to not include the upper boundary

final vessel
#

I really appreciate the answers of people trying to help me, but I can't help but feel that:

  • I'm coming here with the problem: I want to dig a hole. A big hole. Arma gives me a shovel.
  • I want to find a way to bring an excavator, hence my question here.
  • Most of the answers here I get are along the lines of: "why would you even want a hole? it won't be flat!" or "you can't dig that big of a hole with a shovel" (thank you!) or "you could bring 100 people with shovels"
  • No one seems to think that expecting an excavator to do the digging is a sane idea... instead I'm looked at as some weirdo ๐Ÿ˜
rancid ruin
#

this excavator doesn't exist though

#

we're just trying to figure out what is possible

tough abyss
#

I feel you @final vessel.

rancid ruin
#

this is SQF, if you wanna dig a big hole, the best tool available will be some kind of wrench

jade abyss
#

Answer: There are limitations to the engine, that you have to life with :/

dusk sage
#

@outer plover I think if you attempt to move the midpoint outside of your distribution, then you should expect what appears to be anonamlous behaviour (just dont! ๐Ÿ˜‰ ) As for the bounds, are you positive it is actually 10? If you try floor the results, do you still get 10?

little eagle
#

What do you want to hear @final vessel ? Us blaming SQF and Arma for not supporting what you're doing?

outer plover
#

random [0, 10, 10] results in 10 most of the time, literally 10, not 9.9999 or anything

#

So flooring produces still 10

little eagle
#

What answer can a chat room even give.

simple fiber
#

The real question is why would you need such a hole. You can burn the bodies instead of burying them ๐Ÿ˜ƒ

little eagle
dusk sage
#

There is no surprise it produces 10 most of the time, that's the nature of the distribution, but I was not aware it was upper inclusive. Is this causing issues? You can always lower it

tough abyss
#

Pretty goods ones in most cases @little eagle.

rancid ruin
#

random [0, 10, 10] mid point is 10

#

so i'd expect it to return 10

outer plover
#

I know what a gaussian distribution is, but the question is, random x used to return an open (well, right open) interval. random [] doesn't specify

#

Hence the question, what IS the intended behavior

little eagle
#

]min,max[ I guess

outer plover
#

No, it is definitely inclusive

little eagle
#

Well then [min,max]

#

You answered your own question

dusk sage
#

The wiki doesn't state whether it is inclusive is not, so just go with whatever you're given ๐Ÿ˜›

outer plover
#

No, I asked for the intended behavior, not the observed one

little eagle
#

...

dusk sage
#

You'd have to ask one of the big guys that question

little eagle
#

Should ask the one who implemented it, not us

dusk sage
#

Or somebody with a lot of time and IDA ๐Ÿ˜„

rancid ruin
#

oh shit, alternative syntax 3 is great

simple fiber
#

@lavish ocean to the rescue ?

dusk sage
#

From the examples posted on the wiki page, the usage for the alt syntax looks somewhat borked

still forum
#

Mh what did someone say IDA?

jade abyss
#

nono, all fine here

simple fiber
#

@still forum Is the gaussian random inclusive ?

jade abyss
#

back to the coffing dedmen. sleep well. Shush shush

simple fiber
#

You probably know that

dusk sage
#

Nobody is going to know that without looking for it

still forum
#

random [min, mid, max] right?

dusk sage
#

yep

little eagle
#

I googled it and the first result is that shitty book.

simple fiber
#

He knows

little eagle
#

wtf

dusk sage
#

He's not a wizard

little eagle
#

stupid Americanski

simple fiber
#

Harry ?

still forum
#

is max optional?

outer plover
#

No

little eagle
#

No, that wouldn't work

outer plover
#

There's a two-value version that computes a random between x and y but you have to give it a seed

#

Which makes it a little less random ๐Ÿ˜

dusk sage
#

Why is that?

#

The other version is the same, you just can't specify your own seed

little eagle
#

That is the point of the seed. You get the same result in MP on different machines.

outer plover
#

Well, if you give the seed for a random generator, you restart the sequence, so, let's say 123 random [0, 10] always returns the same result

simple fiber
#

@outer plover So what you are looking for is a random number between x and y ?

still forum
#

Ouh god. I'm in the Middle of a PRNG. How did I get here ahhh

outer plover
#

Well, yeah, selecting an array element based on a random number and a given midpoint that I can bias according to user wishes...

little eagle
#

Just turn your function into a big array and use selectRandom

austere granite
#

Dedmen rethinking all the poor life choices he made at this poitn

little eagle
#

There

outer plover
#

selectRandom can't determine a midpoint

#

That's the problematic part

little eagle
#

Make the array bigger

#

10k elements

#

Should be enough

dusk sage
#

So what's the issue with using random [0,5,10] etc ?

little eagle
#

More than enough...

outer plover
#

That's a bit of a brute force method

little eagle
#

No, it's not

simple fiber
#

@dusk sage Its the floor i think

little eagle
#

It's not a brute force method

outer plover
#

@BoGuru with this method, can 10 actually occur or not ?

dusk sage
#

You said it did, so without further information I'll assume it can

outer plover
#

As I said, I just want to know whether the end points are inclusive or exclusive

rancid ruin
#

you could always test it

dusk sage
#

But you are welcome to lower max by one of course

little eagle
#

You only have to generate the array once and can even put a pre generated one directly into your mod or mission.

#

Varanon, no one knows what the intended behavior was regarding min and max being inclusive or not.

#

Maybe not even the author of the SQF command

simple fiber
#

commy is right. If you have such array [1,2,3] and your midpoint is 2 just add 2 [1,2,2,2,3] ?

dusk sage
#
[] spawn {
    while {true} do {
        if (random [0,5,10] isEqualTo 10) exitWith {hint "yep."};
    };
};
#

There you go ๐Ÿ˜›

still forum
#

Thats not a PRNG ^^ It's a LCG :x Even worse

outer plover
#

Geez, guys, are you patronizing on purpose or do you practice ?

#

Forget that I asked

little eagle
#

You keep asking a question we told you cannot be answered.

dusk sage
#

Run that code and you'll get the answer

#

If it's inclusive or not

rancid ruin
#

yes we practice

simple fiber
#

@outer plover Anyway even if it is inclusive it's higly unlikely you get a 10

dusk sage
#

It won't take long with a while true

outer plover
#

If I get a 10, I will select outside an array bound, though

dusk sage
#

๐Ÿ˜„

little eagle
#

Just select a random element

simple fiber
#

Then just check if it's 10 and random again ?

outer plover
#

Ah, that's what you mean, commy2

simple fiber
#

Like what ?

little eagle
#

Make your own gauss curve and you can choose it to be intended to be inclusive or not.

dusk sage
#

Or run that code above and give us the answer ๐Ÿ™ƒ

little eagle
#

It's not at all slower and just as random

simple fiber
#

@dusk sage 2000 years later

dusk sage
#

๐Ÿ˜ต

still forum
#
x = 4 random numbers added together * 0.25
if x < 0.5
  return min + (mid-min) * (x * 2)
else
 return mid + (max - mid) * (x*2-1)
#

Does that help?

little eagle
#

No, it still doesn't say what was intended :S

dusk sage
#

What an earth is that

still forum
#

But you can see that it's ignoring the max if 4 random numbers between 0 and 1 being added and multiplied by 0.25 are less than 0.5

little eagle
#

The random thing with seed is not as useful as our scripted solution in ACE, because of JIP.

#

It would have to automatically discard X rolls the server made on the JIP clients or something

outer plover
#

To answer the question: random [0, 9.999, 10] can result in 10 as well, so I guess the intended behavior is to return a number from min to max including the boundaries

#

With a center midpoint, neither boundaries are likely to come up

still forum
#

Well. I wrote the algorithm the engine uses up there :x

dusk sage
#

So the answer is, if x can be 0 or 1, you'd have min & max inclusive

still forum
#

random [0, 10, 10]
would be

x = random 1
if x < 0.5
  return (10) * (x * 2)
else
 return mid

so 50% chance to return mid. Question Answered. Didn't take that long tho ๐Ÿ˜„

dusk sage
#

That wasn't the question

still forum
#

@outer plover

#

Wasn't it :x

little eagle
#

No, the question is what was intended.

dusk sage
#

The question was whether it was inclusive on max

#

So the answer is, if x can be 0 or 1, you'd have min & max inclusive

still forum
#

Well that is what is intended.. I think. Eats a leaf

little eagle
#

I can tell you what was intended.

#

off-hours

still forum
#

x is the returned value from random 1 So.. If that can be 0 or 1 then.. yeah :U

dusk sage
#

And this is their gaussian distribution ๐Ÿ˜„ ?

still forum
dusk sage
#

Are you sure this is for the alt syntax (gaussian)?

still forum
#

What I posted above yes. Thats the gauss function with min,mid,max arguments

dusk sage
#

oh lord

blissful fractal
#

Anyway to track down the mouse ui number code?. Fx the keybord ui number code for B = 48

jade abyss
#

nope

blissful fractal
#

damm :3

jade abyss
#

if you mean "Keyhandler for mouse"

blissful fractal
#

yup that is what I meant

jade abyss
#

nope :/ Its missed pretty hardly.

blissful fractal
#

dam :3 Anyway to track down if you fire a gun? Fx I got a pickaxe and if that getting fired it need to call the function pickup meth. Instead of scroll and click pick up ๐Ÿ˜ƒ

vague hull
#

fired eventhandler

#

especially firedMan eh

jade abyss
#

yep

vague hull
#

btw Dscha, I figured sending the variable now

jade abyss
#

๐Ÿ‘

vague hull
#

really dirty but well..

jade abyss
#

I think.. i don't wanna know

#

btw. publicVariableClient <-- might be worth a try ๐Ÿ˜„

vague hull
#

forget you!

blissful fractal
#

Thanks

jade abyss
#

"forget you" ?

little eagle
#

inb4 compile format remoteExec call

vague hull
#

nahh

jade abyss
#

nah, setVariable via remoteExec - Commy

vague hull
#

not really either

little eagle
#

I'm sitting. ๐Ÿฟ

jade abyss
#

Your king is waiting, Senfo. Don't let your king wait. I am waiting.

#

"Okay" oO

vague hull
#

๐Ÿ˜…

jade abyss
#

Now i got Bronystuff in my History...

vague hull
#

Glad I could help

#

Ohh wait

#

there was something wrong

little eagle
#

There always is.

jade abyss
#

With Bronys? Yeah, alot

#

๐Ÿ˜„

simple fiber
#

@vague hull Fuck off dude

vague hull
#

aww yis

#

ok going back to remote exec setVariable

#

the other way wouldnt keep them final

#

Ok I deleted the link ^^

#

so in short its now: remoteExec setVariable and then remoteExec one of the functions

#

really just more comfortable to have it that way for developing

jade abyss
#

tbh. For alot of Vars i send them in one bundle to the Client (especialy when its just for Init).

vague hull
#

Basically what Iam doing

#

its just that Iam sending all the functions to the client

jade abyss
#

all functions?! oO

#

oh my, poor netcode

dusk sage
#

i read remoteexec setvariable

#

๐Ÿƒ

vague hull
#

^^
I have this little setup going on, whenever the server restarts it just pulls for a git update, rebuilds the serverfiles only

In short: Iam too lazy to rebuild the clientfiles

jade abyss
#

Same here.

dusk sage
#

So why are you using RE w/ setVar?

vague hull
#

this way: bug/new idea -> logout -> work -> update git -> restart server via command -> login -> test -> repeat

jade abyss
#

I click one .bat file -> Packing ServerData + MissionFile -> Uploading to Server -> Via RDP another .bat to Server to start A3 Server -> When A3 Server starts -> Copying all Data to the correct folder -> waiting to be loaded ๐Ÿ˜„

little eagle
#

I just never make mistakes.

jade abyss
#

Why not @dusk sage ?

dusk sage
#

Mountain out of a mole hill

jade abyss
#

go on =}

#

(without minding publicVariableClient ^^)

dusk sage
#

And pvar is ruled out because..?

jade abyss
#

something with "forget off" or so

#

idk, ask Senfo

dusk sage
#

๐Ÿค

vague hull
#

simple reason BoGuu, RE is at a certain point in time you can define and only to a single (or multiple) targets

jade abyss
#

Single Target -> Also possible with PVC

vague hull
#

i mainly removed pvclient in favor of the networkmanaging profits of remoteExec

dusk sage
#

Which are ๐Ÿค” ?

vague hull
#

see documentation

#

If there was no reason, remoteExec would have probably never been introduced

dusk sage
#

Sigh

#

In your specific case, you wish to share a variable across the network, no?

vague hull
#

expect of the security filters n stuff

jade abyss
#

That was my mainconcern, regarding PVC/PVS. You can't rly filter whats beeing send to that var.

dusk sage
#

Given it's dynamic, it'd be hard to filter anyway

jade abyss
#

Yep

vague hull
#

remember

#

the remoteExec comes from the server

jade abyss
#

With RE(C) you have at least some kind of restriction given. Wich lets me sleep way better ๐Ÿ˜„

dusk sage
#

And so does the pvar ๐Ÿ˜› ?

tough abyss
#

There is no point debating using PV versus RemoteExec for sending clients compileFinal functions from server.
Unless you going to bother to work out the overhead / network usage for both.
They both accomplish the same thing with same amount of security

little eagle
#

^

vague hull
#

if the data sent to the client was manipulated, there would have been another security flaw in the first place

little eagle
#

Neither of them send encrypted messages if that is what you mean.

vague hull
#

nope

#

I mean a manipulation of the functions before they are even sent

jade abyss
#

More like -> Sending over a function to a var, instead of a idk.. a number or a string.

vague hull
#

which means there was a way around compileFinal

little eagle
#

Are functions still compileFinal'd if they are send via publicVariable?

tough abyss
#

Personnally i prefer remoteexec, because i know the order the functions are send to a client.
With PV i am depending on order the variables are sent by the engine

But PV is alot easier to implement for an addon maker.


Debating security is pointless, a server can send any remoteexec / pv cfunction it wants.
If someone has managed to run custom code on your server, you have already lost.

#

@little eagle yeah they are

vague hull
#

yes

little eagle
#

Sounds to me like that would be the easier thing to write then.

dusk sage
#

because i know the order the functions are send to a client.
That is guaranteed?

tough abyss
#

@little eagle same also if you send via remoteexec & use mission namepsace set variable

jade abyss
#

@tough abyss I agree with PV easier for AddonMakers
Downside of the RE-Filterlist just beeing loaded by Mission or Addon (depending on where Arma finds it first)

tough abyss
#

@jade abyss remotexec you need to tell mission people to edit a pbo ๐Ÿ˜‰
Besides talking about sending functions from server -> client == no be filters

jade abyss
#

Yerp

#

An "AddThisFunctionsToARemoteExecWhiteList" config entry would be nice -.-

vague hull
#

from client to server?

tough abyss
#

@dusk sage if you send the functions in an array with RE.Tthen have the client go through the array, setting the functions. You are guaranteed the order

little eagle
#

How is that different from sending the array via pubVar?

tough abyss
#

hmm actually i am wrong about editing the mission for RE whitelisting. Ignore that ๐Ÿ˜‰

jade abyss
#

Not rly, you were right.

#

When its in a mission -> Ignores the Addon Whitelist

tough abyss
#

@little eagle Most people just PV a compileFinal function. no client function required. With RemoteExec version, you need a client function

jade abyss
#

So editing the mission whiteliste -> works

vague hull
#

not true tho

jade abyss
#

Not rly, you can send the whole Code over Deco

#
[_Veh,{player moveInDriver _this}] remoteExecCall ["call",_Player];```
for example ๐Ÿ˜„
dusk sage
#

You could re call

#

yeh ๐Ÿ˜›

#

But not so elegant anymore

vague hull
#

"anymore"

tough abyss
#

True, but i hate the idea of re call

jade abyss
#

(before someone asks: That was from a test ๐Ÿ˜„ )

vague hull
#

it never was, yet its not less secure than a function shared or local

jade abyss
#

Of course, "call" with RE is crap. But sometimes... :/

dusk sage
#

Well re'ing setVariable is much more 'elegant' than re'ing call

little eagle
#

The problem with that is, that you're sending the "{player moveInDriver _this}" string every time over the network.

jade abyss
#

Yep Boguu

vague hull
#

true that commy

dusk sage
#

The question is, are you compileFinal'ing @vague hull ?

jade abyss
#

I know Commy, that was an example that it IS possible NOT that you HAVE to do it

vague hull
#

yes I am

jade abyss
#

Its a example how to do it NOT

dusk sage
#

So how are you updating the client?

#

Oh right, restart

#

Forgot that bit

vague hull
#

takes the same amount of time

#

basically

#

since I dont restart for every change

dusk sage
#

So if you were to PVAR a compileFinal'd function, your argument against that is?

jade abyss
#

PVC,PVS or PV?

dusk sage
#

Server to client I assume he is doing

vague hull
#

Well.. I have read that (in theory) remoteExec, reduces Networkspikes

#

would have been PVC in that case

jade abyss
#

btw why not:

missionNameSpace setVariable ["MyTag_fnc_MyFunction",{hint "I am awesome!"},true];```:D
vague hull
#

thats pv again

little eagle
#

Well.. I have read that (in theory) remoteExec, reduces Networkspikes
Link?

dusk sage
#

I've always thought RE was worse for the network (and asked for a quantative answer the other day - seemed to agree). Whitelisting with RE has a negative effect though

vague hull
#

as far as I know

jade abyss
#

Heard something similar also @little eagle

dusk sage
#

I've seen servers drop to their knees with RE calls firing about

jade abyss
#

With the Whiteliste, prolly

dusk sage
#

Yep

little eagle
#

"Heard it" doesn't mean it's real tho.

jade abyss
#

Someone mentioned that its got their Probs with it. No clue why

#

Never said it is true.

little eagle
#

Worth noting that the tests were done when the whitelisting was new.

jade abyss
#

But that Argument came up in the early beginning of RE

dusk sage
#

And when do things get fixed? @little eagle ๐Ÿ˜†

jade abyss
#

Maybe some time for new Tests.

vague hull
#

I know, yet its kinda like: "its new, its its better"

dusk sage
#

But it doesn't serve the same purpose

#

What you want to do is exactly what PVAR does

jade abyss
#

PVC,PVS or PV?

#

๐Ÿ˜„

jade abyss
#

๐Ÿ˜‚

vague hull
#

my HC just crashed

#

first time in ... ever?

#

wow

dusk sage
#

I saw this in a setPos be log the other day

#
#1 2:1723 HeadlessClient_F [-2147483648,-2147483648,-2147483648]
#

๐Ÿ˜„

jade abyss
#

oO

dusk sage
#

That's outside the box

jade abyss
vague hull
#

weird things happening latly with HC's

#

no

#

thats normal

dusk sage
#

damn good usage

#

-2000

#

๐Ÿ˜„

vague hull
#

isnt -2147483648 the minimum int limit?

dusk sage
#

it's 1 past it, yep

vague hull
#

looks like someone caused and overflow o.O

dusk sage
#

Oh nvm, negative side, it is yep.

#

Well, someone got kicked by BE ๐Ÿ˜„

vague hull
#

at least that worked ๐Ÿ˜„

peak plover
#

Why is your server fps at 5 @jade abyss

dusk sage
#

must be using the scheduler

jade abyss
#

It was during a test. Spamming while(true) stuff, wich spawns a the same Function, that creates the while(true) before

dusk sage
#

๐Ÿ‘บ

tough abyss
#

nice.

jade abyss
#

was something like that.

MyTest =
{
    while{true}do
    {
        []spawn{call MyTest; diag_log diag_activeScripts;};
    };
};
call MyTest;```
peak plover
#

Soo, what's the conclusion ? Client FPS tied to server FPS ?

jade abyss
#

Also ๐Ÿ˜„

#

Mostly because of: How long does it take, to takeout a Server by spamming its threads

peak plover
#

okay, that might be good to know

#

How many threads can it handle?

jade abyss
#

Was for 2017mod, i planed to add a hidden function to Bamburgh, that executes when the Servername consists "life" or something similar

dusk sage
#

it takes a long time ๐Ÿ˜›

jade abyss
#

No clue, too long ago (>9Month)

peak plover
#

hahaha ๐Ÿ˜„

jade abyss
#

That was pre-MemoryBug

peak plover
#

brilliant

jade abyss
#

and they would have never known ๐Ÿ˜ˆ

dusk sage
#

Since 64bit, stuff like that is horrible. Before, if you created something recursive, which ate memory, you'd crash out at 4GB~, now your whole PC crashes at 100% ๐Ÿ™‰

jade abyss
#

nope, memory usage was low as usual ๐Ÿ˜‰

#

just the script handle thingy stuff was filled.

#

Gonna make testrun

still forum
#

You should put some actually heavy code after the spawn

#

so it spawns a new instance and then does very heavy calculations

jade abyss
#

Wasn't my intention

still forum
#

and also set scriptName to something with Life. So if anyone with a profiling build comes around he'll think it's some life script

jade abyss
#

Intention was: Slow death

still forum
#

I think diag_activeSQFScripts or whatever it's called outputs the path to your sqf file right?

jade abyss
#

again: That was >6-9 Months ago, the example above was just for illustration, writen in 30s...

still forum
#

You could use the bug where an eventhandler is saved as a string. When the eventhandler has the script it doesn't have any filename

#

continues suggesting stuff

little eagle
#

I think only if execVM'd or fileNumbers'd

jade abyss
#

Right now, i only spam with countless spawns. Nothing else. Why? Because i just don't want to and do other stuff^^

still forum
#

But they can detect who is causing that. And modify your Mod and then republish the modified version ๐Ÿ˜ฎ

jade abyss
#

Thats why -> Slow death. Occuring only after... idk... 10-30min

#

Until they find that out -> evil laughing.

hollow lantern
#
[base_speaker, "base_alarm "] remoteExecCall ["say3D"];```  returns a unkown sound, but its there and defined: ```cpp
class CfgSounds
{
    sounds[] = {};
    class emp
    {
        name = "";
        sound[] = {"destroyer\emp.ogg", 1, 1};
        titles[] = {};
    };
    class ru_incoming
          {
              name = "ru_incoming";
              sound[] = {"media\ru_incoming.ogg", 1.2, 1};
              titles[] = {};
          };

    class base_alarm
          {
              name = "base_alarm";
              sound[] = {"media\base_alarm.ogg", 1.2, 1};
              titles[] = {};
          };
};``` any idea?
#

ah damnit

#

there is a whitespace grr

still forum
#

Few days ago I saw a Script Optimization guide from a guy that told everyone that stripping every possible whitespace from your script improves Performance by a lot. That would have helped you there ^^

little eagle
#

facepalm

hollow lantern
#

lol

still forum
#

Same guy that told everyone to use very short unreadable Variable names. Because they execute a lot faster than >100 char long variable names.

little eagle
#

I'm sure it helps when all your code is constantly execVM'd mid mission.

still forum
#

Same guy that made that addon free arma radio thingy. Dedmen leaves now ###

jade abyss
#

@still forum Erm, regarding the long Var names = That would make sense, tbh.

#

๐Ÿ˜„

#

This also looks like Network Error

#

No CPU-load change, steady RAM usage ๐Ÿ˜„

#

btw. it doesn't write anything to the logfiles

#

Can be send from Client

MyTest =
{
    while{true}do
    {
        []spawn
        {
            uisleep 0.5;
            call MyTest;
        };
    };
};
publicVariable "MyTest";

MyTest2 =
{
    while{true}do
    {
        uisleep 0.5;
        diag_log diag_activeScripts;
    };
};
publicVariable "MyTest2";

Executed on server

[] spawn MyTest;
[] spawn MyTest2;```
#

21:09:13 "[2901,0,0,0]"
21:10:37 "[345589,0,0,0]"

#

18 FPS atm

vague hull
#

is it still about how to crash the server the fastest?

jade abyss
#

nono, not fast

#

Wasn't my intention ๐Ÿ˜„

#

Just.. erm.. nothing gets executed on the Server anymore

#

Almost

#

For example: Check MyTest2

#

It should spam every 0.5s the Log

#

Thats my log since i started:

21:09:13 "[2901,0,0,0]"
21:10:37 "[345589,0,0,0]"
21:11:09 "::: DIAG ActiveScripts: Spawn-ed: 349390 | execVM-ed: 0 | exec-ed: 0 | execFSM-ed: 0"
#

Thats it ๐Ÿ˜„

#

FPS is still at 20, but... yeah ^^

#

Nothing else is working. I like that

vague hull
#
[] spawn { TEST_A = []; while {true} do { TEST_A pushBack []; }; };```
#

this is a nice game killer

jade abyss
#

Instantly 9999 when pasted to console ๐Ÿ˜„

vague hull
#

and what memory bug where you refering to earlier?

jade abyss
#

that was dedmen

#

...

vague hull
#

My bad, Iam sorry

jade abyss
#

21:20:45 [476147,0,0,0]
๐Ÿ˜„

#

21:33:25 [804690,0,0,0]
dumdidum

hollow lantern
#

can I force an AI to turnOut all the time and deny a turnIn ?

jade abyss
#

I think "careless" was the setting

hollow lantern
#

I don't want a wp or behavior change

#

I just want a specific unit to be turnedOut the whole time

jade abyss
#

if(!isTurnedOut)then{ai action["StuffForYouToFindOut",vehicle AI]};

#

Would look ugly, but can't think of another solution atm. Maybe ask tomorrow again, when more peeps are online, who played with AI more around

subtle ore
#

Hey, quick question here. Is there a way to check if the server has gone into debriefing or not?

jade abyss
#

what for?

subtle ore
#

Saving the position of objects at the end of a mission.

jade abyss
#

afaik not

#

When done -> done

tough abyss
#

Is the ending of a mission scripted or defined within the mission.sqm?

jade abyss
#

"Debriefing"

#

Thats when everything is already gone

tough abyss
#

In other words, what triggers the end of a mission.

subtle ore
#

Okay, I'm thinking even before the breifing. But a way to gauge a time reight before it. I dont know...

#

the end of the mission is scripted

tough abyss
#

Then put what you need before the end is executed in the script

subtle ore
#

Hmmm..well. Wait a sec, now that I think about it. It doesn't really "end". It just restarts the server. So it's continious. That is why I wanted to save the objects

jade abyss
#

"restarts" means?

tough abyss
#

Well is it restarted via script?

subtle ore
#

yes

jade abyss
#

Full restart of SERVER or just Mission or inside mission?

subtle ore
#

@jade abyss serverCommand

tough abyss
#

Same method applies

jade abyss
#

rgr

#

Yeah, then execute it, before the serverCommand gets executed^^

tough abyss
#

You can save it in a database or if you want to, the server's profile.

#

IMO database would be easier

jade abyss
#

21:53:37 [997855,0,0,0] \o/

#

almost

subtle ore
#

@tough abyss I have a feeling you have this slight bias towards databses. But yeah I understand the two different methods. Like I said, I got the saving part done with the minimalist amount of performance impact

jade abyss
#

21:54:03 [1.01718e+006,0,0,0] \o/ there we are \o/

subtle ore
#

I dont follow?

tough abyss
#

Different topic

jade abyss
#

Yup. I am spamming my Server wth [] spawn {while{true}do stuff ๐Ÿ˜„

subtle ore
#

0__0

jade abyss
#

1.000.000 active atm

#

dumdidum
21:55:11 [1.06827e+006,0,0,0]
*i am waiting for the Server to crash.

tough abyss
#

But I am bias I suppose. Never worked with saving stuff in the profile.

subtle ore
#

๐Ÿคท

jade abyss
#

Profile? oO urgs

tough abyss
#

At least a large amount of stuff for that matter.

jade abyss
#

why save in Profile? no, thats... no

tough abyss
#

My thoughts ^^

subtle ore
#

facepalm No of course not

jade abyss
#

DB!

tough abyss
#

Question. Why did you think I am bias to db's?

jade abyss
#

btw. extDB is working with x64 Version of Arma? (haven't tested yet)

tough abyss
#

extDB3.

#

Yes

#

2, no.

jade abyss
#

2... pff

#

i am no lifer, i don't need 2

subtle ore
#

@tough abyss "ArmaHosts" Host provider? Likely working with db's more than anything else? Yes?

tough abyss
#

I host Arma servers. Databases are the best way to store data

#

So much can go wrong with saving data in a profile.

subtle ore
#

Well yes of course. I was sort of joking tehehe.

tough abyss
#

๐Ÿ˜›

jade abyss
#

You can never be sure D:

subtle ore
#

๐Ÿ˜†

jade abyss
#

dumdidum... still waiting
22:00:21 [1.27274e+006,0,0,0]

subtle ore
#

Are you waiting for it to burn, is that it?

jade abyss
#

yep

#

Why?

#

Because i can and i am bored.

tough abyss
#

Want to make arma crash. Run a Life server...

jade abyss
#

Thats nutting new

tough abyss
#

Not nearly as fun too I guess

jade abyss
#

I don't have to deal with them, soo... sucks to be you ๐Ÿ˜‚

tough abyss
#

(โ•ฏยฐโ–กยฐ๏ผ‰โ•ฏ๏ธต โ”ปโ”โ”ป

jade abyss
#

๐Ÿ˜„

#

โ”ฌโ”€โ”ฌ๏ปฟ ใƒŽ( ใ‚œ-ใ‚œใƒŽ)

tough abyss
#

hehe

jade abyss
#

22:05:07 [1.42596e+006,0,0,0]

#

Constantly 14% CPU load, Ram barely noticable, but almost any []spawn stuff is blocked since the first 2-3s

subtle ore
#

๐Ÿค”

jade abyss
#

Oh, now its dead

#

~2.000.000 x Spawn-ed

#
MyTest =
{
    while{true}do
    {
        TEST_A pushBack [];
        [] spawn MyTest;
    };
};

Took me about 25min to kill him. Acceptable slow death.

subtle ore
#

Wow.

peak plover
#

Hmmm

#

Since how many will there be a noticable drop in fps?

jade abyss
#

Server ~15-20FPS (i7-6700K)
Client - no change

hollow lantern
#
_loc = getPos _pos;
_refy = createVehicle ["Fridge_01_closed_F", _loc, [], 0, "FLY"]; ``` _pos is a object obviously but Mr. createVehicle wants 5 arguments, how come?
tough abyss
#
createVehicle [type, position, markers, placement, special]
jade abyss
#

something else must be broken before

hollow lantern
#
params ["_pos"];

_loc = getPos _pos;

_unitG = createGroup resistance;
_unit  = _unitG createUnit ["I_Soldier_F", _loc , [], 0, "NONE"];

_refy = createVehicle ["Fridge_01_closed_F", _loc, [], 0, "FLY"];```
jade abyss
tough abyss
#

Does the fridge fly?

jade abyss
#

^^

tough abyss
#

Maybe it does LOL

hollow lantern
#

well the commands before are working and the unit will be spawn

jade abyss
#

no clue, too late for me

tough abyss
#

Just do this:

_refy = "Fridge_01_closed_F" createVehicle _loc;
jade abyss
#

way faster:

_refy = "Fridge_01_closed_F" createVehicle [0,0,0];
_refy setPos _loc;```
tough abyss
#

KISS

jade abyss
#

Erm... ... thank you? oO

simple fiber
#

'way'

little eagle
#

Keep It Simple Stupid, Dscha

#

But that saying is dumb anyway. Sometimes you don't want stuff to be simple...

turbid thunder
#

the capitalization in this

little eagle
#

German, I was explaining what "KISS" means.

turbid thunder
#

I'd prefer if you would call me by my actual name, "Mason" and not my nationality that is in my nick too ๐Ÿ˜›

little eagle
#

Okay, Mason.

turbid thunder
#

๐Ÿ˜ƒ

little eagle
#

The whole name was too long to type.

turbid thunder
#

Mason has one less letter than German

#

Therefore, it is faster to type Mason instead of German = time saved

#

Gotta keep up the efficiency ๐Ÿ˜„

little eagle
#

Okay, The.

blissful fractal
#

So I had edit my fn_onfired.sqf on my server so when I have MeleeHatchet in my hand and fire it, it should call fn_pickaxeuse.sqf. But that do not work. What am I doing wrong?

params ["_unit","_ammo","_projectile"];

if(_ammo isEqualTo "GrenadeHand_stone") exitwith {
    _projectile spawn {
        private["_position"];
        while {!isNull _this} do {
            _position = getPosATL _this;
            uiSleep 0.1;
        };
        [_position] remoteExec ["life_fnc_flashbang"];
    };
};

if(_ammo isEqualTo "SmokeShellYellow") exitwith {
    [_projectile] spawn {
        params ["_projectile"];
        waitUntil{uiSleep 1; speed _projectile < 0.2};
        _enemies = _projectile nearEntities ["Man", 50];
        _nonUnits = [];
        {if(!isPlayer _x) then {_nonUnits pushBack _x}} forEach _enemies;
        _enemies = _enemies - _nonUnits;
        _projectile remoteExec ["life_fnc_teargas",_enemies];
    };
};

if(currentWeapon _unit == "MeleeHatchet") exitwith {
    [] call life_fnc_pickAxeUse;
};```
turbid thunder
#

@little eagle Yeah, I was just thinking about that

#

TGM could work too

little eagle
#

Reminds me of MTG.

hollow lantern
#

โ„ข (fuck nationality, freedom and peacy ftw)

#

less letters

little eagle
#

What am I doing wrong?

```sqf
<replace with code>
```

blissful fractal
#

What you mean? ๐Ÿ˜ƒ

#

ah ๐Ÿ˜„

#

Got it

#

xD

#

Thanks

little eagle
#

Now add "sqf" after the first three ` to enable syntax highlighting.

blissful fractal
#

Yea saw that ๐Ÿ˜ƒ

little eagle
#

I'd add for debugging:

diag_log [_unit, currentWeapon _unit];

And check the RPT file what that reports.

jade abyss
#

German, I was explaining what "KISS" means.
Ah, kk

blissful fractal
#

Sure I will try

#

Add it in the init right?

#

nvm that question ๐Ÿ˜ƒ

blazing zodiac
#

Does anyone have a faster way to sort an array by distance to a unit than _objs = _objs apply { [_x distance _unit, _x] }; _objs sort true;

little eagle
#

No, looks fine.

dusk sage
#

You'll have to loop over every element regardless, better to let the engine handle that for you

blazing zodiac
#

Alright, thanks guys.

little eagle
#

That is actually probably the best solution one can come up with.

turbid thunder
#

If performance is the problem, then you might just be using TOO many objects you want to have the distance sorted

blazing zodiac
#

It's not causing an issue yet but the runtime is a bit longer than I'd like depending on the location.

#

This is the entire function

#

The nearObjects is only there to allow editor placed objects to be used as cover still

#

Any tips on speeding this up from anyone would be greatly appreciated

little eagle
#
            };
          };
        };
      }];
    };
  };
}

Oh joy

blazing zodiac
#

I know lol

jade abyss
#

Thats even worse! ๐Ÿ˜ฑ

if()then{
    if()then{
        if()then{
            if()then{
                if()then{
                    if()then{
                        if()then{```
little eagle
#
    if !(_modelInfo in _blackList) then {
      if (_modelInfo in _whitelist) then [{
#

A white list and a black list?

jade abyss
#

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

blazing zodiac
#

Some objects won't pass the size check

little eagle
#

I thought both concepts exclude each other.

blazing zodiac
#

but are still viable cover

jade abyss
#

Are you german, The Hound? Would explain alot ๐Ÿ˜„

little eagle
#

A, so the white list is just to skip another check.

blazing zodiac
#

Basically yes

#

the blacklist was there because it trimmed quite a bit of time off the execution

little eagle
#

You should cache if a classname is viable or not instead of computing it for every object again.

blazing zodiac
#

unfortunately the objects in the blacklist array don't have classnames

#

well most of them

#

actually that's not true.

#

pretty much just new_wiredfence_10m_f

#

doesn't have a class

little eagle
#

well you could also cache them by model path instead of the classname

#

Same thing, no?

blazing zodiac
#

I guess so, how would I go about that?

little eagle
#

The distance checks have to remain, but all the classname and isKindOf checks would fall away.

#

CBA available?

blazing zodiac
#

yes

little eagle
#

wait, I'll give you the concept

simple fiber
#

It needs to stop really

little eagle
#
// init
Hound_viableCover = [] call CBA_fnc_createNamespace;

// the function
...

private _isViable = Hound_viableCover getVariable (getModelInfo _x select 0);

if (isNil "_isViable") then {
    _isViable = <do all the classname / isKindOf / model checks>

    Hound_viableCover setVariable [getModelInfo _x select 0, _isViable];
};

_isViable = _isViable && <proceed with distance checks>
#

You missed the point, Harm

#

Like completely

#

lol

simple fiber
#

CBA dependency can still be avoided

little eagle
#

Sure, but that made it easier for me. And getModelInfo alone doesn't help here at all. He's already using it.

simple fiber
#

And he did though the script with CBA so why giving him CBA solutions ?

#

*not

little eagle
#

Wtf are you on about. He said it's available.

#

So might as well use it. If he said no all that would change is what I would've wrote.

#

Jesus.

hollow lantern
#

+1

little eagle
#

At least try to comprehend what I'm doing here.

blazing zodiac
#

Ok cool, thanks for this commy. I'll try it out as soon as I get home.

little eagle
#

You understand what this does right?

#

You only have to do all the model / classname checks once for every model.

#

So some more checks initially, but every other copy of the object type is done way faster.

simple fiber
#

No shit sherlock

#

But using CBA to create a namespace

#

Isn't it overkill

#

Like you can already use an already defined namespace

#

I don't get it that's why

little eagle
#

And what namespace should be used instead?

simple fiber
#

missionNamespace ? uiNamespace ? Even profileNamespace if you don't wnat to run the checks between restarts

little eagle
#

But then you can only have one cache. Maybe he wants to use the model paths for something else later too.