#arma3_scripting
1 messages Β· Page 300 of 1
I think my recent UI configs have more lines with defines than actual config lines
I define all positions as combination of previous position defines
So each class has at least 4 defines for x, y, width and height, plus some other control-specific defines
and it's a new line for each dimension?
Advantage of this is that changing previous defines adjusts anything past it, instead of having absolute positions so when you move something you have to manually move each element after it
Feels a bit like HTML tables sometimes with cells adjusting size automatically depending on content of other cells
So in this case If i'll change BUTTON_WIDTH, positions for buttons will update so all 3 buttons are still aligned properly and have same distance between each other.
fml
But yeah, after a while, it ends up like that. I just checked my old Codes for the Animated Inventory
animated inventory?
For 2017mod, i packed everything in the Inventory, ended up like that:
https://www.youtube.com/watch?v=mVhBweQSQw4
oh fun
huh 2017mod still alive? π
nvm, old video
quite nice inventory thing though π
yepyep, sadly never came to use.
at what point did you join the team?
erm.. @patent estuary Do you remember?
I used to be part of the team for a brief period, came in with Razor at the time π
lol π
All he did was copy & Paste DayZ Code, then claiming he did that for A3... alltalk idiot
your name didn't sound familiar beyond discord so yeah I wondered ^^
uhm, okay? π
It ended up, that i scrapped the whole Code and rewrote from new. So much was broken (far far far from usable) or extremely Outdated (or even worse: DayZ Mod Code -.- )
there went the little work I did lol
I can't remember seeing that in the Code, when i was in.
Maybe it was scrapped before :/
it basically was a ray tracing kind of thing that detected the mutants (or whatever they were called) and if they were in view it would set some value
and the screen went white or whatever
can't remember
hm, can't remember seeing something like that in the Code.
sry ^^
that was in 2014 June-ish
long long long time ago
and then I lost interest in Arma for a good 2 years π
hehe
So I have a player list box (RscListBox) acting as a player list, with the following code applied to it upon the dialog's loading: SQF _playersList = _dialog displayCtrl 80016; { _playersList lbAdd str _x; } forEach allPlayers; Thing is, if I run the following code, my name in the list box is replaced with bis_o, ```SQF
private _objList = [];
{
_objList pushBack _x;
} forEach nearestObjects [player, ["Tank", "Car", "Ship", "Helicopter", "Plane", "StaticWeapon", "CAManBase"], 50];
hint format ["%1", _objList];
lol
Sorry π
you're pushing the player object instead of the name
name _x
@plucky beacon https://hastebin.com/veyiliwere.bash
I did it but the problem is still there π¦
@jade abyss okey i am try
- -am +will =}
I'm having a little bit of a problem, Arma is ignoring CfgVehicleClasses completely. Anyone know a fix?
scripting/learnhowtoenglish channel
@jaunty ravine
- #arma3_config
- What means "is ignoring"? (answer in #arma3_config pls)
"problem"
What "problem"? I don't have a glassbowl π
Where do you execute that Code?
π€· I gave it my best shot
Try to find out, if it was even started.
add a
systemchat str ["i was executed", _marker1];
to the while{true} part
Don't ask me all the time oO Just try it.
okey sory
No need to ask me for every step you wanna take =}
One thing in advance: Do you start your game with "Show Script errors"?
it wouldn't output to the rtp it would output to the chat log
@plucky beacon What can be the problem ?
many possibilities
anyone know where I would find the explosion classnames? I tried looking through CfgMagazines but I couldn't differenciate between ammunition and explosions
Altis life has a million scripts already and outside of a controlled enviornment I have no idea
like the particle effect or the noise?
the particle effect, I know there is one that inflicts damage as well. As if it's what is being placed after a mine explosion
Okay, thanks.
I wonder if I can get aircraft to fly in formation using setdirveonpath
shouldn't they already be able to do that? π€
this is arma ai
Yes, but Arma has always had the ability for formations. Planes (I would think) would be no different?
Force formation and mimic any change in vector
And CLOSE formation
like can I get the ai to pull a blue angels with me as the lead craft
I have yet to see that happen. Many wishes to be had I guess.
I want to have an army of drones match my every move and fire missiles synchronously
That, I think. Could be done to an extent. A badass moment to savour
holy crap
I love ace combat btw because they do ridiculous shit like this
Arma AI don't know how to corkscrew, mach loop, or inver their aircraft at all
So if you
myVehicle setDriveOnPath [(position car)]
the myVehicle will constantly drive into car
note taken
jet2 setDriveOnPath [
[(getPos jet1 select 0), (getPos jet1 select 1), (getPos jet1 select 2)+5],
[(getPos jet1 select 0), (getPos jet1 select 1)-5, (getPos jet1 select 2)]
];
jet3 setDriveOnPath [
[(getPos jet1 select 0), (getPos jet1 select 1), (getPos jet1 select 2)-5],
[(getPos jet1 select 0), (getPos jet1 select 1)+5, (getPos jet1 select 2)]
];
totally just theorizing, I'm not a computer thatcan play arma atm
I'm going to try
it uses height? π€·
Sets the path to follow for AI driver driver, pilot what's the diffrence
but is that how you would do it with land vehicles too?
I could also cheat this and literally attatchTo the planes to the main plane
then detatch when they disperse
is there any easy-to-use script out there that makes mine detectors more realistic, while still not making them a pain in the ass to use?
as in, maybe you hace to equip them to use them, or something like that?
I expected there to be mods, but I'd like a script, because I don't want to force people to download mods to play on my server / the missions I make
I don't have a server big enough for people to bother downloading anything to play on it xD
there may be scripts but there certaintly isn't a mine detector model or anything
well if you want people to equip something they would hold it
just want the ugly rectangles to disappear
yeah, I expected that actually equipping it would be difficult without a mod
the problem I have with mine detectors is that there is just no downside to having one with you at all times
unless you have to buy them or something
but I like to play COD style PVP matches with my clan to improve aiming every now and then
and mines would certainly make it a bit more tacticool
but, as I said, mine detectors
Reading that right now, thanks for the link
π
I like this script
but still, nothing stops players from just having it turned on all of the time
they have to have a mine detector item
I'll definitely think about using it for PvE missions though
Fuck arsenal
@plucky beacon https://hastebin.com/kagukoreto.bash
hi again
nice, good job
accelerated?
Later
any good ideas on how to find out if a tank or static cannon is an AA one? talking about things that can't lock. basic stuff like flaks. ideally would love to read and analyse values from the config and find out that way to avoid class name lists
you can make an array of classnames of AA vehicles
then do a if !(classname in list)
read again π
you might check if their ammo cost value for air targets is below a certain threshold
you could probably reference the config
i dont want lists. i want to determine via config analysis
are you using mods?
thx cptnnick sounds good
i have a mission that has a bunch of presets for popular mods. creates random tasks and stuff. i wan a task that is blowing up some AA. mods are optinal but if you select for example RHS in the lobby param, it'll read all the needed classes from the configs for tasks and other things liek the arsenal
I'm not really aware of any special simulation for AA especially if non-locking flak. Keeping in mind M2's and MG3s have served as light AA role on tanks π
more of like a cheap bug spray
in the same vein guns changing from ARTY role to AT role in WWII π
@indigo snow yer i'll have isKindOf "Tank" as a starting point i think. and whatever arty guns are children of. although that might be same as a static MG. will have to see. don't even know if stuff like IFA3 and UNSUNG even have AA cannons. so i'll need a plan B too. i might jsut make the task not AA specific but run the AA ambient code that makes them shoot into the air randomly only if they qualify for it
what about static flak guns don't count as tanks
Are the exit codes for dialogs listed somewhere in wiki or elsewhere?
Ezcoo what do you mean by exit codes?
@peak plover Eg.these https://community.bistudio.com/wiki/closeDialog
i think you might be looking for the idc values?
those are defined by the user
findDisplay 42069 closeDisplay 0;
Like this
No there is no documentation for exit codes. Unpack all arma scripts and configs and search through them all
Alright, thanks @peak plover & @still forum
you can pass a private variable to a function right?
yes
_unit addEventHandler ["hit", {[(_this select 0),(_this select 1),(_this select 2),(_this select 3),_scoreMax] call DNI_fnc_targetDamage;}];
hint format ["%1, %2, %3, %4, %5",(_this select 0),(_this select 1),(_this select 2),(_this select 3),(_this select 4)];
So _scoreMax is determined by...
private _scoreMax = switch (_classname) do {
case "B_UGV_01_F": {1000};
case "B_MBT_01_arty_F": {2000};
case "B_Heli_Light_01_F": {4000};
default {0};
};
classname determined by...
_classname = typeOf(_this select 0);
called from the init of the object
[this] call DNI_fnc_addHandler;
but even if it went to default it would be 0
So I guess reading from bottom to top...
B Alpha 2-5:1, O Alpha 1-1:1 (D.Nitro), 27.1561, <NULL-object>, any is the output anyway
not sure why instigator is null like that but largely irrelavent
I'm not creating an if Pyramid here, I plan on making a whole library of vehicle classnames with it
so even if if is faster I ain't gunna
private variables can go lower in scope but not higher. and if you pass it as argument to call it doesn't matter. The variable private or not will be copied into _this
private _scoreMax = _classname call {
if (_this isEqualTo "B_UGV_01_F")exitWith{1000};
if (_this isEqualTo "B_MBT_01_arty_F")exitWith{2000};
if (_this isEqualTo "B_Heli_Light_01_F")exitWith{3000};
0;
};
haha π
I'm stickin' to my guns on switch case here
unless it is the problem which I doubt it
either use the switch. or two arrays
_classnames = ["B_UGV_01_F","B_MBT_01_arty_F","B_Heli_Light_01_F"];
_values = [1000,2000,3000];
_scoreMax = _values select (_classnames find _classname);
Switch case is more readable and I plan on users being able to edit this for their own purposes
but in any case, why would the private variable that's passed return any
the two arrays method will be the fastest in the long run. But that depends on how often your function is called. If performance is not important use the most readable
What does actually return any? I can't see that from the code snippets you posted
can you post the part between _scoreMax= and the call where _scoreMax is used?
oh wait.. no.. what should be inside _this select 3?
unit: Object - Object the event handler is assigned to
causedBy: Object - Object that caused the damage. Contains the unit itself in case of collisions.
damage: Number - Level of damage caused by the hit
instigator: Object - Person who pulled the trigger
all the variables passed from the handler
1 2 3 and 4
That's really nice dedmen
okey so can you post the part between assigning _scoreMax and using it?
okay
private _scoreMax = switch (_classname) do {
case "B_UGV_01_F": {1000};
case "B_MBT_01_arty_F": {2000};
case "B_Heli_Light_01_F": {4000};
default {0};
};
if (_scoreMax == 0) exitWith
{
_error = parseText format["<t size='1.5' font='Zeppelin33'>Classname</t><br/><br/><t size='0.75' font='LucidaConsoleB' color='#ff0000'>%1</t><br/><br/>is not available in script, edit <br/><br/><t size='0.75' font='LucidaConsoleB'>vehicleCreator.sqf</t><br/><br/>Identical vehicle has been spawned on the enemy side instead.",_classname];
hint _error;
};
_unit addEventHandler ["hit", {[(_this select 0),(_this select 1),(_this select 2),(_this select 3),_scoreMax] call DNI_fnc_targetDamage;}];
goes to...
_unit = _this select 0;
_cause = _this select 1;
_damage = _this select 2;
_person = _this select 3;
_scoreMax = _this select 4;
if (_damage > 1) then
{
_damage = 1;
};
_DNI_Score = (_damage*_scoreMax);
hint format ["%1 is the score for the kill",_DNI_Score];
hint format ["%1, %2, %3, %4, %5",(_this select 0),(_this select 1),(_this select 2),(_this select 3),_scoreMax];
copytoclipboard format ["%1, %2, %3, %4, %5",(_this select 0),(_this select 1),(_this select 2),(_this select 3),(_this select 4)];
why are you not using params? would make things cleaner looking and more readable :x
well.. What value is inside scoreMax before you call.......
π
nothing, the switchcase is the initial value
the insides of addEventHandler can't know your variable
addEventhandler turns your code into a string. When the eventhandler is triggered it compiles your code and executes it.
so your entire code is
[(_this select 0),(_this select 1),(_this select 2),(_this select 3),_scoreMax] call DNI_fnc_targetDamage; _this is passed to the eventhandler you know that. so _scoreMax is undefined
that recompiling is not on the wiki
params isn't?
I said recompiling. nothing about params π
lol it's okay
but ya I see what you're saying
so how do I make it a value in the handler then? do I set it to a string and pass it?
the code inside the eventhandler is executed at a totally different time. Long after your script is done executing and your scoreMax value went out of scope and got deleted
Yes YES!
you could do
_unit addEventHandler ["hit", format["[(_this select 0),(_this select 1),(_this select 2),(_this select 3),%1] call DNI_fnc_targetDamage;",_scoreMax]];
Or add the score thing into DNI_fnc_targetDamage
Well...
I would be against that. As we elaborated the score determination script is not performance optimized. a hit eventhandler runs in unscheduled... You shouldn't move slow code into there if you don't want players to have a terrible fps drop when being hit
that was the idea with adding the event handlers AFTER using the switch case, so it didn't run a switch case every hit
and it would the maxScore for that vehicle every hit without having to check
the format["[(_this select 0),(_this select 1),(_this select 2),(_this select 3),%1] call DNI_fnc_targetDamage;",_scoreMax] call will return
[(_this select 0),(_this select 1),(_this select 2),(_this select 3),1000] call DNI_fnc_targetDamage;
so in the end you will have
_unit addEventHandler ["hit", "[(_this select 0),(_this select 1),(_this select 2),(_this select 3),1000] call DNI_fnc_targetDamage;"] which is exactly what you want
keep in mind this only works with some variable types. You can't pass an object like this
mhmm
if (_damage > 1) then
{
_damage = 1;
};
noo...
_damage = _damage min 1;
In short. Your code is close to horrible and I couldn't live with such crap running in my modpack π But it may work for you ^^
it looks a bit like sqf back from the Arma 2 era.
You're only the 8th person in this channel to tell me I'm fucking awful
does it work? I like it man
gotta start somewhere :p
I wrote same bad code back in Arma 2 π probably even worse readability wise
i was just typing that Adanteh
heck I literally just threw this together this afternoon to test a proof of concept for a score attack using fixed wing.
Not exactly my magnum opus
I didn't even know handlers have their code passed as strings
How awesome would it be to have a script debugger. So these errors are easier to find :x
I also didn't. Till i found it out. ACE guys also didn't know.. And that issue was actually causing a kinda big performance penalty for them... Hopefully that eventhandler stuff will get fixed. Because compiling hundreds of lines of code every frame is not that... efficient
Dedmen - Today at 12:36 AM
In short. Your code is close to horrible and I couldn't live with such crap running in my modpack```
wow
π₯ π₯ π₯ π₯ dedmen spitting hot fire
People don't get better if you just say their code is meh-ish ^^ But true. My wording was a little high ^^
But ppl still learn, so there is a better way of telling them.
A "LITTLE"?
Your nose was as high as the Statue of liberty^^
I mean, remember your first crap π
googles statue of liberty to see if her nose is high
(i just saw mine, a few days ago, i shivered alot^^)
about 298 feet for nose hieght
Nobody likes KlugscheiΓer π
*punching nitro
I'll check my old arma 2 scripting stuff.. Let's see how bad it gets
I mostly just used several nonLocal Vars, cause i had no idea how to send Vars from one script to another by using spawn π
I mostly did small stuff.. so nothing reaaally bad to find.
and most of the bigger stuff is copy pasted from ACE or something and just modified a little
Don't worry Dedmen, criticism is good. I love going back on old things and realising how shit my code was before and how bad it is now
Lol
sleep 10;
if (!isMultiplayer) then {
sleep 1000;
};
waitUntil{!isNil "acrejoin"};
[] spawn {
_ACREChannelID = 935;
_ACREChannelPW = "germanforces";
while {true} do
{
waitUntil{alive player};
waitUntil{!isnil "acrejoin"};
if ((!isNil "acre_sys_io_pipeHandle") and (!isNil "acrejoin")) then
{
[_ACREChannelID, _ACREChannelPW] call acre_api_fnc_joinChannel;
};
sleep 10;
};
};
sleep 5;
What the?
sleep e621
correct answer would be lol...
server.sqf
#define acre_join "lol"
acre_join = "lol";
publicVariable "acre_join";
I apparently didn't know how to... loooooooll. that code is broken
after preprocessing it says
"lol" = "lol";
publicVariable ""lol"";
I apparently didn't know how to set variables back then
october 2013. so 3 and a bit years ago
so I downloaded this debugger
Oh my
Very hard to get working with mission scripts. easier with PBO's with PBOPREFIX. Better ask in the debuggers discord channel and try it out tomorrow. Cuz I wanted to go to bed an hour ago
the help-desk channel already has some writeup on how to get mission scripts to maybe work. I'll be there for you tomorrow. Or later today.. depending on timezone
okay
Debugger?
It's bad when you have 30 mods and every mod has some slow code
everyone
WHAAAAT?
I'd like to request evidence of those numbers
that's not a valid estimate when units that use mods run ops on private servers not daily
True
players who play on vanilla may play more often but that also doesn't mean they don't use mods on private servers
Most players play vanilla
First of all, you'd have to prove that players who play vanilla only play vanilla and never use mods
and you're saying those same peopl 24/7 have never played with a mod before
it's a pretty big grey area
life, KoTH are the most played servers
Everyone I've ever known to play Arma even on Wasteland, KOTH or otherwise play on private servers with mods on some days
I think the most played public modded server is armastalker
But it's russia
And even that its roleplay
Hey, you started this
don't runaway now
Don't correlate not as often with not at all. in fact I'd be interested in the number of unique IPs that download from armaholic and the workshop
#teamswitchdo
First of all, you'd have to prove that players who play vanilla only play vanilla and never use mods```
2 of the D41 KotH Guys played Arma for about 1 Year. KotH ONLY! Nothing else in A3! __**NOTHING**__ We made a small Exile Server -> They never heard of it before or knew that there are Addons^^
The plot thickens
D41 -> Distrikt41 -> My crap
+the 2nd part makes no sense.
+There are alot more, who play Vanilla only.
Fine I concede, you win, your imaginary numbers are butter than my imaginary numbers
Let's do a quick survey, How many of you here played arma 3 vanilla online? How many played modded online?
Sample size does not matter
I say yes as well
wtf you mean sample size doesn't matter
clearly your methods are undoubtely correct and cannot be proved wrong ever
Okay, lets just take one Group in your count:
Lifer.
sample size doesn't matter
apparently Nigel said it doesnt
lifers only vanilla bc they cant figure out how to install mods
Hey, stop survey shaming, Healthy in all sizes
@plush cargo 99% π
Healthy in all sizes is bullshit
Fuck that! Obesity is a fkn health issue!
^
\o/ Hunt the obese ones, until they loose weight \o/
And after that, the Gendermaniacs
#onlytwogenders
hm. that sounds weirdly reasonable
I play life sometimes, and even dev'd for a few servers π
Stop touching yourself.
k
You are disgusting
dad
Did you just assume my parent-type?? #triggered
Dscha's my dad now guys
poor child
LOL
Yay, new slave \o/
he beats me regularly when I don't comment my code
or use newlines on ifstatements
It hurts me more than you.
I'm sure it does dad
@jade abyss Is Terry Crews less healthy than Michael Cera? Currently 100% of my surveys say that they are both 100% healthy
Really use a diff name? damn the shame is real
Michael Cera is this tiny guy
milsim and life are very similar actually
Oh god.. that disgusting guy... oh my
both role playing
The mission making aspect of them are not close
atleast if by milsim you mean people planning for ages and then dying because they suck and talking all seriously addressing eachother by rank adn shit
I mean, the GameMode LIFE isn't bad at all! There is alot of potential in it and CAN make alot of fun!
BUT:
The Attitude and "the amount of retards (stealer/C&Pler) is just wayy too high"
I must not have been in a milsim then because we didn't do that
and neither does the real army
Fair point badbenson
In the military they just yell "CARLOS GET THE FUCK BACK IN THE TRENCH YOU RETARD"
tell your dad to slap you. your reading sucks today
slaps @plucky beacon
π
again
no stop
calls cps
I can do what i want with ma slave
hahah
whistle
TFW everyone cares more about the spam than him beating me
lol
I just hit him twice
3 times dad
maybe if you didnt deserve it......
twice
That's not even the worse he could do to you
dammit
Life success isn't really that suprising as it was already successful in garrys mod, they just swiched platforms
@plucky beacon Have you met your Uncle Trevor? He just came back from Los Santos. He mentioned that he needs a buddy to "code"with.
Yep, Nigel.
do most life game modes still run like shit? main reason i never got into it tbh
get dir;
attachto;
setdir;
constantly
always
although i also lack patience for role play so i usually try to hunt cops asap.
most do run like shit bc everyone just adds any script they can find they think is cool
What do you mean maintain direction?
setdir after attachto i think
if (_t isKindOf 'Reammobox_F') exitWith {
_pos = ((getPosATL player) vectorAdd ((vectorDir player) vectorMultiply 1.5));
_pos set [2,0];
_t setPosATL _pos;
_oldDir = getDir _t;
_t attachTo [player];
_t setDir _oldDir;
_text = format ['Dragging %1',(getText (configFile >> 'CfgVehicles' >> (typeOf _t) >> 'displayName'))];
titleText [_text,'PLAIN DOWN',0.75];
TRUE;
};
if ("Altis Life" in missionName) exitWith {delete.system32};
too bad so sad
error in position *life expected array type: dogshit
while {!("Meaning" in life)} do {player call fnc_eatFood};
why can't you ban people @jade abyss ?
only the orange names I think
Never was able to.
damn son dwarden reluctant to give out dat powah
+i don't rly wan't any Moderator rights π
no ones cliicking that you scrub
Heh
factoring in labour time, i wonder how much each copy/paste is making him
must be like 0.0000000000000001c per ctrl V
Exactly, he is losing money as we speak
he's got some work to do then
Doing something productive he would be getting mad dough
like he says, the games are cheap, so the margins can't be so high
i bet 10x link spam doesn't bring in 10x link revenue either
minimum
He could've just made some money by sayin stuff like Check out arma 3 Apex 70% off DLC BUNDLE 70% off.
well he is a little boy..... lacks the knowledge
I actually bought that DLC bundle the minute I saw it
Check out scripting where arma scripts go up to 70% faster @ #arma3_scripting
*splash" goes the spammer
hahaha @plush cargo I don't tihnk that's how it works
his name?
does Banning someone on discord remove their messages or is that a feature of the bot on this server?
thought at the end of url was his name, so if you use it, and buy something they know whos link it was and they get some $
If someone uses his link to go there and buys something he gets a cut
ya you can choose from 24 hours to 7 days or nothing
0.01 %
yup
so you guys hear about this new thing called g2a? pretty cool stuff
ban now
lol
π¨ π₯ π₯ π₯ π₯
I seem to be having an issue with parseSimpleArray:
this: "[""MSG"", [""Mercenary""]]"
turns into: ["MSG",<null>]
why are you using double "
is it because there is a space after "MSG"
looks like a comma to me
a comma, and after the comma is a space.
rip
think we used to use compile to parse strings to code
parseSimpleArray is roughly 3x faster, than call compile, and is more secure.
can't you change "" to ' ?
only double quotes " supported for Strings: ["hello"] - correct, ['hello'] - incorrect!
man this command looks so fucking hacky lol
that's not the problem though, the space is.
sqf seems so inconsistent and cryptic still, even the new functions
why the fuck call a function "endl" and not endLine or something?
just why
wouldn't /n still be smaller?
it's just so inconsistent it's crazy
they can't even decide on whether to use pos or position in function names
they
just like "oh a dev made a new function? yeah might be useful...STICK IT IN!"
Well, i think the reason why they are doing it is to make it easier for people to read. a new comer might not know what /n is. endl is more selft-explainitory (#spelling) than /n
dammage
you've only got to look at dammage to confirm that BI do not proof read
no logic applied lol
russians have a hard time with that π
i like how they just added a new one and now there is allowDamage and allowDammage
Only explenation
StokesMagee - Today at 2:19 AM
only double quotes " supported for Strings: ["hello"] - correct, ['hello'] - incorrect!``` Ah, crap. Okay :/
yeah π
haha why
why
In arma 3?
This looks really good
Cheating?
Hah does not concern me
I don't really understand it
Cheating feels artificial. Might as well spawn 30 ai in front of me in a line and shoot them
It's the same
I β€ RscTree
so much info in one ctrl π fucking donezo after messing with this all day
Tfw studying for calculus but you got a sweet idea for a script in your head
"why the fuck call a function "endl" and not endLine or something?"
the reason is literally in the description
Endl is c++ terms
yes
Thanks @halcyon crypt.
what did I do? π nvm it's the player name/object thing way above ^^
Say, just a question -- is it possible to somehow "fake" new gear slots through .sqf? I guess in a sense, disabling the default inventory system and writing your own through .sqf in order to allow things such as modular clothing?
@plush cargo glorious glorious trees i tell you.
@dusk dome Afaik that is not possible unless you make all the clothing combinations into different models and switch them around according to what fake items the character is wearing.
ye, that's the plan.
Modification or mod
What do you mean?
I'm making the clothes myself and so on, if that's what you're asking.
Oh, good. I thougut you were asking if that could be done in a mission or scenario
Well -- I know making the clothes isn't, but the .sqf part -- that's possible in scenario's, yeah?
I would think unlikely. Because there is.more. to the inventory than. Just the ui.
yeah, i getcha. i mean, .sql is flexible enough though to actually write a fake inventory system, assuming somebody had the knowledge, yeah?
Yeah, i mean people have done stuff with vehicles before, loading anmoboxes. And that gives you a "fake inventory". But im not sure replacing it entirely is possible?
@jade abyss was doing some inventory replacement.
Nice, yeah, I getcha! Thanks for answers, I really appreciate it!
It was just a question out of curiosity, since I've been working on clothing recently. I've had some modeled out and I was wondering about getting a new gear slot for them via mod, but apparently that's hardcoded.
yeah, i getcha. i mean, .sql is flexible enough though to actually write a fake inventory system, assuming somebody had the knowledge, yeah?
It's not
Too much hard coded stuff.
Got it, thank you!
Thank you everyone for the answer, I really appreciate it. You're all very kind!
aww π
Huh?
if i run hidebody _unit; on the server. Will the clients see the effect as well?
Siri, where do I hide a body
any way to manipulate the speed at which a sound is played? or only pitch?
I thought I remembered something about speed but maybe it was just someone jerry rigging audio files to sound that way
i only know about hte pitch parameter in playsound or playsound3D or both
I asked google how do I hide a body and it started telling me stuff about how somone got cought by asking siri how to hide a body
π now that's a lot of layers lol. google warning you too about what you search with it lol
I am working on a drop-in replacement of inventory, short answer - it is possible, but tricky
@peak plover you should probably look to hideObject
Thanks for mentioning, longbow. Let me know how that goes, definitely interested in gearslots for pants/shirts etc
Me too @vital onyx! Let us know how it goes!
@dusk dome I do not promise paints and shirts, oringinal intention was to make a more clever loadout (say vest has specific pockets you can place only certain items)
@young current it will take some time, I really hope I will be able to complete it before our mod release
but changes in 1.68 made this chance of this thing to happen more real
This safe start script crashes the sever, any idea why? ```SQF
isSafeStart = true;
private _safeStartLoop = 1;
ssDelManProj = player addEventHandler ["Fired", {deleteVehicle (_this select 6);}];
if (vehicle player != player && {player in [gunner vehicle player, driver vehicle player, commander vehicle player]}) then {
ssDelVehProj = [(vehicle player), (vehicle player) addEventHandler ["Fired", {deleteVehicle (_this select 6);}]];
};
player allowDamage false;
while {isSafeStart} do {
uiSleep 60;
hint format ["Weapons are cold, wait for admin to trigger start. (%1 minute(s) since briefing stage started)", _safeStartLoop];
systemChat format ["[SafeStart] Weapons are cold, wait for admin to trigger start. (%1 minute(s) since briefing stage started)", _safeStartLoop];
_safeStartLoop = _safeStartLoop + 1;
};
It's called as such: ```CPP
QUOTE([] remoteExecCall [ARR_2(QQFUNC(safeStartOn), 0)]);
crashes the server? That script should only run clientside
how do you know it crashes your server?
why are you even executing that on the server. player makes no sense on server. and hint and systemChat also don't
should remoteExec on clients instead of on clients and server
-2
Sometimes if the script requires something to be in sync with the clients I do it there too though.
in unscheduled of course
Thanks guys.
But if it crashes the Server report that to BI. That's a bug then
Hey folks, I need some script that will monitor armor/global hitpoints of a vehicle in real time. I'm testing out a damage model and I need to know what is happening with the vehicle
ive got a question to scripting in altis life, i want to add a device to the heli trader (just the device not on the truck) and want to give it a code so it has inventory, and functions, is it possible for a helicopter to lift it with its ropes or is that impossible ?
Couldnt you just remoteExec it?
@regal sluice if you want the device object to have inventory that would be in it's config.cpp which can't be edited without an addon. The most you can do is addactions to it or attatch it to something. It doesn't even have simulation physics
Oh woops. Chat upated. Sorry
@thorn saffron Have you tried the handleDamage event handler?
@plucky beacon Get hit?
negative
Isnt it basically the same thing except you can pass args?
Yes yes
handle damage can get damage of all the parts too
Cool
and from where, what direction, and what projectile hit it
handle damage outputs the most data involving taking hits as far as I know
I'm not good at scripting and I need some monintoring script
Yeah i guess handleDamage would be your best bet @thorn saffron
I'll help ya get started here
this addEventHandler ["HandleDamage", "hint format ['%1 was hit by a %2',_this select 0, _this select 4]"];
I discovered that the fire particle if placed on the vehicle it actually damages the armor causing eventual destruction. You can put on the fire using destruction effects. As of now I can get AH-64 to burn out in about 24 seconds. This is pretty significant as it can allow for simulating ammo burnouts and such without the need for scripting
burn out
I mean if I put 2 SmallFireFPlace cloudlets it destroys the helicopter on its ow in 24 seconds
yes, righ now it is just telling me that it takes damage. The interesting part is the fact it get's destroyed by "fuel explosion"
So when fuel health reaches 0
I want investigate it further
CUP's AH-64 does not have Fuel on its main config, but it inherits it
hmmm I wonder, if i increase the fuel armor, will it take longer for the helo to explode. I need to test that
fuel ammo is an awkward term
and I'm pretty sure it's based of the hitpoints of fuel itself, not the amount of fuel
fuel hitpoint's armor, man recently I could faceroll my keyboard and write better
I bet you, that the created fire effects are.causing damage. Ive had similar things like that happen before with created explosions
Hey @plucky beacon does the damage point selection work on that handle damage event handler yet? I took a look at it and at the moment it seems that it returns a empty string?
that is exactly what I was looking for: a way to delay the final death explosion in order to give crew a chance to survive without making the helicopter impossible to destroy
I don't know I haven't tried
sadly it seems the control over the damage is rather limited. At coreIntensity 1 CUP AH-64 burns out from full HP in 24 seconds, but a t 0.9 it does not get destroyed
in any case, you could set the handledamage to have
eventhandle "handledamage" >> if(_this select _whatever the one for damaged part is_ ) == "fuel hitpoints or something") then sethit "fuel" 0
my ultra psuedocode should get the concept across
you can set a flat timer
Or just dont allow damage until they bail? Or it just ends up crashing anyhow? Dunno
or you can set it to have half the damage it took
the decreased explodiness has the side effect of making the aircaft harder to destroy using satchel charges and such, with is where the class DestructionEffects with the fire comes in
I looked at the handle damage event handler and there is a possibility of both of them.being hanled in the same frame.
I just dont want to mess around with scripting, just bare config tweaks
pretty effective so far
Well i think what it comes down to is the damage model
I like to see what you have so far, its looking well for its purpose
its just this:
class HitEngine: HitEngine
{
armor=0.25;
material=51;
name="motor";
visual="motor";
passThrough=1;
class DestructionEffects {
ammoExplosionEffect = "";
class Engine_Smoke {
simulation = "particles";
type = "SmallFireFPlace";
position = "exhaust1";
intensity = 0.5;
interval = 1;
lifeTime = 60;
};
};
};
Which is hopefully we see getting a revamp with this next dlc. SmallFire will.still cause the damage.
that is what I discovered, at first I put it there just for effect, only just now I noticed it actually damages the aircraft, with is something I was looking for
Okay, cool. So whats needed now? Im lost.
A way to monitor the damage
Im pretty sure you can add event handlers to config entries
I mean do whatevery you want but that helicopter totally should blowed up just saying
@plucky beacon not the usage of it.i guess. Who knows the usefulness of it
just watched the video
@subtle ore the fire?
@thorn saffron the concept over all. Could be used as you had.shown for more effective landing in crash.scenarops
for some bizarre reason I found out the best way to avoid exploding on crash is to point the nose down
with my mod on
Wait what? The nose? What the heck?
yup
Lol, lovely.
notice the fails where I didnt smack the ground with the nose
at least crash is no longer a death sentence
Yeah it was either the underbelly or the gear in which you crashed,
Yeah i like that asoect, i can now crash with a little more confidence
not really, if you land on the gear you will still most likely explode. Smacking nose first seems to be most effective. Or maybe it was the gun π€
Ah i see, i didnt get enough time to watch it.thoroughly
in the end the crashing bit is a bit random
not exploding instantly when you get shot at is nice however. I'm just looking for a way to use the fire damage to enhance the damage model further
Take a look at what @plucky beacon did and the linkage provided. I dont know if config entries use magic variables or not, so not sure as to how to add it to the class specifically. You can hop down to config editing and imsur e they will have something on that
ye if you "don't want to mess about with scripting" then ask in #arma3_config
I came to the scripting part as i as asking for a way to monitor the damage in the game for testing
Handle damage, get hit. Best bet
output to a log or system chat
same thing, no difference.
the 3d variants of commands need a sepcified path. Not defined in cfgMusic or cfgSounds
Hey there, can someone give me a little help with a script? here you can take a look at my problem: https://forums.bistudio.com/forums/topic/203098-hide-markers-to-other-sides/#comment-3168253
setMarkerTypeLocal are you running this on just the esrver or all clients
all clients I think, becouse the script is activated by the plane
just exitWith it if the player isnt on the side with AWACs
ok thanks I will try with it
no luck whatsoever in controlling the damage, if I change the passthrough, armor or the coreIntensity even slightly damage no longer applies
I guess the only way to do that is via event handlers fired when particular hitpoint is destroyed, but I dont want to do that really. I wanted a lightweight solution that you just slap into config
playsound3d is a piece of shit
just chiming in unrelated
help, please someone
_object = _this select 0;
_player = _this select 1;
_player action ["SwitchWeapon", _player, _player, 100];
_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
if (typeOf _object == "Land_Laptop_f" ||typeOf _object == "Land_Laptop_unfolded_f") exitWith {
_filename = selectRandom ["typing1","typing2","typing3","typing4","typing5"];
_soundToPlay = _soundPath + "sounds\"+_filename+".ogg";
playSound3D [_soundToPlay, _object, false, position _object, 6,(random [0.9,1,1.1]),18];
};
_filename = selectRandom ["pageturning1","pageturning2","pageturning3","pageturning4"];
_soundToPlay = _soundPath + "sounds\"+_filename+".ogg";
playSound3D [_soundToPlay, _object, false, position _object, 6,(random [0.9,1,1.1]),18];
systemChat format ["%1",_soundToPlay];
systemchat output the right sound path
and then it literally does nothing
is a function called from here
_object = _this select 0;
if (typeOf _object == "Land_Laptop_f" ||typeOf _object == "Land_Laptop_unfolded_f") then {
[
_object,
"Search Computer",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",
"_this distance _target < 2",
"_caller distance _target < 2",
{/*started*/},
{_this call bomb_fnc_searchingSound;},
{_this call bomb_fnc_searchDone;},
{/*interrupted*/},
[],
16,
12,
false,
false
] call BIS_fnc_holdActionAdd;
};
_object = _this select 0;
_player = _this select 1;
hint format ["%1, is searching %2",_player, _object];
_player action ["SwitchWeapon", _player, _player, 100];
_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
if (typeOf _object == "Land_Laptop_f" ||typeOf _object == "Land_Laptop_unfolded_f") exitWith {
_filename = selectRandom ["typing1","typing2","typing3","typing4","typing5"];
_soundToPlay = _soundPath + "sounds\"+_filename+".ogg";
playSound3D [_soundToPlay, _object, false, getPos _object, 16,(random [0.9,1,1.1]),18];
};
_filename = selectRandom ["pageturning1","pageturning2","pageturning3","pageturning4"];
_soundToPlay = _soundPath + "sounds\"+_filename+".ogg";
playSound3D [_soundToPlay, _object, false, getPos _object, 8,(random [0.9,1,1.1]),18];
_object = _this select 0;
if (typeOf _object == "Land_Laptop_f" ||typeOf _object == "Land_Laptop_unfolded_f") then {
[
_object,
"Search Computer",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",
"_this distance _target < 2",
"_caller distance _target < 2",
{/*started*/},
{_this call bomb_fnc_searchingSound;},
{_this call bomb_fnc_searchDone;},
{/*interrupted*/},
[],
16,
12,
false,
false
] call BIS_fnc_holdActionAdd;
};
this one works
Solution: Use the one that works.
Problem solved. Next one.
check if the Soundpath has a leading \
before or after C:
Yes.
okay
@subtle ore well im speaking about attaching like a music to a vehicle or something
\Path\file.bla = searching in AddonFile
Path\file.bla = searching in MissionFile
playsound or playmusic is not the same
Anyways, is there any performance advantages with CfgFucntions rather than using preProcessFileLineNumbers?
CfgFuntions is just sqf code aswell. Its not internal engine function etc
I know, like a framework for functions, correct?
Its basicly the same
and I'm basically insane
trying the same thing over and over
that's the right file path
so
what
its an external filepath
playsound3d needs it
ah whoop youre previewing it?
Ya, just outputting the path to systemchat, works in VR area but not Altis
in fact I'm going to make a goddamn log output from the beggining of teh init to the mission file output and then I'll be able to prove if this really is bullshit
|INIT|--!--auto long range radios off"
|INIT|--!--saving disabled"
|INIT|--!--boxBlufor now wass assigned as ammo1"
|INIT|--!--array of intel objects [intel_laptop_1,intel_laptop_2,intel_table_1,intel_table_2,intel_shelf_1,intel_shelf_2]"
|makeIntel|--!--intel_laptop_1 is the object having an action applied to it"
|INIT|--!--making intel object intel_laptop_1"
|makeIntel|--!--intel_laptop_2 is the object having an action applied to it"
|INIT|--!--making intel object intel_laptop_2"
|makeIntel|--!--intel_table_1 is the object having an action applied to it"
|INIT|--!--making intel object intel_table_1"
|makeIntel|--!--intel_table_2 is the object having an action applied to it"
|INIT|--!--making intel object intel_table_2"
|makeIntel|--!--intel_shelf_1 is the object having an action applied to it"
|INIT|--!--making intel object intel_shelf_1"
|makeIntel|--!--intel_shelf_2 is the object having an action applied to it"
|INIT|--!--making intel object intel_shelf_2"
a few moments later using the hold action to search the item
repeating this output on each tick
|searchingSound|--!--intel_laptop_2 is the object, z1 is the player searching"
|searchingSound|--!--C:\Users\[redacted]\Documents\Arma 3 - Other Profiles\D%2eNitro\missions\DN_AltisBomb.Altis\ the sound path trimmed"
|searchingSound|--!--typing5 is the filename"
|searchingSound|--!--C:\Users\[redacted]\Documents\Arma 3 - Other Profiles\D%2eNitro\missions\DN_AltisBomb.Altis\sounds\typing5.ogg the path to the file"
|searchingSound|--!--intel_laptop_2 the object being played on (overruled by position parameter)"
|searchingSound|--!--false the item is NOT inside"
|searchingSound|--!--[4033.74,11702.1,-1.90735e-005] is the position of the object having the sound played to"
|searchingSound|--!--1.03394 is a randomly selected number that will determine the variation in pitch for the sound effect"
|searchingSound|--!--sound should have played but probably didn't because it's a piece of shit command"
why....
is it being played.... -1.90735e-005 undeground
now wait a minute that's negative exponent
so that's like ground level
ya that's just really miniscule below ground level
oh
OH
OH MY GOD
noob.
soundPosition: PositionASL (optional) - position for sound emitter, will override "sound source" position. Default: [0,0,0]
return from getpos
Array - format PositionAGLS
no wonder it worked in VR area because the ground level is like 1 meter above sea level
Thanks Dad
You always know what to say to keep me motivated
only took me 2 hours, record time
How would I get this to work? The boxes wont remove from the array { deleteVehicle _x } forEach _objects - ["Box_East_WpsSpecial_F","Box_IND_WpsSpecial_F"];
Anyone know why I am getting this error when I fetch something from SQL, even though all of the arrays close correctly? ```SQF
Error in expression <["",1],["",2]]","[["",1],["",2]]",0,"[["1709486977",1],["1709485439",2]]",[[[],1>
Error position: <1709486977",1],["1709485439",2]]",[[[],1>
Error Missing ]
Error in expression <ult = call compile _queryResult;
[[[],1],[[],2]]
That is the array that is supposedly having the error
Not escaping quotations correctly
https://community.bistudio.com/wiki/setPlayable I wish this worked, could be useful
I guess because the sqm dictates the lobby
@tough abyss I can't really see where though....
Whats the extension?
extDB3
@tough abyss
Try:
{ deleteVehicle _x } forEach ( _objects - ["Box_East_WpsSpecial_F","Box_IND_WpsSpecial_F"] );```
(untested)
Cool will try. Helpful as always Dscha!
@cerulean whale nm i was wrong π
Your issue is stuff like this in the db "[["",1],["",2]]". Your are storing an array in string but you aren't escaping the quotations correctly i.e ""
@tough abyss I figured it out a couple mintues ago, thanks a ton for the help though. π
Now I am getting something similar again, but it is just odd....
@tough abyss Now I am getting this: ```SQF
Error in expression <,[]],["Blufor",[]],2]],"radio_sound"]]]>
Error position: <>
Error Missing ]
EIther use diag_log and output to RPT (will get cut off after so many characters). Or use the debug extension (in optional directory)
Look at the logs, grab what the extension is returning
Copy/Paste it into an editor with SQF highlighting and see what is wrong
missing ]. That's what happens when you work with multiple level nested arrays instead of something easier to work with.
I've put in the debug .dll and will take a look sigh
This is coming out really weird xD
extDB seems to be placing a ton of [ around the outside of what I am importing
consider maybe using parseSimpleArray or what it's called instead of call compile
Use call compile first + then switch to parseSimpleArray when you got it sorted
won't make your arrays more correct tho
[1,[row1,row2,row3]] is a rough example of returned string from extDB3 1 =OK then its an array of row results
The rows are then an array of the columns etc
Try look at exile/life code etc if you confused etc
can you guys explain why you don't use profilenamespace setvar for this? too much data?
Using an external Database can be easier for admins / backups or setting up external web interfaces
would ammount of data be a problem though? jsut curious
@polar folio I'm moving from my current working system to one that allows you to have multiple 'characters' if you will, that all have different gear. It's just a pain wrapping it all
every player could manipulate his profileNamespace data. or loose it after an arma update when the profile get's corrupted
i just really like the idea of being able to do it all in arma since they fixed it on servers.
i mean saving on the server dedmen
With a DB connector in Arma. You really are only reading it from at server startup + player connects. After that it is normally just update Querys etc
Its really not that much data
May have just found ,my error, let me see if I can sort it out
Well... If i could decide between a self replicating database cluster and.... one file on my non-raid HDD.... If I had dozens of players.. Decision is clear. Plus you can access a database externally
yeah @still forum , I try to use profileNameSpace where I can but it is limiting
yea makes sense
Plus if you have multiple servers that should use the same data. You really can't do that with profileNamespace
thx guys. that gave me a clear picture, depends on the case then.
Does anyoen know if there is a public scrip for taking people as hostage, it would be nice if it was like theone Projectlife is using/made.
Is there a name for a process in programming when you make a slight variation of working code and keep making bugs in an attempt to fix that one bug you couldn't figure out and eventually get so far away from what you know works that it's a garbled mess that isn't readable anymore.
It's Arma'd
initserver.sqf
startTime = serverTime;
publicVariable "startTime";
init.sqf
sleep 5;
if(isMultiplayer) then {
null = execVM "timer.sqf";
} else {
null = execVM "timerSP.sqf";
};
timer.sqf
Timer_Length = 120;
_elapsed_time = 0;
diag_log format ["|Timer|--!-- %1 is the time limit",Timer_Length];
if (isDedicated) then {
while {Timer_Length > _elapsed_time} do
{
_elapsed_time = serverTime - startTime;
};
if(bombDefused)exitWith{};
"EveryoneLost" call BIS_fnc_endMissionServer;
};
timer doesn't start until I define startTime locally on a machine. Isn't public variable supposed to transmit it?
or maybe it has to do with the load order
Also does servertime take in briefing time?
why is PublicVariable not transmitting the variable to all machines
it's clearly running publicvariable on the logs but it's not being recieved by any machines
Does a variable need to be undefined ot be recieved by public variable?
if there is it's probably from 1.68 because I used this all the time before
I'll try
could be timing too.. startTime won't exist on the client(s) till it has time to broadcast
pretty sure you should have a sleep in that while loop
err nvm.. just realised starttime isn't being used on the clients
there is a sleep in the init
i mean in the while loop while it's waiting for the timer
only need to check once a second or something, not as fast as it can
I sure do if I wanna display decimal places flying by
that part only runs on the server though
when you say 'timer doesn't start', do you mean the one on your screen?
(which isn't in that code) ?
Then check, if initServer.sqf is beeing executed at all first.
If not -> find out why π
I didn't know it couldn't be executed
Just test it out.
okay
Everythings possible π
see the note at the bottom here too https://community.bistudio.com/wiki/Initialization_Order#cite_ref-enginewaits_1-0
initServer might be called after init.sqf
Single Player
init.sqf is executed All β Event Scripts Scheduled
Executed at last
i mean the [1]
ah ok, yeah
dafuq
initServer, initPlayerLocal and initPlayerServer -> Order is not guaranteed
again: Have you checked, if initServer is beeing executed?
[] spawn {
while {true} do
{
"respawn_west" setMarkerPos (getpos respawn_marker);
"respawn_west" setMarkerDir (getDir respawn_marker);
sleep 0.1;
};
};
this code is running so I'm pretty sure
+why do you use publicVariable instead of SetVariable?
setvariable hass issues
Yep yep, i am waiting.
public (Optional): Boolean - Only available for Object types and (since Arma 3 v1.48) for missionNamespace. If public is true then the value is broadcast to all computers.
Object setVariable Array ?
Yeah, and?
only for objects?
No?
JIP is important for this though
boy
missionNameSpace setVariable ["StartTime", servertime, true];
with "TRUE" in the end?
ye
btw.: Use your Tag on Vars, or i slap you until you bleed your Tag in the floor!
*slap*
If you use it (and its beeing executed properly -> It should work. I am using it the whole time. So no excuse, you must have broken something π
this weird shit happened
(still have no clue, why you need "serverTime")
synchronized
NOTE: serverTime is available to both server and clients and shows the same value when synced. The only time it is not synced is on the server, right after server restart and only for the first 300 seconds. Client side serverTime is synced from the start. serverTime is also different from server time and server diag_tickTime
That could explain that number
iirc, i always used diag_TickTime for timing stuff
but it's not synced
Why do you need it anyway?
to be all dramatic and countdown shit
Aaaaye look who was right
had to wait 5 mintues for the server
thanks dad
*slap*
don't forget to remove the evidence of your domestic abuse
Not this time.
LOL
π
savage
:D
how to get a reference to an object namespace variable?
I need it to use pushBack
_object getVariable "my_variable"
_object?
Foley, I don't think you understand how SQF works.
it passes a value
meaning if i do something to it, it won't affect the original varaible in object namespace
for example pushBack won't work
Yes it will.
coz i'll be pushing into local var
arrays are pointers anyway, so that almost surely works
even more so if commy says so
private _array = [];
private _object = player;
_object setVariable ["my_array", _array];
systemChat str (_object getVariable "my_array"); //[]
(_object getVariable "my_array") pushBack 1;
systemChat str (_object getVariable "my_array"); //[1]
Then you probably copied the array using +, - or maybe select or apply.
Or arrayIntersects
The default value of getVariable?
How do I escape double quotes and square brackets?
double quotes are already escaped and there is no way or reason to escape [ and ].
It doesn't work. The entities are not interpreted in the output
just post the code
Wait a sec, does code.formatting.not.work with mobile?
It does. When there is code formatting
switch (typeName _this) do {
case "STRING" : {
_this = _this + "|" + (uiNamespace getVariable ["__temp", ""]);
uiNamespace setVariable ["__temp", nil];
"make_file" callExtension _this;
};
case "TEXT" : {
uiNamespace setVariable [
"__temp",
(uiNamespace getVariable ["__temp", ""]) + str _this + "\n"
];
};
};
};
{
_classes = "getText(_x >> 'DLC') == 'RHS_AFRF'" configClasses (configFile >> _x);
{
formatText["["%1", "%2", 0]",getText(_x >> "displayName"),configName _x] call _make
} count _classes;
_classes = (_x + ".txt") call _make;
systemChat format[(if(_classes == "OK") then [{'CLASS EXPORT: Successfully exported %1 to "ArmA 3/%1.txt"'},{"CLASS EXPORT: FAILED to export %1 %2"}]),_x,toLower _classes]
} count ["CfgWeapons","CfgVehicles"];```
You mean like this?
you can put sqf after the first 3 ``` to have SQF syntax highlighting
like
```sqf
<code>
```
how do you break lines?
enter
Γ fter ``` enter will line break automatically. If no ``` you have to use Shift+Enter
_make = {
switch (typeName _this) do {
case "STRING" : {
_this = _this + "|" + (uiNamespace getVariable ["__temp", ""]);
uiNamespace setVariable ["__temp", nil];
"make_file" callExtension _this;
};
case "TEXT" : {
uiNamespace setVariable [
"__temp",
(uiNamespace getVariable ["__temp", ""]) + str _this + "\n"
];
};
};
};
{
_classes = "getText(_x >> 'DLC') == 'RHS_AFRF'" configClasses (configFile >> _x);
{
formatText["["%1", "%2", 0]",getText(_x >> "displayName"),configName _x] call _make
} count _classes;
_classes = (_x + ".txt") call _make;
systemChat format[(if(_classes == "OK") then [{'CLASS EXPORT: Successfully exported %1 to "ArmA 3/%1.txt"'},{"CLASS EXPORT: FAILED to export %1 %2"}]),_x,toLower _classes]
} count ["CfgWeapons","CfgVehicles"];
language must be on the same line as ```
much better
why are you using formatText anyway? why not use normal format ad then use parseText or whatever it's called to turn it into text
@subtle ore it doesn't indeed
Hmm
uh what?
Code formatting
Was talking to @tropic gulch
The coloring doesn't work on discord mobile app ( android at least )
Interesting, yes i have an android device.
@still forum The code was not written by me. I just did some modifications to it in order to extract RHS classnames
Well... instead of using formatText just use format and parseText
OK
Is it possible to somehow disable footsteps? Like, of specific units? I assume there is no specific scripting command for it but mayby there is some sort of workaround to still achieve the same result? Mayby?
I'm trying to preplan a project, making a sequence diagram figuring out where I don't exactly have the solution for how I'm doing to solve parts of it