#arma3_scripting

1 messages ยท Page 346 of 1

waxen tide
#

@rotund cypress care to elaborate on the advantage? I'll look into it.

spice kayak
#

TL;DR: Script turns lights off and on, but shouldn't turn back on if damaged. Not sure if it'll work, never used getHitIndex before.

tame portal
#

@rotund cypress param not params

#

@waxen tide param/params is faster than select and gives you the advantage of optimally defining default values and checking the type you're selecting from an array

#

*optionally

waxen tide
#

i see. thanks you two!

tame portal
#

@spice kayak

#

When you damage the lightpoint of a lamp via script, use a value like x.936482736482

#

Something that is very unlikely to occur when you shoot it

spice kayak
#

It uses 0.97, or is that not specific enough?

tame portal
#

When you heal the lamps again, just check if the damage hitpoint is that specific value, if it isn't, don't heal the lamp

spice kayak
#

You actually have a point there.

#

I didn't think of that.

tame portal
#

I'm sure something like 0.9755 is specific enough

#

Very unlikely to happen naturally

#

It saves you the hassle from setting a variable and so on

spice kayak
#

And then the night when people play it, it happens haha.

rotund cypress
#

@tame portal params not param

tame portal
#

Workaround but still better than wasting resources

spice kayak
#

But yeah, I'll give that a try. But what I've written should work?

tame portal
#

@rotund cypress He's selecting a single element from an array -> param

#

Multiple elements -> params

rotund cypress
#

Param is essentially the same as select

#

And also

#

As long as you are turning a parameter into a variable you should use params

#

Unless its not at index 0

spice kayak
#

omgomgomg IT WORKS

tame portal
#

I swear to God I'll go to your house and throw at it with eggs @rotund cypress

#

:gun:

spice kayak
#

Sorry, but that was like, 5 hours of constant back and forth testing, giving up, eating lasagne, testing, etc.

#

It wasn't even good lasagne :(

tame portal
#

@spice kayak Working like intended?

spice kayak
#

Yup!

#

I'm just about to do a bigger scale test and see what happens, but yeah!

tame portal
#

@rotund cypress I use param for single values to select since I think private _variable = xxx looks more explicit

#

@spice kayak cheeky workaround 101

spice kayak
#

It's beautiful.

#

Little disappointed switchLight doesn't work though :(

tame portal
#

Meh was always kind of broken

#

I'd Personally add a small delay though when damaging alot of lights

#

Especially when it's across the whole map lol

#

If you don't put in a sleep and it's running on the server all clients will go ham and drop to 0 FPS for some time lol

#

But that heavily depends on the number of lights your damaging

spice kayak
#

Ah, it's only a small EMP, so it's not too bad. I think maybe 6 lights at most, so it's not too bad.

#

I would love to get them to flicker before going out and back on though.

#

I feel that would be too much effort unless I figured out functions, or a way to make what I've written as a function.

tame portal
#

Hmm

#

I think flickering would only be OK to a certain extent

#

Since changes via setHitIndex are globally synchronised

#

However I don't think turning it off and on 4-5 times in a second or so will make your server explode

#

Should be fine

spice kayak
#

Like, on (default) -> off (1 second) -> on (1 second) -> off (30 seconds, actual EMP) -> on

still forum
#

@tame portal "param/params is faster than select" wrong. Wouldn't make sense that a function that does more takes less time

tame portal
#

In its basic form it has proven to be faster to me

manic sigil
#

@spice kayak count me interested... will you be sharing this script? :D

spice kayak
#

Would there be anyway I can turn what I've written into something like,

