#arma3_scripting
1 messages · Page 436 of 1
and everyBackpack should return the backpack container
that you can then read from using the cargo script commands. Like if you read from a box
ill check it out now
that works great, does the same thing for for uniforms and vests ?
everyContainer found it
I am starting to wonder whether the BIKI has actually saved me time, or cost me.
In the very beginning it helps. But then comes the point where you realize that pretty much everything is wrong somehow.
i only found out you can use find for strings xD was reading Biki the other day xD
or outdated
"asshole" find "ass"
0
xD
@commy2 I agree, at some point you are looking for more information and just realise that there's alot of stuff missing.
It's great for beginners, though
But I didn't say missing. Plain wrong.
where I have it its more like
toLower("asshole") find toLower("ass") ```just to be safe
@little eagle let's edit it then? what is the current problem with the wiki
Pick a page and I tell you. Also hyperbole.
next pls setFlagSide
I know it works, and will return (about) 40
see KK's August 28, 2013 comment
it can be seen as "widely accepted", too
but let's rephrase it, it's an old page after all
Sure, but the description is still wrong. And he's basically rambling about floats being floats.
Nothing to do with setDir.
i did ^
setFlagSide
@wary vine to get uniform/vest use uniformContainer/vestContainer/backpackContainer
Not sure as I never used setFlagSide, but the description talks about " where unit is local ", but the command takes a flag as argument not a unit. Is it supposed to say "object"?
{
private _container = _x select 1;
private _cargo = [backpackCargo _container,weaponCargo _container,itemCargo _container,magazineCargo _container];
systemChat format ["%1",_cargo];
}forEach (everycontainer _x);
``` seems to work
Added: New "pixelPrecision" parameter (0(default AUTO), 1(ON), 2(OFF))
Added: New ctrlSetPixelPrecision script command
These were added on the 12th of January. Does anyone know what they do?
would Sets object heading. Angles are measured in degrees clockwise from north, and regular range goes from 0 to 360 (0° = N, 90° = E, 180° = S, 270° = W). Negative angles represent a counter-clockwise angle. suit you then @little eagle
@lone glade knows I think
setDir can be -360 to 360 tho right ?
@winter rose Range automatically get's clamped to 0 to 360
It can be any number.
which is also kinda wrong still. Because 361 doesn't become 360
1874981 would be valid
-∞ to +∞
right quick comp csgo game then will be back
The range is from 0 to 360. Anything outside that range is passed through (abs range) modulo 360 😄
oh @still forum got it sorted last night
not clamped, let's just example 2 speak for itself
we don't -have- to specify it can accept more, but a note can be welcome.
Technically the command has no range, as it reports no numbers. It has a domain from -inf to inf, or however maxed out floats should be represented. getDir has a range from 0 to 360.
But specifying what exactly it does wouldn't hurt.
const SteamID = require('steamid')
let sid = new SteamID(`${json3[i].id}`);
sid.instance = SteamID.Instance.DESKTOP // 1
``` converts another instance of steam64 id into the one i needed
(abs range) & 360 is what it does. That's even SQF script
wilth node anyway
also, this command if from OFP era. chances are that its wiki page hasn't really been well updated ever since
It was always wrong.
I kinda like the old wiki style... https://community.bistudio.com/wiki?title=setDir&oldid=2766
it had its charm
a bit less readable if more details are present though
but the whole wiki isn't wrong, mostly old commands that are not revised
and if it's wrong, change it – that's what I do
Go ahead, that's a good thing to do.
hmm
has the biki got an api or something I can hook into on my bot ?
so i can search for commands from my discord xD
yes it has one. mediawiki API
OOOOOOH
But not all commands are on the wiki
So who should we contact if a command is missing?
will allow classname to displayName conversions ..
just working out the best way to store it.
Me or @winter rose
Or just write in #community_wiki
@tough abyss
ctrlSetPixelPrecision is missing
It has a ingame description, though I am not sure I understand that.
Isn't that dev-branch only?
That's true, but if it's not added now it will never be...
Nah... Not true ^^
There are few wiki editors. And there are even fewer people on dev branch.
So the chance that you have a wiki editor on dev-branch which also writes UI scripts so he knows what that does... Kinda low
True, the only reason I haven't added it is that I am not 100% sure what it does.
and the ingame description is as useful as always
Any of you guys used VCOM AI and can give me the best way to see if its actually working? lol i.e AI behaviour differences
When it works, you'll notice it immediatly.
setDir edited 😄
Well done;)
I mean it looked a bit different, one guy ran away...
i dont know the ai enough sadly to tell
best way to see if its actually working?
press escape, if there is VCOM menu, it's working
Good. It could also be mentioned in the description how it uses the remainder of division by 360 if larger absolute values are used.
example 2 does the job I think
I agree commy. Lots of parts of the wiki are bullshit.
According to the wiki the new findIf command on dev-branch is a Arma 1 and Arma 2 and TKoH command.
findIf is to me, what # is to #arma3_scripting.
you hate findIf too?
I am actually wondering why the process of adding commands to the wiki isn't automated.
@tough abyss https://xkcd.com/1205/
So?
The time spent to automate the process might take longer than doing it manually.
Especially now since Arma 3 and SQF is nearing the end.
You are generally correct, but I don't believe that in this case.
So it could've saved months is what you're saying?
It's not about saving time alone, it's about providing complete information by having an automated process.
commy2, it depends on what exactly is automated. If it is just the fact that a command has been added, how long does it take to create an empty command entry?
Few minutes?
So what's the reason so many commands were missing there locality information when added to the wiki? It's surely not time.
Cause somebody has to test them?
Not even the devs knew how sqf would work in the end I assume.
@errant jasper So you want to tell me, a dev at BIS writes a command and doesn't know whether it broadcasted over the network?
Ever tried addWeapon in MP lol?
To be honest wouldn't surprise me. But unless they have some annotation about locality that you could automatically extract from source code it is hard to automate.
Automation would give us a complete list at least. There still a ton of ui commands missing on the wiki.
I agree.
I wonder who's idea findIf was.
🤔
Guess BI is doing some heavy sqf scripting again to bring some new platform update, so they need to squeeze out all the performance they can get to make it run acceptalbe
SQF is getting ported towards Enfusion, right? or will it simply be legacy support
The command saves one if per iteration. That's nothing compared to what fixing some internals could achieve.
Noone knows...
Time wise, 2mins for 2000 commands is 4000 minutes, around ~30 hours. So it would have been wise to automate it some years back. Now I am not sure - again time wise only.
But anyway, I agree with you guys that having a complete list of commands is a major benefit.
@tough abyss So what's the reason so many commands were missing there locality information when added to the wiki? It's surely not time. Because there is no automated way of getting that information
As I said, in my opinion it's not about time saving, but providing complete information. Also, who says we are talking about commands only
sqf was pretty much dead since 1.78, so it's surprising to see findIf. It's so obscure.
Automation would give us a complete list at least. Which we already have
Guess BI is doing some heavy sqf scripting again to bring some new platform update, so they need to squeeze out all the performance they can get to make it run acceptalbe The performance game is already over.
SQF is getting ported towards Enfusion, right? or will it simply be legacy support @winter rose DayZ said they will completly remove all SQF.
But right now it looks like legacy support.
I meant "Arma4" future engine, a mix of Enfusion and IDK what else
@tough abyss Also, who says we are talking about commands only Well.. What else?
damn i was just getting the hang of sqf, now you tell me its dead. so what should i learn now to hit the ground running on arma4?
@winter rose Yes. ANd I said the same.
oh ok then
@lusty canyon Enscript. Or C#. Or just wait a couple more months atleast
@Dedmen A complete config viewer with a proper way to search for example
I have a system
Where I can make as many teams as I want
How do I display a custom amount of sides as scores the best?
Would it too bad to show all of them? Might clutter screen
The current config viewer is bunk. A better and especially faster one could be scripted easily.
#Intercept config viewer :3 🤤
True that. It looks and feels like it was written in 18th century
Well, it was actually..almost
https://i.imgur.com/1zgg9Ja.jpg
What other ways are showing side score on screen_
That look ok, and are informative
@still forum that actually Sounds like a good idea
@peak plover Guess you would need to write your own GUI for that.
#Intercept config viewer What's that?
Yeah @tough abyss . My question is more about GUI design
What part of screen should I use?
A theoretical construct @tough abyss
Especially with Intercept's custom UI controls. You could make something really proper.
I think if I just print the player team and top 2 teams on screen, it would be good enough
Custom ui now is a thing?
Does anyone of you high IQ individuals know how to make a bombing script that actually drops the bombs in the proper moment for it to hit a proper target
With different height / appraoches and so on.
Though... Outside Config viewer should be better @still forum
My dive bombing works "fine" ( https://www.youtube.com/watch?v=IUiryLv3n5o ) because it'll basically jsut fall straight down, but I'm having a hard time figuring out at which distance to drop bomb when i'm flying at other heights. It's an edit of the CAS module
The calculations should be in there
It's the pre jets dlc ccip
You can also just make the plane fly over and spawn the bomb in
It's not a thing yet.
Outside config viewer with the ability to directly load your -mod string and all your mods would be cool AF.
But without a online web thingy variant not many people will use it.
Make a web variant with many popular mods available. And include a diff viewer. And also include dev-branch updates and also archive older versions.
Boom.
a web variation probably would be dead-ass slow
simply due to the nature of how it has to work
I'd personally prefer an ingame viewer, but with SQF that's gonna be slow.
nice of you guys to volunteer to write a new, better and faster one.
sqf one could be fast enough.
Really? The one we have now slows down drastically with CUP and some other mods
But then again I don't know how it's written
Because it's written poorly.
Sounds like job for the CBA team 😉
It uses the scheduler. That's all one needs to know. Imagine one with proper caching and manual scheduling.
They should have rewritten it when they released Eden
"propert caching"
ehh ... wut? you want to load the whole config into SQF to defeat ... well ... the purpose of configs?
that is why i want you to explain what you mean by that
because as i see that, there is no "proper" here
Itching
speaking of cfgs can someone write me a script to extract all the cfgcomposition classnames into an array
configProperties [configFile >> "CfgComposition", "isClass _x", true] apply {configName _x};
Both of what you just said. Are not what he asked to do.
someone mentioned me?
sweet thanks @still forum
it's a pixel precise grid compared to screen size percentages
isnt safeZone still the way to go for uis ?
No ^ :disgusted:
safezone for anchoring + pixelGrid for pixel precision
Isn't that what you used for Arsenal?
Question was what the new script commands are
ooooooh
I think pixelGridPrecision?
xD i use safezone for everything xD
it is
so you also don't know?
That command does not exist
no
those commands / new config entries don't seem to be documented
"What is not documented does not exist"
as proclaimed by BIS wisdom
So it does not exist and that is the Truth
amen
I thought you tried it out and maybe found out what it is
I tested it and never found what it did
oh, and findif is nowhere to be found in changelogs yet
I guess that was added with #
It was in one of the dev changelogs
no it wasn't
Really? Nevermind then
first one is documented the second one isn't
well 3 if you count findif
but it's not in the changelogs huehuehue
> findIf
BIG FAT COMMY LIES RIGHT THERE
Does # support boolean value now?
what does?
well fuck
nope
array1 # parseNumber true/false
everyContainer seems to be returning grounds for vests/uniforms inside a container
but using it with parseNumber defeates the purpose doesn't it?
don't use # then, there's 0 reasons to use it
btw where is # page?
Purpose is elevated command priority.
Kill all parenthesis.
@little eagle because adding parenthesis is too hard apparently
@winter rose Don't make that page 🗡
😋
@little eagle Alright, thanks for the info. I though it was meant to be a shorter version than select
had to make a new command that has the same speed as select 🗞
but I wannaaa
Don't believe everything you read on the internet, Revo.
is pretty much an alias of array select index that doesn't work with macros and has higher priority
was trying to out put something like
crateName
Items.
containerName
items .
containerName
items
containerName
items
if you kinda get what i mean
that doesn't work with macros
implying
it's not implying
even breaks macros
it breaks macros 😄
Already known and reported in BIF feedback thread
@wary vine you can sort them by type of container and use vest / uniform / backpackContainer
you don't need to use everyContainer
So it is an alias for select, or just to select integer index? Can you do (I'm on stable) this: myArray # {[_x] call IsFluxCapacitor}
is the best
So does VCOM just blanket every AI, including them spawned with triggers, or do I need to add something to them to make them spawn using vcom AI?
@obsidian chasm every AI automatically.
huh I am so unsure whether it worked, theres no option in my menus but i did it how i was told
private _containers = _object getVariable ["containers",[]];
{
private _item = _x;
private _itemType = ([_x] call BIS_fnc_itemType) select 1;
private _itemDisplayName = ([_item] call Life_fnc_fetchcfgdetails) select 1;
if ((toLower _type) in ["vest","uniform","backpack"]) then {
//Check the cargo of this item...
};
}forEach _containers;
``` this is what i mean ..
i also read this on their steam page "I thought there used to be a settings menu for VCOM, I saw that it was removed from in-game because of other mod support but now where can I adjust settings? "
@lone glade "findif on the other hand is super duper useful and not in the changelogs" BIS is testing your vigilance.
Probably in th e CBA setting menu
"Addon Options" iirc
y u no use modul anymor ?
nvm i do
gib moduml back
on main menu at least
Eden >> Settings >> Addon Options
WHAT??? Oh... SURE HE CAN
Stop trumping other peoples expectations commy
Of course they haven't found evidence 😉
"we have self investigated and have found no evidence of wrongdoing"
I have self investigated ace arsenal and found no less than 0 bugs in it, best ace module to date guys, everyone says it, I got the bliggliest module
_object = cursorObject;
private _containers = _object getVariable ["containers",[]];
private _someIndex = 0;
{
private _container = _x;
private _cargo = (backpackCargo _container) + (weaponCargo _container) + (itemCargo _container) + (magazineCargo _container);
{
private _item = _x;
private _itemType = ([_item] call BIS_fnc_itemType) select 1;
private _itemDisplayName = ([_item] call Life_fnc_fetchcfgdetails) select 1;
if ((toLower _itemType) in ["vest","uniform","backpack"]) then {
private _InsideContainers = everyContainer _container;
systemChat format ["%1 -- %2",_itemDisplayName,_InsideContainers];
private _currentIndexedContainer = _InsideContainers select _someIndex;
_someIndex = _someIndex + 1;
};
}forEach _cargo;
}forEach _containers;```
as long as everycontainer returned in the same order as the array
_type is undefined.
that and everyContainer doesn't
Wouldn't "found no less than 0 bugs in it" imply that you found at least 0, but potentially infinite?
NO BUGS, THE BEST PEOPLE SAY IT
I approve of your goal to "MAKE ARSENAL GREAT AGAIN"
NO CHAOS, ONLY GREAT ENERGY!
Pretty sure the meaning of "no less than" (atleast) is different from "not less than" (more or equal).
^ this traitor works for jhina and is trying to sabotage our GREAT PROJECT
large hand movements
and when you start the mission? Have you got some options then? I believe when a mod is not using CBA ehs it's not properly initialising the settings in Eden
none at all
addons in there only show up if they use CBA settings. I think CBA itself doesn't. So it doesn't show up. And apparently vcom also doesn't use it
configure addons is greyed out, however I did have TFAR which showed perfectly in addons
so i dunno, not a big deal if VCOM is blanketing my AI
im just too dumb to notice a difference with ai lol
CBA JR is configurable? 😮
keybinding, but not the settings.
Nevermind, I was looking at the controls....
Vcom doesn't seem to use an ingame menu for its settings.
Who said it does?
implying
hheheheheheheheheh
oh wait, i'm french so it has to be the stereotypical
honhonhonhonhonhon
:white_flag:
🥖
i've heard that enough times that I can safely not get triggered by it
🏳
_object = cursorObject;
private _containers = _object getVariable ["containers",[]];
private _someIndex = 0;
{
private _container = _x;
private _cargo = (backpackCargo _container) + (weaponCargo _container) + (itemCargo _container) + (magazineCargo _container);
{
private _item = _x;
private _itemType = ([_item] call BIS_fnc_itemType) select 1;
private _itemDisplayName = ([_item] call Life_fnc_fetchcfgdetails) select 1;
if ((toLower _itemType) in ["vest","uniform","backpack"]) then {
private _InsideContainers = everyContainer _container;
{
if ((_x select 0) == _item) then {
systemChat format ["%1 -- %2",_item,(_x select 0)];
};
}forEach _InsideContainers;
};
}forEach _cargo;
}forEach _containers;
``` so I kinda have this working, but if there are 2 of the same item, its duplicates it
post what?
the facepalm emoji that was posted right above my "what" message
huehuehue
Z͌̈́a͊̈́l͊̿g̏̉͆o̾̚̚S̝̬ͅc̬r̯̼͇i̼͖̜p̲̘̘t̠͖̟ :U
15:28:40 "B_Carryall_oli -- B_Carryall_oli"
15:28:40 "U_OrestesBody -- U_OrestesBody"
15:28:40 "V_BandollierB_cbr -- V_BandollierB_cbr"
15:28:40 "V_BandollierB_cbr -- V_BandollierB_cbr"
15:28:40 "V_BandollierB_cbr -- V_BandollierB_cbr"
15:28:40 "V_BandollierB_cbr -- V_BandollierB_cbr"
``` the output when I diag_log
Only one explanation: brain bugs.
dw im a dumbass
xD
if ((_x select 0) == _item) exitWith {
diag_log format ["%1 -- %2",_item,(_x select 0)];
};
``` switched out that part
15:37:10 "Carryall Backpack (Olive)"
15:37:10 "[]"
15:37:10 "Carryall Backpack (Olive)"
15:37:10 "[""FirstAidKit"",""FirstAidKit"",""150Rnd_762x54_Box_Tracer"",""30Rnd_9x21_Mag"",""30Rnd_9x21_Mag"",""30Rnd_9x21_Mag"",""30Rnd_9x21_Mag"",""30Rnd_9x21_Mag"",""30Rnd_9x21_Mag"",""30Rnd_9x21_Mag"",""30Rnd_9x21_Mag"",""30Rnd_9x21_Mag"",""150Rnd_762x54_Box_Tracer"",""HandGrenade"",""HandGrenade"",""30Rnd_9x21_Mag""]"
15:37:10 "PDW2000 9 mm"
15:37:10 "Jacket and Shorts"
15:37:10 "[]"
15:37:10 "Slash Bandolier (Coyote)"
15:37:10 "[]"
15:37:10 "Slash Bandolier (Coyote)"
15:37:10 "[""HandGrenade"",""HandGrenade"",""HandGrenade"",""HandGrenade"",""HandGrenade"",""HandGrenade"",""HandGrenade"",""HandGrenade""]"
15:37:10 "Guerilla Uniform"
15:37:10 "[""HandGrenade"",""HandGrenade"",""HandGrenade"",""HandGrenade""]"
``` bit hacky, but seems to work
So I have a module that fires a function :
while { true } do {
systemChat "fired";
{ [_x, true] call TFR_fnc_divingGoggles; } forEach playableUnits;
sleep 5;
};```
It doesn't loop on the server though... am I missing something basic?
It only fires once
There a script that let's me set an altitude that automatically deploys parachutes and removes most of the steering?
@vapid drift what is TFR_fnc_divingGoggles? pastebin plz
It's just a simple script that swaps out the goggles but it functions as intended
Look at this by itself:
while { true } do {
systemChat "fired";
sleep 5;
};```
so the loop has effect, but only once?
Check the rpt file.
@little eagle Sorry, where?
%LOCALAPPDATA%\Arma 3
https://community.bistudio.com/wiki/systemChat effect: local
Ah ok
try that to be sure:
[format ["Hello there - General Kenobi: %1", time]] remoteExecCall ["hint"];
roger
is the player obj scope accessible from addaction / EHs, or do i have to pass args?
"player obj scope" 🤔
just player inside an addaction
@winter rose So I modified the code and ran it as you suggested:
while { true } do {
[format ["Hello there - General Kenobi: %1", time]] remoteExecCall ["hint"];
{ [_x, false] call TFR_fnc_divingGoggles; } forEach playableUnits;
sleep 5;
};```
I only get one hint "Hello There - General Kenobi: 0"
@vapid drift A loop might quit if you have a script error inside it.
Also it's called TFAR if you mean the mod
If you remove the call to that TFR function. Does it work then?
^ this
Paste TFR_fnc_divingGoggles
so TFR_fnc_divingGoggles doesn't exist or brings up an error
maybe put a waitUntil { not isNil "TFR_fnc_divingGoggles"; }; somewhere before the loop
The function calls, doesn't generate errors, and runs the way I would expect it to
wait
🤦
:>
Duh...
I think he figured it out.
"It's not the error. It works fine"
Ugh confirmed, I wasn't thinking about the fact that I was calling a loop lol
when I spawned it, it all works fine
Thanks for helping me out though guys, really appreciate it
I don't think this script works with respawned units.
Like when respawnTime is 0 for example, it runs into a race condition and locks out the respawned unit forever. Same with the scheduler letting the script rest too long.
The whole thing should only be one loop without the unnecessary object namespace stuff.
@dim terrace Which official Arma 3 map has ponds?!
surfaceIsWater is working with ponds as far as I remember```
None
Was just pointing the lack of fresh water ponds out.
I use
_overWater = ((getPosASLVisual player) select 2 <0);```
To check if player is in water
How can i get a Boolean from a config file? there is getText,getnummber,getarray but is there any way to get a Boolean??
There are no booleans in config.
@fleet wind Just use 0,1 for true/false with the getNumber
Ive got this in a config illegal = true; wo sill getNumber 1 work ? @drowsy axle
I wouldn't use True/False with getText because it makes reading it easier.
Or do i have to change it all in the config?
Depends on the header file and whether or not you used mikero's tools to binarize it.
Needs to be a string to use gettext anyway....
@fleet wind true is a string
By default i gets converted to a string "true", but it could turn to 1.
ahhh Thanks!
Is there anyway to make the AI helicopter count the gunners as 'transport' since when people are on the guns the AI seems to ignore the transport unload timer and just land and takes off straight away
you can try count players in heli, instead of "gunners as 'transport'"...
i think its just the dumb helicopter ai being dumb again
it wont obey my transport unload
ffs
arma really feels like it wants to fight you all the way
"transport unload timer" 🤔
unload timer - probably waypoint delay...
i mean the current timer is 300 - 300 - 300 and even then it just lands, takes off immediatly
whereas before it'd stay on the ground for the duration
well apparently changing the waypoint to careless, despite it never being on careless before and working..fixed it. Thanks arma lol
question, wll this script open arsenal when they spawn or give them their last loaded loadout
{
player addMPEventHandler ["MPRespawn", {
["Preload"] call BIS_fnc_arsenal;
["Open",true] spawn BIS_fnc_arsenal;
titleText ["<t color='#CC0000'>Arsenal Script by J. </t><br/><t color='#CC0000'>33rd Peacekeeper Company</t><br/><t color='#58D68D'>-Press ESC to exit Arsenal-</t>", "PLAIN DOWN", -1, true, true];
playSound "Hint";
}];
} remoteExec ["bis_fnc_call",0,true];
looks like it will open the arsenal
The "Preload" is useless btw
alright
This will open the arsenal for every player every time any player respawns.
Where is this script?
i was planning on using it on my arma 3 zeus server
i wanted to make sure it worked or not before han
Put this into initPlayerLocal.sqf:
params ["_unit"];
_unit addEventHandler ["Respawn", {
["Open",true] spawn BIS_fnc_arsenal;
titleText ["<t color='#CC0000'>Arsenal Script by J. </t><br/><t color='#CC0000'>33rd Peacekeeper Company</t><br/><t color='#58D68D'>-Press ESC to exit Arsenal-</t>", "PLAIN DOWN", -1, true, true];
playSound "Hint";
}];
What else would you want?
nah was just making sure lol
The answer is "yes".
alright
hmm i seem to be having an issue with rscTextMulti
structured text is working with hintSilent
_info ctrlSetStructuredText parseText format["<t size='1px'>%1</t>",_structuredText];
hintSilent parseText _structuredText;
and the control is found
class Life_RscText {
x = 0;
y = 0;
h = 0.037;
w = 0.3;
type = 0;
style = 0;
shadow = 1;
colorShadow[] = {0, 0, 0, 0.5};
font = "RobotoCondensed";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
text = "";
colorText[] = {1, 1, 1, 1.0};
colorBackground[] = {0, 0, 0, 0};
linespacing = 1;
tooltipColorText[] = {1,1,1,1};
tooltipColorBox[] = {1,1,1,1};
tooltipColorShade[] = {0,0,0,0.65};
};
class Life_RscTextMulti: Life_RscText
{
linespacing = 1;
style = 0 + 16 + 0x200;
};
class Lega_Market_ListingInfo_Description: Life_RscTextMulti
{
idc = 9512;
x = 0.699032 * safezoneW + safezoneX;
y = 0.2734 * safezoneH + safezoneY;
w = 0.124775 * safezoneW;
h = 0.4224 * safezoneH;
};
the 2 related base and the control.
Any reason why people always recreate these configs instead of just using the config export function to create a header file so they can use the same base classes available in addon config?
i dont know, just always used life_rsc classes
why ?
there's too many reasons to name
Weird prices.
xD
i got a few people to spam things on the market the other day xD
to try and find bugs, and fill the market with real listings.
instead of my just duplicationg rows xD
the general functionality is there atm , just working on a few more things, including the ui
I can already spot a bug 😄
@wary vine Looks sweet 😉
but does it look good in 1360x768 from 8 feet away? HUEHUEHUEHUE
Still mad?
What happened oO
ACE Arsenal meme
barely
all will be fine once stats are released
@lone glade what bug ?
yeah its not finished yet 😉
im doing things 1 by 1 xD
then finalizing the dialog, then finishing touches like that
making UI elements is easy, making them work together is hell
yup
The only fun part.
I still hate dedmen for making me rewrite the stats API
but then again it's much better now and it only took me a day
AM STILL ANGRY
ACE arsenaal is shit. Doesn't even have dynamic search.
make a PR ™
Why do I have to save everything?
you broke ace and cba by removing modules
How To Ruin Everything
😛
Anyone here working with MCC and ASR AI OR ALiVE and ASR AI.
all 3. Why?
Well.
I am trying to pick a combination for AI Macro and AI Micro.
I don't really want the bloat of MCC
And Like the idea of ALiVE but I also don't need massive persistant missions with dynamic spawns.
I just want the AI I place on the map, to work with each other.
Better than normal, if that makes sense.
I don't use MCC for AI.
Did you look at vcom AI yet? Heard that does good stuff.
Also that's #arma3_scenario 😉
It's not bad
But it makes the AI do some weird Macro things
AI does very well in open areas, and does some awkward stuff in closed areas.
I though about trying VCOM with ASR-AI if it fixes that.
As VCOM is mostly a squad level AI suite.
But what's important is I setup a ton of my AI via scripts, and want to make sure my AI choice plays nice with that.
For example, scripted waypoints, etc.
One such example is a QRF being spawned and sent toward a position.
Every time I use VCOM I pretty much only use 1-3 features. It tends to focus to much on 100% control of the AI instead of just nudging them in the right direction. Don't really use ASR-AI anymore because a lot of features such as suppression, concealment, ect is used by vanilla.
How can I check what type of weapon is selected now(atmissile, aamissile etc)?
currentWeapon (vehicle player)?
@next lily but it will return the name of the weapon, could I have a weapon type?
It'll return the name of the weapon. Are you looking for the sort of 'config' path or parent classes?
Well, in the config for jets, there is a class MFD in which there is a condition, for example will draw reticle if aamissile is selected, or bomb or gun etc. I would need that in sqf , to disable pip screen when the at missile isnt selected
You can try toying around with either currentWeapon or you could even substitute that for currentMagazine. Those both return a string, which is the name of the relevant data.
Be that the weapon you have selected or the magazine.
Ok will do, thank you
Quick question... So the Arduino IDE has this first line preview feature when selecting curly braces and multi-line nested code:
https://i.imgur.com/hPtJVbR.png
Does notepad++ have a similar feature? No idea what it would be called, so can't really use google here
one could implement that into arma studio
though ... what purpose? nobody using it anyways
I use notepad++ for general coding stuff outside of arma and I really like that feature in the arduino IDE
But it's sort-of arma related, because I still use notepad++ for some arma scripting
I prefer using sublime.
I use visual studio code
How I can approve my dll in Battleye?
The "Preload" is useless btw
without preloading, configs will be parsed when you open arsenal first time... (vanilla arsenal)
And that is why I more or less stopped developing arma.studio 🤷♂️
Maybe some PR agency will helps 😀
Can I add string?
Add string to string? yes.
oK thanks
Also
Does it make sense to make ui elements in 3rd person or not?
Should it say 'your score' or 'my score'
UI elements in third person?
ui would be local so how about just score?
Should it say 'your score' or 'my score'
As an example
There would be like
More than 1 scores
^
What if you forget what side you were on
it's possible, but forget your name is harder
structured text ?
I am using that
Space bars are not equal elenght
1st / 2nd are not equal length*
I guess I gotta make 3 elements
i did something similar https://gyazo.com/b4b368aca321424a582b199bf32dfe24
that is 1 structured text, with all elements aligned to left.. there 2 pictures and 4 texts blocks
I believe structured text can be aligned left or aligned right.
But I know that if you don't, it's all centered for each new line.
At least, for single line bits.
ignore background size, that thing is animated and wip...
also just valign maybe, nigel
I kinda wanted it to start from left
and align the : and -
I guess
I'll just make 2 structured text controls
or 3
had to play it... was no screenshots lol... https://gyazo.com/9ca4d7723c5cada41080330fbf1d4147
as i said 1 structured text... everything aligned to the left
Hmm
I guess that makes sense
Just color coding it and dat it
Thanks
Your hud looks really cool btw
thanks
https://i.imgur.com/xuDIcJG.jpg I guess I'll leave like dis until I figure something as cool out
Good point thanks
It's a dynamic system where sides are not based on side
So there are unlimited sides, but I'll make player side blue and all else red
"sides are not based on side" ?
roger
I wanted to make 1 mission with this, so I am creating a template in case I ever wanna do something round based again
I gotta think of a way of keeping kills as score too
prob array of friendly units as setVar public
And checked on killed 🤔
y u no monokai 😮
also for the fucking love of everything that is holy, USE COMMENT BLOCKS
throws a block with a nasty comment at @lone glade
waaaaaaaaaaah no bulli
not material? GIT OUT
discord with monokai will be... nice
you're nice
thanks ?
Is there a way to create custom EventHandler? Becouse now in my script I use while loop with waitUntil
publicVariableEventHandler?
but hey maybe your script doesn't need that, it sounds like you may be headed towards a wrong direction
I need to activate script whenever weapon is changed(with F key) in jet
UI Eventhandler maybe?
checking weapon in a PFH would be more reliable
No there is no way to create custom engine eventhandlers
But you can just make a PFH that checks periodically and then call your function. Or use the CBA Event framework
PVEH as @winter rose said is completly unrelated to this. Atleast I don't see any connection
@neon snow There is a weapon changed eventhandler afaik
Ah no.. That was CBA ^^
@winter rose How could you use the currentWeapon for that?
@austere granite is it more performence friendly?
currentWeaponTurret 🤔
What about inputAction?
@neon snow No it's not more performance friendly
It could be a little better if you use it properly. But only if you run 10x or more of these waitUntil loops simultaneously
@tough abyss could I combine UI eventHandler with inputAction somehow? Or do I have to check it in a loop aswell?
I don't see how inputAction would be in any way related to this....
Besides actually changing the weapon yourself. But you said you only want to detect if the weapon changes
you'd put innputAction "weaponchangethingie" > 0 on keydown probably
Ahhhh
inputAction switchGunnerWeapon also
Potentially unreliable waitUntil inputAction.
Or known reliable waitUntil currentWeapon
Just keep using what you are currently using. If you only run one loop then it's fine.
Well currenty I use something like this:
while {(alive _FA18)} do
{
_mag=currentMagazine _FA18;
...
waitUntil {!(currentMagazine _FA18 isEqualTo _mag)};
};```
So I guess it is pretty similiar
Thank you all
Well I got around it, by using actionKeys "nextWeapon"; which will return the code for the key for changing weapon and then use it in displayAddEventHandler
Which might randomly break for joystick/gamepad keys or mouse buttons or keys with modifiers.
Yeah, and it will not work if the weapon is selected with keys like 1,2,3,4... -selecting particular weapon. So yeah, I will leave it as it is.
just checked inputActions for switch weapon and there are none reliable/usable,
also some of them works only with default keys lol
tried nextWeapon,switchWeapon,switchGunnerWeapon
{_x moveInAny Cut_car_1} forEach (allUnits) select {side group _x isEqualTo resistance} select [4,3];
the (allUnits) select {side group _x isEqualTo resistance} select [4,3] return the correct aray of units [Un_Soldier_12,Un_Soldier_3,Un_Soldier_1]
but for some reason the frist one comes with a generic error and put opfour units inside that vehicle
it works if i just paste the aray that it returns, why is that?
Parenthesis are wrong.
forEach is executed before select, which will not make sense.
anyone know how to make those nice BIS addactions where you have to HOLD space for a few secs and you have progress circle UI ?
removing the parenthesis makes no diference
You have to add the right parenthesis. Not just remove the wrong ones
True, but I never said you have to remove them. You have to use them to execute the code on the right side of forEach before the forEach itself.
uh, any exemple?
( )
Thanks.
It's more rewarding this way and it is literally that easy.
I dont know, i dont really fell that the reward is that good.
10 - 5 - 4
This is 1, right?
But you want it to be 9. Now add parenthesis to fix it.
...loading
Nevermind, i will just do it in some other lazy way.
¯_(ツ)_/¯
will setvehicleammo 1 fully reload a pylonized plane that has custom weap/mags (through addweapturret/addmagturret)
- pylons changed with grumpy loadout pylon script (GOM)
The script I believe is not relevant
setVehicleAmmo should refill magazines for dynamic loadout vehicles
setVehicleAmmoDef would give you problems with jets
Only one way to find out.
can i do setvehicleammo 0.1 per tick (holdaddaction) to gradually refill the ammo?
That would probably remove ammo the first time.
right, guess ill just do set 1 on hold completion
afaik in hold action you will have always 24 steps
so you can try something like _step = 0,042; and _vehicle setVehicleAmmo (_baseValue + _step) < for every progression step... 🤔
if that is for repair/rearm thingy, you can set it to 0...
Still would be weird. Consider a plane with machine cannon and missiles. Fires all rounds, but no missiles. Then uses setVehicleAmmo 0.5 and half the missiles are gone.
true
setVehicleAmmo + setFuel + setVehicleArmor enough to return veh to pristine condition?
hi there, is there a scriptcommand to add/remove the new camo-nets etc to a tank model?
Is this something from the dev branch?
It's all done via the Vehicle customisation system
Yes there is. And yes dev-branch
The answer is probably animate then. That is at least how my tanks show or hide their camo nettings.
That should work if I am not mistaken https://community.bistudio.com/wiki/hideSelection
ahhh awesome!!
That's for simple objects. Unlikely. Bet it's animate.
thank you I will dig in
Alright, just one way to find out
The animation names should be in the config viewer.
CfgVehicles / <tank_name> / Animations / hide_<something>
I would've guessed animate too
animate works thanks everybody, the customization page is really helpful too
{
if (typename _x == "STRING") then {
_tank animate [_x, 1];
};
} foreach _animList;```
When some guy asks you in here to help review his code.. Don't waste your time on it.
https://github.com/DUWS-R-Team/DUWS-R/pull/167#event-1520816460
20 comments. And 2 days later just "ah.. Just ignore that. Let's merge"
NEVER end a script with a variable assignment. That will trigger the only real SQF language bug in existence.
What's that about? Never heard of it
That from your link btw
Try yourself.
A assignment returns nothing
That's the bug.
Literally everything in SQF returns something.
That's the only thing that doesn't
and when you try to assign the functions result to a variable.. You die.
Ha, that would explain an issue I had a few weeks ago
Imagine if BI did write the 1 or 2 lines of code to fix that
you could then do stuff like _var1 = _var2 = _var3 = 5;
Fixing that would be too easy wouldn't it
yup
Alright, thanks for the explaination
Assignment operator is bugged. If you end a function with an assignment, and call that function, and assign the return value of the function to a variable, the game says "generic error" for no reason.
Goal of "good practice" is to avoid scenarios of confusion and "unexplainable" weirdness. That's why you should never end a function with a variable assignment.
Or not use private...
Seems like intended behavior if you ask me. If people want to make a function return something, they’re supposed to end it with the variable.
Or the value
No, it's a bug. The assignment is intended to report GameValueNil.
Is it supposed to work?
at that point it became a feature commy
[{
systemChat "boop";
}, [], 1] call CBA_fnc_waitAndExecute;
^ this prints something after one second.
_null = [{
systemChat "boop";
}, [], 1] call CBA_fnc_waitAndExecute;
^ this does too, but also says "generic error".
Explain to me how that makes sense.
You mean a thing that applies to 99.9% of everything in SQF. But doesn't apply to one thing and that one thing isn't officially documented anywhere... Is intended?
And a thing that works in most other programming languages.
And then even if it's intended it just prints a useless "generic error" that doesn't tell you at all what's wrong
Why would anyone do that, though?
What?
Why would anyone what?
Who in their right mind would have a function return the result of systemChat
That's not what happens.
Or a variable assignment?
What if you want to return nothing in case of an error?
Does returning nil work?
Also, as I said, a command like systemChat reports GameValueNil and can be assigned without error. The assignment itself reports nothing (not nil or sqf nothing, literal nothing in C++) and therefore breaks.
I don’t see how someone doing something like getting the result of a variable assignment would be useful.
doesn't stop people from doing it.....
At that point, the function is being used in a way that was not intended
And no one would want that.
But people do that by accident
and fuck up other peoples scripts who use your function
which is exactly why you should never end with an assignment
Maybe you don’t try to assign a variable to the result of a function that doesn’t return anything?
Dude
Let's say you have a function that returns a number in 99.9% of cases. So ofcause everyone stores the return value.
Let's say there is a 0,01% chance that something goes wrong. Author displays a error message and ends in an assignment
: Maybe you don’t try to assign a variable to the result of a function that doesn’t return anything?
But that is legal for 2000 commands, except the assignment operator. Because of a engine level bug...
as he doesn't want to return anything he doesn't care.
But that breaks everyones script who calls you function
Even if returning nil would be totally fine
No one would do that while wanting to do it.
It's broken anyway. So why would anyone do it?
private _broken = {
private _something = 1;
};
private _working = {
private _something = 1;
nil
};
_null = call _broken; // error
_null = call _working; // no error
Makes no sense.
Everything else returns nil in case of error.
That thing doesn't return nil on error. And even doesn't return nil when it operates normally
Hm. I think I would rather those throw errors instead of returning nil.
You would prefer to show people "generic error"
instead of showing an actual error message?
How good that I don't use any of your code.
Hm,yeah, I guess they would throw an error eventually
It kills the script with a generic error.
That's it
if you return nil then people know that function failed and can catch the error
But you cannot catch this error at all
Well besides param I think
You mean when you want to call functions and don't know what others return?
Like if you have a eventhandler framework. And tell people to either return number or nil.
And they return nothing. And your framework crashes. And all other eventhandlers aren't called anymore
Yeah. Brilliant. Thanks.
You now have generic error in: {call _x} forEach _funcs
Very nice. You immediately know what's wrong and where right?
Would that bug caused by an If statement or something?
Well, I gave you the solution in that one intercept PR. param does not work sadly, because sqf complains about nothing also when trying to create an array, not only when assigning.
if statement?
What?
In that one intercept PR? 😄 Which?
But I know you have the solution in CBA. And I know where to search for it
The bug is caused by an assignment.
But I know you have the solution in CBA.
Do we?
If you’re assigning a variable to the result of a function, That function should be built with that in mind
Exactly.
Tell that to noobs like you who say "I would rather return nothing than nil"
Chaos. Pure chaos.
So basically, the issue here is someone fucked up their function, and the bug is that the game doesn’t say exactly what the problem is?
No
That function should be built with that in mind
Agreed. No function should end with an assignment.
The issue is that the assignment operator is bugged
But who would end their function with it if they’re going to assign a variable to the result?
Hm
But who would end their function with it if they’re going to assign a variable to the result?
Sometimes you call other peoples functions, sometimes they call yours.
Good practice is to avoid the empty stack bug by never ending your function with an assignment.
What? No! I never use CBA or ACE. I wrote my own stuff that does the same just more dumb.
Because these are dumb frameworks that are soo overhyped
Jesus.
I don't think the apply workaround I posted on the intercept github is used anywhere in CBA. If you use the keybinding framework or use directCall, and your function ends with an assignment, it errors out.
I think the same is true if you use a postInit function in the base game and end it with an assignment.
Worse is this though: https://github.com/CBATeam/CBA_A3/blob/master/addons/common/fnc_waitAndExecute.sqf#L32 urg
There are idiots who think you need to end everything in an assignment. Aka put 0 = stuff or _dummy = ... everywhere
🗞
just because you have to do it in Editor init scripts because that's also bugged and BI is refusing to fix that
That's what the editor teaches you.
Oh, I know how to start a #arma3_scripting war
Because reasons.
; for returns or not hueheuhuehueue
not.
So yeah.. Why would you save a return value of a function? Because The Eden editor forces you to do it.
Leaving out the final ; to indicate a return value.,. Does this have any basis in other languages?
Does have it's charm the way it is in SQF.
you get attached to it
I WANT GETDAMMAGE IN ENSCRIPT
sqf support pls, just to have that command survive
inb4 they kill sqf, but the eventhandler will still be named Dammaged
I legit would laugh my ass off
If we'll even have eventhandlers like we have in A3
If the damage code is in Enscript and you can hook/edit it. we make our own eventhandlers
if we don't have another language on top of enscript
I know you can't wait to mod in js
What for? Enscript is supposed to be the scripting language, no? Why build something else on top.
Because enscript is shit. Currently 😄
And we need to hide all the crap by building an additional layer on top
looks at sqf
🤦🏻
are you guys watching the stream ? 😀
ye
DayZ will be moddable because they release the server files...
We can already mod it and use Enscript. But we don't because they don't provide any documentation on how to do so
If they release server files again without documentation that won't help much
Doc is for wussies.
I wonder how the general public will react when they actually see how enscript works and how crap it is 😄
Probably disappointed. I never had any expectations. Hope someone remembers that I was right all along. Again.
(I haven't looked at it once)
The syntax looks awesome. And if it would actually work how it looks... it would be awesome.
But it doesn't.
If you know any other OOP programing language. You will keep swearing and throwing things at enfusion
If you don't know any other languages and grow up with Enfusions quirks. You'll love it.. I guess.. maybe
oh gee, I can't wait 😄
If you remove the quirks it's actually the same as SQF with OOP on engine types. Like object.setDamage
You'll love it.. I guess.. maybe
It looks verbose compared to SQF.
If you remove all the broken stuff. Like.. All of OOP except the engine OOP stuff that you can't remove...
... then?
It's basically just a file with a bunch of functions in it
What I hate the most about sqf is probably the scopes. Is that still the same?
S_fnc_setDamage = {
params ["_object"];
_object setDamage 1;
};
Enscript:
void S_fnc_setDamage(Object _object) {
_object.setDamage(1);
};
Well.. Scopes.. Variables don't automatically carry over to functions you call
and you can't overwrite variables from functions that call you
is that what you mean?
Variables don't automatically carry over to functions you call
Sounds promising.
You probably won't notice that though
Jesus.
There is a stack. But it is not used for passing or storing variables.
imagine what "lifers" will be able to shit out
It is used for storing variables in recursive calls.
Because all variables are global and unique you cannot do recursive calls because they would overwrite themselves.
That sounds like a problem.
And even if that sounds acceptible.. Look at the backend.
func(var1,var2);
func(var1,var2);
turns into
push var1
push var2
call func(var1,var2)
pop var2
pop var1
push var1
push var2
call func(var1,var2)
pop var2
pop var1
the pop/push in the middle are total bullshit. But there is no optimizer
Also. All functions have to return. So by default every function has a return instruction. If you add your own return at the end. You now have two return instructions and the second one will never be hit.
....
But as I said.. Most people won't notice these things.
But I know they are there. And it bugs me.
Well, it IS a scripting language.
Btw this info is from Enscript between 2013-2018(dayz 0.62)
I hope they will fix all this. We'll see
Lacking recursion is bad, that hasn't been reasonable for decades.
Well they ducttaped recursion into it
Having the compiler be woefully optimised is one of the reasons I think integrating another language would have been beneficial.
But every variable being global completly stops any possibility of even getting some multithreading
It takes a lot of time to write a compiler/interpreter that runs genuinely well
Sounds like just more broken scope issues like with SQF
If it doesn't have OO like scope of variables within a "class" you can hardly even call it OO, then it is just namespaces for functions
It does have them
But.. You don't want to do OOP with inheritance. You'll just get frustrated.
you can cast to any child from a parent without issues, it only errors when you try to call functions that are only defined within the child
so if you instantiate a parent and try to cast to any child of it, it works just fine 😄
Inheritance doesn't really make sense if you HAVE TO overwrite every function from the parent
Or was that only constructor?
only the constructor
.
🤔
@open vigil ^
But even the constructor. You cannot change argument types or number.
I guess i can imagine a few things where you are fine with that. But in most cases that makes it kinda useless
so things like
public class Point {
private int x;
private int y;
public Point(int p_x, p_y) {
...
}
}
public class Point3D : Point {
private int z;
public Point(int p_x, p_y, p_z) {
base(p_x, p_y);
...
}
}
arent possible
Dont know if theres something like base() or super() in Enscript so dont take that for granted
@slate olive Either participate as a mature user or leave.
oh wow my bad
@wary vine 22. do not post URL links w/o short description of what it is , anywhere
Do you not know how to read the rules?
Yeah, its just a screenshot
of...
$ is an illegal char for parseNumber, so it defaults to 0.
Why don't you just post what's on there and say what it does
Thats what you should have included with the link
i had to make a minifunction xD
instead of violating a rule. And requiring everyone to click that link to know what you actually mean
tbh, I post links all the time without explicitly saying what they are.
True. Biki links and links to github 😄
i think pretty much everyone does.
^
gyazo is what i see most people link screenshots. thats litteraly all it does.
Also commy is theoretically still veteran. So it's fine.
"theoretically still veteran" What?
He's on probation
@wary vine You are breaking another rule right now btw.
?
The only point here is "read and follow the rules and everything will be fine"
¯_(ツ)_/¯
Also posting links without description is fine (IMO) if you already know from the conversations context what that link will contain.
Wasn't the case with yours though
What was $100000 supposed to be? A binary number?
params [
["_numberString","",[""]],
["_type","",[""]]
];
if (_numberString isEqualto "") exitWith {
["A Number as string must be passed through with this function"] call BIS_fnc_error;
};
private _type = toLower(_type);
private _stringArr = _numberString splitString "";
private _newArr = [];
{
if (([_x] call Lega_fnc_isNumber)) then {
_newArr pushBack _x;
};
}forEach _stringArr;
private _newString = _newArr joinString "";
private _output = switch (_type) do {
case ("numbertext") : {[(parseNumber _newString)] call bis_fnc_numbertext};
case ("money") : {(([(parseNumber _newString)] call bis_fnc_numbertext) splitString " ") joinString ","};
case ("int") : {parseNumber _newString};
default {_newString};
};
_output;
<random link with random characters at the end>
Uh lol. Look at that.
^ That this is supposed to be prevented with that rule. And you accidentally did exactly that
@little eagle $ == money
I think that fixes itself if you just put the $ at the end though
That would be incorrect though.
wait
Welll.. Murica.. Fahrenheit. ¯_(ツ)_/¯
how do i use apply the contents of a variable in my addaction?
_AI_unit addaction [_addactiondescription,
{
[_AI_unit, _player, 2, _type, ""] remoteExec ["TLS_fnc_hostage_prisoner", 2];
}];
the _AI_unit isn't being passed to the function or _player.
Decimal dot or decimal comma?
decimal coma
_AI_unit, _player and _type are undefined, Snatcher.
switched his alignment to chaos neutral
@LifeSnatcher#6222 you make it a global variable
local variables don't and can't propagate
Eh, you pass them as arguments.
or you pass it as arguments
addAction has parameters?
Yes.
One thing, does anyone know anything outside of arma that will let me convert classname - displayname ?
they are defined in the params of the function that is applying the addaction
No, they're undefined.
they're clearly undefined there
As I just said.. local variables don't and can't propagate
@wary vine Unpack the configs and stringtables from the pbo's and use notepad++.
_AI_unit addaction [_addactiondescription, {
(_this select 3) params ["_AI_unit", "_player", "_type"];
[_AI_unit, _player, 2, _type, ""] remoteExec ["TLS_fnc_hostage_prisoner", 2];
}, [_AI_unit, _player, _type]];
@still forum its for my discord bot 😛
There. Now they are defined.
Just export all of them from arma. And let your bot read the text file
^ what I was about to suggest
just redo the export whenever you update a mod / arma and you're good to go.
Till today I didn't know that addAction had arguments...
That is also what all external tools would do... Almost all.
Today I Learned Today?
just so you know what I mean https://gyazo.com/c0ffd469079210979e6fbd573c38d2f7