#arma3_scripting
1 messages ยท Page 288 of 1
keep it scheduled, keep it safe frodo
It's more potential for optimization.
Stuff can be even faster than we thought.
Good findings.
I guess my nickname will now officially be "the optimizer" or.. "the optimiz0r" or sumthin even cooler
you obviously send the client id over net. everyone already has all the names on their machine, dummy
I fail to see what this has to do with the scheduler either. You guys are just acting up like monkeys that found a new toy.
Weirdos.
Every eventhandler might be affected. Tell me how you would replace a onHit eventhandler by something scheduled
Yeah. Ask check damage x seconds. At least it's scheduled. -.-
Does anyone have a way to return the typeName of an object? Like the typeName bushes uses when using the nearestTerrainObjects or nearestObjects command "BUSH" or "TREE"
Yea I don't mean the classnames
I couldn't find any script command returning the mapType (Thats the name of that btw)
Like the names that are used in the nearestTerrainObjects and nearestObjects commands
The categories like "BUSH" or "TREE"
That work for sorting even though there is no class for the objects
There's some listed under that entry
There are all listed under that entry*
It's gotta be where they inherit from somewhere up the config Hierarchy?
It seems they aren't all listed there dedmen
Unless they are and this object is unsorted
I've tried each of those types for this object and it didn't come up yet it does come up with an empty array for types
They are all there all 40 of them. And it's nothing related to inheritence. It's a setting set in the Model of that object
Wait a sec I'll double check if thats really all of them. just for you ๐
Maybe I missed one when I was going through
Yep. the last one is "TRAIL"
Anyway to get one of those with cursorObject?
Let me check with getModelInfo quick
I checked the Wiki and I couldn't find a script command returning the type
unfortunately getModelInfo doesn't seem to work for it
i was trying to do the same thing the other day hound, don't think it's possible
and commy it has nothing to do with the scheduler, it was a lord of the rings joke
getText it from their entry in cfgMarkers
@still forum https://community.bistudio.com/wiki/getObjectType is this what you're looking for?
would be very useful
i couldn't find a better method than standing next to the object and hideObjectGlobal'ing each mapType one by one until it disappeared, then i knew the object was that map type
There is a way to know if a vehicle is armed using configs?
Sure. All weapons are defined inside the config class
what's the easiest way to figure out what you're looking at eden? Basically want a cursorTarget/cursorObject that works in it, so i don't need to load in
Talking terrain objects btw, not eden placed entities
hey guys does anyone here know which script / mod this in from? Found it in my script.log for the server 13.02.2017 14:59:27: Kim Andre (IP address) GUID - #5 "lost_key','pooploop','rscrazzler','rsclistboxvg','vgdialog','sspcm','niggers_die']; _badclasseskick = ['a3_m3editor','extdb2',"
just googled "arma rscrazzler" and the only thing to come up is cheat and anti cheat sites
terribly sorry, disregard that #5 seems to be ultimate soldier 2 MP
5 PA_arsenal
5 vaa_arsenal
5 grace_sway
5 vaa_fnc_vaa_arsenal
5 ULTIMATE_SOLDIER2MP
5 SSPCM```
at least I'd say so
5th entry being Ultimate Soldier 2 MP
looks like a cheat dialog
i know your intentions are good but you probably shouldn't ever link hacking sites here
ooo ur prolly right thanks
oh no worries on that @rancid ruin those scripts are long patched
#info_help_tips 18. do not post active URL to cheat and shady sites ...
i don't think it's a question of if the thread you're linking has working hacks, more of a principle
quick edit the message and we all pretend we didn't see it 11
Iwas just looking what to put in the ban message now that those 20 entries are banned permanently^^
I respect that @still forum but wouldn't being aware of whats out there be better than not? How do you protect against hackers wo knowing what they are up to?
I don't know. I just cited a rule
is there a command to set background colour of progressbar colour?
https://community.bistudio.com/wiki/ctrlSetBackgroundColor ? Just a guess
class RscProgress
{
type = 8;
style = 0;
colorFrame[] = {0,0,0,1};
colorBar[] = {1,1,1,1};
texture = "#(argb,8,8,3)color(1,1,1,1)";
x = 0;
y = 0;
w = 1;
h = 0.03;
};
think its texture
been a while since i messed with it
you can put a text rsc behind it and color that
is there a command to set background colour of progressbar colour? you are confusing
^
so colorBar is the "color of the bar" and texture is the "texture of the bar" not very helpful. I don't know how to set texture on a ctrl
ctrlsetText will work for texture if applicable
1 Question, how do you do something like that for a mission? How can i make so smooth Camera Videos ? https://www.youtube.com/watch?v=GIOorXZpROw
Its so nice omg... I want that one
There is a ton of good camera tutorials out there. Took me a bit to get the hang of it but it's pretty cool stuff
When you get it going, keep in mind players will have to sit through it everytime unless you run some sort of check to see if it's their first time on the server
I made a short one for a life server a while back
_distance = 75;
_plr = vehicle player;
_dir = (getDir _plr) + 25;
_height = 37.5;
_camPos = [_plr, _distance, _dir] call BIS_fnc_relPos;
_camPos set [2, _height];
showCinemaBorder true;
_camera = "camera" camCreate _camPos;
_camera cameraEffect ["INTERNAL","BACK"];
_camera camPrepareFOV 0.700;
_camera camPrepareTarget _plr;
_camera camCommitPrepared 0;
while {_height > 2} do {
_distance = _distance -0.36;
_height = _height - 0.175;
_camPos = [_plr, _distance, _dir] call BIS_fnc_relPos;
_camPos set [2, _height];
_camera camPreparePos _camPos;
_camera camCommitPrepared 0.025;
waitUntil {camCommitted _camera};
_dir = _dir - 1;
};
_camera cameraEffect ["terminate","back"];
camDestroy _camera;
Soolie, do you have some Links? Because this is what i want, i would appriciate any cool good links because i want that so bad, also its perfects as an outro :p
Is there a way to disableFire without deleting the projectile on fired?
that dude has some good ones
Found a way to do it via keyhandler
@tough abyss tbh the tutorials are good but if you're anything like me you will learn the most from looking at other people's code. DL a bunch of cam scripts and check out how they do it. That combined with the tuts should be good
thank you
np ๐
there's never a need to use BIS_fnc_relPos these days @plush cargo, you can replace that with getDir
Hey Guys, why is my screen not going black? waitUntil {!isNull (findDisplay 46)}; 0 spawn { cutText ["", "BLACK FADED", 5]; titleText ["","Black IN",4]; any=[[["TEST","<t align = 'center' size = '0.7'>TEST</t><br/>"],["TEST","<t align = 'center' size = '1'>TEST</t><br/>"],["TEST TEST","<t align = 'center' size = '0.7'>%1</t><br/>"]]] spawn BIS_fnc_typeText; sleep 30; cutText ["", "BLACK IN", 5]; }; sleep 10; ["core\ls\videos\vid.ogv"] spawn BIS_fnc_playVideo; //Video abspielen
check rpt for script errors
@rancid ruin was using relpos bc i needed not only the dir but the distance bc camera rotates around player and also moves toward them.
getDir alternate syntax does exactly the same thing as BIS_fnc_relPos
no wait, getPos alternate syntax
origin getPos [distance, heading]
There also is getRelPos SQF command which doesn't use north as 0 degree, but the view direction of the "origin" object.
that's nice, bit more intuitive than modelToWorld
good info guys thanks
What is or where might I find the command to change the set the texture of headgear?
Anyone know?
with a mod
I thought that, too, but then I saw this:
class H_Beret_02: H_Beret_blk
{
author="$STR_A3_Bohemia_Interactive";
_generalMacro="H_Beret_02";
displayName="$STR_A3_H_Beret_020";
picture="\A3\characters_f_EPB\BLUFOR\Data\UI\icon_H_beret02_ca.paa";
model="\A3\Characters_F_EPB\BLUFOR\headgear_beret02";
hiddenSelectionsTextures[]=
{
"\A3\Characters_F_EPB\BLUFOR\Data\headgear_beret02_co.paa"
};
class ItemInfo: ItemInfo
{
mass=6;
allowedSlots[]={801,901,701,605};
uniformModel="\A3\Characters_F_EPB\BLUFOR\headgear_beret02";
modelSides[]={6};
};
};
It has hiddenSelectionTextures. Is there no way I can leverage that viat script?
yes, with a mod
Fuck. That's irritating.
there is no helmet object to pass to setObjectTexture
That's weak shit, there. It should be like setObjectTextureGlobal [3, etc.]
Dammit. Anyway, thanks!
hm, no, its not part of the uniform model so you cant retexture from the main unit object
Ugh! Always something.
Can anyone use a plugin for eclipse bringing you full SQF support (live syntax check included)? Because I have written one you might be interested in: https://forums.bistudio.com/topic/202181-sqdev-sqf-developing-in-eclipse/
Ehm, is it possible to make a script that changes the gui color of the client? I saw that one some servers, after i joined it was red.
Im sorry, im a hardcore noob, could you maybe write something like that for the community and post it here or is there a certain code on the internet?
๐ฑ im sry
not sure if this is it
"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1
The thing is, i want a script that sets the profile of the player to as an example red.
Not the Dialog thing
what do you mean profile of the player
can you post a screen shot of what you want to change?
The Standard Orange Color
You can change that by a script. I know it, i had the script but i dont have it anymore
i think its something with GUI_BCG_RGB_R GUI_BCG_RGB_G GUI_BCG_RGB_B GUI_BCG_RGB_A
you could maybe copy/paste your current profile variable file, then change the value using the in-game settings menu, save, then use your text editor to compare the c/p'd file to it
the variable/s that is different will be the one/s you're looking for
yeah those are what I posted
pick a color with rgb format profilenamespace setvariable ['GUI_BCG_RGB_R',1];
thats 100% of red
['GUI_BCG_RGB_R',1]; that is red?
rgb_r r is red
so if you want only red then you need to set the rest to 0
just call it on the player
in the init.sqf or initplayerlocal.sqf
profilenamespace setvariable ['GUI_BCG_RGB_R',1];
profilenamespace setvariable ['GUI_BCG_RGB_G',0];
profilenamespace setvariable ['GUI_BCG_RGB_B',0];
okay omg i give that a try
it's those 4 variable names you listed, and they are part of your profile namespace
profile namespace persists between missions unlike missionNamespace
^
imo fucking with people's profile namespace vars like that is kinda rude though
i wouldn't be happy if i joined a server and it changed all my preferences
๐ ๐
maybe you can restore to default on disconnect
My Server is a Mod-Server. We are something like a big Walking Dead Server. Big Community and that. Id like to have it red so its perfect
yeah, restoring people's preferences back to what they set them as, on disconnect, would be thoughtful
@plush cargo good idea
it would be a nice touch then, rather than a "what's this fkn mission dev done to my preferences"
yea it would just be a script that i need to open in the escInterupt and than make those settings back. But the question is how are the standard settings?
๐ @rancid ruin
do a profileNamespace getVariable on those 4 variables
same as how you set them to new values, you're just getting them instead
What if the game crashes? ๐
then people will be like "why the fuck did this mission dev fuck with my profile"
got it working omg
but i need to make the alpha channel a bit down because only red is fcked ๐
does this affect all ingame uis or is this - BCG - code for just the loading screen?
@tough abyss ?
it changes a lot of stuff i think, it's like your default "colour"
All Ingame GUI's
awesome, suprised more people dont edit this to match their own uis
I will add the Script for removing it after leave and post it here as pastebin.
But its on Life Framework 5.0
Why even bother changing shit
it's annoying as hell
Attempting to change them back when they disconnect isn't going to be perfect
What if they crash/dc or alt-f4
@BoGuu#1044 Don't try to argue with common sense, this was told before, he ignored and... yeah, Life^^ What do you expect ๐
@jade abyss i dont ignore, when they crash they can change the settings back in the Arma Settings. There is idk i heart it from god, its called set to default settings. The function is cool ๐
That isn't cool
You are changing something that somebody wanted set in a particular way
It's incredibly annoying
@dusk sage its just the color wtf ๐
A colour that somebody has picked, because they like it
You walk over and change it for them
You dont need to join my server ๐ , its just a cool thing to add
Just a scumbag thing to do
@dusk sage I could also make a script where you can have a dialog and change it on your own ๐
there already is one
btw are there more codes for that? because my gui in main menu is now without any color lol ๐
@dusk sage you are laughing about Life Framework. Why should you steal or just copy? Its easy to do that.
btw i created a flashlight script. Isnt that cool ๐ https://i.imgur.com/k9DtTeX.jpg
you are laughing about Life Framework. Why should you steal or just copy? Its easy to do that.
What are you on about? Steal what? I haven't laughed about anything
I'm just talking about how stupid the servers that change your gui colours are
it does seem a bit rude
Wow, you are a pretty good example, why the Lifers have such a bad reputation.
(still searching, where i was laughing about the "Life-Framework"... hmm... can't find it...)
you were actually crying?
@tough abyss
No, saveprofilenamespace is essentially pointless. The profile will be saved anyway when you close the game. Including alt+f4 or even CTD. Maybe it doesn't save it when you pull the plug. Never tested that.
You should ๐
No. I still need this machine to read my Emails and I don't have a smart phone to compensate when this one dies.
I'm watching these Armachinima entrants and I need to know like... damn, how do they have such precision control over their AI? I think I need to just put together a list of all of the commands to control AI to do exact shit in a given scenario and go at it as a whole, rather than my method of piecing it together one command at a time.
unitcapture + unitplay a lot i'd guess
What do all the vets in this chat do when they're not here teaching us scripting noobs how to sqf
clasified
When commy isn't typing in this chat, he continues his SQF studies, and waits for the prime moment to correct someone
๐ต
Continuously correcting mistakes is the only way to perfection.
๐
The first step to improvement is acceptance of failure
Accepting failure is damning yourself to mediocrity.
I know nothing about coding , Can somone edit this so it can do slow motion while the bullet is travelling , its a working bulletcam script , and also Have a Delay at the end to see the Target Shot ?
Slow motion code : setAccTime 0.1
player addEventHandler ["Fired", {
_null = _this spawn {
_missile = _this select 6;
_cam = "camera" camCreate (position player);
_cam cameraEffect ["External", "Back"];
waitUntil {
if (isNull _missile) exitWith {true};
_cam camSetTarget _missile;
_cam camSetRelPos [0,-3,0];
_cam camCommit 0;
};
sleep 0.4;
_cam cameraEffect ["Terminate", "Back"];
camDestroy _cam;
};
}];
I don't see the problem. Just insert your slowmo one liner at the start and the end. Where the camera is created and later deleted. How did you even get this far without any knowledge of scripts?
@little eagle Hey , I made a thread with some changes ~ https://forums.bistudio.com/topic/202190-request-edit-help-bullet-cam/
I found the script while browsing for bullet Cam.
I just would like to see these things implemented , A.) Slow mo . B. ) Infinite Camera Time C. ) Delay at End ~ 3 seconds.
Make sure to leave credits!
Ah for sure , will change
What does "infinite camera time" mean?
When I shoot bullet in Air like 4km from airfield, It Exits camera
around 3km
Because of Bullet expiery?
- Also in the air it exits.
Yeah, the bullets die after 6 seconds or so. To save performance.
No way to get rid of that.
Bullets die , hmm interesting.
They get deleted.
Where can I put Slow mo and Delay at end to see the Dead Soldier I hit ~ ?
Then you obviously can't follow them anymore.
ok
Probably after the camCreate and camDelete commands. I mean, SQF is pretty verbose and self explanatory.
sooo like this
player addEventHandler ["Fired", {
_null = _this spawn {
_missile = _this select 6;
_cam = "camera" camCreate (position player);
_cam cameraEffect ["External", "Back"];
waitUntil {
if (isNull _missile) exitWith {true};
_cam camSetTarget _missile;
_cam camSetRelPos [0,-3,0];
_cam camCommit 0;
};
sleep 0.4;
_cam cameraEffect ["Terminate", "Back"];
camDestroy _cam;
};
setAccTime 0.1
}];
Same for your 3 seconds. There already is a delay in the code. You just need to replace the numbers.
at teh end
wow
Pardon?
Are you in Multiplayer?
Editor.
Slowmo will never work in MP.
Editor is SP
Sure. Just so you don't get your hopes up.
ok so
where do i put Time accel
Had to reload Editor , for the new code , But its working now
I'd say you slow down the game when you enter the camera, and speed it back up when you leave the camera ...
im having a hard time understanding what you mean
you dont really udnersatnd what i mean i guess
I think I do, but I don't feel like doing all the work so you can copy paste it without any effort.
lol so much work for a little tiny favour , thanks anyway
Seriously. It's like adding two lines. Anyone can do that.
Going to be releasing a few versions of this on the forums later(diff camos/colors). Here's the first one.
Did it force a windows update ๐ ?
Is there anyone who knows how I can check if cursorObject is a tree?
I did the following
if ( cursorObject in [ "b_ficusc1s_f.p3d", "t_ficusb2s_f.p3d", "t_pinuss2s_b_f.p3d", "t_pinuss1s_f.p3d" ] ) then {};
But didnt work
I assume it doesnt work since the tree itself returns 819438: t_pinuss2s_b_f.p3d
But could I use BIS_fnc_trimString on that or something?
Or maybe not since it will be a different value for all trees
@rotund cypress
You can do str cursorObject find "ficusc1s" > -1
Or you could trim the string and check if the model part is in your list
yep
The above will only give me a bool
You want to check if it's a tree, you never said anything about which one
Oh ahhaha
also, this might be of use: https://community.bistudio.com/wiki/getModelInfo
Never used it though
nice exactly what i need
now i can select 0
and just use that
thanks
Since it returns array
Yaaay
๐
Get out with your wizardry
I wonder if you'll ever have a case that's t_...t_? @jade abyss
?
Because could just do a str _x find "t_" if not
was find expanded?
ah yeh can search strings now
Ah, i got you. Could lead to some strange circumstances, when you have a model with "t_" in it
(for example: Carxyz_t_b or whatever)
i remember there were some Vehs with it
yeh, that's my worry
Thats why -> Search for " : " with LIO, delete until that (+the spaces behind it) -> Select the first 2 letters -> compare
๐
prolly, yeah. Should do it too. Test it out =}
Problem is: Some Custom Maps don't use the " t_ " Tag.
ah ye i see this
*updated with alternative Comparsion
there is one good thing about windows 10
When I create an infinite loop and can't exit ARMA at all, I can bring up the window screen and move it to another desktop
14:54:28 Error position: <ATLtoASL player modelToWorld [ 0, 4, 0 ]>
14:54:28 Error atltoasl: Type Object, expected Array```
Got that error
apparently it expects an array
I guess its because its in a forEach
Where do you execute it?
No way, rly?
Okay, again:
Where is it beeing execute, under what circumstance, who is executing it?
Well i am executing it by spawning it on my player
That thing above should be executed, when you stand somewhere, as a player.
worked for me, no clue what you did
@rotund cypress use ( )
Oh
ATLtoASL player modelToWorld [ 0, 4, 0 ]
->
ATLtoASL (player modelToWorld [ 0, 4, 0 ])
oh boy
Hahaha
(ATLtoASL (player modelToWorld[0, 4, 0]))```Just like it was in my example...
There is a reason, why i did it that way, sooo... just don't change it ๐
Ye I see now
i know that feeling
when you can see the mistake
although its plain obvious, well "arma obvious"
I mean, its just logic
well in the end its just
what the engine thinks is more binding
ATLtoASL player
or player modelToWorld
but yeah from left to right its logical that it will not work
D:
(ATLtoASL (player modelToWorld[0, 4, 0]))
ATLtoASL -> Expects array, but next entry is an Object -> Error
means -> Calc the mtw Pos first -> ( ) it
Yep
Is there a reason for these aswell? _objectName = toArray str ( _x ); _objectName deleteRange [ 0, ( ( _ObjName find 58 ) + 2 ) ]; _objectName = toString ( _ObjName );
THe parenthesis
Yes
Hate parenthesis
What are you planing to do?!
Tree cutdown script
no I just think it looks cluttery
Oh my
NO
NO DSCHA
Yep
NO
I send you strange pics again, if you try to argue with me again!
oh god
(btw.: tbh.: Can't remember if the () at toString were needed or not anymore, wayyyy too long ago)
Never needed it. It's SQF. SQF doesn't have functions that take parameters in ()
โ your answer @rotund cypress
nice
Wasn't it only the other day people were questioning the amount of parenthesis simzor uses? ๐
Or maybe that was me, who knows
I know I used a lot before
Then I came to the conclusion that it's stupid
But that was a couple of weeks ago
@dusk sage
It can sometimes get confusing
people often think
select 1 select 1 select 1 select 1 doesn't work
ye
Guys, what is the Variable of the Ingame Background? The Menu is: 'GUI_BCG_RGB'
no
I dont know where i find them, in setVariable Wiki is no variables list
Or how can i see my profile (game) options? I cant find that in Documents and the files
๐ซ i just want help no one knows?
The LoadingScreen only uses GUI_BCG_RGB Don't even know what you mean by ingame background. My ingame background is the 3D landscape
He wants to change the UI Color of every Client, connecting on his Server, then saving it to the profile, fking up the Clients Settings.
If you want to fuck up the client's profilenamespace just fill it with gigabytes of junk.
SHHH
@jade abyss dude omg, can you just answer my question or get the fuck out ? So unproductive
๐ฃ
@still forum i dont want that. I just want to change the color Settings of the Menu in Arma to White, The Text to Black and the gui white
I got it working with the gui but i dont know the variables of the menu
what menu? escape menu?
@jade abyss i dont want to attack you but it gets on my nerfes
Arma Main Menu
In Browser on top the black thing
@jade abyss Just a prank bro
@still forum i sent a screen
@dusk sage ?
lulz, i am just told him what he was planning, lulz
Guys ? Discussion about anything related to Script creation and usage within game ... IF (script == true) THEN {chat here};
i sent a screen did you?
sry, im german thank you โค
I'm too ^^
send* bro xD
Does that class under short temper ๐ฎ
But why do you want to change that? That's in no way related to the server the players are playing on. If you are doing a Mod change it in config. Else let the user change it via game settings
dude omg, can you just answer my question or get the fuck out ? <- lulzยฒ
Its related to it, its for my text system and other things, so you dont know the answer?
@jade abyss pls, its a discussion about script related stuff
Everything after you join the mission on a Server is serverrelated. The server selection screen definetly is not
But the Server Selection Color is also the color for inGame
why do you show me a screenshot of the server selection if that's not what you want to change?
And do you know that the game has to reload the UI after you change the profileNamespace variable for the background?
for the change to take effect
I thought you were changing their colours back when they left, now you want to change the server browser colours ๐ฆ
Lies!
re eventhandlers yesterday
I didn't even knew, that the 2nd one was even possible oO
Why? What's so strange about it?
Nothing strange, its just... idk, i think i have never seen it anywhere (always with { Call Function/Code inside} )
Just re-check my old files: Yep, everything done with {call _fnc_bla}.
Well, it doesn't work with local variables.
Even in the Example, its not shown:
https://community.bistudio.com/wiki/addMissionEventHandler
Was there any benefit of using it without {} ?
One less call, one less scope.
hm, strange.
No need to define another global variable.
But turns out, this one is faster regardless.
True true
Which means I can squeeze out some more ms in some of my stuff.
The only example i found in the files so far oO Rest is with {}
a3\functions_f_mp_mark\Revive\fn_reviveIconControl.sqf
//main draw eventhandler
if (isNil "bis_revive_iconEH") then {bis_revive_iconEH = addMissionEventHandler ["Draw3D",bis_revive_draw];};```
Which is a huge deal. draw3d is basically once every frame
Yeah
Dunno how long bis_revive_draw is
boguu, you were teasing a life developer earlier, that won't please boguu from yesterday
When did I tease somebody?
I think he mixed up some names.
you were taking the piss out of that miller guy and his quest to fuck up people's profile vars
I wasn't taking the piss out of anyone, the guy wants to mess with profileNamespace colour vars, I said that's annoying as hell
A normal person would've responded: "Oh, I guess changing profile settings isn't a good idea after all".
This guy though ...
Really scumbag thing to do, I have to fix them up every time I join the servers that change them
But I guess your skills at reading prevail again ๐
just saying, you're poking fun at the exact type of person you went on an hour long argument to say we shouldn't poke fun at, only yesterday ๐
i don't really mind, it's all funny to me
But I guess your skills at reading prevail again ๐
Did I make a mistake?
I am confused now, who is firing shot at who now?
I don't know anymore.
Or: Are there any shots fired at all?
I'm not poking fun at anybody, I'm just telling the guy it's annoying to change the colours, doesn't matter what server he owns, goes for everyone
^ this sounds reasonable to me
You have to point out the "obvious" these days.
When i said that, he told me to stfu ๐
When i explained that to others -> He hold me to stfu ๐
I made a comment in general after I saw yet more generally stupid comments about life. I pointed out that people continue to shame some of the decent people in the community, which is true. So I guess getting upset with colours is cannon fodder
Don't care which sub community they are, but it's pretty amazing how many stupid, brazen and brazenly stupid people there are these days.
Brazen and brazenly stupid has a weird ring to it
have you ever looked at Nitrado or the official altis life Forums?
"dumm, dreist und dummdreist"
๐
It makes sense in German
I've never looked at nitrado
The worst thing i've read was a guy, who struggled with a hint message.
Wait, lemme search for it
I like the copying commits from GitHub and including the + and -
"I found the solution" or "I fixed it all by myself" XD
That guy yesterday that wanted to add a slowdown to the bullet cam script he copy pasted yesterday and even copied setTimeAcc from somewhere else.
"Please put this together for me, I don't want to think. thx"
hmm... can't find the Thread anymore -.-
Commy, you are kidding, right?
Wait
All threads will be gone @jade abyss
Some kids hacked the old Tonic owned ALRPG site, he then sold the domain
Hu? He shut that thing down ๐
alrpg? nah, that was Exile.
anyway: lulz @little eagle
I was talking with somone a few days earlier, before that happend, he mentioned that it will be shut down in a few days.
shut what down
I'm confused
@little eagle @still forum thanks, we will take look into that's EH recompiling 16x something something , you know what i mean ๐
?
@plucky beacon wrong channel, move that to #offtopic_arma
k
If I'm using a trigger for conditions that don't require any of the trigger specific functions or variables, is it more reliable to just use a [] spawn ={waituntil{};}?
for context it's a countdown timer and the condition is elapsedTime > timerlength
i think it depends on the rest of all code running at the same time. i think one of the main issues with spawn is that once the script engine gets overloaded there is no guarantee when the code will be executed anymore.
my guess is that triggers are fully engine side and thus more reliable.
I ask because sometimes the mission ends when the condition is met but other times does not. Trying to figure out if it's a ttrigger or script problem.
code can only be correct or not
it's not random
but time can be different on machines
time is calculated on the server, then sent to clients via public variable
so time should be same for everyone
yep.
so it's not the time that's the problem, originally I was thinking having the trigger on Server Only would work better so that the mission end script is only executed once. Because aren't triggers global?
@plucky beacon
DriftingNitro - Today at 7:44 PM time is calculated on the server, then sent to clients via public variable
nope, serverTime is synced.
for local timings, like countdown only on one Client -> diag_TickTime might be the best choice
how does date work? that's not synced either is it?
I have no fkn clue.
wiki says it isn't
should be a flag in description.ext at least imo...like syncing the date across clients isn't a strange request imo
@plucky beacon
You should also check this, regarding trigger Locality:
https://community.bistudio.com/wiki/createTrigger
That'll be the day when we have week long missions and need to sync dates, lol
thought you were talking like system date
nah, in game date
lol ๐ no
haha
That made me smile, gj on that ๐
like, one client can be at daylight in january, another at night time in october, seems so stupid
Are you sure? hmm... (date not synced)
Maybe just adding a simple setDate every... idk... hour ๐
it was that way in arma 2, pretty sure it hasn't changed
END_TIME = 300;
if (isServer) then {
[] spawn
{
ELAPSED_TIME = 0;
START_TIME = diag_tickTime;
while {ELAPSED_TIME < END_TIME} do
{
ELAPSED_TIME = diag_tickTime - START_TIME;
publicVariable "ELAPSED_TIME";
uiSleep 0.98;
};
};
};
so basically this is what I was running, and on the client side it's updating Elapsed_time every second.
END_TIME not defined
it is above
but... why?
instead of tick_time?
read above
11-12min ago
You simply just send the startTime to the Clients -> Count down from that Number (using serverTime)
is that because time-from-start is diffrent when people JIP?
wut?
diag_ticktime is real time spent from start of game
Yes.
so that's diffrent depending on when they joined the server
rgr
So basicly... erm.. just:
Client:
Tag_MyStartTime = 0;
waitUntil{uisleep 1; Tag_MyStartTime > 0};
while{true}do
{
uisleep 1;
hint str (serverTime - Tag_MyStartTime);
};
Server:
_startTime = serverTime;
missionNameSpace ["Tag_MyStartTime", _startTime, true];
should be correct/usable. (Untested in A3)
Thanks, I'll have to test it later because I ahve to finish this homework before I start doing Arma stuff again :P
yepyep
oh, nice
it always seemed such a broken system
i remember some arma 2 server where different clients would be in total darkness or daylight lol
are there still issues with weather sync? i also remember some people with clouds/fog, and others with bright sunshine
that's why so many people just set the fog to 0 repeatedly in a loop right?
that doesn't sound like arma
no wait, that does sound like arma
i've never understood what wind actually does in arma, other than move trees. does it affect projectiles or anything?
there's a fantastic video of the results of a hacker in dayz standalone somewhere, with the trees going 90 degrees in either direction
it might've been removed cos i couldn't find it last time i looked ๐ฆ
@tough abyss is forceWeatherChange the engine version of that skiptime setovercast hack solution?
i hear ya. i guess a zeus-ish "10 hours later" loading screen could work. but only with controlled pace of combat. could be disastrous otherwise n certain situations ๐
"the root of the problem is first param of setOvercast simply does not work ..."
yea probably because of lazy 3rd party cloud tech implementation
dang
what i do now is not fuck with weather at all and just set forecast stuff totally different from start conditions in the editor. aka using engine implementation for random weather. seems to work fine but never ran it for hours and checked in a detailed manner, if stuff is synced
man i wish setfog would accept an rgb input. shit looks still way too blue sometimes
postprocessing effects hehe
actually. i just realised why i think by fucking up my settings. it's jsut using the sky box for color i think
isn't Ace weather supposed to sync all the fog and stuff?
@polar folio interrogation tactics
answer me or it's back to the 4th dimension with you
ahh thats fog :/ thought as snow
yea definately good for trippy stuff. "the ground is gone :O"
Reminds me of the color correction ppEffect
make everything red and blue and shit
My next challenge will be getting a GUI text field to set an integer value globally.
https://community.bistudio.com/wiki/ctrlText
+
inside a UI Config (like RscButtonMenu) :
onButtonClick = "missionNameSpace setVariable ['VarName', (ctrlText 12345), true];";
gl, hf, done.
lol thanks
I'll save this
Is it always better to use the namespace instead of publicVariable?
I barely used PV. But can't rly tell anymore. @little eagle ?
https://community.bistudio.com/wiki/publicVariable
https://community.bistudio.com/wiki/missionNamespace
(JIP stuff @plucky beacon )
So missionNamespace doesn't update for players who join the game halfway in
It does (its setVariable you are speaking off)
_myTruck setVariable ["myPublicVariable", 123, true];
JIP/Global
_myTruck setVariable ["myPublicVariable", 123, false];
Lokal (where executed)
just went to the setVariable page
Ah:
Whats possible was:
_Number = 2;
missionNameSpace setVariable ['VarName', _Number, true];
(wich makes no big diff at all ^^ Ignore what i said ๐ I have no idea anymore, why i used MNS the whole time. Prolly because of the possibility to format["VarName_%1",2] the VarName
Formatting could be useful
hi, help me please make autobans. my sclient-side [getPlayerUID player)] remoteExec ["TON_fnc_autoban",2]; and server side _uid = _this select 0;
"228229230" serverCommand format ['#kick %1',_uid]; I only work kick player and exec ban It does not work. Why can not I use a ban? and whether it is possible to make the ban on time, which would contribute to ban.txt, ie BE comands
Sorry for my English((
q: How would I go about creating a sector dynamically on every known city on the map? (yes, I know on altis this is cpu suicide but I'm looking for a working example). I've narrowed it down to this: { } forEach nearestLocations [getPosATL player, ["NameVillage","NameCity","NameCityCapital"], 25000];
So what do I put inside the {}'s?
Because, as proof of concept, I'm looking to make every city/town/village a sector that can be claimed, regardless of the map. The module should just automatically (automagically?) scan the map and figure it out.
You should check the Wiki again ;)
https://community.bistudio.com/wiki/nearestLocations
I already have nearest locations in my code snippet and that's why I opted for just the nameVilalge, nameCity and nameCityCapital categories. I don't need nameMarine and others.
What I'm looking to do is create each of those locations as sectors in a sector control game.
btw.: Those Informations should be inside the Config, might be easier to take them out of it.
mmm arrays
That's not the question I'm asking.
wow
I already have my list of locations. I need to make each of them a sector.
you mean like the BIS capture sectors?
yes.
_locations = "true" configClasses (configFile >> "CfgWorlds" >> worldName >> "Names");
{
_type = getText (_x >> "type");
if ((_type == "NameCityCapital") || (_type == "NameCity") || (_type == "NameVillage")) then {
// do something with this city/town
};
} forEach _locations
@rancid ruin "Thats not what he was asking for" XD
oneoh, I am already past this point. Again.
alright bruh keep your hair on
Everybody stop panicking!
I didn't read that as aggressive btw but I just got here
It wasn't meant to be aggressive. If it was taken that way, my apologies.
you should keep your hair on anyway, lest you go bald
if I pass in an array that had more than the three name constants I threw in then yea it can get overly aggressive. I could easily just have it grab mountain tips, for example.. the ones that are named at least.
there's shit loads of location types, not many are really used though, it's a shame
But the question is more, how do I make each of them a sector for the sector control game type.
are locations organized by type? I mean they must be if only some are available for jumping to in Eden and Zeus
without any previous knowledge of what is on the map.
Thats why we started with that Config thing. 1. "nearestXYZ" -> avoid if not rly needed.
Here at the Arma 3 discord we work from the ground up
leave no line of code unchecked
I could tell. ๐
Listen to Dscha (carefully) and you'll be good
meh, me? meh
sadly, for my needs I kinda do because I am aiming to wrap most of thesector setup stuff into a drag and drop module, set the range on what it'll turn into a sector, and it'll do the rest. That's why the range attribute, defaulting to 25000 range, can easily be smaller if you want a smaller stage to play on.
Next thing: I don't think there is a "Prefab" for Sectors. I guess, you have to write that stuff for yourself (e.g.: CreateMarker + InArea)
I was afraid of that.
Uh, nvm. Thx @rancid ruin o7
2nd result for arma 3 sector control on google
I bet Sa-Matra knows sectors, ya know KOTH and all
nerfbats Oneoh. "scripted setup, not manual. :)"
best bet would be placing that stuff in the editor and thus finding out how it's done using the editor UI. then go hunt class names of those modules and functions those modules run
and then create them via script
cfgModules
yeah you can do anything in script that you can do in the editor
editor is just a GUI for scripts
here's some info on how the module UI fetsches the variables https://community.bistudio.com/wiki/Arma_3_Module_Framework
will help you reverse engineer
Was hoping I didn't need to go into that deep into the code but... looks like that's all I have. Ah well. And that module framework is what I'm actually leading with to make a dynamic sector control game... the overall idea is that Altis could be split up in roughly equal sections from east to west, and the idea is to take over one part of the continent before advancing to the next.
There will be more ๐
The sector control is created, and destroyed dynamically as the west advances into the east (or other way around if they botch it up bad)
Hint: Start small, just play around with some basic stuff. Then go bigger and bigger (like testing around with Arrays/Markers etc)
@still forum 5 mega would fuck profileNameSpace?
that don't sound like something you can avoid going deep on xD
I had hoped. ๐
Hope is for the weak
What I might do, if I can figure out how to dynamically add and remove sectors, is to make the trailing edge of a warfront despawn and new sectors created ahead of the front as it moves.
keep it as one sector control but the sectors themselves are dynamic.
no @tough abyss
@dusk sage thanks.
Thank you for your time folks. At least it gives me something to work with.
@woeful void Try static stuff first ๐
Already bored with setting up static sector missions. ๐
Dynamic ones, I don't.
kk
if I can't do it manually, then I have no idea how to do it automatically. That's true for about everything really. you can't automate what you have no knowledge of.
yea i dunno about performance of those BIS modules whne there are as many as towns on Altis for example
I already know trying to make every down a sector is CPU Suicide..
I may put a hard limit inside of the code, only X many sectors can be created, for example.
i'm thinking making your own sector system is actually a great project for a starter. clear conditions and straight forward concepts. and as a bonus you get all the control over what exactly happens
btw.: For how many players did you planed on doing this?! 1000?
Otherwise -> Zones will be empty, when more then idk... 10-20
That's part of the fun, scaling it for the # of players online per side. If there's less then 10 total, then having 2-4 sectors might be enough. 100? 8-12ish.. playtesting will bear out what is a fair number.
Sounds easy, but will be a clusterfk (alot to do) ๐ gl with that
isn't CTI doing all that?
CTI scales?
like making each town a sector
Ah, yeah. (at least, it was in OFP ๐ )
yea haven't played it in a while myself. but i think there are several versions of this concept available in mission form. maybe you can find one that suits your needs. unless you're in it for the challenge
I'm doing it as a goal/scenario/... something, that gives a reason to why I'm torturing myself (err)... to satisfy my curiosity and learn more about how the engine works. (yea, lets go with that reason)
^.^
Ideally I would like to find a way for the scripting to communicate off server, like calling a URL or writing/reading from a file...
that way I can have multiple server running, each handling a different part of that warfront and syncing up through that external resource. even MySQL would be a good option...
DayZ did something like that. I would love to learn how.
didn't dayZ just save player gear and position independent from server? i always thought that was one of its biggest flaws design wise. allowing server hopping to pick clean airfield barracks on empty servers
Yep
DB/MySQL Connection:
https://forums.bistudio.com/topic/169723-extdb-arma3-extension-linuxwindows/
I don't disagree about it being a flaw.. but the concept behind it, with data being shared across servers, is what I would like to work out.
Hmmm.... I'll have to look at this.
i'd love something like planetside 2. game is stupid but the whole mass battle on one server thing is damn beautiful
But: Before you do something like that -> Fiddle more with the basics.
Yeah Benson... ๐ฆ
Or at least... connect from 1 Server to another one directly (via Script/ServerCommand)
you should start small though. make your script create zone markers on each town based on location size. then learn the most effective way to check how many units of any side are in those areas considering that you got a shit load of them.
that's already a bunch of interesting problems to solve
and learn in the process
yea that'd be cool dscha
There is one command, but don't work ๐ฆ
or something like (afaik doesn't work):
https://community.bistudio.com/wiki/sendUDPMessage
@badbenson#0154
https://community.bistudio.com/wiki/sendAUMessage
I'm working off of several ideas like that @polar folio, it's kind of like a knowledge map. high level concept, broken down into pieces and each piece I'm addressing individually, some of those are broken down too... down to like.. 3-4 layers deep. There's so many things I do have to learn, yes, so I'm working on each byte sized piece, one at a time. ๐ The dynamic sector module is my learning how to create game logic entities dynamically.
gl with that
thanks.
@plucky beacon @jade abyss
I think publicVariable and missionNamespace setVariable public are essentially the same. Both trigger pv eventhandlers now. object setVariable public should too btw. Very weird stuff going on there.
There is no reason to usepublicVariable outside of explicitly wanting to make use of the PVEH.
missionNamespace setVariable public is faster, because it's one less command. It should be used most of the time, but is for whatever reason less popular "out there".
Anyone have a surefire way to keep AI from proning? setUnitPos "Up" doesn't work 100% of the time.
Plus I'd still like them to be able to crouch
@little eagle Are you sure, that setVar triggers PV EH? oO don't think so, tbh, hmmm....
according to rocket (dayz) PV's are sent as priority messages while setvar is not
and no @jade abyss, setvar should not trigger pveh
oh it seems like setvar pveh was added in 1.46
but it seems to take the target to listen to so they're not the same
unless the first syntax runs for MNS setvar
Erm, yeah? Thats what i said, it doesn't trigger it? oO
https://www.youtube.com/watch?v=28e4RUhkjPs @finite mica look in cfgORBAT
setVariable public does trigger PVEH and it will also pass the used namespace as 3rd argument in _this..
Machine 1:
"test" addPublicVariableEventHandler {diag_log _this};
Machine 2:
missionNamespace setVariable ["test", 0, true];
player setVariable ["test", 1, true];
group player setVariable ["test", 2, true];
RPT:
14:25:07 ["test",0,Namespace]
14:25:07 ["test",1,B Alpha 1-1:1 (Gefr. commy2) REMOTE]
14:25:07 ["test",2,B Alpha 1-1]
Good to know.
It works the same as publicVariable does, in that it does only trigger the event on all other machines, not the one that used the command.
Which means that it does not work at all in SP.
@cedar kindle
The alternative syntax of addPublicVariableEventHandler is not functional and does exactly the same as the default syntax. The namespace parameter is simply ignored.
I also cannot reproduce either of them being sent with any sort of priority. The messages arrive in the order they were sent.
i'm guessing it has something to do with the engine implementation but that's good to know
any difference for jips when the variables are synchronized?
Hmm. Not tested. Should be easy to figure out when looking at that JIP messages .txt file.
The PVEH does not work JIP anyway. PVEH cannot be added in frame 0 and in frame 1, all JIP messages are synched already.
oh
player setVariable [ "VAcatch", [ "VAcatch", "onEachFrame", {
if ( !( isNil { _this getVariable "VAcatch" } ) && { !( isNull ( uiNamespace getVariable [ "BIS_fnc_arsenal_cam", objNull ] ) ) } ) then {
_this setVariable [ "VAcatch", nil ];
_thread = _this spawn {
waitUntil { isNull ( uiNamespace getVariable [ "BIS_fnc_arsenal_cam", objNull ] ) };
// Arsenal closed
// Save player gear
[] call ing_fnc_gear_save;
_this setVariable [ "VAcatch", "VAcatch" ];
};
};
}, player ] call BIS_fnc_addStackedEventHandler ];``` doing something wrong here? Works from initplayerlocal.sqf but only first time I open arsenal and close it, next time it wont... hmm
Does BIS_fnc_arsenal_cam actually become null when the arsenal is closed?
Maybe they keep the camera object around, but inactive
The waitUntil seems arbitrary
I'm also sure there already is a Arsenal opened event and you don't have to loop.
BIS_fnc_arsenal_cam //null if arsenal is not open else holds reference to arsenal display```
Larrow claims so
Yeah, but is it true?
well must check... but it works for the first time when used just not after respawn ยฏ_(ใ)_/ยฏ
Do yourself a favor and use this:
[missionNamespace, "arsenalOpened", {
// code
}] call BIS_fnc_addScriptedEventHandler;
like
[missionNamespace, "arsenalOpened", {
[] call ing_fnc_gear_save;
}] call BIS_fnc_addScriptedEventHandler;
done
๐คฆ๐ป well yeah the easy way ๐
That should do it as far as I can tell.
Wait, is there actually an event for opening the arsenal now?
A" scripted " one, yeah. And it has been there since forever
Unfortunately it executes after the arsenal exchanges all your gear, so it's not as useful as it could be. But I guess that is exactly what Jastreb wants? Maybe not.
save gear after player closes the arsenal ( what Jastreb wants )
No, opens it.
The arsenal, for whatever reason, replaces all your gear with the exact copy of what you had
Which is only a problem when you deal with setVars on backpacks if you want to handle TFAR or ACRE
Otherwise you don't notice it I guess.
Oh and it deletes your laserdesignator batteries when you have full gear.
Really annoying.
bugs ยฏ_(ใ)_/ยฏ
๐ค
this will save gear when player open arsenal, but player changes gear and at that point when he is done I need it to save it
Well, replace arsenalOpened with arsenalClosed
shit... where do you dig these
lol
its not on EH list on BIKI
[] spawn {
while {true} do {
waitUntil {
!isNull (uiNamespace getVariable ["BIS_fnc_arsenal_cam", objNull]);
};
waitUntil {
isNull (uiNamespace getVariable ["BIS_fnc_arsenal_cam", objNull]);
};
_inventory = [player, [player, "currentLoadout"]] call BIS_fnc_saveInventory;
player setVariable ["currentLoadout", _inventory];
};
};
I hit windows key, "fn_arsenal.sqf" -> open file -> ctrl + f "scriptedev" -> F3, F3, F3
that's how I do it
Yes, but you ask the game every frame if the arsenal is open or not.
wich is a waste of ressources
yeah, that's because I didn't know there was an event handler for it
Contrary to what some people claim I say, I think it's not a good idea to do that.
so thanks a lot for showing me
no I just call a FN which saves it to ProfileNamespace
yw
@little eagle and folks massive thanks for the EH direction and possible solution
@tough abyss 5 mega would fuck profileNameSpace? Not sure... But a few GB certainly will
The chance to it hit 5 mega is remote, real is more like 2 mega.
What happens if i create an object and then store it in a var in profileNameSpace, and then restart the game? This object will be a objNull?
How would you even reach 1 MB of data? Even saving a whole loadout is <5 kb
You'd need to save hundreds of loadouts
@little eagle i use profile name space, on the server, as a alternative to ExtDB3.
Was not hard to do.
There is no limit as far as I know.
Although I think that the whole profile namespace resides in RAM.
So yeah, don't make it take up gigabytes.
I just store text and number in it, because this is the data send to ExtDB3. But can i store object types in it?
After server reset what happens with this var if the object stored in it don't exists anymore?
It take less than 1 mega with a clean server. With a server full of objects and player it can grow to 3 megas may be.
You can store anything in profile namespace, but if you switch missions, things like objects, groups, locations etc. become null.
They only persist as long as the mission persists.
Ahh.. thanks.
I simplilly have an array in profileNameSpace that simulates each table in MySQL
5 tables in MySQL -> 5 arrays in profileNameSpace
Starting to whink MySQL is unecessary
:p
I don't know what mySQL does.
So without MySQL and without the need of ExtDB3, one can run the mission in his client, play with friends, and have persistent stuff using profileNameSpace
There is no need of dedicated. It will really be a mission only, with persistent save.
@little eagle its a database.
To store player gear, vehicles position etc...
I know that, but I don't know how it does that.
And I don't care tbqh.
Doubt it can handle object references either, since you can only pass strings to extensions.
And there is still no way to serialize objects...
use player UID
Only if you give that object a vehicleVarName and that still does not serialize it actually in that you cannot use it in different missions / sessions.
MySQL is simply just for storing data (like Gear, Position, whatever) not varNames and Objects etc.
numbers, strings and arrays basically
Those are the things usable with profileNamespace and extensions
But faster to qry from an MySQL DB
Why PNS?! oO
That might work, if you only have certain amount of entrys in it. If it gets bigger and bigger -> MySQL is faster, due to index stuffthingystuff
Because people would rather use inferior features than introduce dependencies.
hi, help me please make autobans. my sclient-side [getPlayerUID player)] remoteExec ["TON_fnc_autoban",2]; and server side _uid = _this select 0;
"228229230" serverCommand format ['#kick %1',_uid]; I only work kick player and exec ban It does not work. Why can not I use a ban? How to ban with a reason and time via extDB2 or BE command. Is there a way to call BE command from sqf?
What?
He wants to ban via sqf, but is too lazy to do a 5min googlesearch (since 3 days)
btw.: Lifer how it seems ๐ (TON_fnc)
Idk, if exec ban does not work with serverCommand , then there is nothing we can do about it.
My players "table" in profileNameSpace is like that:
playersTable = [
[
"23897492374" //player 01 UID,
"56745764644" //player 02 UID,
"34534636566" //player 03 UID,
"23445644745" //player 04 UID,
"65734534563" //player 05 UID,
"45645635634" //player 06 UID
],
[
[gear,life,myUniform,weapon,myItems], //p 01 data
[gear,life,myUniform,weapon,myItems], //p 02 data
[gear,life,myUniform,weapon,myItems], //p 03 data
[gear,life,myUniform,weapon,myItems], //p 04 data
[gear,life,myUniform,weapon,myItems], //p 05 data
[gear,life,myUniform,weapon,myItems] //p 06 data
]
];
To query for a player is simple:
_playerData = playersTable select 1 select ((playersTable select 0) find _uid);
To save a player is simple also (total save):
(playersTable select 1) set [((playersTable select 0) find _uid),_newPlayerState];
To save player uniform is simple also:
(playersTable select 1 select ((playersTable select 0) find _uid)) set [3,_newUniform];
sqf
You goofed
That (playersTable select 0) find _uid line looks painful. Also this is essentially what those CBA hash thingies do.
Yeah idk. That looks good to me. I wouldn't worry about size until it actually causes problems.
You could, instead of using one variable, use a new variable for every player uid using the format command, to get rid of the need to use find, which would speed things up.
profileNamespace setVariable [format ["MyTag_playersTable_$%1", _playerUID], _whatever];
etc.
Yep, thats how i did it for temporary saves in 2017mod
oops, edited
Does anyone know of a fast way to get the class name of an item with a specified displayName?
I don't have an instance of the item, only the name
Cache them at mission start in a pseudo namespace. Best used together with the items inventory icon.
What kind of items?
Why by name?
oO
:magic:
How long does that take to run?
Problem: Localization? Commy2
like 0.002ms
oh nice
You cannot get faster than this with SQF, anden3 ...
Of course multiple item classes can share the same display name and picture, so it's not ...
... What's the term?
my current method is around 500 ms, so this seems a bit better
again: What are you trying to achieve?
This is for loading gear on mission start
Wouldn't it be better to use Classnames, instead of DisplayNames oO
People in my community has complained about them taking long to look up :P
lol
Ooohhhh myyyyyy
So I'm just checking how viable it is to use displayNames
Give them a simple UI Listbox Interface or let them use Arsenal ๐
lmao. It is, but you need to unlock level 100 SQF to get it to work.
@jade abyss @little eagle i never got the profileNameSpace tables highly populated to know if it gets slow or not.
No, they are hashes. Doesn't matter how many entries they have*
@jade abyss Nah, enforced gear.
hmm
@little eagle you talk about your solution with each player in a variable?
Exactly.
I see you're using count instead of forEach. How big of a difference does it make?
count is a bit faster, but doesn't have _forEachIndex.
kk
But not THAT much faster
I'd rather use forEach, but the QC likes count for whatever reason.
someone needs to make a forEach/count without _forEachIndex and without counting the return values
Dedmen, fix your unit test, so we can release 3.2
I did
@little eagle you understand, if 2000 unique players join my server, i will have 2000 vars.
@tough abyss use CBA hashes
So? Currently you will have a huge ass array instead and using find becomes slower linearly the more entries you have, while format getVar does not change speed at all*
Yeah, so its magic, or with one billion vars it start to get slow?
One billion will get slow because it will have to resolve hash collisions, but it'd still be faster than find, probably
Look up how hash tables work. That is what BI does for setVar or any other global variable
In a well-dimensioned hash table, the average cost (number of instructions) for each lookup is independent of the number of elements stored in the table.
Wikipedia
lol what?
but are you?
I'm kinidng about my reaction, but this is very nice thing i was not aware of.
They also invented potatos with curry and magantiba in 1837... you know that?
Okay, time to be the PartyPooper:
How do you think, will you edit your saved Data.
Also:
How will you save your cached Data?
Also also:
How will you load your saved Data?
also also also:
Do you plan on doing any backups? If so: How?
"I ate a potato."
I think I figured out a pretty neat revision of my vehicle spawner. Instead of changing the addaction of each vehicle I have it grab the classname of the vehicle who's init it's in, send that to a case:switch and checks the library of all combinations and spawn's the enemy counterpart.
Also I was using an ugly way of having two arrays and spawning them with the same index of a parrallel array
i think i mentioned it before but:
lineIntersectsSurfaces + bound via a Keyhandler to a btn. or AddAction who checks for the model and activates (deletes the simpleObject + adds the "real one") that particular Car then
https://community.bistudio.com/wiki/lineIntersectsSurfaces
returnUnique (Optional): Boolean (added in v1.69.140138) - When false, all intersections in the same object are included not just the 1st one. Default: true
:9
oh that's just for not spawning it on top of each other
You talking to me Dscha? I think we're on diffrent pages
uh, wut?
Yeah, i was talking to you
Weren't you the one, who had simpleObjects as Vehicles, then exchanged them?
If not -> Ignore what i said ๐
If you are -> read what i wrote ๐
nahnah
:P
I'm sure it's hard to remember when over half the conversations last weekend were about my project >_<
I can't even remember what i said 2 hours ago, soo...
Well 2 hours ago nothing, so of course you can't!
Thanks for all the help, as a conclusion of all help here i will keep the find version for obvious reasons.
@jade abyss can't you block me again? ๐
The day you guys do a lazagna good like me we will be able to talk.
as a conclusion, I will stick with the worst option
O.K.
<- confuziused
The philosophy of Confucius emphasized personal and governmental morality, correctness of social relationships, justice and sincerity
@little eagle do you have any idea whats going on atm?
#arma3_scripting was pretty friendly to you compared to some of the other people that run into here and want their two liner scripts fixed for free.
@still forum confuziused = Confused just spelled wrong on purpose, because: I dolfinitive like that.
do you have any idea whats going on atm?
No.
Okay.
But that makes it all the more exciting.