EMPon;
sleep 0.2;
EMPoff;
sleep 0.2;
EMPon;```
tame portal
#

@still forum :>

spice kayak
#

Well, it's mostly on the wiki, I've just modified it slightly haha.

tame portal
#

@spice kayak if you want to make it a script to publish I suggest you pull the list of lights to damage only once and then pass it to your on off function

#

Do you want to publish it as a pbo?

spice kayak
#

Publish? Like, workshop or something? I'll end up exporting it to MPMissions at some point, yeah, but not publishing it.

tame portal
#

Hm then one simple function should be enough

#

I'd personally pass it a list of lights to turn off/on and whether to turn it off or on

spice kayak
#

Yeah, I'm working on re-writing it right now to see what I could do with it.

#

Though it is 2am.

tame portal
#

ArmA doesn't know sleep

spice kayak
#

So, I've got an idea of what I want, I'm just not sure how to do it in arma terms.

#

I'm just not sure how I'd do that bottom part. I don't know how to call upon things like that.

dusk sage
#

call empON

#

call empOFF

spice kayak
#

Oh.

#

'I don't know how to call upon things like that'

#

Couldn't have been more obvious.

#

Thank you.

dusk sage
#

๐Ÿ˜‰

spice kayak
#

So far this script has had more sleep than me...

#

Time to see the errors!

#

Okay, errors where I didn't expect any. Line 2.

#

Fixed it, and god damn, it's actually pretty damn amazing looking.

rotund cypress
#

@tame portal but then you are compromising unnecessary performance AFAIK

halcyon crypt
#

any way to have cd like behavior for configFile? Like configFile >> "Class1" >> "Class2" >> "Class3" >> .. >> "some_attribute_of_class2"

still forum
#

Explain better

#

You can do configFile >> "Class1" >> "Class2" >> "Class3" >> .. >> "some_attribute_of_class2" already

halcyon crypt
#

really?

still forum
#

yes.. exactly like that.. That's how you access config values

halcyon crypt
#

so the .. goes back up 1 level?

indigo snow
#

no

halcyon crypt
#

the .. didn't mean "etc" ๐Ÿ˜›

still forum
#

no

#

just save the config in a variable

#

_var = configFile >> "Class1" >> "Class2"

halcyon crypt
#

I wish, I only have access to the full path

still forum
#

_var >> "Class3" and _var >> "some attrib"

halcyon crypt
#

I get a full path like configFile >> "Class1" >> "Class2" >> "Class3" and I need to access some attributes of "Class2"

spice kayak
#

Here you guys go - the EMP flickering in action! No need to watch any longer after the lights go out. That was me just jumping up and down in celebration before realising I forgot to stop recording https://www.youtube.com/watch?v=DP1U6irG16g

indigo snow
#

str the config path and then some plitstring magic

#

but i guarantee theres a better way to set up your structure

#

so you wont need this in the first place

halcyon crypt
#

Oh I'm sure there is but I can't.. too much legacy

#

seems promising

tame portal
#

@halcyon crypt What do you want to do

halcyon crypt
#

get the parent config class of a config class

#

not parent from inheritance but actually config path

#

like with cd you can do cd .. and it goes back up a level ^^

tame portal
#

Oh so you mean class A { class B {

#

From b get a?

halcyon crypt
#

kind of but not really

#

actually yes

tame portal
#

configHierarchy is the way to go then

spice kayak
#

Thanks for all your help, @tame portal :D It's working beautifully. Decided to try it on La Trinite, and oh my. Not too bad on the performance either!

tame portal
#

private _parentConfigs = configHierarchy blabla;
private _parentConfig = _parentConfigs param [(count _parentConfigs) - 2, configNull];

#

Something like that.

#

On mobile atm

#

@spice kayak no problemo

halcyon crypt
#

just realized we store the config path as [bin\config.bin,[3,4,2,2]] so I can just select my way to it ๐Ÿ˜ƒ

#

getText ((configFile >> "CfgGroups") select 3 select 4 select 2) >> "the_attribute";

#

and yes that path is generated at runtime so the indexes are fine ^^

manic sigil
#

Okay, JTAC script still in planning, need someone to check my thinking.

At the start, 9 radio triggers are set up (one for each 9line section) with "this AND BaseMenu == 1" for activation, and BaseMenu set to 1 in the init of the mission.

Each section then, one step down, sets BaseMenu = 0 and ThatSectionMenu = 1, with subsequent menus using their own menu variable for activation. (HeadingMenu == 1, Friendlies == 1, etc)

At the last section of each menu, on acting, sets SectionMenu to 0 and BaseMenu to 1.

This is all accomplished by each step doing a series of SetRadioMsg and SetTriggerConditions ["this AND SectionMenu = 1", "Dir100 = 3", ""] style rewrites for these same 9/10 radio triggers.

My problem/question is, will resetting to BaseMenu reactivate the base menu trigger conditions? Im suddenly wary that ill have to just face it and make a tree of triggers for each one.

My alternative plan was a single repeating trigger on MenuReset == 1, running a script that restores the radio triggers, but its being a pain in programming [""this""] etc.

rotund cypress
#

Does anyone here know if it's possible to change the size of a #lightpoint?

#

Right now it's just a round object...

manic sigil
#

Could I use basemenu1 = triggerstatements radiotrigger1, then later do Radiotrigger1 settriggerstatements basemenu1?

#

Guh, why do i insist on having insights at work and not at the keyboard t_t

narrow musk
#

Really sorry this probably isnt the correct place although i cant find the link to this discord if somebody could quickly share it. sorry to be a pain,.

robust hollow
#

@rotund cypress i dont think you can change the size of the sphere itself no.
@narrow musk discord.gg/arma
@atomic epoch what do you mean its invisible?

atomic epoch
#

You can't read it to find the errrors that would stop it compiling

robust hollow
#

umm, can u write the code in a text editor and then paste it in? what situation are u in where this is happening?

still forum
#

How do you find out what is wrong in a piece of code that you can't check for what's wrong and that you also can't look at?

#

Are you serious?

#

That's like asking "How to know if Schrรถdingers cat is alive or dead without observing it"

robust hollow
#

lol

still forum
#

If you can't read/edit the code anyway... You couldn't fix that code anyway if you could find out what the problem is

#

Put a magic number at the start of the script

#

then check via string comparison

atomic epoch
#

How would that work? A magic number? what?

still forum
#

Put something at the start of the script

#

and after decrypting just check if your script starts with that something

#

if it doesn't then decryption failed

atomic epoch
#

I guess that could work. But it would make the encryption very weak A hacker would only need to brute force one character (which would have to be in plain text) to unlock the whole text.

robust hollow
still forum
#

@robust hollow no.

atomic epoch
#

try will still give an error if it compiles incorrectly

still forum
#

But a hacker can look at the decrypted code.. Or he could compile it and see when it doesn't fail compiling

#

so that wouldn't actually make any difference

#

your encryption is weak enough already

#

and would a "asdwer3456bFASF$Q%ยงT" at the start of your script really scream "I'm successfully decrypted!!" ?

atomic epoch
#

Any code that decrypted would be stuck inside a spawn scope, I don't see how a hacker can look inside those

still forum
#

๐Ÿ˜„

#

You don't know anything about hackers do you?

atomic epoch
#

how would you do it?

still forum
#

Hook the compile function and log everything passed into there

atomic epoch
#

I don't see how a spawn scope can be looked into

still forum
#

Or just use my script debugger and add a breakpoint on new script threads

atomic epoch
#

I mean for a spawn {}

#

I don't see how someone can look inside one

still forum
#

Or just set the callback for the BE script scan and let it send the scripts to me

#

As I said.. You apparently have no Idea about Hackers ^^

atomic epoch
#

I know how I would an sqf from a script, but none for looking inside a running spawn

still forum
#

You have 0 chance to protect anything that is available on clientside against a real hacker

robust hollow
#

๐Ÿ‘๐Ÿป

atomic epoch
#

Well, I guess that makes us both

#

And ftw, there are no real hackers in Arma 3

#

Only scripters

#

scriptkiddies

still forum
#

So if you want to 100% protect something.. Don't have it land on clientside.
Otherwise.. Stop caring about how good your encryption is.. Because you don't stand a chance against a real Hacker

#

what?

#

Are you serious? XD

#

You are telling me I don't exist?

robust hollow
#

ur a scriptkiddie ๐Ÿ˜›

atomic epoch
#

Ok, lets say you on a server

#

Show me something I could'nt so using script commands, and I'll believe you

still forum
#

๐Ÿ˜„ Nah.. I'm fine with you staying in your weird world ^^

#

But.. Google "Intercept" or "ArmaDebugEngine"

atomic epoch
#

Would can they do?

still forum
#

I said google

#

If you don't wanna know then don't

atomic epoch
#

I googled "Arma 3 Intercept Hack". It shows a bunch of videos showing "hacks" from script injectors. But nothing impressive. These "hacks" are just script commands from Arma

still forum
#

Never said that was a Hack

atomic epoch
#

Then "Intercept" is nothing of intrest to me

still forum
#

So.. If it is a real Hack and not some script kiddy crap it's not of interest.

#

#offtopic btw

atomic epoch
#

If intercept doesn't do hacks, then why are you mentioning it to me?

#

Like I said, there are no real hackers in Arma 3. Only script kiddies

#

"If it is a real Hack and not some script kiddy crap it's not of interest" - So yes, because there are no real hackers in Arma

robust hollow
#

i assume uve only been hit by script kiddies?

atomic epoch
#

In arma 3? sure. If you honestly believe you've been hit by a "real" hacker in arma, you are mistaken. Script kiddies don't deserve such a title

#

That's all they are, script kiddies

#

Hacking by using script commands from the engine to "hack"

manic sigil
#

Last "hack" i saw was someone using an A2 'nuke' hack... but the script is broken in A3, all it did was shake the screen and give us a neat orange filter.

still forum
#

This is so ridiculously funny ๐Ÿ˜„

manic sigil
#

Kinda wish I knew the filter code, tho, it was a good effect :/

still forum
#

@atomic epoch I don't only believe that there are real Hackers. I know that there are. Because I am one of them

atomic epoch
#

That nuke still uses script commands. A combination of BIS_fnc_MP, createVehicle, drop, filter, and there you have: Nuke Hack. All of which still use script commands.

still forum
#

I don't think I have a screenshot of my ESP

atomic epoch
#

@still forum , yes you could very well be a real hacker. But inside of Arma 3, your just a script kiddie. Using script commands to ruin a server is not a hack

still forum
#

XD

#

I don't use script commands for my Hack

#

You are ridiculous

#

Wanna see?

manic sigil
#

I did have dreams of using the arsenal Import function to like, this allowdamage or this addaction.

still forum
#

I'll make a screen of some of my code

blissful wind
#

:\ take it to PM

atomic epoch
#

ESP can easily be recreated with script commands using getpos player and draw3D.

open vigil
still forum
atomic epoch
#

Kinda pointless though. Its easy to recreate your "hacks" with normal script commands. Your just overworking yourself. Any hack you can ever do, will always be limited by what script commands can already do. Not impressed

still forum
#

So.. You are saying everyone that is doing something that could be done with existend or non-existend script commands without using scripts in any way is still a script kiddy

#

And you are saying because my native hack can somewhat be build using scripts that I am limited to script stuff only? Your logic is messed up man

#

Because a car is made of metal it can't move because metal can't move by itself?

tough abyss
#

This is a fun read ๐Ÿฟ

atomic epoch
#

ESP is nothing to be proud of. And yes, anything you can do, can already be done inside the Arma 3 Engine.

cinder night
#

๐Ÿ˜‚

still forum
#

But as I said.. I'll stop now. You stay in your own delusional world

#

How can you make a SQF->C++ Binding with only scripts? Tell me that

atomic epoch
#

Delusional? No, your just giving me somethign to learn.

indigo snow
#

I think weve confirmed that nothing client side is safe by now, to return to the original topic.

still forum
#

There is not much going on here right now.. So.. I guess I could have some fun with some random idiot ๐Ÿ˜„

tardy wagon
#

using scripts inside of arma isn't really even what script kiddie means, as long as you write the scripts

#

"script kiddie" refers to kids who try to attack things who have no real knowledge on what they are actually doing, and who are just following guides and using pre-built tools

blissful wind
#

BIS_fnc_scriptKid takes args _rage, _noGF (default: false)

tardy wagon
#

coincidentally I had an attempted script kiddie compromise of my web server yesterday

arctic veldt
#

My "script kiddie" interpretation is someone who finds ands uses random scripts/hacks/whatever they stumble upon

still forum
#

That's also my definition. Just copies stuff without making anything himself

arctic veldt
#

๐Ÿ‘†

tough abyss
#

@still forum thats probably the most organized ive seen ๐Ÿ˜ฎ i just throw everything in dllMain

still forum
#

I started out with that.. But that project is now a little over 2 years old

tough abyss
#

ah

still forum
#

and as I added different rendering engines and stuff that became a liiittle to cluddered

halcyon crypt
#

judging by the work @still forum has been doing I'm pretty sure he fits the "hacker" definition quite well

#

the positive version that is

#

๐Ÿ˜„

still forum
#

There is a unwritten rule that you are not a Hacker unless a Hacker calls you a Hacker

#

By that definition I think I'm actually not one.. Not sure

halcyon crypt
#

that's the same thing as a good programmer calling another programmer a good programmer

#

quite unlikely to happen ^^

rotund cypress
#

Hey guys, if I want to hide the default player marker on map, the red one which shows where you are, how can I do that? I checked difficulty options but I can see no such option.

robust hollow
#

mapContent=0; should do it, it hides other map markers tho, like spotted units.

rotund cypress
#

Already have that, but still shows

robust hollow
#

oh, maybe im thinking of something else ๐Ÿ˜• it is in difficulty i know that much

chilly hull
#

So if I have a gun on the ground, how do I find out what it is? trying to typeName into isKindOf doesn't work because typeName just returns "OBJECT"

#

Speficially I want to take the gun from the ground and put it into the player's hands.

manic sigil
#

@chilly hull just delete the gun, and player addweapon?

chilly hull
#

I intend to, but I first have to find out what type of weapon it is.

robust hollow
#

if it is in a weaponholder you can do weaponCargo box which returns ["arifle_MX_F"]
if it is an actual weapon object you do typeof object which returns "Weapon_arifle_MX_F"

rotund cypress
tame portal
#

@rotund cypress can only be done through the difficulty settings

#
groupIndicators = 0;      // Group indicators   (0 = never, 1 = limited distance, 2 = always)
friendlyTags = 0;         // Friendly name tags (0 = never, 1 = limited distance, 2 = always)
enemyTags = 0;            // Enemy name tags    (0 = never, 1 = limited distance, 2 = always)
detectedMines = 0;        // Detected mines     (0 = never, 1 = limited distance, 2 = always)
commands = 0;             // Commands           (0 = never, 1 = fade out, 2 = always)
waypoints = 0;            // Waypoints          (0 = never, 1 = fade out, 2 = always)
tacticalPing = 0;       //Tactical Ping (0 = disabled, 1 = enabled)
visionAid = 0;        // Vision aid (0 = disabled, 1 = enabled)
mapContent = 0;       // Extended map content (0 = disabled, 1 = enabled)
manic sigil
#

Does ShowcommandingMenu not function all the time? I have a radio function that on activation is supposed to keep the menu open, but it closes anyways :/

cyan pewter
#

Any tips for selectPlayer? I can't get it to do anything even in a sp environment

spice kayak
#

Okay, can anyone think of any reason why this wouldn't be updating?

bravoUpload = 0;
[] spawn {
    while (bravoUpload < 100) do {
        if (bravotriggered == true) then {
            bravoUpload = bravoUpload + 1;
        };
        sleep 0.5;
    };
};```
waxen tide
#

