#arma3_scripting
1 messages ยท Page 425 of 1
that doesn't trigger mouseButtonDown though
yea
what alganthe is saying, he might be wrong about Atom, but he's righat about this :3
mousedown is 0, 1, 2 only i think
M5 does trigger MBD. That is how CBA keybinding handles the mouse.
UNLESS THEY CHANGED (disclaimer)
๐ at least
LMB, RMB, MMB, Mouse 3 - Mouse 8 are all supported.
Scroll wheel can be handled using MouseZChanged or something like that.
da ^
Thanks for inputKeys info, comrades
Next lecture on this topic will be in +/- 3 weeks. ๐ค
Maybe put a wiki note ?
it's already there
people just ignore it anyways
afaik it's commy that added the note too, lemme check
:~)
was year of enum
Just mentioned the note ๐ for the first time
Maybe a warning message in command description like on broken commands ?
compiles list of paragraphs to add
Ha! In my opinion it is broken. But I still can't log into the wiki.
can't use your BI net thingy account?
yeah, works here using g+ login.
My acc still says it's not registered for some reason since update, can't watch my own contribs
Tonic framework ?
it's just a wrapper for param now afaik
Still a pointless function call. But that is just what happens to unmaintained code.
could also easily be fixed using some regex
what the... fuck
That is what we did when local / private keyword was made.
Or when we switched from EXPLODE_PVT_N to params.
params is yet the best what BIS made without breaking something
That's a lot of overhead.
๐
param used to be broken with index -1. It wouldn't report the default (like it would with -2), but the same as index 0.
Also, params used to not trigger an error message when the type didn't match. That was even more powerful imo.
.... i've seen MCC
... optimised by Killzone_Kid
now imagine how it looked before
i'd say better
@wraith cloud no worries I've seen a lot of that
if (isNil "_defaultValue") then {nil} else {_defaultValue};
Hah! RETNIL :~)
almost like if true then true else false
Nah, this is actually useful.
but without macros
Eh, it's annoying to write this one out all the time.
Redundant information with the variable name listed twice. Just another error source.
makes your life easier
script_macros is almost like a shrapnel in a tony starks chest
what is the deal with macro's anyway? clean code, I like.
So don't see why not, keeping in mind a couple of rules.
Well I don't get why would you wrap getVariable as GVAR
Well that IS a stupid thing.
๐ฟ
hahaha
last time he wasn't
But that is bad macro usage.
macro rules:
- replace atleast 2 commands
- ehhh
X39's opinion can be discarded anyway.
dunno, he seems to have improved in those past few years
I don't like where this is going ๐
I spoke to him once on TS. He's a good guy.
He's that type of person that is ALWAYS wrong. So consistently wrong, that you just assume the opposite of what they said and then you get it right guaranteed.
Who exactly ?
lul
Oh X39 dude?
I only met like 3 of these people in my life and I became friends with two. The third one is X39.
not a lot of names with that prefix... Let's not discuss personal opinions of others in here...
Why not? He's tough enough to deal with it, and it's not like anyone has any scripting related question atm.
I do, MERGE MUH PR COMMEH
Bring it on. Say something mean about me.
wait, that's not a question
Well I do! looking for some tags I can use to find an explication on the whole call compile thing in this discord.
How do I addAction to my mission? ๐
Your name makes me think of poo. Is that mean enough?
I may have 1-2 weeks of nothing to do after tomorrow. Depends on what happens tomorrow.
So maybe I merge it. Whatever PR that may be.
Can I trade my 60-70 hour workweeks with your nothing?
" that user alt tabbed during a loading screen, MUST HAVE REMOVED HIS GPU" - Arma 3, 2018
wait what
60-70h is not even legal here
Well, Gnashes, you have a job, I'm looking for one. So deal?
USA, "Professional" so overtime laws don't apply to me.. Heh
Don't do it Gnash, It'll take him some days to automate your job and render you obsolete ๐๐ฟ
@lone glade arma recently removed my 960 card, physically
Hahaha. I'm a CPA (Financial Statement Auditor). There's only so much you can automate sadly.
So what's that. 60 hours in Excel?
More time spent convincing the people who work for my clients that they're doing something the wrong way despite their insistence that their way is the only way that makes sense.
Excel time is for the newbies
sounds like a job commy -can handle- does here
sounds like the perfect job to lose faith in humanity
I'd probably get really angry if I had to do that 10 hours a day.
The one benefit is that there's typically something in a rule book somewhere that you can just throw at them
"You did X, rules say X is specifically not allowed, so change it"
@little eagle why do you exit with true or false
//_this allowDamage false;
true
} else {
//_this allowDamage true;
false
};
Always ends with bool
Because the true block does something else too.
Don't suppose there's a way to block path finding for certain ssides in a certain area? Soldiers keep walking into their own minefields, lol
Why do they move into the mine field in the first place? SAD, Guard?
@little eagle Neither.
It's just the fastest way
lol
Well, actually, it's not, but they still go that way
More waypoints to get around the minefield.
Instead of walking through the entrance to my base, they walk through the live firing range, into the minefield,
which is then fenced on the other side
reveal mines maybe
For every friendly, for every mine?
lol
I guess that'd be the easiest way
Without fencing off the mines
This is how they try to get inside https://i.imgur.com/UFf5maQ.png
(on foot)
huge maybe x2 "invisible walls with disabled collision for players" ๐
west revealMine this
into the mines init box.
So one for each mine, not for each mine times each soldier.
Or maybe:
{
west revealMine _x;
} forEach allMines;
if all mines belong to one side.
init.sqf
No idea if it actually impacts AI though.
I just did blufor revealMine this in their init field
blufor is not a side
Hm
Try it:
west == blufor
But why? What's the point?
Point of what?
Dunno, maybe they thought west/east/resistance doesn't fit the A3 scenario.
So they made blufor/opfor/independent.
Which makes much more sense
considering how the side system is setup maybe they thought they'd add the ability to add more of em'
there's already 7 of them ๐
How about no need for sides completly
But it defaults to the sides we have right now
That makes no sense
not after respawn... if you mean that
_unit addAction ["", {true}, [], -99, false, true, "DefaultAction", "call commy_safezone_eachFrame"];
This
It runs the eachFrame on each frame?
yes it does
maybe just delete projectile with firedman eh...
Yeah, you may need to readd this on respawn.
Wouldn't it work the same if it was eachFrame and what are the benefits of addAction anyway ?
ahha okay
DefaultAction is firing your weapon/handgun/launcher.
And grenades and put are handled as a bonus essentially.
It's written to be as short as possible.
๐๐ผ
hax
The less commands per loop, the more efficient it is.
proof that UI "size" (small, normal, large) is gargabe:
vanilla HUD doesn't resize properly, the vehicle info control is out of the screen (I restarted the game)
same for unit info
(no mods) ๐
Did you try with a clean profile, no edited ui placements?
Cuz u can drag some things around
try it with sli... ๐
SLI is dead
inb4 2 core graphics cards again
devs didn't implement it properly or even at all most of the time, nvidia thus stopped providing support for it
maybe vulcan / dx12 will bring it back but I doubt it.
having a game that would support it was great back in the day
I think I'll use that to remove the grenades and shooting, but just use a different loop somewhere else to set a simplle variable.
I wanna have mroe than 1 safezones and a few more variables in volved
only grenades for safezones?
guys, just tried player addAction ["", {true}, [], -99, false, true, "DefaultAction"]; and i can throw nades, but not shot... did i miss something ?
yes, commy's code
i thought it just returns true...
dunno, haven't checked what's inside it
how does setWeaponReloadingTime work? Just slow down anim + functionality or what?
nah, there's an internal timer for reloads
Ah, okay.
@meager heart yes
commy_safezone_muzzles = getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles") + getArray (configFile >> "CfgWeapons" >> "Put" >> "muzzles");
commy_safezone_eachFrame = {
if (true) then {
{
_this setWeaponReloadingTime [_this, _x, 1];
} forEach commy_safezone_muzzles;
//_this allowDamage false;
true
} else {
//_this allowDamage true;
false
};
};
player addAction ["", {true}, [], -99, false, true, "DefaultAction", "call commy_safezone_eachFrame"];
works ๐
How can you create several markers on (position) objects in a array? have tried this ```{_testmakr = createMarker ["Helicopter", (getpos _x)];
_testmakr setMarkerShape "ICON";
_testmakr setMarkerType "hd_dot";
} forEach _helis;
Markers need unique names.
Replace the name with:
format ["Helicopter%1", _forEachIndex]
for example to dynamically create marker names.
Thanks works great @little eagle
I'm looking for a way to use getMissionConfigValue with BIS_fnc_typeText. Specifically, IntelBriefingName isn't passing to typetext. I get this error:
https://i.imgur.com/11FRiVy.png
The work around I'm currently using is including the mission.sqm into description.ext and calling the value with missionConfigFile.
Full block:
_title = getText (missionConfigFile >> "MissionSQM" >> "Mission" >> "Intel" >> "briefingName");
_author = getMissionConfigValue ["Author",0];
_cmfvers = getText (missionConfigFile >> "cmfVers");
[
[
[_title, "<t align = 'center' shadow = '1' size = '0.9'>%1</t><br/>",5],
["By: " + _author,"<t align = 'center' shadow = '1' size = '0.6'>%1</t><br/>",5],
[_cmfvers,"<t align = 'center' shadow = '1' size = '0.4'>%1</t><br/>",5],
[format ["%3/%2/%1 %4:%5",date select 0, date select 1, date select 2,date select 3, date select 4],"<t align = 'center' shadow = '1' size = '0.4'>%1</t>",10]
] , 1, 1.05
] spawn BIS_fnc_typeText;
As listed above, getMissionConfigValue ["Author",0]; works fine, but getMissionConfigValue ["IntelBriefingName",0]; does not.
You can't just combine the two strings. getMissionConfigValue only works for root level mission config entries.
Also, the default value seems wrong. Should be "" or something like that, not 0.
Ahhh, gotcha. Thanks a bunch.
Why would you want to change this anyway?
I mean, as the block above is now, it works fine. I was just curious as to why getMissionConfigValue ["IntelBriefingName",0]; didnt work the same way as getMissionConfigValue ["Author",0]; did.
getMissionConfigValue ["BriefingName", "no name"]
BriefingName is the attributes name, and it seems to be the root level config entry according to this list: https://community.bistudio.com/wiki/Description.ext#briefingName
class BriefingName //sources - ["A3_3DEN"]
{
data = "IntelBriefingName";
Welp. Rookie mistake haha.
How can i use getpos to just get the z (Altitude) or is there a Altitude command ?
getPosASL should work
sorry to waste time
_position = getPosASL player;
_z = _position select 2;
Man
filtering different inAreas for triggers and markers and array
_zones select {
!(isNil '_x') && {
(_x isEqualType "" && {!((getMarkerColor _x) isEqualTo "")}) ||
(_x isEqualType objNull && {!(isNull _x)}) ||
(_x isEqualType [] && {!(_x isEqualTo [])})
}
};
Look so bad ๐
disgusting
๐ค
It makes sure that if it's a string, it's got a marker color, which means it's a real marker.
If it's a obj, it makes sure it's not NULL
and if it's an array, it makes sure it's not empty
But it looks... disgusting
As usual you just gonna figure something less "ugly" laters
@peak plover Well, I can see at least one thing you can shorten
(_x isEqualType [] && {!(_x isEqualTo [])}) to ({!(_x isEqualTo [])})
isEqualTo would already imply checking array?
^ what he said
it will
@compact galleon is right
No. == will. isEqualTo will not
isEqualTo checks type?
@peak plover Performs strict comparison between var1 and var2 and returns true if equal, otherwise false. Strict means that it would check that both arguments are of the same data type and then compare the values.
well, "most" types not all of them
Ooh
That's good thanks
isEqualTo = === apparently
That's good to know
so basically
_var = true;
_var isEqualTo true
But not so strict that arrays have to be the same instance
well you can even
_fnc_isEqualTo = {
switch (_this select 0) do
{
case (_this select 1) : {true};
default {false};
};
};
no ?
Yes, but whether it'll accept all types, I don't know
[[], []] call _fnc_isEqualTo will return true
how many times are you going to write if (bool) then {true} else {false}
did i wrote it already ? ๐
yes, about 5-6 hours ago
me ?
da
wut
eh
[0,1] select (_var isEqualTo true)
oh...
0 spawn
{
disableSerialization;
waitUntil {!isNull (findDisplay 46)};
var_ehBlockNades = (findDisplay 46) displayAddEventHandler ["KeyDown", "if ((_this select 1) in actionKeys 'Throw') then {true} else {false};"];
};
((_this select 1) in actionKeys 'Throw') already returns a boolean
Why do you then true
((_this param [1,0]) in actionKeys 'Throw') isEqualTo true
biki down
dev blog /website down
da tonk took it
It was seized by the FBI
^ btw it will works with { }... that thing is 2 years old
biki is up
oh sorry, nigel... discord trolling me...
Why do you then true
that thing will not work without it....
and back then was some troubles also with inputActions/actionKeys... cant tell what exactly
Then please don't spam the channels for those who do
@lavish ocean @smoky raptor ๐จ plz
Hey sorry if this seems like a bit of a vague question but can anyone give me any suggestions for good scripts / features to try and make (relatively basic but with experience of programming beforehand) in sqf.
that's fairly vague, you want to learn sqf?
yer pretty much and im just looking for small project ideas to try and make
so like how in say when learning c# I first made a login system and then a 'atm' style system so something like taht but in sqf
i'm trying to think of something but nothing comes up :/
hello world script using the various message possibilities...
but that doesn't really help learning sqf
i'd say finding something you want to do and then ask for pointers here would be faster
but finding "simple" tasks to learn sqf isn't a bad idea in itself.
what is so special about sqf compared to c#? thats the question then. Propably the scheduled/unscheduled thing?
but thats a trivial thing isnt it?
yeah i mean quirks and "meh this is awefull" but thats something you adjust as you go i would recon?
I guess
yer see I mainly do 3d modelling and have been for a while now but ive got a project idea I really wanted to start on but alot of the mechanics are whatI would assume to be relatively complicated to implement so I wanted to try and make some smaller things first and then try and work on the ones for my project
i wrote an extended vehicle damage script... and then started on 3d radar stuff (before jet dlc came) and 3D artillery computer as first stuff.
and i'm not really familiar with any programming language, just the basic structure, some syntax and stuff
its not that hard
knowing versionning (git) is also very useful
extended vehicle damage? so like each part such as the wheels doors etc gets its own damage value or? also yer im not too farmiliar with git but ive used it in a few projects before (assuming you mean github if not then I probably look like an idiot lol) but yer Ive got experience with Python, and C# primarily so im hoping ill be able to figure it out pretty quickly
no, ammo exploding from penetrations to ammo, based on projectile parameters and so on, fuel burning, crew getting injured based on hitlocations blabla jadda jadda. Propably obsolete once tank dlc comes around
Let's hope!
amen
cough ACE_cookoff cough
oh fair enough. That sounds pretty cool
and no commy
mine is better - in terms of potential, because ace needs to work with all vanilla stuff and pre-existing sections. I have custom models where much more is possible
currently it's worse on dev branch damage wise
X3KJ, did you made any demo videos of your damage system ? i saw something like that... but it was so long time ago, afaik beta times
@meager heart then it must be something else you think of, mine is more recent (but unreleased).
Haven't made detailed presentation of it. You can see the results of it here https://youtu.be/dcH4bzH6Ydk?t=6m16s and at 18:00 and 20:30, but its just the end results for explosion. The more interesting bits, like leaking, fire damage over time of compartments and crew stuff are not shown.
you can read some details here https://www.dropbox.com/s/u91u2qg1i8iok4n/CustomDamageSystem.pdf?dl=0
Oh nice models there also is it Warhammer like conversion ? ๐
it is indeed
Nice ๐
That system looks interesting...
Other volatile components inside a burning compartment may ignite and burn or explode as well -depending on vehicle setup it is possible to cause chain reactions within multiple compartments
i'm hoping the dlc does the same and more... but i somehow have a feeling that many interesting bits are not implemented, and that its all totally inaccessible and hardcoded ... as with radar in jet dlc...
^yeah that part is crucial for large objects like battleships, or "land battleships"
are you sure that is you first project ? lol
When you start with one layer first (explosion) and then gradually add on top it's not difficult. Only thing i was not feeling capable of was to making it compatible with the MP side of things - which is where the guys from IF mod (kju and co) offered help
but currently all on hold waiting for what tank dlc brings
commy2 ๐ฉ - Today at 02:18
Let's hope!
I've a question about Draw Distance in MP, if anyone wouldn't mind helping
I have setViewDistance 6000; in my initServer.sqf, but my players don't seem to have longer draw distances. I watched one of their screens and it looked like he had less than 1k Draw
In addition, I have player enableFatigue false; set in init.sqf
This works for me (the host) but not hotjoin players
some looking around suggests that I want to use either initPlayerLocal.sqf or initPlayerServer.sqf, but I am not sure which is the more correct place to put that line
@plucky pewter initPlayerLocal.sqf
Is there a way to spawn a unit completly naked?
I meean
As soon as he is created he is naked
So he never gets a uniform not even for a frame
Even B_Soldier_base_F spawwns with gear
is it possible to spawn in like ,the combat goggles on a floor?
yes
Waffe1 = "WeaponHolder" createVehicle getpos this;
Waffe1 addWeaponCargo ["arifle_Khaybar_C_ACO_F",1];
Waffe1 setPos [getPos this select 0,getPos this select 1,0.5];Waffe1 setdir 75;
You might be able to figure it out from here
@peak plover make your own config class of that unit that is naked.
Then it will spawn naked ^^
That script you posted was written by a german
ye
@compact galleon Thanks much for the help
Man , empty units with nothing at all would be great for everyone who uses custom loadouts.
@peak plover use an unarmed soldier and strip his uniform and GPS etc then he is naked. Though yes it would have been nice to have an unit called B_unit_naked
The survivors of Nato and Csat have ONLY the uniform afaik. That is probably the closest you will get...
csat uniforms have increased protection
yeah i know. Due to the fact they lack the heavy vests for BluFor.
At least that is the reason i read somewhere
nah, most of their vests don't provide any protection, only those "basic" kevlar ones without plates
their = BluFor/OpFor/both?
I can remove uniforms
It's just the stutter from creating units and then giving them loadouts via script is bigger than it would be on a naked guy
hide it maybe somehow
I hate having to debug Steam exclusive mods.
Downloading them is so annoying. So many search bars, menues and launchers compared to google.
And SW is so fucking slow compared to what I get with my browser.
And then finding that god damn folder.
Why so many subfolders wtf.
@little eagle what?
C:\games\steamapps\common\Arma 3\!Workshop
THe invisible folder
They are all there
I like downloading, just type in search. and hit +
"C:\Steam\steamapps\workshop\content\107410\930738103\Addons"
C:\Arma 3
is my usual path
Haha, open the first file:
// by commy2, edited by ...
There's shorctuts with mod names in !workshop
I actually must be one of the only people that likes SW
Shortcuts are created by Arma launcher afaik. So if you don't use that you might not have them
@still forum backpack entities remaining the scene seems fixed
at least locally
they may still not get deleted properly on other clients
So atleast on the host they are properly deleted. That should solve most of the problem I guess
yup
is that in stable?
No, dev
Is any container like vest is the same object when it's moved from vehicle to unit etc?
@unborn ether depends what you call "same object"
@lone glade You can return container object with vestContainer for example, just curious if it stays the same object when you put it, or take it, in order to do some setVariable stuff. I just can't check that from phone ๐ฌ
I can't setVar on objects? Wut
only:
vehicles (such as ground holders the containers are in)
locations
controls
displays
dialogs
and ofc mission / ui / profile/ parsingNamespace
But isn't that an actual vehicle? Can somebody please check ?
No no
yes yes
When it is on your unit
and how it is? via a special ground holder
I think it returns the actual backpack object
vestContainer player setVariable ["foo","bar"];
Just to see if keeps existing after put/take actions
@lone glade You can set variables on backpacks/vests. TFAR does that
yes it keeps the vars when you drop it
@still forum So basically they are persistent until deleted scripted ways?
yeah
Thanks
So
I've got player variable from missionconfig
_unitVar = call compile (getText(_unitCfg >> "Attributes" >> "name"));
It always says undefined variable in expression if the unit is not there
How do I check that it's not nil before call compile
Aahh
isNil (compile (getText(_unitCfg >> "Attributes" >> "name")))```
Duuh
lol
or.. you could check the output of getText
That does not help
Ah.. I see.
because if player is not slotted... variable nil
You seriously call compile to get a variable?
oh my god
get a variable.. get variable.. getVariable
use together with default value
๐ค
I love Discord. But then there are servers like this one, that strips it back down to IRC
Rough.
surely there are other places that don't strip it back to IRC
surely every place doesn't need to be the same
surely
How is that a bad thing
:D:D ๐ It's all the same in the end of the day
Is there any way to figure out the current topmost display?
maybe with https://community.bistudio.com/wiki/allDisplays and find the active one, let me check
Yeah aware of that command, just not sure how you'd get the current one
both, i have custom displays and dialogs
it's for a notification that i wanna make sure is overlayed no matter what, but because we have no decent z-order i wanted to see if i could get the current display when calling the notification function and then recreate the rsc when needed (Or add it to said display)
there is a BIS fnc something that creates a display, maybe just creating one is enough (and it will add on top of all the others existing at this time)
why not a simple BIS_fnc_showNotification, would it be hidden?
mine does some additional stuff, plus there's a couple other systems i got too
https://www.youtube.com/watch?v=kAHWuYS0ekc like the debug text in the background on the left is something i use a fair bit and i don't wanna constantly just cut rsc there to make sure it stays on top ๐ฆ
from https://forums.bohemia.net/forums/topic/182494-getting-the-current-top-dialog/ ,
"it appears that the idd of the currently opened dialog is the first one in the alldisplays array. The IDD of the dialog is -1." (huh?)
Hm thanks, i'll mess around a little to see if i can get something workable out of that
wish you the best! it seems to be a recurrent question indeed
Yeah although A3 UI scripting has improved a lot, zorder of items is still an issue
The same applies to having interactive elements on top of eachother
I must be blind, is there a way to tell the player's view elevation? I know getdir is heading.
it starts with the orbs you see it and ends with backwards sop
lol
is correct answer
or wait eleveation as in not how hight the eyes are but how high its looking
yeah eye direction probably is good for that
he is probably offline already, anyway
yep
we will never know, what is view elevation ๐
Does anyone know what the in game Key ID is for Arsenal or if there is one. I've been through many of the xmls contained in the game pbos and cannot find it.
Hey, anyone know anything about DrawIcon3D
trying to put a custom image as the icon, couldnt think for the death of my why it wasnt working, but then someone said try a complete file path , C:// etc.
and it worked.
but imagefolder/image.paa didnt
never ever use paths with drive letters ingame
i have tried in altis life, and editor
both give the same issues.
@young current thats what im trying to avoid
@cloud thunder the hell are you calling a key ID
ingame localizations Ex. <Key ID="str_a3_radio_b"> <Original>Bravo</Original>
those are strings
yes
sooo, you want the string for "Arsenal" ?
yep
ok, found a workaround.
afaik, just "Arsenal" doesn't exist, it's either Virtual Arsenal or any other combination of words
_image = format ["%1imagefolder\image.paa",[(str missionConfigFile), 0, -15] call BIS_fnc_trimString];
yes Arsenal is what is listed in player actions when Arsenal contents are modified in English game versions.
STR_A3_Arsenal
When using one of the several Arsenal modifiers such as BIS_fnc_addVirtualWeaponCargo
that's the string used for the addAction in bis_fnc_arsenal
Ah, cool Thank You. In wich pbo is the string located?
no idea
Hmm
When adding dialogs /displays to description.ext
rsc go into
// Rsc titles
class RscTitles {
};
But why do displays / normal dialogs
Just go there without a class?
@cloud thunder languagemissions_f_bootcamp
even with an nvme ssd win search sucks
took about 3-5 minutes to find in my unbinned data
fn_arsenal.sqf ?
Ok, nice. What would you reccomend to unbin multiple pbos at once? @lone glade
BIS tools has something to unbin all pbos from root to the P drive
for exactly what I just used it for.
it doesn't work for EBOs and doesn't unbin .p3d files for very obvious reasons
arsenal function Description:Splendid arsenal viewer
Oh right, forgot about that, I had already used it and have and unbined game on my machine somewhere for the terrain I was building and abandoned..
default tool is BankRev
Quick question, anyone here a pro with animated dialogs ?
i.e, I have something similar to exiles notifications but.... https://gyazo.com/0d6b511a00b2253ae4b548a59f291aef?token=6088fc496cd07a6f8c104773609c18f1
ctrlSetFade
ctrlSetPosition
ctrlCommit
Check out these 3. It's not that difficult to make.
that is what ive done xD
but if you look at the distances.. its kinda not working, I have put in 4-5 hours trying different things before coming here
.. some of them are overlapping, but some have a bigger gap then it should be.
Oh, that screenshot is yours, not the one from Exile.
it seems to be the bigger messages that are breaking it
Did you write it on your own? Because if so, you should be able to figure it out yourself. Seems like a simple math problem.
https://community.bistudio.com/wiki/ctrlTextHeight
This may be needed here.
yup
HOLY SIHT
Im a fucking idiot
Notifation_Array = ([_ctrl] + Notifation_Array) select {!isNull _x}; was after the movement loop, so it wasnt counting the last one sent...
now time to test.
thanks for the kick up teh arse xD
Looks nice.
@shut flower https://github.com/CBATeam/CBA_A3/issues/876 Would this be enough if it were an array in description.ext?
Both normal config and description.ext
Combines both arrays.
Would be also nice to use this to allow non-logged users have access to server settings. Should be a seperate array though
What should they be named?
What is the debug console list thingy called?
watch?
Maybe you could just reuse the debug console access array for that
and then call the other one CBA_settings_EditWhitelist/AccessWhitelist
I'm sure chris can think of a better name
How would you make barrels of certain type go BOOM when hit by a bullet with CBA events?
I'm trying to make a funny mission.
Idea:
if mission list exists
user can edit if he appears in combined mission + addons list
else
if addon list exists
user can edit if he appears in combined addons list
else
user can edit if he's logged in admin
This way logged in admins are locked out should either addon or mission have a list.
@fossil yew
// init.sqf
["barrel-classname", "Hit", {
// createVehicle a bomb
}] call CBA_fnc_addClassEventHandler;
Like this?
yes. let me find the bomb class... something that's not really big, no jet bombs
I think you need to delete the barrel, otherwise it could spawn multiple explosions killing the server due to hitting itself with the explosion.
Hit is a shitty eventhandler for this, because it could appear on any machine (shooter), not the one that owns the barrel.
But idk if HandleDamage works for that object.
makes sense
Nvm, I was thinking of HitPart. Hit is fine.
additionally some thing to allow users in the list AND logged in admin. like just adding the string "loggedInAdmin" into the list together with other playerUID's
That way you have Chris' and my Idea combined in one list
you can either limit that only some admins can edit. Or can specify users that can edit in addition to the admin
yes. Exactly that
He, now that I know the difference between >> and / to navigate configs is the priority of them, I can get rid of even more parenthesis:
//new:
getArray configFile/QGVAR(whitelist)
//old:
getArray (configFile >> QGVAR(whitelist))
eats ๐ช
new is slower tho
And? It looks nicer though. Benefit outweights the cost, because the speed difference is probably minor.
kill all ()
I prefer to be very explicit with my parenthesis to be honest... It's way more clear and you don't have to know whether a command is nular, unary or binary while reading some code ^^
same thing with math
Are you saying it's not obvious from context, because you can assume code you look at works (if it causes no problems)?
not entirely sure what you mean but yeah I guess so
getArray configFile/QGVAR(whitelist)
You say it could be read as:
getArray (configFile/QGVAR(whitelist))
or
(getArray configFile)/QGVAR(whitelist)
I say only one of them makes sense.
for example I prefer
mapGridPosition (getPos player)
over
mapGridPosition getPos player
Well, you end up with a lot of parenthesis if you go by this.
so with your example I'd go with the getArray (stuff) version
I disagree ๐
Way harder on the eyes with this much redundant information.
well _blah doesn't have to be parenthesized though
I guess but then you could just split it over multiple variables
You're making this worse and worse.
hehe
If you use it only once, you probably don't need a variable.
if it helps readability I don't care
โฌโโฌ ใ( ใ-ใใ)
it hurts it because you probably know SQF like your back pocket for the most part, others don't ^^
others should tho
(no clue if that saying translates well to other languages)
gives reason to work harder on getting to know everything
elitism and programming don't go well together in the grand scheme of things ๐
Your message was better before the edit
lol
well readability and debuggablity typically go hand in hand
doesn't really apply to SQF since there's no real debugging
but still
Yes, and superfluous parenthesis hurt readability and debuggability, because they obfuscate what's actually going on with redundant information.
and our opinions differ on readability so that point is kinda moot ๐ฆ
debuggability? My debugger doesn't care about parens
More displayed information = eyes don't know what to focus on = more brainpower needed to read code = more easily to miss or make errors
@little eagle that's why I said that if it gets too much you'd extract stuff to variables
useless comment
that's why you drink a mix of monster and G-fuel before reading sqf commy
to make your brain power rise up
@still forum your debugger probably does something similar to VS where you can evaluate the selected bit right?
and/or it knows which *nary type a command is
A.)
private _groupMembers = units group effectiveCommander cursorTarget;
B.)
private _groupMembers = units (group (leader (effectiveCommander cursorTarget)));
C.)
private _commanderTarget = effectiveCommander cursorTarget;
private _leader = leader _commanderTarget;
private _group = group _leader;
private _groupMembers = units _group;
A is good, the rest is bad.
I prefer B but C is the "best" IMO ^^
If you're an absolute beginner. Like a pig looking into a clockwork, then maybe B and C are a starting point, but anyone that has at least written one script should understand A.
definetly c. But also depends on how often that is used
But I would decide based on what perf I need
Or group. Come up with a better example then.
leaving you with
private _groupMembers = units cursorTarget;
the example served it's purpose though ๐
aka don't put shit in vars when it's not needed?
Alganthe missed it completely.
my brain power is too low commy
Commy2, that said, I've had cases where not using brackets causes an error
I didn't drink G-fuel or coffee today
๐
oh well, it would be a first in software land if we'd all agree on a style and it won't happen here either
Like it complains about expecting an array but finding something else, etc
because an other command has priority ^
mhm. in that case using brackets fixes the issue
Parenthesis. And of course it errors when you miss obligatory parenthesis. We talk about superfluous or optional parenthesis.
"I missed some parenthesis before, so better wrap everything in it" is not acceptable.
ยฏ_(ใ)_/ยฏ
"I forgot my pants yesterday, so now I put pants on everything"
I don't enjoy wading through errors all the time
If a precautionary pair of brackets prevents that then w/e
It's not even ambigious code that we talk about. It's parenthesis for the sake of parenthesis. Which is dumb.
what do you think about:
(_x select 2) set [(_x select 3), (_x select 0) arrayIntersect (_x select 0)];
(from dedmen)
from me? wut
yes, from you
neat
wait, i'll find the commit ๐
Which is dumb.
maybe, but does it negatively affect anything? (if it doesn't, then "is dumb" is rather subjective here)
vicious
Ah yeah. my magic stuff
(_x select 2) set [(_x select 3), (_x select 0) arrayIntersect (_x select 0)];
One params would get rid of all parenthesis. I guess this time I agree that creating variables is prefered, because it's about arguments in a function.
It wouldn't really make it better I guess
but does it negatively affect anything?
Yes, readability and maintainability as we said. And it makes the code more error prone due to obfuscating the relevant information with superfluous information.
Is that why you use (_x select 0) thrice?
ยฏ_(ใ)_/ยฏ
:~P
apparently lazyness
oh shit what have I started
~ is great. It lets me use emoticons without getting replaced by non-blob abominations.
The plural is "emoji", not "emojis".
LIES
params wouldn't make that better.
params ["_array1","_array2","_array3","_array3offset"]
it's because you're a japanese spy commy
but you're also a double agent working for the USSR
What's the latest season of Archer? I've seen 7 last iirc.
I stopped at 6
May've been 6, yeah.
@still forum https://github.com/CBATeam/CBA_A3/issues/879
Any ideas on how to implement this? As another argument in FUNC(init)?
I would yeah
Honestly... init func is getting a bit overloaded
a alternative config way would be better
What do you mean by letting people not edit them mid mission. When else would you edit them?
you can edit them in server settings. But they won't take effect.
One sec gonna read up what I wrote
Yeah, init has 7 args, and one of them is an array with up to 3 sub array potentially depending on the settings type.
I didn't write that in there :u
config makes it a bit crusty for very small settings though. You'd need a function for every small thing instead of having it inlined
Wouldn't it just be enough to put a disclaimer that you need to restart the mission for some setting changes to apply?
Couldn't this , if we want it on a per setting basis, be enough to just put inside the settings tooltip?
Just like the exclamation mark that the setting is being overwritten
So not the tooltip.
people don't really look into the tooltip if they already know what the setting is doing
didn't stop me @still forum ๐
Well, another exclamation mark may be confusing too.
And using the already existing one for this also, may even be more confusing.
A blue one?
I always had this idea for making a green checkmark for when the setting does apply. Basically the oppsite of the exclamation mark. And maybe that could be yellow for those need-restart-type settings.
Maybe outside the dialog as soon as you changed a setting that doesn't take life effect. And when you hover over it it says
"you changed settings which will require a mission restart to take effect. <list of settings>"
I don't want the dialog to be filled with useless empty space on every entry for when the warning is not there.
The space is there whether or not the exclamation mark is shown.
So could easily also make a checkmark there.
I guess ยฏ_(ใ)_/ยฏ
Maybe positive feedback is reassuring that the setting does take effect. And that would be the ideal place for this disclaimer for need-restart type settings.
I'm not a designer guy. I don't know
I'm not either and I'm probably the worst person to decide this.
Make some examples. Post somewhere. Let vote ๐
Because strange things make sense to me, and really popular things don't at all.
Like alganthu does
Make some examples. Post somewhere. Let vote
Sounds like work. Guess I make a PR with screenshots.
Well you said you have free time. Use it
Could use it to procrastinate or play video games.
That new medievel game came out
kingdom come deliverance?
Well, I don't play recent games, but thanks for the suggestions anyway.
play video games.... like arma
and what can you do while "playing" arma? SCRIPTING
taps forehead
You're a genius, alganthe.
throws ๐ฅ at @lone glade No sleep!
Yes, readability and maintainability as we said. And it makes the code more error prone due to obfuscating the relevant information with superfluous information.
So it's subjective ๐
How is it subjective when I gave an objective and measureable reasoning?
I can't believe nobody has made a PAA plugin for Gimp yet.
true, it gets old converting shit through texViewer
Is it enough to convert to PNG, or does it have to be TGA?
PNG is enough
ImageToPAA
readability is subjective, as is maintainability. The latter part is linked to these two
which doesn't work 90% of the time
I find it easier to read B and C (from the earlier examples), for example
I gave an objective measurement for readability. The more information you display, the less readable it becomes.
that's not...
Displaying redundant information, e.g. implicit information, hurts readability.
No, for everyone
I've seen people comment each fucking lines of the functions even tho they were simple AF
I find it harder to read a lot of stuff packed into one line for example
brackets/new lines break that up
and yeah ofc commenting on each line makes it noisy
// Pushing the item into the array
_array pushBack _item;
The world is full of things to explain.
^but compare that with
[actual array and stuff here] pushBack [another array] select 1```
(comments weren't part of the original discussion btw)
This isn't one of them
THE WIKI IS THERE FOR THAT
comment large blocks for maintainability or workarounds you had to use
tfw you use and and talk about readability
You're not talking about the same thing as OPTiX.
But I think I know what you mean. And it's not fair, because you left out the implicit information in your example too by skipping right to the variables.
But how do those become defined?
Yeah I was too lazy to come up with a proper example
Also, in your example, the parenthesis that you missed are obligatory.
So your code is broken and not suited as example.
Aye, which is why i use them by default ๐
Yes, everyone should use obligatory parenthesis. That was not my argument.
The example is clearly ambigious. Unary command stacks are not ambigious.
My point was basically that, unless one is completely familiar with how the command precedence/stack works, it's probably safer to use parenthesis than to not, even if not required
I discarded the "I missed them once, so put them everywhere" reasoning already.
Maybe you should study basic command precedence. That could help you debug code of others...
From a mission making standpoint, it's a lot of lost time and frustration because you thought "oh hey maybe it's okay to not use them here"
Like really basic things, like read from left to right. It's not too much to expect people to know that.
But there's the tradeoff. I have finite time for a hobby. It's not my job, and I don't make mods and stuff. So this is way easier and convenient to just do this ๐คท๐ฝ
Read from left to right was so much of a time investment? It helps saving time later tenfold.
After respawning
``` does not work... until ~15 seconds after death
Then it magically works
Doesn't assignCurator have to run on the server?
I usually place more more parenthesis than necessary, especially in larger if statements
It works 15 second later and it's in local m
SP?
assignCurator has to run on the server and on a dedicated server, player is null.
local mp
It works
But it does not work if I respawn and do it in the next ~15 seconds
If 15 seconds have passed from respawning
it works again
Who knows.
t-t-thanks bohemia
tonks
ooh, yes excited for tonks dlc 'tho
Can I have "Make Arma Not Bug" dlc?
A "The players decide the bugs to fix" would be a nice DLC, one I might consider worth paying for too
Having played other games, especially open world ones... I'd say arma still is quite moddest in bug production
Just the sandbox nature and moddability let's us see deeper behind the veil and notice bugs that we would not know about on other games
Well, atleast I got rid of stutter when admin wanna become zeus or sth
The ones I have most issue with are the ones where they did it intentionally to make their DLC work properly and broke the balance of the game otherwise
๐คท๐ผ
Because they refuse to fix them until enough time has passed. They just can't focus on do things properly instead of hacking it together
Example?
Introduction of armour broke SP completely. Range of spotting reduced for Apex and again for tactical ops
Spotting nerf is weird... shulda made it so setting skill to 1 is mroe than it's now
I like how skyrim / fallout games always have unofficial patches 'tho
It was first reduced dramatically with Apex, and the reason was downright obvious because the AI was spotting players through the undergrowth quite easily and a lot better than a player could do. So they decided to cap the range or it would have broken all their missions.
No they can't see through the leaves, but what they can do is see through genuine gaps and see the magic spot on a human when camo would make that impossible for a human
@little eagle write a new life completly from scratch and make millions
Make it >100 fps
Make a simple script drawing a line from the AI to the position they "think" you're at
In open ground humans have an advantage, in forests the AI has an advantage just based on the way our eyes work. You can't have similar capabilities for the AI in forests
you'll notice very fast they:
- don't see through foliage
- blind fire a lot
- you can break LOS fucking easily
I don't disagree and its not what I said or meant.
even through gaps AI can barely spot your ass
But I do think to get an even playing skill the best thing to do is reduce the AI spotting skill and aim in forests due to the closer nature of it.
chernarus is the most noticeable for that, you can lay down in some parts of the forest and be practically invisible
BI clearly did exactly that and for the same reason both for Apex and Tactical ops so that now if you aren't playing either their spotting distance is hard capped at a ridiculously low number.
I am sure they will undo a bit of it in a patch or two, probably for tanks because the low value wont work for that DLC ironically!
I just wish they didn't do that, change the balance of the game overall for the purpose of making their DLC work. Its frustrating to say the least.
Yeah. The issue is @lone glade if you don't run a script that reveals spotted enemies to other groups around. They can't see past a certain distance anymore. And players can easily see. But @tough abyss uses right mouse button zoom. So he has a huge advantage in long range, cuz right mouse button zoom is 3 (according to call CBA_fnc_getFov)
3x zoom, for free... I hate right mouse button zoom
I play without zooming ... so having a scope is a huge difference
THere's a mod VTN, that disables it and there's config edits people have done to disable it as well
I fully expect the range to be massively extended for tanks DLC because you can't have tanks being limited to 300m spotting each other it will be ridiculous.
I quite like the idea of no zoom, we play mostly without scopes to bring ranges down to realistic levels with appropriate accuracy too
I take it you mean this mod: http://www.armaholic.com/page.php?id=31127&highlight=VTN ?
Is there one without pistol accuracy changes? (What does it change about pistols?)
@wraith cloud It's stupid. If Squad can do it arma can as well. And people who defend it saying u can see better IRL. No you can't... try spotting someone from 300 m away... then try in arma with rmb zoom...
I think the FOV for RMB zoom is 0.25 and default is 0.75 on foot.
So yeah, 3 times magnification.
weapon accuracy is their dispersion cone in milirads
Yep. They used the zoomed in FOV as 1x.
In description RCO says magnification 2x... I guess it means 2x max rmb zoom
So all 2x weapons should be 0.125
I really hope I remember those values correctly -_-'
No, you have to edit the configs, including all vehicles.
Going through all classes takes too long
make a macro
Still need to edit all configs.
^
you haven't seen me using the ace clipboard for that ๐
Find all of them, and maintain the list of them. It is a fair bit of work but I certainly will see about trying it out and see how the game feels like that
ACEX disable zoom when ๐
Certainly fits with our ethos
I'm fine with RMB zoom, but it kinda forces the optics to be based on 0.25.
call {
private _headgearArray = ("((configName _x) find 'milgp_h_cap_backwards_03') > -1" configClasses (configFile >> "CfgWeapons")) apply {configName _x};
private _listLength = count _headgearArray;
for "_index" from 0 to _listLength - 1 do {
"ace_clipboard" callExtension ([" HEARING(", (_headgearArray select _index),");",endl] joinString "");
};
"ace_clipboard" callExtension "--COMPLETE--";
};
Because a certain mod maker couldn't inherit properly.
I think its too strong currently, but at the same time we can still spot further than the AI without it.
And 0.25 already is quite zoomed in, so they had to choose to make their optics only be 2x technically.
and I can kill shit up to ~300 ez... That means with an rifle, in a3. you'd never need a scope
If you now make e.g. Bundeswehr optics with 4x zoom, they feel akward.
That's why I just based everything on 0.5 :~P
Make scopes great again. By removing or reducing rmb zoom
holy fuck
rmb should be like 1.5x max
the backlash
...
I should do it and be crowned "most hated person by the steam workshop"
Do it for ACE3 and put it in common
Too many assets to handle. Especially CUP. Not even thinking about RHS.
If you want to kill CBA, then that's the right idea.
:^)
"FIRST TEH BORKED OUR SERVER, THEN DEY TOOK UR ZUM"
What was the quote, alganthe?
THESE SH1THOLES BROKE MY SERVER , BUNCH OF FILES I DON'T EVEN WANT , NOOBS , I'M TELLING TRUMP !
also:
Where is the ace_server.pbo located?
I can't find it, and the instructions on the website for the framework are wrong. It's not in the optionals folder. I need to set up default settings for the ace mod on my server but I can't cause your tutorial is outdated and the file isn't there (I searched my entire SSD for it even!)
look at the header
Oh.. you searched your entire SSD?
Well ofcause you don't find it if your mods are on your HDD.. Duh.
"the tutorial is outdated" it's so outdated it even says it is and points to the correct one
ARCO is 2x zoom by description, but actually it's 0.125 FOV and default is 0.75 FOV. So actually it's 6x zoom from the default.
I always skip the brightly colored parts of the doc.
but wait commy
there's more!
@censored , After a few hours of testing, googling , finally I found the solution, It looks like ace_server.pbo is not needed anymore and ace server side settings are integarted into cba settings. Why it is not clearly written in readme text IDK. What you need is just "cba_settings.sqf" file in the "ARMA3\userconfig" folder. Just copy your ace settings from serverconfig.hpp file and paste it to newly created "cba_settings.sqf" file. It wokrs for me and I hope it will work for you. Just check your server rpt file, you should have line like this:
[CBA] (settings) INFO: Userconfig: File [userconfig\cba_settings.sqf] loaded successfully.
regards
censored
It's also not just me:
https://community.bistudio.com/wiki/User_Interface_Event_Handlers
When using the event names listed below with the ctrlAddEventHandler, ctrlSetEventHandler, displayAddEventHandler or displaySetEventHandler commands, the prefix "on" in the name must be removed. (e.g. 'ButtonDown' instead of 'onButtonDown')
So many people miss that.
not using config EHs, TOTALLY HARAM
Eh.
Im colorblind so I don't see the text that they makecolored on the ace 3 wiki
it's all invisible for me
i'm html / css blind, I can't see html / css elements
๐
I only see plain markdown
I can't see indendation
class MRCOcq //sources - ["A3_Weapons_F_Acc"]
{;
opticsZoomMin = 0.25;
opticsZoomMax = 1.25;
opticsZoomInit = 0.75;
};
class MRCOscope //sources - ["A3_Weapons_F_Acc"]
{
opticsZoomMin = 0.125;
opticsZoomMax = 0.125;
opticsZoomInit = 0.125;
};
Yes, MRCO is the same. 6x zoom from the default.
make rco 4x
ARCO, MRCO, RCO, ERCO are all the same
make rmb 1.25
how to piss thousands of people at once 101 - starter edition
s๐คท๐ผ
^
It would make the game better imo.
I got used to it within like 2 sessions
true
Unrealistic long ranges for everything is one of Arma's bigger problems
but then you'll still have people fucking scream on top of their lungs
I feel like arma 3 ranges are one of the best in gaming
You should play sniper ghost warrior 3
How to lose sense of distance and depth
the game
If they are the best, why change them?
No
Zooming is bad
Distances scale well
Mountains and hills feel realistic compared to Ghost Recon Wildlands
Which feels like it's comprassed the size of the map, but kept the height of the map
The odd thing about Arma is the terrain feels good but actually its pretty compressed as well compared to real life
@still forum can intrecept remove RMB zoom in a easier way than editing 1000s config entries?
Yes, let's offload all the shitty tasks to Dedmen. I approve.
I actually think that's got the potential to be the easiest fix
Changing all the zoom all at once in a simple script so we can rebalance everything would be great. Probably not possible though
Not with SQF.
A script to generate the needed config would be good enough for now though.
@peak plover it can edit the config entries for you
if (_zoom > 1) then {_zoom = ((_zoom / 1.5) max 1)};```
There did it