#arma3_scripting
1 messages ยท Page 400 of 1
the push instructions probably always get some callFunction or something like that in the end?
Ah yeah. You only get to know it's an array after the values have been pushed
Not always
_myvar = [1,2,3]
endStatement;
push float 1;
push float 2;
push float 3;
makeArray 3;
assignTo _myvar;
gonna private convo
probably better ๐
๐
Could I use intercept to make Mr. de-dmen publish tf ar version one point zero?
I thought intercept ate bugs for breakfast lunch and dinner?
https://youtu.be/AUWKw9Jk5_4 It does exist ^^
Oh, someone from the Panzergrenadierbrigade 37 is in the ST HUD!
what is the actual bug in that video? The popping sound?
"GameDataCrap " naming lel
I get that same sound when I plug in my headset or sometimes when I start playing music or some other system sound starts playing
(on Linux)
you did not noticed that the guy starts radio chatting and keeps being normal on the left side?
while the character rotates
and the guy radio chatting should be moving too?
from the left to the right (according to the position)
lol no didn't notice that
The pop sound moves your speaker into full negative so it cannot generate any sounds anymore. Which essentially makes you completly deaf
so what i said was not even the bug?
cool ... where can i file a bug report? ๐
(i know where, just making jokes here)
The movement was right when I heard it last time
it's not ๐
Are you sure it doesn't just sound wrong because you cannot hear anything at all on one ear?
The right ear is completly soundless
same end-result
that's quite some weird behavior ๐
Indeed
last time i tried to do something like that i could not get the L & R channels fixed ... made a minecraft plugin for teamspeak
but it was fully retarded in regards of angle
but i would start in pretty much all routines that modify sound
when a radio chat close starts
@still forum Aha! A fellow audition user!
I mainly use it as live mixer
Welp
Neat
decompileASM {[1,2,3,4]}
push float 1;
push float 2;
push float 3;
push float 4;
makeArray 4;
decompileASM optimize {[1,2,3,4]}
push array [1,2,3,4];
This will be so good when it's done :3
Dedmen, if you're bored this much then maybe you should look into making a preprocessor for sqf files that does it's stuff at addon build time. Instead of the game start.
I'm pretty sure we could shave off 20 seconds of preprocess/compile time when starting the game with ace, and at least 3 for every mission restart (preInit and postInit are recompiled mostly).
Also make it kill newlines except for those used inside strings! I'm tired of line 3k errors for functions with 20 lines.
It would've been something I can see purpose in for a change...
You can fix the 3k line errors by just moving your script component include
You mean above the functions header?
yeah
But then the thingy wouldn't work anymore
The thing that does make these pages: https://cbateam.github.io/CBA_A3/docs/files/arrays/fnc_filter-sqf.html
You can't teach it to ignore the first line if it's a #include ?
Would it work if we do:
#include "script_component.hpp"/**/
?
But even if the lines were correct, 2k chars wasted for every function is dumb.
@little eagle no need for such things
just use gcc preprocessing only
wont be 1:1 the arma preprocessor, but better
Sure I "just use" it. Now I have to find someone that actually knows how to implement that into the make.py.
Doesn't help me as no one has done this for Arma yet.
uhm ... so you say that due to nobody having used gcc preprocessor on arma you cannot google on how to use preprocessor on any file?
fyi: already used gcc on arma sqf file
Thanks.
some macros will be broken due to arma not being fully c preprocessor
those need small adjustments
Oh, we don't have a lot of those, so...
you actually really do not have a lot
this would be the first entry on that google search
which would have provided you with this information: gcc -E in.c -o in.i
where in.c is the input file and in.i is the output file
@queen cargo How do you make gcc find the include files?
correct pathing and correct workspace
armas "file system" is at last nothing but a simple copycat of normal filesystem
--> start at the root of your addon
eg. addons/x39_proj_scripting/
execute from there
gcc will do the rest
See? This is a deep rabbit hole and some smart ass posting lmgtfy won't help...
for those outside of your addon, https://www.rapidtables.com/code/linux/gcc/gcc-i.html
@little eagle gcc is fully documented with literally all questions ever asked already available
just no sqf attached to it
And? I wanted dedmen to sink his time into it because he already seemed bored.
just that dedmen is busy enough with things that would do way more good then solving a problem that is none
than*
And saving 20 seconds would actually be an improvement over doing stuff that never will be finished anyway.
Have you considered deleting your account?
have you ever considered listening to what i am saying?
Why would I when you clearly don't?
gimme examples
I wanted dedmen to sink his time into it
told you how to archive
just that dedmen is busy enough with things that would do way more good then solving a problem that is none
So are you saying that you posted that lmgtfy for dedmen, even though I requested something from him and he didn't respond with any questions about how to achieve it?
It'd be faster for me to replace the ingame preproc to remove all the empty lines. But that won't really make it faster
Now that we bullied Quiksilver away, I need a new (old) one to pick on.
But If I give you the ability to load precompiled code that's already after preproc+compile+optimizer
i was here before you @little eagle
i will be here long after you have been forgotten
I'm also here way less time than you. And I'm blue :u
daba
But all I can do is Intercept stuff. And as long as you don't want Intercept
nobulli.jpg
Isn't the bully life kind of hard ? @little eagle
@little eagle put this as your avatar please: https://pbs.twimg.com/media/C85-Ur1V0AAkAVM.jpg
What can I do, people chose to be wrong (disagree with me).
You will not make me wear an anime avatar, sorry.
No one wants anime. We need more fur
Is commy always right is the real question? ๐ค
Hey don't force your furry nature on us dedmen
That's just plain wrong
Lool
Rather Dedmen on the right :u The middle guy is ugly
Is commy always right is the real question?
Yes.
Good to know Commy, import or local?
The burden of always being right about things when the shit hits the fan does not mean I'm your personal magic eight ball.
Hahahah ๐
"The amount of indents should be inversely proportional to the length of the function." ๐ฟ
That's right.
Sooo the longer the function the less of indentation?
Yep.
Cool
This is prescriptive, not descriptive. It's an ideal for making good code.
void thing()
{ \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t return 0;};
And I don't take credit for it. Linus wrote that.
Linus....who...?
The guy with the penguin.
No, but they are like 30% of the file size of unbinned mission.sqms.
No wonder with that logic
Is there a way to binarize all sqf and remove all indent
preprocessFile(LineNumbers)
But files will still big
That is why I suggested to dedmen that he makes a preprocessor that does it's magic at addon build time.
Why just not make it yourself?
Because dedmen seemed bored.
I'm not bored. I just like doing cool stuff :U
SQF Assembly is cool.
When X39's optimizer works as I imagine it about 20% speedup across the board through all scripts
Imagine!
I mean 20% of infinity is still infinity ๐
assembly is funny
at least non-cpu ones
๐
๐ ๐ ๐ ๐ ๐ ๐
Hey guys does anyone know how I can check if my player received damage with a script?
damage player > 0
Thanks! I'll try that
probably broke?
It isn't and it works perfectly.
When will they add lbSetColorRight etc. to the wiki?
With "they" you mean KK or me?
"They" means everyone but me.
When they feel like it I guess
Weird tho.. He lsits that command as 1.80 but we got only bug fixes in 1.80. No new script commands
My OCD isn't big enough to fix that
No one should care about which version a command was introduced.
it's useful for people playing on legacy aka linux users ๐
All 3.
I lied. Fixed.
never forget the 17 days of crossplay
It lasted twice as long as 1.78
Alganthe, don't worry. Eol will be nice
Linux, mac and windows users all in sweet harmony
mac users, aka the one dude who's testing branches on it
I just have given a multiline edit box control a scrollbar by putting it inside a controls group with the same height dynamically determined using ctrlTextHeight.
Be careful about dem branches. Some to thin to carry yo weight
https://community.bistudio.com/wiki/Category:Command_Group:_GUI_Control ```
This page was last edited on 10 September 2008, at 04:07.
And?
Exactly!
Why did you post that?
This has been there since alpha?
Why did no one tell me.
It's false, because I see commands from A3 there.
Well, then it's still false, even if it edits itself, that is an edit.
So saying last edited 10 years ago is wrong.
It doesn't edit itself
Check it's source
It's source just says "display everything from that category here"
Guess that makes sense.
And that's what it does and what it did for the last 11 years
nice
https://community.bistudio.com/wiki?title=Category:Pages_using_duplicate_arguments_in_template_calls&action=edit&redlink=1 This page doesn't even exist at all. But still has loads of stuff
/\/\(O_O)/\/\
Oh noes. I just realized that Dedmen can now attach poop emoji to all my comments.
Will this code work?
case (!isNil {_x getVariable "player_rank"}): {format ["%1<br/><t size='0.8' color='#B6B6B6'>%2</t>",_x getVariable ["realname",name _x],switch ((_x getVariable "player_rank")) do {
case 0: {"Test"};
case 1: {"Test 2"};
default {"Unknown"};
}]};
@kindred bane Can you format this next time, see linage in #info_help_tips
Err...how many tabs do you have in there? Use spaces next time lol
Use 4 tabs in replacement of tabs
What u mean?
no, don't
Anyways, that code isn't complrte
use a proper editor that replace tabs by 4 spaces
Atom
im using sublime text 2? ;P
Sublime Text
wait, 2 not 3?
Atom is fine Alganthe
Yes, yes itbis
wait one, we have sqf highliters from ace
anyways any idea if that switch thing will work XD?
no it won't
hmm =/
you're also missing parts of the code
what u mean
case (!isNil {_x getVariable "player_rank"}): {
format ["%1<br/><t size='0.8' color='#B6B6B6'>%2</t>",
_x getVariable ["realname",name _x],
switch (_x getVariable "player_rank") do {
case 0: {"Test"};
case 1: {"Test 2"};
default {"Unknown"};
}
]};
``` properly formatted
and see the first case? that means there's a switch, and I don't see it
@lone glade Maybe it crashes for you sure...peasent.
Oh, thats cause its part of the code alganthe im editing playertags in altis life ;P
eat a dick midnight, you know electron apps are utter shite
the only one that somehow works is VS code, and it's because it's not electron per se but typescript
whomever thought making apps in native javascript / coffeescript need to rethink their life choices
Heheheheh
well thanks guys ๐ i think i got it ill test now.
it's objectively worse than other editors
sublime and vs code shit on it
if you think it's good you're also probably using github for windows or gitkraken
Notepad++
fucking hell
VS code I couldn't get used to.
Tried pretty hard, but no luck
I keep sublime for my rpt
I keep sublime for my rpt
You realize how stupid that sounds?
You're using a text editor that can't edit large files, aka what an editor is supposed to do.
or even fucking read them
Why not vim, it's a great editor
@austere granite Did you released yourchristmas present?
I'm not editing large files. I worked with both vs code, sublime, np++ and I like atom the most.
LIFE PROBLEM
that's why I told him to post it in scripting
I dont get it??
Most people won't help you when they realize it's for life stuff
and for good reasons
@austere granite Question above ? ๐
@jade abyss This is what it looks like when I do scripting in vanilla no mods: https://github.com/commy2/Arma-3-Scripted-Lobby/blob/master/missions/LOBBY.VR/Lobby/script_component.hpp
aaaaaaaaaaaaaaaaaahhhhhhhhhhhhhhhhhhhhhhhhh
No, not yet. Maybe tomorrow
๐
I needed my own data type essentially.
How comes?
To create lobby groups and I could attach variables to it and the other type SLOT.
#define CREATE_NAMESPACE_GLOBAL createSimpleObject ["Building", [0,0,0]]```
You create an obj and use it as namespace? ๐
Yup.
Ah, i think i remember. Haven't you done that IngameGroupSelection UI?
"use it as namespace", no, all objects are namespaces
I only knew of location
controls can also be used as namespaces
I needed two global namespaces, so I use the simple objects for them.
The only namespace I use is profileNamespace
https://i.imgur.com/CmzMiXW.png
^ 200 kb of code for me ๐
Actually it's more like 50kb.
dynamic Groups i assume?
Like "Adding new Groups on the fly"
Created by script during the mission.
๐
This is what a user would need to do to create a mission with slots:
https://github.com/commy2/Arma-3-Scripted-Lobby/blob/master/missions/LOBBY.VR/init.sqf
example of control namespace
https://github.com/acemod/ACE3/blob/master/addons/arsenal/functions/fnc_buttonLoadoutsRename.sqf#L38
๐ ๐ฏ
it makes not being able to store arrays or vars in lnbData a lot less problematic
it's for readability
technically I could drop the one for params, but I find it more readable this way.
No joke, you could technically remove all of them.
Is it fully scripted and no addons needed ?
adding the UI-Files, rest should be doable without it
There are no ui files. It's all mono color ๐
Technicaly, the whole OBE thing i did, could be Vanilla Only too. Just the changes in the CfgVehicles forced me to do it as an Addon.
Why not? Add some fancy interface!
That's the worst. I'm always glad if there're no "pretty" pictures.
Dunno why I made this. Probably to prove a point about me being able to do vanilla scripting.
My 1/5 cents - It has some style or design or whatever you call it.. just leave it like that, without funky colors and toxic elements
So I got the following code
who whoa
_this addAction ["action I wana add",
{
//Code
},[1],0,false,true,"User20"," driver _target == _this"];
_this ?!?!?!
okay hold lemme finish XD
so ik that watever the code is will run once custom key 20 is pressed,but how can I have it where the action will run while the key is pressed down
words
Mobile sucks
@little eagle does this need a certain amount of units pre-placed? or can I only place 1 playable unit and it would work?
setPlayable, rip :'(
I remember arma1-2
Where I mostly started
I know the pain
But I don't know the pain of editing raw sqm without an editor
That A2 3d editor was so garbage
We've come a long way
and then people STILL complain "waaaaah it's not good enough"
Well it wasn't really all that editor and more 3d
member when placing shit on a table took 10 minutes?
Only if you're lazy
I know of people who placed down bases by reloading the mission after every object to get it right
rip
I remewber when 3den was announced to completely replace 2d editor
And people were mad and sad
"how can I still access the 2D editor"
"Do you have brain damage after using it for so long?"
I remember the first steps in A2 with the alternative 3D-Editor
@jade abyss Pretty awful right?
The old one? Yes
Nigel many people are gods then
you mean... poseidon
Zeus gods no less
๐ค
I meant, poseidon is the official name of the opposing zeus in ZGM, as well as a tool ๐
or whatever the zeus vs zeus gamemode is called
I never palyed that
I never touched any official gamemodes
I only play ~life~ ugh... hardcore gamemodes
outside of EG, and that was like, 2h top
Yeah...
Anyone played that TVT mode called blitzkreig when a3 was in alpha, one of the first servers
So many teamkills when people didn't know how to play arma and recognize uniforms
"G is for Gear"
Lol
hahaha
I still had people do that in 2016
Why?
So you can go a lot faster in this car, are you using the boost?
you mean shift?
No double tap V
My latest favourite
hahahahaha
I remember when grenades were a firing mode of sorts too
your hand is a muzzle
Overheats? :P
There was a mod for A2 that kinda fixed some of the CQB combat. ST_(something)
They need to fix the turning around and stuff in A3
I want barrel occlusion back
Like turning around is not centered around you, but your gun or sth
try to go through a doorway with a sniper rifle, the barrel pokes through the wall
Well, New squad update does it well, pubg does it well
before you got stuck
@peak plover Nuh uh, gtfo with that comparison shit
I am stopping you right there
That shit ends here
Just talking about barrel occlusion being possible
Nu uh
it's possible, BECAUSE IT WAS FUCKING REMOVED
like the perfectly working gun pipper we had for planes
I don't want to hear it Nigel
nope
๐ค
Turn around before the next frame loads. glitched
that's not how the collisions work
Sure
PhysX is tricky like that altanthe
and I know why they removed gun occlusion, too many people complained and thought it was clunky
It could pull a fuck you at any moment
you're trying to use a fucking lmg / sniper rifle in a doorway
Physics or not
I don't care Alganthe (and i understand that)
PhysX
RV4
No can do my friend
It'd find a way to send the player to space
no, the "sending to space" happens due to shit going under the ground and being propulsed with an insane force out of it
๐ค
player collisions aren't affected by those issues
Yeah but Alganthe never doubt the possibility
well, if you somehow end up squished between units it does but hey
as in:
spawn with a shitload of other people spawning at the same time
you'll either ragdoll and fall face first on the ground or die on the stop and your body propulsed into the air
I've still seen the player adjusted left or right even when spawning in the same spot
or in very rare cases ragdoll and then propulsed then die
yeah, that's normal
that's not a physX interaction tho.
Nope
Nigel...
nigel....
if you delete something you need the index ref, guess what, you can store that in a var
[1,2]
ughhh
deleteAt would removed the third number (index: 0, 1, 2)
anyone see any obvious syntax errors here? https://pastebin.com/raw/wxvnEr9N
fnc_tracksreplace =
{
bannable offence
you know you can make an addon to just replace objects without having to use sqf
XD
Your { is on the wrong line
look, this isn't general practice for me okay?
its just a quick script for a proof of concept
its only a habbit of I repeat it again, which I most likely will not
but I agree with you
I would fix it if it weren't for all the gamelogics using it
you know ctrl+F exist right?
Wait wat
if you don't have an editor that can mass replace (N++ at the very least) you're doing something wrong
You're using game logic init to execute shit?
yes
Well there is your issue to begin with
Don't do that
It's more work than you need to do
justification incoming in: 3...2...1
so what would the alternative be to find the position of the tracks
I thought checking a radius of several map tiles would be better than scanning the entire map
100m * 100m is a single tile
yes
terrain object comand variant would work fine for track finding iirc
so you placed a fuckload of game logics all over the map
thats where the 100 comes into play on line 6
๐ฑ
there's about 30 of em
Dude....
I'm open to suggestions for an alternate method
using [worldisze / 2, worldsize / 2, 0] as a position and worldsize radius
^
do it once on the server at init and cache the thing
posinit and also add a init EH so that if zeus adds stuff
Wait, how is worldSize determined as a command? Distance diagonally?
config
@agile pumice it may seem like a waste of time, but you will eventually some limitation inherent to the non dynamic nature of your approach and will have to rewrite the entire thing as a script or series of functions
and yes, it's the diagonal
I think that was implied shifty
it's a hard learned lesson that hurts the more you put it off
@lone glade figured as muc
I've done pretty much the exact same thing in the past, just trying to save him the pain
Yeah but bad practice will remain bad practice if you can't learn how to use better alternatives
or recognize why it's terrible
"triggers are amazing guys" "it just works"
I was looking for the paa that is used for the gradient for the info sections in the topleft/topright corners. Anyone know where they are located or if there is a way to give a gui element a gradient background instead of using paa?
inb4 "uh, my triggers don't work anymore"
sounds of the scheduler choking in the background
Hahahah
triggers are cancer
@tulip cloud How do you mean?
this is honestly the first time I've heard someone tell me not to execute code from a game logic
What
fuck it, write 3den modules if you're lazy and dip your fingers into addons
I want to know who taught you that now
Who the hell told you that?
You did, 5 minutes ago
inb4 it's one of us who was trolling, trying to find the worst way to execute sqf
Midnight - Today at 12:28 AM You're using game logic init to execute shit? eagledude4 - Today at 12:29 AM yes Midnight - Today at 12:29 AM Well there is your issue to begin with Don't do that
I want to create a gui element with a gradient background. Kinda like this https://gyazo.com/67e57525f6db82db8b727d20cb4c2772
Though haven't found anything that creates a gradient or clean gradient texture yet looking through .paa files
call compile an execVM in a game logic -> the creator of all things
@tulip cloud it's an image
How am i encouraging you to use gls with that statement?
it's paa images, can't do gradients
I think there's some confusion going on here, Midnight
Evidently, can you explain to me what i am missing sorry?
@subtle ore only recommended if you're writing code to be accessible, ie for a gamemode you want to be adapted easily
I said I was executing code from a game logic, you told me not to. Then when I said "this is honestly the first time I've heard someone tell me not to execute code from a game logic" you asked me who said it XD
@nocturne iron True, but only if you're looking for simpleton setup kind ot stuff.
yes
ye, I'm pretty much doing that for my binkov thing
Anyone know where the transparent gradient file is located? I'm hoping it's a 1x25 or something pixel image that I can stretch to scale.
@agile pumice You were talking about people who told you do execute, not the people who told you not to
and we were wondering who told you to do that (execute code from GLs)
@nocturne iron Which isn't a bad thing...accessibility is the first step to expansion
@tulip cloud just make it yourself, photoshop + ImagetoPAA spam is a neccessary part of the arma 3 graphic design process
for maximum pretty ui tho
Hmmm...
@nocturne iron I try to avoid what is already part of the game if someone knows.
I reused BI VA icons and got a non copyrighted bin icon from the net for ACE Arsenal ๐
and someone made me a GL icon ๐
If Justin wants something more unique to his mission then make it yourself justin, otherwise i'd agree with you
Awesome
@lone glade Gross
no search bar for loadouts for you midnight
i'll make sure to put your UID in my naughty list ๐
I'm very OCD about duplicating content that might already be available to me in all the arma files. I can easily create it that isn't the problem. Trying to be efficient.
Damn! Such evil Alganthe
that'd be a great april's fools ....
Hehe
inb4 sneaking UID bans into CBA
get most of you guys UIDs and randomly fuck with your game
"thefuck, why do bananas appear in my inventory?"
"why does my weapon keep jamming?"
You don't have it Alganthe, i am fine
It can't be that hard to find your steam profile midnight
Nooooo
already got it @subtle ore
get hired by battleye
Even worse
til, there's websites that reference all your steam IDs
Oh
Do it Alganthe, nuke from orbit
remove your name from your steam dude
Wha?
fair enough
doxxed
tbh I don't mind if people find me
pizza time
There are at least more than one Bryce Cain's from Boise Idaho
Pizza whar kind?
Doxxer's choice
do people still do that ?
Double dog dare you nigel
because you sure as fuck get sued by the pizzeria here
IT IS THE C U R R E N T Y E A R
Doxxing is old
it's not on the person who's "receiving" but on the person calling
but damn, trolling specific people through ACE and CBA is much easier than I thought....
Do it...
high time to sign up as a dve
don't like that asshole who keep reporting issues not using the template?
BOOM, profile vars cleared
Holy fuck lol
Steal mom's credit card info from a lifer entry?
๐
honestly "fun bucks" should be banned / illegal
it's euros / local currency or bust
would cut down on a lot of predatory practices
Maybe
are there any script libraries other than the armaholic one?
Yes
the ACE3 / CBA github repos ๐
for cba
if ((toLower serverName) find 'life' > -1) then {
// rip
};
inb4 you realize nigel typed that
Wtf
-1 is everything from 0 to infinite
But.
also, that is perfectly valid
Why
find returns -1 when it doesn't find a valid index
!= is two buttons > is 1
simple
also, != is two commands
do you mean whiy find >-1?
No
time to speed test this
i'll probably do arsenal stats in january, don't have the drive with holidays and skrubs screaming that I broke their loadouts (hint, I didn't touch them)
Oh
ACE Arsenal doesn't have stats implemented yet
Alganthe why does my game not freeze when I open arsenal. You are taking away from the expereince
Stats, we dunno what that is supposed to mean
Uh
Ballistic infromation
Oh
Tactical technical info
which is basically useless in vanilla
(((stats)))
I only take armour >lvl 4
no, the info there is wrong
How so?
only ballistic protection and explosive resistance / mass are right
Is new one based on ace ballsitic info etc.?
Doesnt read config values?
all the "range" and other ballistic info are wrong
it does
but "range" is the maximum zeroing for example
Huh, interesting
still need to look into how i'll do the interface, in the meantime I got commy to fix scaling for the button bar, I fixed other scaling issues.
Added QOL improvements to the loadouts screen (including a search bar)
Added a button to import loadouts from BI VA
manually test and insert all values
still haven't gotten a single proper "issue" reported, I already knew of the scaling issues and it happens on really weird resolutions anyways
Are u using pixel?
interface is pixel perfect
OUTSIDE OF THOSE FUCKING FRAMES THAT RENDER DIFFERENTLY
oh god...
๐ค
that 1px difference between literally all the controls and how frames render
ballistic pro, explo pro and damage could probably be done dynamically by spawning in actors with the given armour etc and shooting them with a 'standard' rifle and normalizing the values you get back
ew
has a better feel
Well, it wouldn't be practical
you could probably automate it and export it to a table
and would be wrong
why?
because of the error margin due to the value being taken after all the calculations are done
damage isn't only using armor
yeah ofc
you'd have to refine it a lot
but you'd get an empirical measurement of performance without having to use the guns or translate fairly arcane weapons stats
either that or a 'bullets to kill ruskie at 300m bodyshot' rating
"fairly arcane", you mean what is actually used for the damage calculations?
yeah, it doesn't make sense to people who aren't versed in it
also, fun fact:
those bars "limits" (min and max) are taken from the lowest and highest value for the currently loaded weapons / containers configs
interesting'
So question here, never used controls very much. When do i use ctrlCreate and when do I use a config?
never
always
Gotcha.
unless you like pain, then go for it ๐
Never
always do it by config
there's a very VERY niche use case for ctrlCreate
like, the pylons UI for ACE uses it
and that's because the number and position of pylons isn't fixed
Couldn't you just adjust it during runtime via script?
No, what happen if you run out of controls because there's too many pylons?
only if there's a hard set maximum midnight
like, say I'm writing a button board menu
I can hide options/change their functions dynamically
but I can't have more buttons than I've defined in the config without using ctrlCreate
ctrlCreate is a wonderful tool if you need to add buttons to pre-existing interfaces, like map screen or display 42. other than that, it has very limited use. i use it on loop scripts so i dont have to copy and paste a million times as well
really dumb question
but params works for _this var in event handlers right?
fixing lots of ugly old code
Sure, why not?
param["_Var1","_Var2","_Var3"] etc
Don't see why it shouldn't work ยฏ_(ใ)_/ยฏ
thanks dscha โค
params works for ANYTHING that is on the left of it and provides an array
well, that returns an argument that it can take at least
e.g.
_Arr = [1,2,3];
_Arr params ["_VarWith1","_VarWith2","_VarWith3"];
Should also work
without a "prefix", it uses _this
Is it possible to have players on 2 different sides in 1 group?
No
Damn alright ty
what do you need it for
@warm gorge
Something im working on. Need to create the ability for different sided players to talk to each other. I know I could use channels created radioChannelCreate, but I cant use them as theres a limit to how many can be made
Createa your own chat
@little eagle does this need a certain amount of units pre-placed? or can I only place 1 playable unit and it would work?
Yes. The debug mission has 20 dummy slots placed. I was thinking about automating the process of placing them by adding 3den scripts to my missions pre int though. Thanks for reminding me. After that, it will work essentially automatically by just opening the mission in the editor once. I can even make it autosave ๐
3den is, in contrast to the arsenal and zeus, pretty great actually.
"If only the goddamn menu commands were documented properly." - silentspike 2017
gucci ๐
I looked at it and the units are like virtual dude, I wonder how well this will plug and play with one of my missions
I hope it works just liek that
Things that will need adjusting are:
initPlayerLocal.sqf and initPlayerServer.sqf need to be redirected to the new unit.
init.sqf scripts with waitUntil {!isNull player};.
Maybe that could be worked around by doing selectNoPlayer every frame until you've chosen a slot. Will try.
Trying to make it as compatible as possible.
anyone knows why BIS_fnc_textTiles causes FPS drop?
Checked the RPT log file for script errors?
there doesn't seem to be any error
If it works correctly, then the fps drop is probably just from the function operating.
hmm. might need to give it a performance test
How many years until we get "ctrlFocused"?
and ctrlSetFocus _ctrl returnยฏ_(ใ)_/ยฏ
But https://community.bistudio.com/wiki/ctrlSetFocus already is a thing, which makes this even more infuriating.
"Hey guys let's only make the scripting commands we need for our content and not more"
"Sounds like a great idea John"
and so ctrlSetFocus but not ctrlFocused was born
Can't believe they don't need ctrlFocused. If they think so, they just don't know yet.
interesting tidbit, BIS_fnc_findExtreme was introduced after BIS_fnc_findMix and BIS_fnc_findMax
why
ofc we have selectMin and selectMax now, but it's inexplicable
How many years until we get "ctrlFocused"?```
Imagine having RV-E OpenSource ๐
there's an EH for that commy
are you ready to witness greatness?:
onSetFocus = QUOTE(GVAR(leftSearchbarFocus) = true);
onKillFocus = QUOTE(GVAR(leftSearchbarFocus) = false);
i'm sure you weren't ready
Yeah, just add both of them to all controls and set some variables yourself. <_<
you could turn this into a command
and I have 0 ideas why the fuck they still haven't
XEH for displays when?
hint that is how actually a lot of ui development outside of arma works too @little eagle
Working around incomplete api? Great.
cue in the 930 required js dependencies
@lone glade yes, just yes
there are multiple properties which are not-existing but can be created using event handlers
it is common to have to do it yourself
simply because not everything can be covered
a missing command with existing event handlers is no flaw
if neither was existing, it would be a problem
a command that returns which UI element is in focus seems..... you know, useful
but then again, no more senior devs on A3 coding wise, or they're focusing on tonks
QoL feature
nothing more
or even worse: current focused element can be anything including nothign from your actual dialog
the one thing I hope get changed for A4 is the asset reuse, it's extremely blatant (but not a problem due to the modding scene)
Idea 2:
focusedControl
Returning the control the focus is on.
I think we don't even have this for dialog/display.
nope :/
there is always just one focused control
And?
and one control with keyboard focus
which is the focused control
^
and? and if your script bugs out it will bug everything out
keyboard focus does not has to be the actual focused control
wat
What? ๐
yes it does
no ...
if the control isn't focused you can't give it keyboard inputs
even ctrlSetFocus has quirks ๐
I mean, if there are 2 kinds of focus, just make it return an array with both elements or smth.
because those aren't the focused EH
Some do detect mouseEnter, but not exit... and mouseEnter will only ever trigger once
I can guarantee you 100% that a control CANNOT take keyboard inputs if it isn't focused
Never heard of that either.
and one that note, if you open up a dialog then keyUp will still pass through from the mission display, but keyDown will not
difference is the kind of focus
only one control on your whole system can have keyboard focus
logical focus however, is something different
wait a second, mouse hover isn't focus
same goes for arma
keep it to arma, we all know how arma systems compare to "the rest"
I'm talking about different ARMA ui stuff ๐
Ya'll weird.
in the case of "You'd expect this to work... but for some reason it doesnt"
no, it's more the case of:
"wait, why the fuck is that working like this?"
you all just hate arma for SQF, for its UI system, for foobarblublub and ignore possible solutions completly ...
you just hate it that it is not perfectly fitted for your needs ...
like, FSMs, most of SQF, UI, the physX implementation
let's be honest, nearly all of them are either aged as fuck or badly implemented
there's no redeeming factor here
go and code another game
well X39 in 90% of cases i can work around it, and granted A3 UI scripting has improved a lot
wow, I was waiting for that one
but still sometimes there's some stuff thats.... wtf
yes @Adanteh#0761
obviously there is
but nothing they ever complain about is an actual issue
it is QoL
fun fact QOL are issues
yeah the lack of QoL is what makes arma a turn-off for most people i think :p
QoL in scripting is literaly on the lowest end ever possible
UI QoL? even more lower priority
you can work around your "issues" extremly easy
It takes like 3 minutes to write ctrlFocused.
especially you should be capable of doing it in a brief moment
in some cases i can't with UI ๐ฆ
same in SQF @little eagle
the thing is, the less we need to abuse the sqf layer the better.
Hmm, write it once in 3 minutes or write it 1000 times in 3 minutes ๐ค
i don't have examples right here, but i've spend way too much time on arma UI in the last month and in a couple scenarios spend a ton of time on trying workarounds, none of them working
X39 how do you work around not being able to detect how far you scroll in a controls group? Handle mouseZChanged yourself and use that to detect scroll levels? ๐
i mean... that could potentially be a workaround, but wtf
i understand we can't have absolutely everything
the UI system is a gigantic band-aid on an open wound
@Adanteh#0761 sadly yes ...
however, scrolling is not rly usable in any UI system i ever used
all just required a hell lot of background coding
But for example the ctrlFocused would be a nice easy thing to do probably
Instead we get super useful stuff like https://community.bistudio.com/wiki/isUIContext. I'm sure no one here has used it, even though X39 will tell me how great it is.
wtf
i wonder if that's for the admin commands? ๐
considering how much they abused uiNamespace for arsenal (and for no fucking reasons too) I wouldn't be so sure about that
uiNamespace needs to speak out against this blatant #metoo'ing
Is this a good implementation of a mission timelimit?
_timeLimit = "Timelimit" call BIS_fnc_getParamValue;
timeLimitEnabled = false;
if(_timeLimit>0) then {
timeLimitEnabled = true;
globalStartTime = diag_tickTime;
waitUntil {diag_tickTime - globalStartTime >= 3600};
"endTime" call BIS_fnc_endMissionServer;
};
If not then Im keen to hear suggestion to improve it ^^
If you have spawned that and not called from init.sqf then yes
not using tags
tags?
Yeah, globals need ofpec tags.
any global var need tags imho
Might not be bad for a mission.. I mean.. it's your mission that breaks when you add a mod from someone who thought the same
if someone end up using your varname you're kinda screwed
well... its not a script for others to implement
That has nothing to do with anything. Global variables need ofpec tags to be considered "good implementation" period.
also the code is spawned like this from initServer.sqf .
[] spawn compile preprocessFileLineNumbers "scripts\timeLimit.sqf";
why not just execVM?
Ive read on german arma forums (armaworld) that execVM is bad
execVM and spawn compile preprocessFileLineNumbers are exactly the same thing
Or why not just make these variables local variables. I see no point in having them as globals.
^
They will have furtur implementation in npc dialogs
like HQ telling you how much time left
then better start using tags now
execVM is bad, but it's slightly better than spawn compile preprocessFileLineNumbers by virtue of being shorter to write.
ah okay
both shouldn't be used anyways
what should then be used?
yes
For a script that is just spawned once execVM is the best if you want to be scheduled
execVM it, because it's executed only once anyway.
okay. And what if It would be executed multiple times? A function?
Don't listen to the idiots from some idiot filled german arma forum
exactly
cfgFunctions
but why through a game logic?
i'm trolling, ignore me
lol XD
You could optimize it by using sleep 1 or smth like that inside the waitUntil, but no one will ever notice any difference so meh.
you mean uiSleep
FurV as Tag?
Yeah that could work
fur
They're the same for dedicated servers for all intents and purposes.
You could use FurtherV if you really wanted to
I should use the same tag in my stringtables.xml right?
Silly Dedmen, OFPEC tags are 3 to 5 chars ๐
Yeah lucky you, your name has the length of 5 characters
Is it luck or foresight?
wait I know your name from somewhere
Furer works too ๐
wait I know your name from somewhere
hides
commy2 the guy who released a script to make custom guided missiles on armaworld
Yes, that is what I'm known for.
Don't know if I should laugh or feel empathy ๐
The tag should be lowercase right?
No one recognized you, and I'm practically famous now, alganthe. So I don't need your pity.
Doesn't matter.
cries in wiki pages
Lower or mixed.
I love the refector function of intellij