have you checked if bravotriggered changes to true with a debug output?`

spice kayak
#

Yup, that outputs as true.

#

bravoUpload just simply isn't changing from 0, for whatever reason.

waxen tide
#

put a debug output inside that if statement to see if it changes there?

robust hollow
#

while {} not while ()

spice kayak
#

I did try both earlier.

#

I got it working now though, thanks.

waxen tide
#

@spice kayak what editor are you using?

spice kayak
#

notepad++

waxen tide
#

if you type "while" in it and hit tab for autocomplete it gives you:

#
while {/* condition */} do 
{
    /* STATEMENT */
};
#

kinda hard to fuck up then

spice kayak
#

Oh, nice. I might have to.

#

But it wasn't the {} / () that borked it. I don't think it liked the true/false statements. I've gotten one of them working, just not the other, despite being identical.

waxen tide
#

well while () doesn't work so at least you have one error fixed

#

sqf syntax highlight in discord sucks btw.

spice kayak
#

Yeah, for some reason, it wasn't working when they were inside the same [] spawn {}; function.

#

Once each was in it's own, it worked.

waxen tide
#

well spawn adds scripts to the scheduler, it doesn't gurantee the scripts are executed in the order you schedule them at all. can bite you in the butt.

#

if you rely on a specific execution order you need to make sure that your previous script executed

spice kayak
#

Yeah, that might have been the case. Thank you.

waxen tide
#

if you check the biki on spawn it shows how to check if a script is done with the handle and scriptDone

spice kayak
#

Oh, nice.

#

There's actually one more thing you might be able to help me with.

#

I've got this bit of code, executed on the server for the second operator. However, there might not always be an operator, and I'm pretty sure if I leave the slot empty when I play as MP, I get an error because the unit doesn't exist.

[] spawn {
    while {alive pOperator2} do {
        if (Op2empUsage == 0) then {
            pOperator2 removeAction 0;
        };
        sleep 1;
    };```
#

Let me just check that once more though.

#

I know it's something simple, but for some reason, my tired mind is drawing blanks.

#

Actually, I didn't get an error this time around. Well, that's nice!

#

Oh yup, got it again. Undefined variable "pOperator2"

waxen tide
#

well just check if pOperator2 exists

#

if yes, execute your code

#

if not, don't

#

you can even check if a variable is undefined with isNil

spice kayak
#
[]spawn {
    if (!isNil pOperator2) then {
         while {alive pOperator2} do {
        };
    };
};````
#

That also would give me errors. I feel like an idiot right now, because I know it's something I've done before.

robust hollow
#

if that code is executed on the server then removeAction wont do anything?

spice kayak
#

It does.

digital pulsar
#

isNil takes a string as an argument

peak plover
#

!isNil {myvar} ?

digital pulsar
#

!isNil "myvar"

peak plover
#

boith

digital pulsar
#

well he referenced the variable directly

#

just giving him a solution, not a whole lecture on the command

peak plover
#

also while {!isNil "pOperator2" && {alive pOerator2}} do {};

spice kayak
#

Sorry, I've gotten it fixed :)

waxen tide
#

do modern IDEs check for undefined variables? i mean if you simply never define a var in your project, an IDE could catch it right? it identifies vars for syntax check anyways?

#

shuts up

waxen tide
#

I want to display a short text on the screen while the player talks to an NPC. hint is too subtile, titletext is too small and formating doesn't work (yet?), hintC takes player control which isn't wanted. Anything i'm not aware of?

queen cargo
#

SystemChat

peak plover
#

cutRsc

#

make your own hud resource and display that instead

#

Easiest way would be to use systemChat or sideChat

spice kayak
#

Well shit. Now my scripts are making the game crash.

waxen tide
#

well something could be spamming the chat and then systemchat would scroll away? that doesn't seem ideal

#

i'll look at cutRsc i guess

#

thx guys

spice kayak
#

too many virtual memory blocks requested for me anyway.

#

Can someone take a look at the different scripts I've written to see why this might cause crashing? Because it's not giving my any specific errors, I'm really not too sure where to look :(

#

Okay, hosting as MP works, but the FPS is literally 0. Something is causing a hang, I'm just not sure what.

tardy wagon
#

run it through a profiler

spice kayak
#

Yeah, I think I might have found it. I didn't have a sleep command on a looping script.

#

For something that was meant to +1 every time it looped, yeaaahhhh.

cloud thunder
#

if (bravotriggered) then {

spice kayak
#

I did initially try using boolean but was getting errors with true/false, so I used 1/0 instead. I'm not sure if that would work if it's a number, would it?

cloud thunder
#

sure as long as you declare it a number before loop runs

spice kayak
#

Oh, neat. I originally thought that would only work with true/false statements. Thank you.

waxen tide
#

is grabbing stuff from the cfg files all the time expensive performance wise?

still forum
#

yes

#

you could make a function that caches the result in a variable after your first request

waxen tide
#

well i wrote a script to generate a list of all cities, towns etc on the map and then keep that to use it in various places, and i was wondering if that even makes sense

#

is it smarter to store such things in multiple arrays, and then do selectRandom (townarray + cityarray) or should i use a multidimensional array and throw cities and towns for example in the same array but with a category attached?

still forum
#

selectRandom (townarray + cityarray) concating arrays is not free. So doing that often is not a good idea

#

If you never need seperate arrays for them then just keep them in one array

spice kayak
#

Okay, this is strange. I have one variable called emp1Charge, yet it seems to have two values.

still forum
#

different namespaces?

spice kayak
#

This is the script this certain player is running. Basically, if their charge is lower than 100, it'll add 1 charge every cycle. Once the charge is at 100, it'll stop adding up, and instead add an action if that action wasn't already there. Down the bottom, there is a hint that displays the charge level. https://hastebin.com/ojelugevad.sqf

This is the script the addaction runs, which should reset the charge back down to 0 once it's executed, and allow the action to be removed. https://hastebin.com/axucixequl.sqf

#

I don't think so.

waxen tide
#

well i need both. occasionally i only want towns, but occasionally i want both towns and cities. the question is: fetch partial information from a large multidimensional array, or occasionally concatenate them. i only do it for starting a mission every few minutes so i guess its no big deal.

still forum
#

multidimensional then

waxen tide
#

ok thanks

still forum
#

@spice kayak So That are your scripts.... And that is what you are doing.. whats the problem?

waxen tide
#

i fetched all the locations from cfg yesterday and there are millions of small hills inside

spice kayak
#

The problem is, when the charge is at 100 and the action is added, when I execute the script, the charge value is set to both 0, and 100 at the same time.

still forum
#

there is no "at the same time" in sqf

spice kayak
#

If I use systemchat locally to get value of the charge, I get it counting up again, which is what it should do, but on the hint, it's still displaying 100, while every second, adding the action again and again.

#

so, it's like operator1Script is stuck on it thinking it's 100, so it's adding the action again and again, yet the part that increases the charge knows it's below 100, because it's slowly increasing it from 0 again.

waxen tide
#

just out of curiosity: i was under the impression the scheduled environment exists so scripts could run multithreaded and thus in parallel?

still forum
#

no.

#

you are talking about scheduled. And no. They don't

waxen tide
#

yes, scheduled. but why does it exist then? just to avoid exceeding the execution time inside one frame?

still forum
#

yes

waxen tide
#

i see, thanks

still forum
#

@spice kayak

        if (emp1charge < 100) then {
            emp1charge = emp1charge + 1;
        } else {waitUntil {emp1charge == 0};};
#

maybe that helps

spice kayak
#

I'm now trying to add it to the same [] spawn {}; instead of in seperate ones.

still forum
#

it can't increment anymore till it's back at 0

spice kayak
#

But it does reset when the script runs, but it doesn't for the hint and the addaction segement.

#

That was the issue.

still forum
#

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

#

Something has to reset the variable to 100 again in the hint

#

There are no different namespaces here

spice kayak
#

Yeah, but if I use systemchat to get the variable, it says it's not 100, which is correct.

#

It's like, at some point, one variable becomes two. I know that can't happen, but it seems that way.

still forum
#

did you try putting the sytemChat right after your hint?

#

inside the same spawn

spice kayak
#

Oh, systemchat is typed in the debug console.

still forum
#

parsetext format is quite dumb.. formatText

queen cargo
#

Formattext is returning normal strings

spice kayak
#

Okay, even weirder. I've increased the amount it adds every cycle, from +1 to +5. Now, systemchat is showing it go up in increments of 5, yet the hint is only going up at 1 every cycle.

#

The fuck, game.

queen cargo
#

Your code is probably wrong

#

And you fuck up in some way

spice kayak
#

Thank you, I figured that much :P

queen cargo
#

Npnp

#

You can use arma.studio with Dedmens debugger to debug your script

#

More indepth

waxen tide
spice kayak
#

So, I think I figured out the hint part anyway. For some reason, it's using both emp1charge, and operator2's emp2charge.

#

So the reason why the hint was flicking back and forth was because it was switching between emp1charge and emp2charge.

#

And the reason why it was thinking I was at 100 was because emp2charge was at 100, so it would add the action for me, but emp1charge was reset when the action was used.

#

Weird, I'm not sure why there is the conflict between the two.

#

Fixed it. For some reason, I had emp1[stuff] in the emp2script, which shouldn't have ran anyway, but still.

still forum
spice kayak
#

Still having a bit of glitchy hint stuff. If I've got one unit executing their own hint, with their own variables, and then another unit with their own hint, with their own variables, it shouldn't be conflicting, should it?

still forum
#

only one hint can be displayed at a time

waxen tide
#

doesn't it make more sense to extract location information from the cfg rather than using nearestLocations to map the whole map? but then the return type isn't of the type Location i guess.

peak plover
#

Isn't parsetext completly different from formatTextT?

still forum
#

I guess it makes some sense. But from config is harder I think

#

@peak plover parseText turns string into text

#

formatText is like format but returns text instead of string

waxen tide
#

well i figured out how to do it and make a nice array, but to turn that into locations i can only think of abusing nearestlocation again

peak plover
#

Ohh, really?

#

So i'm turning 2 into 1

still forum
#

No. I'm joking

peak plover
#

Thanks

tame portal
#

Why is text and string even a thing

spice kayak
#

Do you mean, one hint over every player, or one hint per person?

peak plover
#

literally just wrote something with parseText format a few hours ago ๐Ÿ˜„

spice kayak
#

Because I know the latter one.

peak plover
#

Hint gets replaced by a newer hint instantly

#

I hate hint

spice kayak
#

Yeah, but, if one machine executes one hint, and another executes their own local hint, there shouldn't be a conflict, should there?

#

I've had missions before where one team gets one hint, and another team gets a different one.

peak plover
#

nope, local effect

#

no conflict*

#

But if antoher script uses hints (some mods do) it will overwrite ๐Ÿ˜•

spice kayak
#

But for some reason, on this one, despite being two different units with their own local script running their own hints, Im' getting conflict.

still forum
#

@tame portal Because they are totally different things in the backend. Text is compiled. String is just a string of characters

tame portal
#

Yeah but it's still... weird

waxen tide
#

@spice kayak if you do hint "1"; hint "2"; then only 2 will be visible because it will replace 1 instantly.

still forum
#

@spice kayak One hint per UI

tame portal
#

I personally would have made all functions that need text compile the string when required

peak plover
#

@spice kayak try putting systemChat _text under the hint. See what pops

spice kayak
#

I think it's because I'm hosting it.

peak plover
#

good for debug

still forum
#

@spice kayak Are you alone in MP? or with someone else?

spice kayak
#

loading into MP from editor.

#

so, alone.

still forum
#

You are alone.. Who is the other Player getting the hint then?

peak plover
#

๐Ÿ˜ฉ

still forum
#

"despite being two different units with their own local script running their own hints"
You are alone. Tell me how one person == two seperate persons

spice kayak
#

Another unit is getting the hint.

still forum
#

How?

spice kayak
#

Or, should be.

peak plover
#

non-player units don't get hints. If they unit is local to you (client and server) you will get it instead

still forum
#

The script is running on his computer?

#

You are ALONE. There is only your Computer.

spice kayak
#

yeah, I get that, I just meant, I told the unit to run the script, which is why it might be having conflicts for me, the host.

peak plover
#

loading into MP from editor.
This means you are both server and client, at the same time

spice kayak
#

Yeah, that's what I was getting at before.

still forum
#

You are the Unit. So you are running the script. So you are getting his Hint

#

You can't test Multiplayer MP stuff when you are alone.

#

Because Singleplayer is by definition not Multiplayer

spice kayak
#

Yeah, that's what I was thinking as well. Least now I have more clarification on that fact.

#

I admit, I love running around and seeing all the lights flicker off and back on again. It should make for an interesting mission, hopefully.

peak plover
#

Nice, I wish more people put decent missions on workshop ๐Ÿ˜ƒ

spice kayak
#

Ha, yeah, 'decent'

#

It's mostly just for my group, so I doubt I'll release anything I've made.

rotund cypress
#

@tame portal everything is pretty much on 0 however, I still see myself

peak plover
#

Because, there are so many communities that have stuff like trouble in terrorist town, etc. But mostly these are kept inside the house ๐Ÿ˜„

#

I like learning and checking out other missions/scripts for inspiration

#

Any script/funtion libraries that exist?

spice kayak
#

Well, maybe i'll share it once it's done.

#

It's kind of like Splinter Cell's MP, with Agents vs Guards. The Agents have a rechargable EMP, silenced pistol, tripwire mine and some smoke grenades. The guards have an SMG with a flashlight and some armor. The objective is to upload intel to two different laptops. Once that's done, Agents win. Guards win by killing all agents.

peak plover
#

See, that sounds awesome. I wish there was like a google docs or sth, that everyone could add their creations to via google forms or sth ...
be it scripts, missions etc... Or something similar to ai script/mod list

#

@spice kayak that's really awesome

spice kayak
#

Ha, thank you. I've been working on getting the EMP side of things working for a few days. Only today have I actually made a mission around it haha.

#

My main issue is, I normally don't have people to test with until it comes mission night, in which case it'll more than likely break, and everyone would be disappointed :C

#

Oh my, the guards should totally have clem lights.

chrome nebula
#

How would I add more items to this line
if ("Exile_Headgear_GasMask" in (assignedItems player)) then

#

I basically want to add more gasmask items to the exile radiation script

rotund cypress
#

if ("Exile_Headgear_GasMask" in assignedItems player || {"Mask2" in assignedItems player}) then

#

@chrome nebula

chrome nebula
#

So I'd just need to put the two lines?

#

For however many items I want

rotund cypress
#

if ("Exile_Headgear_GasMask" in assignedItems player || {"Mask2" in assignedItems player} || {"Mask2" in assignedItems player} || {"Mask2" in assignedItems player} || {"Mask2" in assignedItems player} || {"Mask2" in assignedItems player}) then etc

chrome nebula
#

Sweet

#

Cheers man

rotund cypress
#

|| = OR

chrome nebula
#

AHHHH

rotund cypress
#

You can also write OR, but don't do that

peak plover
#

WHAT?

spice kayak
#

OR WHAT?

rotund cypress
#

OR and || are the same operators.

#

Doesn't matter what you use

peak plover
#

Why not if ((goggles player) in _masklist) then {}

rotund cypress
#

Could do as well

#

Well, he is not using goggles though

#

He is using assignedItems

peak plover
rotund cypress
#

I think it's a modded thing

#

Exile..

peak plover
#

I've played it, last I remember the gasmask was in goggles

chrome nebula
#

@rotund cypress

#

I'm getting an error

#

13:43:07 Error in expression <all ExileClient_gui_gasMask_toggle;
};
};
ExileLastStatUpdate = diag_tickTime;
t>
13:43:07 Error position: <;
ExileLastStatUpdate = diag_tickTime;
t>
13:43:07 Error Missing )
13:43:07 File mpmissions\ExileBlank.DSR_Chernarus\Overwrites\ExileClient_object_player_stats_update.sqf, line 176
13:43:07 Error in expression <all ExileClient_gui_gasMask_toggle;
};
};
ExileLastStatUpdate = diag_tickTime;
t>
13:43:07 Error position: <;
ExileLastStatUpdate = diag_tickTime;
t>
13:43:07 Error Missing )
13:43:07 File mpmissions\ExileBlank.DSR_Chernarus\Overwrites\ExileClient_object_player_stats_update.sqf, line 176

#

This is my code

#

if ("Exile_Headgear_GasMask" in assignedItems player ||
{"Masque_Metalhead" in assignedItems player} ||
{"H_ALFR_Gasmask" in assignedItems player} ||
{"avon_ct12" in assignedItems player} ||
{"avon_ct12_strapless" in assignedItems player} ||
{"avon_SF12" in assignedItems player} ||
{"avon_SF12_strapless" in assignedItems player} ||
{"avon_fm12_strapless" in assignedItems player} ||
{"avon_fm12" in assignedItems player}
then
{
if !(ExileClientGasMaskVisible) then
{
true call ExileClient_gui_gasMask_toggle;
};
if (alive player) then
{
if (diag_tickTime >= ExileGasMaskNextSoundAt) then
{
playSound format ["Exile_Sound_GasMaskBreathing0%1", 1 + (floor (random 2))];
ExileGasMaskNextSoundAt = diag_tickTime + (2.2 + (random 1));
};
};
}

still forum
#

@chrome nebula Error Missing ) you are missing a )
And it's VERY easy to spot in your code

chrome nebula
#

...

#

Godammit. :L

#

I'm such an idiot.

spice kayak
#

That's how I've felt all day!

#

God, today I was stuck on how to figure out if a unit exists :/

#

Yeah, I suck at names

#

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

waxen tide
#

If i find a few more ways to shorten this script it will disappear

manic sigil
#

How would I take a starting position (XYZ in an array), a direction, distance, and altitude, and turn it into another position (XYZ) to move a gamelogic to?

cold pebble
#

I'd take a look at getPosATL and setPosATL on BIwiki, that's probably what your looking for

manic sigil
#

That'd do for altitude, but that's probably the easiest part :/

#

modeltoWorld with some maths involved?

#

Or positionrelative

cold pebble
#

Oh yeah modelToWorld then, misunderstood original bit ๐Ÿ˜‰

manic sigil
#

That's fine, I'm reasonably sure where I'm heading with this, but past experience has shown that throwing it out here usually results in an obvious 'Oh just use 'FindThatPoint' function, it's right on the wiki..'

#

X2 = (getpos Start select _1) +(Dist) cos (Dir)

cold pebble
#

Haha well the wiki is good ๐Ÿ˜‰

manic sigil
#

Oh god trig ๐Ÿ˜ซ

cold pebble
#

Trig can be useful ๐Ÿ˜‰ love it

manic sigil
#

I know, I know... I'm not shy of maths, but it's never been my strong suit.

#

Especially introductory algebra. No clue why, just couldn't wrap my head around it.

#

StartPosX = [getpos Start] select 1
Correct?

waxen tide
#
array = [[1,2],[2,2],[1,2],[2,2]];
#

How do i select each element from that array where the first element is 1 ?

indigo snow
#

a select {_x select 0 == 1}

waxen tide
#

Thanks!

tardy yacht
#

Hey my dudes, I've been stuck on the same problem for a little over a day now. I have a cellphone with working contacts and messages lists. When you go to your conversations list, you see the person's number (or name if they're in your contacts) and on double click, it opens a new dialog. This dialog lists the messages between you and this person, and has a reply button. When I press the reply button though, I can't seem to find a way to pass the number's variable to my reply script.

Here's how it goes:

Conversations dialog -> double-click conversation in list, spawns script -> script gets the lbData (number) and stores in _num then opens new dialog and uses the number to populate the messages list -> onbuttonclick calls other script <- thats who I need to send the variable to.

I could probably make the variable a global one, but I'm sure there's another very simple way to do it. I'm probably just missing something big time.

#

fn_openMessages.sqf

disableSerialization;

_num = lbData [5050,(lbCurSel 5050)];
createDialog "phone_messages";
_list = CONTROL(6000,6050);
_messages = { if ((_x select 0) isEqualTo _num) exitWith { _x select 1 }; } forEach dript_phone_messages;

if (isNil "_messages") exitWith {};

{
    _msg = _x select 0;
    _label = if (count _msg > 15) then { (_msg select [0,15]) + "..." } else { _msg };
    
    _list lbAdd _label;
    _list lbSetData [(lbSize 6050) - 1,[_msg,_num]];

    if ((_x select 1) isEqualTo 0) then { 
        _list lbSetPicture [(lbSize 6050) - 1,"sent.paa"];
        _list lbSetPictureColor [(lbSize 6050) - 1, [1,0,0,1]];
    } 
    else { 
        _list lbSetPicture [(lbSize 6050) - 1,"rec.paa"];
        _list lbSetPictureColor [(lbSize 6050) - 1, [0,1,0,1]];
    };    
} forEach _messages;
still forum
#

set/getVariable on the dialog

tardy yacht
#

so like

#

phone_messages setVariable ["number",_num] ?

#

Oh I think I found it I need to grab the dialog through findDisplay

#

That works

#

Neat

#

Thanks, again.

#

I'm gonna have to start crediting you somewhere on my server if you keep this up ๐Ÿ˜

peak plover
#

What are variables that I get with _this when I use buttonSetAction

#

And how do i find documentation on this?

#
_buttonCtrl buttonSetAction "
    systemChat str _this;
";

๐Ÿคฆ

#

returns ""

still forum
peak plover
#
_buttonCtrl ctrlSetEventHandler ["buttonClick","
    systemChat str _this;
"];
// control
peak plover
#

I feel like buttonsetaction is bad and ctrlSetEH should be used instead ๐Ÿ˜•

#

A note from buttonsetaction to ctrlSetEH would be cute

rotund cypress
#

I know this is the wrong chat, but I did not get any answer in Battleye so wil try here as well.

Hey, does anyone know what this means exactly?
23:47:33 BE protection kicked in for player id=1805870767, name='SimZor', msgType=372
Its a compile function i am remote executing globally
Battleye log
26.08.2017 23:47:33: SimZor (ip:2304) 6015f94cf68fcb43378a31eb574f6aed - Compile Block "fnc_compilerequest ["skipTime 5","SERVER"]"

peak plover
#

Just wait on BE channel. This is not instant chat.

waxen tide
#
(findDisplay 12 displayCtrl 51) ctrlAddEventHandler ["Draw","
    (_this select 0) drawLine [
        getPos player,
        [43.343434,53.555553,0],
        [0,0,1,1]
    ];
"];
#

what does _this store?

peak plover
#

same as onDraw, returns map control ?

waxen tide
#

I don't follow

manic sigil
#

Partial JTAC success so far - I have a reasonably accurate orienteering script, though it's buggy as hell on certain paths (one trigger was setting my hundreds of meters to 0, constantly, which isn't fun when 90% of the tree requires Dist100 == anything but 0). All I need now is some way of using marking systems (smoke? Laser is easy I think), and actually spawning the airstrike.

polar folio
#

what was the variable/function/command to get the currently controlled unit again? basically wanting to have something work with zeus remote control also. i remember the solution vaguely but forgot to implement it when it came out

peak plover
#

isPlayer?

#

            bis_fnc_moduleRemoteControl_unit = _unit;
            _unit setvariable ["bis_fnc_moduleRemoteControl_owner",player,true];
polar folio
#

ah. i think that's it

polar folio
still forum
#

Don't think so

manic sigil
#

Every plane I spawn nosedives :/ I can't seem to fix this one up.

#

NVM, kinda fixed it with a KK script.

polar folio
#

apply some velocity

manic sigil
#

Problem is the spawn direction is variable :/

polar folio
#

apply velocity in dir vector then

#

vectorDir _plane

manic sigil
#

I think I got it with a KK script, KK_fnc_setDirFLY

#

I think I borked the math, tho... 90 degrees is still due north :/

polar folio
#

_plane setVelocityModelSpace [0, _howmuchyouwant, 0];

#

i think

peak plover
#

using ctrlMenu:
Do I just add a EH to check if mouse is not on the menu or clicks elsewhere?

polar folio
#

what's ctrlMenu?

peak plover
#

It's the drop down menu from the eden editor

#

It's well lacking documentation ๐Ÿ˜ญ

polar folio
#

just noticed yea

manic sigil
#

Input heading 180, target set to 270... yeah, I screwed up the math somewhere :/

#

@badbenson#0154 But your code worked, plane at least flies in at 180.

#

TGT setPos [(IP select 0)+DistTotal*(cos DirTotal),(IP select 1)+DistTotal*(sin DirTotal),0];

waxen tide
#

protip: when your units don't spawn and you can't find any issue, check if your cleanup deletes them right after they're spawned

peak plover
#

Hah, had that happen ๐Ÿ˜„

spark phoenix
#

Anyone here know exactly when the missionnamespace is created when joining into multiplayer

rotund cypress
#

When your group gets created IIRC @spark phoenix

spark phoenix
#

Thanks, will look into that then

tame portal
#

Quick question

#

Whats the easiest way to find out what name to use in the requiredAddons[] field in the CfgPatches

#

for something like HLC for example

still forum
#

@Kegan Hollern#7401 Way before preInit

#

Is your question when missionNamespace get's cleared? I think on Serverjoin. Slot selection.

#

I can check when exactly tomorrow. PM me so I don't forget

tame portal
#

3rd line

still forum
#

If someone catches you doing something like that.. Just say you are using Intercept to do magic ๐Ÿ˜„

tame portal
#

lol

#

Classic excuse ๐Ÿ˜„

rotund cypress
#

@tame portal return? This is not C#...

#

Never mind, just noticed this ;)

3rd line

queen cargo
rotund cypress
#

Not really the same thing, but sure

queen cargo
#

it is the same

indigo snow
#

#define return

#

voila

rotund cypress
#

๐Ÿ˜‚

#

_returnValue = if true then {true breakOut "main"} else {false breakOut "main"}; would not make sense @queen cargo

#

However in other languages you would have to use return

#

Here you don't, so it's not the same thing

queen cargo
#

SQF is working with scopes

rotund cypress
#

Exactly

queen cargo
#

breakout is the closest relative

rotund cypress
#

However, if I don't want to exit the scope, I don't use breakOut

#

I just leave the value I want to return

#

closest relative != same thing

queen cargo
#

there is no same thing thats the oint

rotund cypress
#

Exactly, yet you said it was the same ๐Ÿ˜‰

queen cargo
#

closest relative

waxen tide
#

realises addAction has a return value

peak plover
#

So, any public server use the switch server yet?

#

Could transfer players when there's a restart...

#

Or link to other servers by the same community through the briefing(map)

waxen tide
#

how bad is waitUntil performance wise? Is there a lazy version of it?

peak plover
#

not bad ๐Ÿ˜ƒ

#

waitUntil has specific use, if used for intended purpose it's good

#

If you just want to loop 'tho. Using while is 0.0001 ms better in 10000 iterations ๐Ÿ˜„

blissful wind
#

lol

rotund cypress
#

Never use while unless you got a condition other than true

waxen tide
#

please elaborate

rotund cypress
#

for "_i" from 0 to 1 step 0 do {}

#

Can also use OEF

peak plover
#

Yeah, use while {isNil "myLoopExit"}instead of while {true}

waxen tide
#

for performance reasons, that is?

rotund cypress
#

Yes

peak plover
#

OEF is most likely the best for not using SQF power

#

Because it does not check any conditions and waste any time whatsoever

waxen tide
#

whats OEF

rotund cypress
#

On Each Frame

#

for > while

#

Most of the time as well

#

Even if you have a condition

#

Better to use exitWith or breakOut

waxen tide
#

well i only need to check on something every, say, 5 seconds.

rotund cypress
#

Cause if you have a while loop it will check the condition each iteration

#

While a for loop is faster

peak plover
#

It does not matter what you use, they will all constantly check if it's been 5 seconds yet...

waxen tide
#

oh.

rotund cypress
#

@peak plover What do you mean by that?

peak plover
#

Unless you have >1000 loops like that it won't matter 'tho

rotund cypress
#

It will

peak plover
#

sleep _x; will cause the script to suspend and be checked if it's sleep is done yet

blissful wind
#

which takes a lot of CPU power as we all know

#

๐Ÿ˜›

rotund cypress
#

Did anyone here mention sleeps? @peak plover

#

What does that have to do with anything? ๐Ÿ˜›

waxen tide
#

so whats the most performance efficient way to check on a condition in a not terribly accurate (time wise) manner?

peak plover
#

No, if you run nothing else (vanilla, no scripts) you might get some slowdown with a few thousand loops VR

#

use event driven scripts intead of sleep

rotund cypress
#

I am talking about getting your result the fasest way

#

Not about slowing anything down

waxen tide
#

so, event handlers?

peak plover
#

if you want to sleep 5 seconds the fastest way just use sleep 4.9

rotund cypress
#

No matter how few loops you have, for will always be faster than while loop

queen cargo
#

"event driven scripts" ...
if you add those "event driven scripts" with a condition, the condition is checked just like normal

best way to just loop stuff is spawn

#

only exception is tiem critical stuff

peak plover
#

I mean if possible eventhandlers that already exist

queen cargo
#

and pretty mcuh nothing anyone here codes is time critical enough to be placed in onEachFrame

waxen tide
#

how do i loop with spawn?

peak plover
#

@waxen tide what are you even doing?

#

maybe it can be done without sleep?

tame portal
#

@queen cargo then you have those servers where something you spawn will be executed in 5 seconds because the scheduler is full of crap lol

queen cargo
#

@waxen tide sqf [] spawn { while {condition} do {code}; };

tame portal
#

#howtonotmanage

queen cargo
#

@tame portal stop using faulty code and that wont happen

tame portal
#

@queen cargo dont tell me

peak plover
#

Running the scheduler full of crap is not that hard...

#

just try vcom with 300 ai

queen cargo
#

that is the point
it is hard not to do so

#

that is why you barely find good running missions

waxen tide
#

@peak plover i spawn a lot of civilians and i put a long dialogue on them with addAction. depending on some conditions, the dialogue takes different turns and triggers events. I don't need instant responses, the player needs to read the answers anyways.

peak plover
#

wait, so what is the sleep for?

#

changing what add action to ad?

waxen tide
#

sorry my internet crapped out. @peak plover i asked about waitUntil because i want to stall the dialogue and only advance it based on conditions

peak plover
#

Ahh okay, so _text1; sleep 5; if (player isStillListening) then {_text2};

#

kinda like that?

waxen tide
#

well a bit more complex, but roughly, yes.

#

the dialogue has 3 stages. i want to offer an addAction that advances the dialogue, to stage 2, then 3 and stop the npc for a short while each time the player talks to him (the npcs walk around) then the player has a bit of time to continue talking, if the player doesn't the npc walks off. also if some condition is triggered (the npc gives the right answer (he gives random ones) then change the dialogue back to stage one and stay at stage one without advancing (stage 1 is just variants of "hi")

grizzled spindle
#

Is there a way to disable arma 3 cheat menu/shift minus?

waxen tide
#

basically i would like a universal structure for the script that is flexible and allows adding stages and removing stages at any time while also evaluating multiple conditions. and all of that with not really exact timing, there is lots of sleep(5); in the scripts to prevent players from spamming options anyways.

peak plover
#

I don't think using sleep in less than 10 loops will cause you any noticable frame drop in your case

#

Don't addActions check every frame anyway?

waxen tide
#

i really don't want to waste any performance as long as i don't need to sacrifice a living being to optimise my code a bit

#

i remove the addaction as soon as the player used it, and then do most of my stuff, and then create a new action. also i reduced the radius for them to trigger but i'm not terribly sure that feature works yet.

peak plover
#

Yeah, addAction checks every frame and does not use the scheduler. So it freezes EVERYTHING, checks all addactions, continues

waxen tide
#

jesus.

peak plover
#

Well i'm over exadurating

#

exaggergating*

waxen tide
#

there might be a group of players in combat while i spawn the civilians to be questioned by a different player group. so i sure don't want the civilians to be a performance toll.

peak plover
#

I reckon that if performance is your primary concern...
You'd probably be better of using a loop that checks a simple condition and then displays a HUD element saying (space to talk) when you are close to someone who you can talk to and then do more complex checks...

#

instead of using addaction

#

But then agian

#

BAN premature optimization

#

Make something that works, don't overthink too much, then once it's done. Fix performance if needed

waxen tide
#

mumbles something incomprehensable

#

thanks

peak plover
#

I run into the same trap as you all the time, takes me forever to get anything done ๐Ÿ˜„

#

Also if you use ACE3 use ACE interaction instead, because it only checks conditions when you are holding down the menu key

waxen tide
#

well another big concern is that i nested way too many loops for that dialogue

peak plover
#

Yeah, try to keep it simple

#

I found that after writing something, taking a minute to look at the code and write comments will help me find a couple of errors or allow me to make some things better

#

Anyway I hope you get to the goal you aim for ๐Ÿ˜„

blissful wind
#

if performance is your primary concern.... itยดs arma

waxen tide
#

maybe i should write a generic dialogue function but then dialogues are complex.

blissful wind
#

which given the scale it actually runs pretty well

#

@waxen tide depends you can push the text you want and make the player belive he has a choice when he doesnt

#

you can introduce slight changes without need to have completly diferent branches

waxen tide
#

i'll complete what i got and then you guys can take a look and yell.

blissful wind
#

ok only if i can just look and not yell

peak plover
#

Consider doing what you do now with ~0.01ms less performance vs spending a week doing something bigger and ~0.01ms better perf ๐Ÿ˜„

worthy fox
#

say3D and playSound works for CfgSounds but I'm wondering what plays anything under CfgSFX?

grizzled spindle
#

Is there a way to disable arma 3 cheat menu/shift minus?

peak plover
#

Don't think so

#

shift minus FPS works online...

#

So does flush

tough abyss
#

how do I check if a player is in gunner seat?

cold pebble
#

Make a keydown eventhandler, then do a case for shift + - key and if they press it do some code to deny its function @grizzled spindle

robust hollow
#

gunner vehicle isEqualTo unit

#

im 90% sure simply denying the keypress doesnt stop the cheat menu. I flick disableUserInput off then back on and it stops the cheat menu. problem with it is you have to add the evh to every display if you want to completly disable it

tough abyss
#

@robust hollow if (gunner vehicle isEqualTo player) then{ would that work

robust hollow
#

if you replace vehicle with the vehicle ur checking yea

cold pebble
#

(findDisplay 46) displayAddEventHandler ["KeyDown", "_this call somefunction"];

#

That'd be your display eventhandler to aim to block the shift- thing

#

Then make a case for whatever number - is on German keyboard, check if shift is there, then disable user input or whatever you wanna do @grizzled spindle

#

If _handled is true before going thru, cheat menu won't open

#

At least that's what I think ๐Ÿ˜‰

tough abyss
#

@robust hollow so "if (gunner (vehicle player) isEqualTo player) then {" works if your the gunner of a helicopter or car. how would i check if your on a bench of a heli or shooting from a qilin?

robust hollow
grizzled spindle
#

doesnt seem to work @cold pebble

#

will have a look tomorrow

cold pebble
#

What's your script that's called? @grizzled spindle

#

Like it needs to take parameters correctly etc so you can check for shift and the keycode

#

Like that bit of code I put in is an example, and is no way near the whole thing you need, just a starting point ๐Ÿ˜ƒ

manic sigil
#

So maths isnt my strong suit. I have a starting point, a heading and a distance. I tried using trig (cos and sin, etc) but im getting wonky results - 90 degree headings returning dead north, so on.

Is there an easier way of finding the target location from that data?

#

Like, an invisible circle of DistTotal radius, a ray set on DirTotal, and the coordinates of their intercept?

robust hollow
#

well, if im understanding you right you could do something like this. there is probs a better way but im not the smartest so heres a simple fix:

_head = 60;
_dist = 5000;

obj setdir _head;
_dest = obj modelToWorld [0,_dist,0];```
manic sigil
#

Would that work for a gamelogic/marker, though?

#

I had considered it, but I second guessed myself, assumed it wouldnt function for things that cant normally move :/

robust hollow
#

modeltoworld only works for objects, but id like to think its the easiest way about getting ur destination pos.

tame portal
#

Does anyone know whether there is a way to have a classname of for example a weapon and get the corresponding CfgPatches config entry in which the weapon classname has been defined?

manic sigil
#

Hrm... i could get away with VR objects.

tame portal
#

For example you define a class for a music track in CfgMusic and your addon is called

class CfgPatches {
    class MyMusic {
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {"A3_Music_F"};
    };
};
#

"MyMusic", and lets say you define a track called TrackA inside it

#

Is there any way to get from TrackA to the config entry "MyMusic"?

#

In this example:

#
class CfgPatches {
    class MyMusic {
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {"A3_Music_F"};
    };
};

class CfgMusic {
    tracks[]={};

    class TrackA {};
};
robust hollow
#

configSourceAddonList (configfile >> "CfgWeapons" >> "arifle_Katiba_F") = ["A3_Weapons_F_Rifles_Khaybar"]

#

that return is the patch

#

is that what ur after @tame portal ?

tame portal
#

Ermagherd

#

Exactly what I was looking for, thanks @robust hollow

peak plover
#

' looks like fly feces

tame portal
#

@peak plover wat

peak plover
#

I'm using strings inside strings, ' looks like a housefly took shit on my screen...

tough abyss
#

What do you do for double strings

#

Like " ' ' "

#

What's inside ' '

waxen tide
#

can i compare the content of one variable with the name of another?

robust hollow
#

yea? content isequalto 'name'?

waxen tide
#

oh nice

#

thanks

peak plover
#

I'm all the way at```sqf
" "" ' hey ' "" "

tough abyss
#

:O

peak plover
#

string inside eventhandler inside an eventhandler

tough abyss
#

Lol

#

Rip

peak plover
#

also onMouseExit don't work

robust hollow
#

yes it does?

peak plover
#
            _ctrlMenu ctrlSetEventHandler [""mouseExit"",""
                _this spawn {
                    disableSerialization;
                    systemChat str 'MouseExit';

                    params ['_ctrlMenu','_index'];

                    (_ctrlMenu getVariable 'menu_info') params ['_buttonCtrl'];

                    ctrlDelete _ctrlMenu;

                    _buttonCtrl ctrlShow true;
                };
                true
            ""];
#

I can't mouseExit: (

#

killfocus works...

#

am I doing something wrong?

robust hollow
#

what kindof ctrl r u doing it on?

peak plover
#
class menus_template_listBox
{
  access = 0; // Control access (0 - ReadAndWrite, 1 - ReadAndCreate, 2 - ReadOnly, 3 - ReadOnlyVerified)
  idc = 1011; // Control identification (without it, the control won't be displayed)
  type = CT_LISTBOX; // Type is 5
  style = ST_LEFT + LB_TEXTURES; // Style
#

listbox

#

Probably does not support it?

robust hollow
#

dont think so

#

i dont have it working on a list box either, but it does work on buttons so it must be a special one.

peak plover
#

Hmm, it would be very nice to have ;9

#
mouseMoving
and
!(_this select 3)
``` works :0
#

This is awesome!

#

finally a nice list

#
_dropList = [
    "Respawn Player",    
    [0,1.3,5,1],
    {
        private _array = [];
        private _nil = {
            private _value = _x;
            private _name = name _value;
            private _toolTip = ('Respawn '  +  _name);
            _value = str _value;
            _array pushBack [_name,_value,_toolTip];
            false
        } count PLAYERLIST;
        _array
    },
    {[_this] call respawn_fnc_respawn}
] call menus_fnc_dropList;
#

Adding a list has never been this easy ๐Ÿ˜‰

tough abyss
#

@robust hollow how would i use fullcrew (example)

robust hollow
#

look at the wiki link i sent.
just fullCrew vehicle which returns all occupied seats,
or fullCrew [vehicle,'seat type'] to return all occupied seats of that type,
or fullCrew [vehicle,'seat type',true] to return all seats with unoccupied seats showing objnull as the occupant.

tough abyss
#

im not looking for open seats, im looking for seats a player can shoot from

#

and to see if they are in it

robust hollow
#

yea, this shows that too

#
[obj,seat,cargoindex,turretpath,isturret]```
tough abyss
#

how would that go into a if statement

peak plover
#

if statement requires a boolean

robust hollow
#

something like this idk?

_isTurret = false;
{
    _x params ['_unit','','','','_turret'];
    if (_unit isequalto player) exitwith {
        _isInVeh = true;
        _isTurret = _turret;
    };
}foreach fullcrew[vehicle,'Turret'];

if (_isInVeh && _isTurret) then {};```
tardy yacht
#

How would I go reversing an array? I have tried reverse, but it doesn't seem to work:

_array = [["ASDASD","ASDASD"],["ASEEFD","GREWSFG"]];
systemChat str _array;
systemChat str (reverse _array);

_array prints as "[["ASDASD","ASDASD"],["ASEEFD","GREWSFG"]]"
reverse _array prints as nothing.

No RPT errors, no debug errors.

robust hollow
#
systemChat str _array;
reverse _array;
systemChat str _array;```
manic sigil
#

Finally solved my directional problem, got my Cos and Sin backwards. Which is weird because I'm like 90% sure math doesn't work that way, but whatever, it passes.

thick sage
#

Does anyone knows how to handle a disconnect on the client side? I.e. if local client drops, execute a code before dropping completely.

#

(like a last message to the server before disconnecting)

rotund cypress
#

@thick sage try endDefault evh on client

#

handleDisconnect etc need to be added on server

still forum
#

@rotund cypress Please don't tell a SQF beginner that he could use an OEF instead of an endless for loop. Those are completly different things and quite hazardous for beginners.
@grizzled spindle I think it's called onCheat in description.ext. Just check description.ext wiki.
Also please don't spam.
@peak plover you can use CODE in eventhandlers... You don't need to use strings. But keep in mind that they are only stored as string internally (https://feedback.bistudio.com/T123355)
@thick sage You can't rely on that. If client's game crashes or he ALT+F4's or he losses connection that script might not run.
You can just attach a script to the ABORT button in the Menu.

#

@spark phoenix Read my message about missionNamespace?
I think right after you click continue after slot selection. Also missionNamespace is not created. It is there from game start on. It only get's cleared when you end/start a Mission.

rotund cypress
#

@still forum he was asking to disable the cheat itself, not run a script when it happens.

still forum
#

And that's what I told him.

rotund cypress
#

He needs to add a keydown evh on all displays and block it

still forum
#

Atleast I heard somewhere that onCheat can return a value

rotund cypress
#

Or block user input when it happens

#

It does not work to use onCheat to disable it

#

I spent a day on trying different things before I came up with a good solution in onkeydown evh

still forum
rotund cypress
#

Or just use disableUserInput and then enable it again

#

Will also reset

peak plover
#

Thanks Dedmen!

#

Very good stuff, So instead of huge block after EH, I shall insert a call function

spice kayak
#

Welp. Trying out my very own parameters for the first time. Fingers crossed!

#

Config : some input after EndOfFile.

#

Would help if I added parameters to the right description.ext...

#

Yeah, still that error. I don't see anything wrong with my formatting though.

still forum
#

you have a } too many

spice kayak
#

Yeah, found it! I didn't have [] after texts/values

#

Whoops!

#

My monster. IT LIVES.

peak plover
still forum
#

did you test? Mh.. Well.. still if you "_this call myFunc"

peak plover
#

Yeah, it's still A LOT better that way

#

It says type code expected string

#

I guess ctrlSetEH is old

#

or something

#

Also means I can put stupid comments now

#

Code is more organized as well ๐Ÿ˜„

#

what the real


_ctrlList ctrlSetEventHandler ["LBSelChanged","call menus_fnc_listEHLBSelChanged"];

causing a crash...

#

Maybe I fggd sth up?

still forum
#

do you have a ctrlRemoveEventHandler in there?

peak plover
#

nah

#

what the real

#

_ctrlList ctrlSetEventHandler ["LBSelChanged","call menus_fnc_listEHLBSelChanged"];
_ctrlList ctrlSetEventHandler ["mouseMoving","call menus_fnc_listEHmouseMoving"];
``` both cause crashes for some reason...
#

if (_inside) exitWith {};
systemChat str 'mouseMoving';

//(_ctrlList getVariable 'menu_info') params ['_buttonCtrl'];
//_buttonCtrl ctrlShow true;

// delete the control
ctrlDelete _ctrlList;
#

if the exitWith runs no crash, so it's either the comments or ctrlDelete...

#

probably ctrlDelete, because it's on same frame

still forum
#

yeah.. ctrlDelete

peak plover
#

yup, it's that. I have to run ctrlDelete in scheduled for it to not crash

#

sick

still forum
#

Makes sense imo. Reported a similear bug over a year ago

peak plover
#

That's very interesting

halcyon crypt
#

I guess whatever is iterating over the set EHs loses track of the control e.g. null pointer or whatever and crashes

still forum
#

kinda yeah

#

They iterate over each EH. without checking if the Control or the EH itself has been deleted already

#

A very dumb mistake and can be fixed with one line of code that I can write in 5 seconds

peak plover
#

Either way, I've not been this excited about a function in a while, THIS IS FUN!

still forum
#

Still... Unfixed and ignored by BI for over a year

halcyon crypt
#

pity

peak plover
#

I will utilize the shit out of this control ๐Ÿ˜‰

jovial nebula
#

Hi all,I tried to make a civilian unit join a west group, the purpose of this is changing unit's side.
Unfortunately, now the 'side player' command returns 'WEST' , but instead playerSide still returns 'CIVILIAN'. How do I know exactly which side is the unit on?

halcyon crypt
jovial nebula
#

Oh

#

Damn

peak plover
#

Also fun stuff:
Can't store code into profilenamespace, because it gets executed when you launche the game

still forum
#

wut? Are you sure? That's new to me

tough abyss
#

If it does, just store it as a string then

peak plover
#

14:34:54 Global namespace not passed during: (isNull getAssignedCuratorLogic player)
14:34:54 Error in expression <(isNull getAssignedCuratorLogic player)>
14:34:54   Error position: <isNull getAssignedCuratorLogic player)>
14:34:54   Error Local variable in global space

Originates from

[["Become Zeus","player remoteExec ['zeus_fnc_srvAdd',2];",[{(isNull getAssignedCuratorLogic player)},{false}],true],[player]] call menus_fnc_registerItem;

which saves the array to profile namespace as

unit_menu_items = [[{(isNull getAssignedCuratorLogic player)},{false}],true],[player]],[["Respawn Plugin","call respawn_fnc_menu",[{true},{false}],true],[player]]]
#

I guess I have to string the stuff I want to save

still forum
#

CBA/ACE have that problem when you push craptons of shit into profileNamespace

peak plover
#

Well, my situation got so bad that when I load any of the showcases, there is no AI, it's all broken ๐Ÿ˜„

#

str when saving and compile when grabbing, I guess...

#

This is actually very bad...

#

Someone cloud exploit this and ruin others games completly, just by having them connected on the same server...

#

Which is just scary to know...

shadow valley
#

you guys seem like smart people can you help me out please

spice kayak
#

If I have an independent run a script local to them, but contains something like this, would it still work, or no?

{
  if (((side _x) == West) && (_x distance (getMarkerPos "emp1Marker") < 100)) then
  {
     _x removePrimaryWeaponItem "acc_flashlight";
     sleep 0.1;
     _x addPrimaryWeaponItem "acc_flashlight";
  };
} forEach allUnits;```
indigo snow
#

hint: what locality arguments do those two commands take?

#

i.e. Local or Global?

spice kayak
#

I'm sorry, but I'm not sure.

indigo snow
#

well what does the wiki say?

spice kayak
#

I haven't really played around with local/global executions. WHich two commands were you referring to? The remove/add commands?

indigo snow
#

yep

#

and im not talking about execution yet, just argument

spice kayak
#

Well, I'd guess Object for both would have to be global.

#

As to the string, I'm not sure, I'd say local, but local to the object.

indigo snow
#

the wiki page displays locality on the top left

#

A(letter) and E(letter), standing for Argument and Execution

spice kayak
#

I'm sorry, I don't think I actually see that on the wiki page for me.

indigo snow
spice kayak
#

Oh, sorry, you're right.

#

The specific page I was on didn't.

#

Sorry. The arguments are local for both.

indigo snow
#

yea

#

so if the script is running on a single client only, it work for units local to his client

#

so not other players, ai on the server, etc

spice kayak
#

That makes a lot of sense. I wa sn't too sure when I added the forEach allUnits part. I thought that might somehow change it.

still forum
#

@shadow valley No we can't. Because we don't know what you want

shadow valley
#

sorry ok so my game keeps crashing when it launches, with the error memory cant be read

still forum
spice kayak
#

So, to fix that, a function and remoteExec would work?

indigo snow
#

Ya

spice kayak
#

So, like this?

LightsOut = {
  if ((_x distance (getMarkerPos "emp1Marker") < 100)) then
  {
     _x removePrimaryWeaponItem "acc_flashlight";
     sleep 0.1;
     _x addPrimaryWeaponItem "acc_flashlight";
  };
};
[] remoteExec ["LightsOut", west];```
indigo snow
#

If you wanna flicker em, wouldnt actions work better than adding / removing?

#

I think theres actions for lights on and off

spice kayak
#

Sadly that doesn't work on players :(

#

If it's the command I'm thinking of.

#

enableGunLights "This command can be used to force lights on, but not to force lights off. "

#

Unless the later comment corrects that.

#

I admit, the only reason why i went with removing and adding them is because I didn't think enableGunLights would work.

delicate totem
spice kayak
#

Oooh, that works in debug console.

#

Hang on. With what I sent just before (the last script, using remoteExec, would that work with _x? I know there is a certain word for the target variable that passes over, but I can't remember what it is. I don't think it's _x though.

#

_this is the word I was thinking of. Duh.

tough abyss
#

is there any hidden action to script weapon deployment?

#

@still forum didn't you have access to all commands and what parameters they take?

waxen tide
#
_text = "Hello";

_this addAction ["Hi", {hint _text}];

// Error :
'hint |#|text'
Error undefined variable in expression _text
still forum
#

@waxen tide _text is undefined.

waxen tide
#

well, i know. is there any way to get that variable into the code scope of addAction?

still forum
#

make it a global variable

indigo snow
#

compile a formatted string

still forum
#

move the text into the code by using format

indigo snow
#

dont even need to compile even

#

format ["hint %1",str _text] should have to correct amount of quotation marks, iirc

#
_text = "Hello";
_this addAction ["Hi",format ["hint %1",str _text]];
waxen tide
#

works like a charm

#

thanks guys i spend an hour on this already :/

indigo snow
#

I generally setVariable stuff onto the object the action is added to, if i need extra variables. You might prefer that, also.

still forum
peak plover
#

I'm still looking for a way to move the action menu title from middle of the screen to the side...

#

addAction, more like waste of 0.001ms action

indigo snow
#

If there isnt an rsc for it youre probably just fucked on that

peak plover
#

... ๐Ÿ˜ฆ

#

hmm

#

textDefault

#

is the image

#

is
text="$STR_ACTION_FLAPS_UP";
the thign that shows in middle or are they same (middle and side)

#

What if I put a couple of new lines into every text...

indigo snow
#

arent there x/y you can manipulate?

peak plover
#

nope, most gui elements allow movement, but action menu and jets dlc huds don't

#

Can't rescale / move

#

It's so annoying.

  1. deploy weapon on car
  2. look around
  3. (middle of screen) GET IN AS DRIVER[STEERING WHEEL]
#

Why...

#

If it was disabled on ADS, i'd be happy...

tough abyss
#

@still forum there seem to be new ones in your list but also some missing that i know work

#

is your list directly from the source?

still forum
#

my list was from current 1.72 binary

#

I only exported from one function. Might be that they are split into multiple

tough abyss
#

๐Ÿค” tested Surrender yesterday and it worked (devbranch)

#

๐Ÿคฆ i guess so

still forum
#

I'll see what I can do

tough abyss
#

awesome! thanks

peak plover
#

It's possible that textDefault is the middle text?

still forum
#

Surrender is a hotkey I think

#

DeployWeaponAuto
DeployWeaponManual

#

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

#

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

#

I answered. I dunno ^^

#

But if they exist. Then that's their name

peak plover
#

deployment was added with marksman. Try looking into marksman dlc files

still forum
#

Actions are not in any "dlc files"

tough abyss
#

hmm i don't see those DeployWeaponAuto and DeployWeaponManual in your second link

#

@still forum

still forum
#

Yeah.. But I found them elsewhere ๐Ÿ˜„

tough abyss
#

ok ๐Ÿ˜„

#

i guess one can "simulate" keyboard actions with the action sqf command

#

hence why surrender worked

still forum
#

Yep. And I've sent you the name of the deploy keyboard action

tough abyss
#

i will try and hope i can get the DeployWeaponManual to work :S

#

seems like the whole action system is a big mess...

still forum
#

It is one of the things that are there since OFP

tough abyss
#

and they seem to have reinvented it for every new installment and kept the old one

#

anyway thanks for investigating!

#
                                        
aUnconscioush_0 db 'UnconsciousHead',0  
                                        
aUnconsciousb_0 db 'UnconsciousBody',0  
                                        
aUnconsciousa_0 db 'UnconsciousArms',0  
                                        
aUnconsciousl_0 db 'UnconsciousLegs',0  ```
๐Ÿค”
spice kayak
#

Well shit. Apparently the EMP to turn out the lights by damaging them, only affects the person who executes the script.

#

I dun goof'd on that one.

quasi rover
#

I open full virtual arsenal with player addaction, like this:

player addAction ["Arsenal", {["Open",true] spawn BIS_fnc_arsenal;},.....];

and I want to remove mortar bagpack (e.g. "B_Mortar_01_weapon_F") from full virtual arsenal. how to? ๐Ÿ˜…

quasi rover
#

yeap, I read it but most say whitelist script. still don't know how to. I just thought single command line using BIS_fnc_removeVirtualBackpackCargo can solve it, but still don't know. @tough abyss

spice kayak
#

Sorry again, so when I realized the addAction script to damage objects was only working locally, I decided to try remoteExec, however in doing so, the action activates immediately and without my action. Might I ask what I'm doing wrong here?

pOperator1 addAction["EMP Charge", {execVM "emp1Script.sqf";} remoteExec ["BIS_fnc_call", 0],nil,6,false,true,"","true",0];```
peak plover
#

OGHH

#

Fuck yes!!

#

Finally

spice kayak
#

Got something working? Nice!

peak plover
#

Yes, got rid of the add actions from middle of the screen

#

This was my wish for like ever ๐Ÿ˜„

spice kayak
#

Oh, nice!

grand berry
#

How did you achieve it in the end?

peak plover
#

Actions reads
textDefault
If it's "" it will use text instead
so using textDefault="<br/>"; Means no ugly action in the middle of the screen ๐Ÿ˜‰

waxen tide
#

I'm trying to understand params, maybe someone can clarify this to me. I'm wondering where bis_o1 comes from and what it means? Also i am wondering where i could read up stuff like this and if it is always the same pattern.

#
_unit addAction ["Action", "script.sqf", ["arg"]];

// script.sqf
params ["_object", "_caller", "_id", "_args"];

systemChat format ["object : %1", _object];     // C Alpha 3-1:1    - object the addAction is attached to
systemChat format ["caller : %1", _caller];     // bis_o1            - ???
systemChat format ["id : %1", _id];             // 0                - id of addAction ?
systemChat format ["args : %1", _args];         // ["arg"]            - argument passed
grand berry
#

@peak plover can you not just set showWindow value to 0?

peak plover
#

@grand berry Nope, that does not remove texts from middle of screen

grand berry
#

I thought that was the purpose of that param - what does it do if not that?

peak plover
#

No clue, but I set it 0 and it didn't remove. left it on 0 'tho...

waxen tide
#

@peak plover would bis_o1 turn into something unique per player in multiplayer?

peak plover
#

Whatever you set it as in the editor

#

You can set a name for units

#

And i think bis_o1 is dynamically created, so its always different

waxen tide
#

oh, i see, so it entirely depends on the unit object and i can attach whatever i want to each unit?

peak plover
#

Yeah?

waxen tide
#

I see, thanks. Sometimes me is of stupid.

#

also, the _id is the addAction ID ?

peak plover
#

Yes

queen cargo
#

anyone here could check what this outputs?

systemchat diag_tickTime;
for "_i" from 0 to 10000 do {};
systemchat diag_tickTime```
normal perf. test of the middle part is also acceptible
peak plover
#

0.002 running mods in VR (fps ~200)

#

also you forgot str diag_tickTime

still forum
#

@spice kayak You are not remote execing the right thing

#
pOperator1 addAction [
  "EMP Charge",
   {execVM "emp1Script.sqf";} remoteExec ["BIS_fnc_call", 0],
  nil,
  6,
  false,
  true,
  "",
  "true",
  0
];
#

you didn't remoteExec the script in the action. Instead you remoteExec'ed the script and added the returned value as a script to the action

spice kayak
#

Ha, sorry, I was just about to say that I'm pretty certain I fixed it.

#

I also didn't think anyone saw my comment haha.