#arma3_scripting
1 messages ยท Page 289 of 1
Confucius is Konfuzius in German. So I saw confuzius in confuziused
Dedmen, fix the duplicate newline
Yeah, do you job.
It's duplicate now? I need a better git tool :/
Yeah, fix that
It's important for my OCD.
Done
You heard that? Its important for his LED
Great. Now rename it to hashKeys and we're done.
I think he meant OLED LCD
Thats what i said.
Yeah, why you didn't renamed it to hashKeys, tztztz... schlampiger Workflow here, tztztz
(bored and hungry, bad mix)
How do I load a rifle with ammo?
Yes
Why doesn't this discord have a #random channel
press R
...
๐
?
AddMagazine -> AddWeapon -> MagazineWillBeInWeapon
AddWeapon -> AddMagazine -> MagazineWillBeInGear
sometimes*
Hmm, didn't work for me. I might've done something wrong
Ah, thanks
doesn't load Magazines Commy
Yes it does.
As of Arma 3 DEV 1.37, this command also supports weapon magazines.
"As of Arma 3 DEV 1.37, this command also supports weapon magazines."
I requested addXWeaponMagazine and this is what I got after a year of waiting.
Nope
I think you mean from cargo space?
Yep
Too difficult : (
):
Arma 4
removing of SingleItems is not possible, without workaround (caching everything, removing the desired one, readding)
for sure
But KK added LIS reporting multiple intersections a few hours after I mentioned that it would be useful.
I feel like they're listening to me now.
You can call me god now.
They're also looking into that eventhandler recompile issue.
(i am just talking the same nonsense as you, right now ๐ Like BI would listen to you.. thats... cmon, be realistic ๐ )
No one listens to you, Dscha. That is nothing specific to BI.
The same as... idk... Gabe would finance HL3.. thats stuff... idk... that will never happen.
Some do listen to me! They regret it afterwards, but there are always new ones!
HL 1 & 2 sucks
so does... no, i am quiet. afk.
@jade abyss hey, sorry pal, just understand something wrong. Language barrier.
rgr
It would help if he didn't use so many ellipses.
I liked them, but the internet ruined them.
The channel description is still not fixed.
if (_condition isEqualTo call compileFinal str if not (1 ^ random 9999 != random 4444 ^ 0)) then {
I repeat myself: ๐ฉ ๐คฆ
@little eagle he who?
He who used 5 ellipses in one sentence.
Me? Lol
The same as... idk... Gabe would finance HL3.. thats stuff... idk... that will never happen.
Ah
(hint: It's just 4, so it can't be me)
It's just 4
No, it's five
Put your glasses ehhe
4
The same as...idk... Gabe would finance HL3.. thats stuff... idk... that will never happen.
The same as...
1
I count 4
-1
Dscha, the namespace setvariable broke my timer :<
And the error is?
god I need to rewrite this timer, it's a fuckn mess
We can't tell, since.. you know... our glasbowls are in maintenance-mode.
_time = serverTime - Tag_MyStartTime;
_finish_time_minutes = floor(_time / 60);
_finish_time_seconds = floor(_time) - (60 * _finish_time_minutes);
if(_finish_time_seconds < 10) then
{
_finish_time_seconds = format ["0%1", _finish_time_seconds];
};
if(_finish_time_minutes < 10) then
{
_finish_time_minutes = format ["0%1", _finish_time_minutes];
};
_formatted_time = format ["%1:%2", _finish_time_minutes, _finish_time_seconds];
``` the problem is all this shit is needed for the format
eh
there's got to be a better way
Okay, delete it. Rewrite it, i assume i've never seen it. Okay? Okay ๐
gl hf
@plucky beacon Please do yourself a favor and use a function to format that time.
[_time1, "H:MM:SS"] call CBA_fnc_formatElapsedTime
Maybe BI has something like that too
I'll have to look around, I find it hard to believe nobody else has tried formatting time before
Example:
format["Time until Respawn available: %1",[(_WaitTime - diag_tickTime),"MM:SS.MS"] call BIS_fnc_secondsToString];```
is that a thing?
It outputs the format "00:00.00"
So just test it out ๐
https://community.bistudio.com/wiki/BIS_fnc_secondsToString holy shit i missed the obvious
You know I was wondering if I would be able to make a countdown in mm:ss.ms but wasn't sure if it would hog resources for a loop like that
Not rly
I mean i guess it's not like I'm calling the script over and over, I could set a thread on a loop?
Example
waitUntil
{
_Ctrl_Timer ctrlSetText format["Time until Respawn available: %1",[(_WaitTime - diag_tickTime),"MM:SS.MS"] call BIS_fnc_secondsToString];
round(_WaitTime - diag_tickTime) <= 0 OR
isNull AnotherVariable
};```
_Ctrl_Timer = ctrl in the center of the screen, loaded with RscTitles.
right
also
Disable saving of script containing this command. After this script can work with the data types which do not support serialization (UI types).
what does disableSerialization mean? It sounds like you can't assign stuff or maybe I'm reading it wrong.
search the Wiki for that
That's what the definition on wiki is
already there brah
disable saving of script containing this command, soooo no returns? no assighnments? what are you saving? I don't get it
Its just needed, let me say it that way, when playing around in the UI ๐
I know but why and why wouldn't it just be used in everything if there isn't a disadvantage
Remember rule #1:
Don't ask, just accept. Its Arma.
hmph, fine
So I was planning on making a Mission, and wanted to give a live drone feed on a monitor, so the tropps can see and plan everything. Is there a "easy" way of doing that?
There are scripts available I've seen
search around for it
they include instructions
Don't just accept things. disableSerialization does exactly what the command says it does.
I guess I'm just kinda lost on the definition, what can't I do when I disableSerialization?
Just don't ever use the scheduled environment and you wouldn't even have to worry about this.
oh, okay
Script serialization is responsible for keeping your script pseudo threads alive when you save and reload a mission.
If you disable it, the script will die when you save and quit.
It's necessary every time you store DISPLAY or CONTROL values inside local variables.
Since these ui types don't survive when you close down the game.
huh, interesting, so data actually stays around when you quit a mission
Or you can just do what everybody else does and just say fuck savegames
_missionAlive = 0 spawn {
disableSerialization;
sleep 1e9; // forever
};
_missionAlive spawn {
waitUntil {scriptDone _this};
hint "mission was loaded!";
};
This should explain it.
wait until sleep 1e9 XD
It's just a 1 with nine zeroes.
Well, you don't know how long the first session will last.
The script has to never finish, except for when you save and quit.
it is
We haven't got long left to live then
but that's why it's //forever
That is how "mission loaded" event handlers were done before BI added an actual event for that.
We live around like 3 billion seconds
30000 days only : (
shh
When using hex numbers in SQF code... Are they case-sensitive?
No
Allright... Thx
Np :>
How does it come that 3.4028235e38 is a valid inpput as a number when I can't find e listed as an operator? Is it an undocumented one or does it work differently?
Google scientific notation
I know what it means... I'm just wondering how the game handles it
Does it simply accept this as a form of number notation then?
Okay... I just thought it would make sense for it to be an operator similar to exp ^^
Something related to discuss:
- what else would you expect in minimap? (navigation, units)
- do you need something else for custom scripted display?
- something else you miss?```
https://forums.bistudio.com/topic/200468-jets-custom-info/?page=3#comment-3153306
@little eagle @tough abyss
@scarlet spoke for the same reason 0xFF is a valid number.
@velvet merlin I don't get it.
Yeah makes sense if you put it that way ๐
@little eagle maybe ACE ppl have some wishes/requests for custom displays
as the tech might/should become available also to tanks/ground vehicles, i would assume you guys should be interested
Not quite the same idea though @little eagle
But the interpretation is different
Of course. One time it's hexadecimals, the other time it's big numbers.
Yet both are just different ways of writing down numbers.
Well, the 0x is particular for a compiler to denote that it's hexadec
You could represent both by just using numbers as characters, but it's more convenient this way.
And eN is for adding *10^N
That is also done by the compiler.
Whereas all numbers internally use s.notation, that's how they are handled and displayed
But the compiler still replaces your scientific notation with a completely different one most of the time
Well, it's here is a number as you'd expect it vs heres a hexadecimal number FF
No
8 is internally something like
00001000
And 0x8 is the same
And so is 8e0
Btw, would be nice if they added support for binary numbers
Commy is speaking in R2D2 again.
Don't consider the internals working in binary, were moving away from lowest level here. You could write 8, or 8e0, they are equivalent. But 0x is an explicit note to the the compiler
its spreading!
What do you think the e is?
C3PO, beep beep boop bib?
If you were to cout a large number, it'd display it with s.notation, it's natural. Your hexa number will come out in decimal, how it's handled
There is absolutely no difference between 255 and 0xFF
You're missing the point ๐
But your logic, any number from 0 to 9 is a "compiler directive" to read a number.
You said for the same reason 0xFF is a valid number.. It just so happens you can tell the compiler your number is in hexadecimal. Versus the other case, just a number in its standard form
But doesn't matter, off topic
e is a compiler directive to resolve the scientific notation
ยฏ_(ใ)_/ยฏ
We don't even know the internals, so there is no point in even talking about "compiler directives"
10
1e1
0xA
Three ways to write down a number
The last two actually use letters
That was my point. Nothing more.
timer.sqf
Timer_Length = 300; //When mission should end in seconds
if!(isDedicated) then
{
disableSerialization;
2 cutRsc ["NitroInfo","PLAIN"];
waitUntil {!isNull (uiNameSpace getVariable "NitroInfo")};
_display = uiNameSpace getVariable "NitroInfo";
_setText = _display displayCtrl 1010;
_setText ctrlSetBackgroundColor [0,0,0,0.3];
_elapsed_time = 0;
_start_time = diag_tickTime;//will change to serverTime when working
while {Timer_Length > _elapsed_time} do
{
_elapsed_time = diag_tickTime - _start_time;//will change to serverTime when working
_setText ctrlSetText format["%1",[(_elapsed_time),"MM:SS.MS"] call BIS_fnc_secondsToString];
};
2 cutRsc ["default","PLAIN"];
[[],"BluforFailure_time.sqf"] remoteExec ["execVM",-2,false];//gotta make global
};
pfft okay so right when I posed it, it started working, but it's counting up instead of down
the milliseconds are kinda jittery, gotta align to the left side
For alignment of the numbres it works fine by setting their decimals to the same length
I have done this by transforming the number into a string first and then add or remove segments as needed
decimal to the same length? isn't the kerning defined by the font?
The what?
Oh wait... Is your problem the one that the numbers don't line up because they have a different length?
Like 4.5 vs 3.576
even with 1 digit on the end, the string still jitters
even if ya got rid of milliseconds, it still moves around
Oh okay then forget my comment on that... I misunderstood your problem xD
Hey is anyone able to write what I assume is a relatively simple script, which will check the assets on the map and put a map marker next to any that are part of the expansion?
We've started to strike a problem where we've had an influx of new players, and many of them don't have APEX yet as they're just getting into the game. Unfortunately as I found out last night, they can't play a lot of the missions we have because they contain a "number > 1" of apex assets, like a simple piece of fence stops them from joining the mission.
Problem is when everything's already laid into the mission it's hard to find what's from the expansion even judging from the error messages they get.
I thought if someone could come up with a script that can check for APEX locked assets and even just drop a map marker so it can be found that would be really helpful. Unfortunately my scripting ability is very minimal
wtf am I looking at. Why is a ui script also using remoteExec
@little eagle
if (first char is 0 && first char is x)... vs just parsing the float more than likely ๐
@leaden summit
tl;dr
You want a script that reports the current number of objects that require APEX?
Well ideally it would mark them somehow (maybe on the map) so it's easier to go back into a mission I made months ago and know what to take out
I see. Do you have any examples of objects it would have to detect, so I can properly debug it?
I can only think of some tanoa soldiers and those new jeeps
There's a fence and gate, I think it's acalled a back alley fence
Or even the big crane/digger prop
there are multiple fences in the game ...
Yeah sorry just trying to find a pic
Stuck at work at the moment else I'd find you the classname
pennyworth mentioned the following in the mission makers channel
The restriction only applied to objects and buildings from the expansion that aren't "props". I don't think they'll have "exp", but a way to check that with scripting would be to look at https://community.bistudio.com/wiki/allMissionObjects and look if thi returns expansion from it https://community.bistudio.com/wiki/configSourceMod
sorry commy I'm a bad little script writer.
Nah, ignore his ranting
that almost sounds kinky
oopsie
#define DLC_APEX 395180
commy_allTanoaMarkers = [];
addMissionEventHandler ["Map", {
params ["_isOpened"];
if (_isOpened) then {
private _tanoaObjects = allMissionObjects "" select {getObjectDLC _x isEqualTo DLC_APEX};
{
private _marker = createMarkerLocal [format ["commy_tanoaMarker_#%1", _forEachIndex], _x];
_marker setMarkerShapeLocal "ICON";
_marker setMarkerTypeLocal "mil_warning";
_marker setMarkerColorLocal "ColorRed";
_marker setMarkerTextLocal typeOf _x;
commy_allTanoaMarkers pushBack _marker;
} forEach _tanoaObjects;
} else {
{
deleteMarkerLocal _x;
} forEach commy_allTanoaMarkers;
commy_allTanoaMarkers = [];
};
}];
@leaden summit
put this into the init.sqf
It didn't pick up the Gendarmerie (sp?) jeep, but apparently that's just a retexture, so anyone can use it.
Found the church ruins and the soldier
Awesome thanks man
Imma save this, could be useful
hoarding scripts, because "they could be useful"
You have no idea how many people come to me saying "Does my mission have Apex objects?"
Tell them to write a script to find out real quick
You give people too much credit
These are people who haven't scripted more than a "allowDamage false;"
Also floated the issue with R3vo to see if that's not something his 3den enhanced mod could add. It really frustrating as a mission maker to have people not be able to join because of one asset you had no idea about
yay, I even made the timer turn red when there is only ten seconds remaining
Isn't there an option somewhere in the Eden editor that lets you see the required addons?
Yeah, but they wanted to see where they are placed on the map.
What's the best way to force a dialog to remain open until conditions are met, I know you can script it to waituntil the dialog is closed to open it again but I want to know if that's the only way, or if there is just a way to prevent someone from pressing escape to exit the menu
(findDisplay 123456) displaySetEventHandler ["KeyDown","if((_this select 1) isEqualTo 1) then {true}"]; //Disable ESC```
ESC is only disabled, as long as Display 123456 is active
So say if i was trying to modify vehicle inventory space via mod. What exactly would i have to do in order to over ride the class and change the inventory space.
Search google for CfgPatch (or CfgPatches, on of them is correct, can't remember anymore)
will do
It's CfgPatches
maximumLoad would that be inventory?
uh, think so, yeah
\ Don't mind stuff like MaxMagazine*****/MaxWeapon***** and MaxItemCargo
Or something similar, they don't work, but are still in the Cfg, sometimes
markdown ยฏ_(ใ)_/ยฏ
its fine i get it. thank you
ios there a program for ARGB colers to find easely? because am noob ad this kind of things, theres a program i can use that will give the colors ..
There's a ton of things online that give you RGBA colors
google <- ?! quicker then here?
how do I google?
hah yeah i know but i dont understand how to put it in u know? am dom as fuck so for example
rgb(193, 66, 66) .. this from colertool
and this is arma "#(argb,8,8,3)color(0.05,0.05,0.05,1)", ... where do i put the numbers :p
parseText stuff
yeah my english is shit to i know, argb 8 8 3 <:::: change this? or change 0.05,0.05,0.05,1 <<:::?
the latter
it's in a scale from 0 - 1, so to get the value you'll need to divide the value by 255
So for example the red is 193, which will be 193 / 255
owkey il try that
_setText ctrlSetText parseText format[" <t align='Left'>%1</t>",[(Timer_Length - _elapsed_time),"SS.MS"] call BIS_fnc_secondsToString];
_setText ctrlSetText format["%1",[(Timer_Length - _elapsed_time),"SS.MS"] call BIS_fnc_secondsToString];
These two are outputting the same, I don't know if parsetext will work here
it's like there are controls for literally everythign but alighnment
fonts and header sizes
_Ctrl_AreaPts ctrlSetStructuredText parseText format["<t align='center' color='#%1'>%2</t>", _Color, _Area_Trend];```
;P
I mention it again: Most of the stuff i write here is taken from the very back of my brain, the examples are from file i did, when i was actively coding. Thats more then 6 months ago^^
well you got a good memory
nice i got my mod working. that wasnt hard at all
Yep Cloud.
There are aloooot of examples out there, a short google session will find almost everything.
I usually have a million follow ups though
Even if I find the answer I like to know why it's the answer
private _test = 1;
systemChat str [_test];
private "_test";
systemChat str [_test];
result:
[1]
[1]
___________________-
private _test = 1;
call {
systemChat str [_test];
private "_test";
systemChat str [_test];
};
result:
[1]
[any]
๐ค
It doesn't in example 1
_test = 1;
systemChat str [_test];
private "_test";
systemChat str [_test];
same result
[1]
[1]
private _test = 1;
call {
systemChat str [_test];
private "_test"; // <- Gets cleared here, because: Was call'd before?
systemChat str [_test];
};```
stop thinkng about this
no
check out this mindfuck instead:
force me
call {
_test = 2;
systemChat str [_test];
private "_test";
systemChat str [_test];
};
result:
[2]
[2]
_test = 1;
call {
_test = 2;
systemChat str [_test];
private "_test";
systemChat str [_test];
};
result:
[2]
[any]
Yeah, correct.
Top: Same "scope"
Bottom: _test was defined BEFORE the different "scope"
Scope is not the right word... hmpf...
Bottom: _test = 2; is kinda useless, since _test existed before.
You are immediately agreeing with the example that makes the least sense to me. And you're confused about those that make the most sense to me.
It still gets buttfkd by private again
I dreamed of SQF once.
Oh btw.: Why it does that -> Makes no sense to me too. I just explain what i think is happening!
You'd think having an identical scope in two scenarios would lead to the same result no matter what you did in the previous scope.
Arma ยฏ_(ใ)_/ยฏ
All I can say is: always set your variables to private.
Yep. In the beginning of the file.
But people will still say "I don't need it, I don't see why"
Needs more work, but that was my habbit.
First Line in every Script:
private["_a","_b"];```
Actual first line is:
// by commy2
But everything with QC won't allow me to use that
qc?
... we usually have PRs reviewed before merging them by at least one maintainer or whoever feels like it
review your own, // by comm2, reviewed by commy 2 โ
And hope no one notices. And hope nothing broke.
//by commy2 reviewed by commy 2 love commy 2 <3
review process is fun. I made dedmen do 20 commits in a PR where he added one basically one liner function.
Good ๐
where da heck is text fields in the gui editor :I
nonono
I mean I want a gui with my own text field
but I can't find that type of element in thie editor
? RscText?
ya but text box is kind of ambiguous
You're looking for a box that players can type in when gui is open?
class RscEdit
{
deletable = 0;
fade = 0;
access = 0;
type = 2;
x = 0;
y = 0;
h = 0.04;
w = 0.2;
colorBackground[] = {0,0,0,1};
colorText[] = {0.95,0.95,0.95,1};
colorDisabled[] = {1,1,1,0.25};
colorSelection[] =
{
"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])",
"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])",
"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])",
1
};
autocomplete = "";
text = "";
size = 0.2;
style = "00x02";
font = "PuristaMedium";
shadow = 2;
sizeEx = 0.045;
canModify = 1;
tooltipColorText[] = {1,1,1,1};
tooltipColorBox[] = {1,1,1,1};
tooltipColorShade[] = {0,0,0,0.65};
};
I don't use the GUI editor for my UI's so not sure where it is in there but thats it
then you'll need a button that gets the value of the rscEdit ctrl when you press it and does what you want with that info
Ya so basically you type in an integer and hit a button to confirm
pretty sure when you try to call whatever text is in the editbox, it will come in a string ("1")so you will have change it to an integer ? not sure
I'm having issues defining it
hmmm
I'm gunna have to come back to working on the GUI stuff, I always have a lot of trouble finding things for defines.hpp
ya I got the default here
okay so it is RscEdit just hard to tell from the editor
At some point I'd like to reverse engineer the BIS upload boxes
Any way to get all units classnames from a group from config?
eg.
You got the "OI_reconPatrol" group, and I want to get all the classnames of the units that are in that group. Without spawning it of-course.
Rightclic group, log classes to clipboard, paste somewhere
configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OI_reconPatrol" >> "Unit0"
it goes up to Unit3
add >> "vehicle" for the entry containing that unit's classname
think that's how it works
Ah sorry, i thought from the editor
Hey guys, is there any list of what positions selectionPosition can be used with?
How would I go about checking if a config entry has a certain property?
if( (getText (configFile >> Path)) == "" )then{hint "nope"};
if( (getArray (configFile >> Path)) isEqualTo [] )then{hint "nope"};
*Edit
etc. blablabla
why not? sorry, i'm bored
In this case, it doesn't matter what you choose. == or isEqualTo can be used
can you even compare arrays with ==?
*edited above blub
there you go then ๐
And?
if( (getArray (configFile >> Path)) iqEqualTo [] )then{hint "nope"} ->
if "(configFile >> Path)" has no Array -> getArray answers with []
*fix0rd
Ok, thanks a lot (:
_fact = Dscha iqEqualTo 40;
@thin pine How DARE YOU!11oneoneone
yo wot m8?
sori mi no understand
aye caramba Tequilla wall trump.
Ho Lee Fuk
More triggers than a rifle squad
hey guys any way to disable the kill messages when Zeus is remote controlling a unit?
hm. i thought default behavior was NO kill message because the unit is remote controlled. did that change maybe?
it used to be that no message would be shown
but since a week or two every Zeus kill shows the Zeus name as killed by
ah cool. i think in the bigger picture that is actually good
how so
for your purpose i feel it would be best to do what Nitro suggested and disable all kill messages and if you need them for other stuff you could use a scritped way
it's better for mods in general
AI can be so stupid that Zeus has to take over
not fully switching into a unit but jsut remote controlling can break mods that rely on knowing who the player is etc
Hay Dscha, remember when you posted how to set a variable based on the text in rscEdit box?
ctrlText?
is that what it is?
that's how you get the text of a control including edit boxes. as far as i remember
onButtonClick = "missionNameSpace setVariable ['VarName', (ctrlText 12345), true];";
got it
Top right in Discord -> "Search" -> "TheWordYourSearchFor" -> Enter ๐
I know I just did that to find the code block :P
I just didn't know which ctrl it was
I was trying all the wrong ones
rgr
I'm getting errors from a file I didn't even edit
createEnemy.sqf
private ["_newUnit","_markerPos","_tempUnit"];
if (_this == null) exitWith{};
_newUnit = (group OpGrpLead) createUnit [_this, getMarkerPos "East_Start", [], 0, "NONE"];
called from getUnits
{
diag_log format ["|getUnits|--!--This is the unit: %1",_x];
_LowerClassname = (toLower (typeOf (_x)));
_caseResult = switch (_LowerClassname) do {
case "b_officer_f": {"O_Soldier_SL_F"};
case "b_soldier_sl_f": {"O_Soldier_SL_F"};
case "b_soldier_tl_f": {"O_Soldier_TL_F"};
case "b_soldier_uav_f": {"O_Soldier_UAV_F"};
case "b_medic_f": {"O_Medic_F"};
case "b_soldier_ar_f": {"O_Soldier_AR_F"};
case "b_soldier_aar_f": {"O_Soldier_AAR_F"};
case "b_soldier_gl_f": {"O_Soldier_GL_F"};
case "b_soldier_m_f": {"O_Soldier_M_F"};
case "b_soldier_lite_f": {"O_Soldier_lite_F"};
default {null};
};
diag_log format ["|getUnits|--!--This is the classname: %1",_LowerClassname];
_caseResult call missionStarter_fnc_createEnemy;
} forEach BluforPlayers;
if (_this == null) exitWith{};
->
if(isNull _this)exitWith{};
How do you even get a type script?
okay so I fixed that, but I still get an error after
You tried starting it, with the fix?
I tried with it commented out earlier
(If you receive Error Msgs, only fix the first one! Some can be followup Errors)
Means, when its commented out -> It continue to call a script, that expects an Object, right?
What I don't get is why changing stuff in the timer script made this come up :/
- check createUnit in the Biki again
+is OpGrpLead already a group, or is it false naming?
so _this is a string
so it's never null
String can't be Null
wat
default {null}; make that default {""};
oaky well I gotta go to class but I'll commit these edits
then check == "" as Dscha said
Ya I don't know how that even changed, last time I edited that file was a while ago
Now that I'm running my changes through git it should help me keep track
ye don't waste time on these kind of thoughts. i did that way too much in the past. "but this should work...". just fix it. be happy it's an error that gives you a descriptive error message. that's a privilege. check your privilege bro
TRIGGERED
oh, then not triggered.
haha
I print out ascii art in the log because it's funny
I have to say I'm pretty happy I got this git setup that updates straight to my mission folder, so I can work on it from other computers
only set it up on a whim
And we're all happy for you Nitro
That sounds extremely sarcastic and bitchy but im srs tho ๐
I dunno I using bitbucket
lol thanks sanchez
oh I'm not using the git for a dedicated server stalk3r
It's just to my missions folder
oh you're not talking about what I was doing
I mean that's technically a #server_admins question, but I'm pretty sure you don't need filepatching unless it was on my server without my knowledge
ah right cause I am trying out VCOM AI for the server and it requires filepatching enabled but I thought it was a security hazard to have it enabled
well it is which is why it's mainly used on private servers
why not use the mod version?
sorry, I mean the script version
the configuration file can be inside the mission
Because the server has multiple mission files in /mpmissions
You can unpack the addon and edit the defaults?
yes but when I load in another mission, it won't have the same VCOM AI settings
he means modifying the vcom pbo to adjust the defaults.
ya so basically, harder to edit but you can set what you want still
also
when using cutRsc, what diffrence does it make when they're on a diffrent layer, is being on a layer higher value or lower value affect anything other than it's identifying number?
visually think of layers ๐
like photoshop
is cutRsc always behind a createDiolag?
good question. you could always use ctrlcreate on that dialog. afaik the control created last should be ontop like it does with the ones created from config
I'm having a bug where two almost identical rsc layers, one is working and staying visible, the other one flashes for a frame and dissapears when the script calls.
disableSerialization;
20 cutRsc ["NitroBlu","PLAIN"];
waitUntil {!isNull (uiNameSpace getVariable "NitroBlu")};
_display = uiNameSpace getVariable "NitroBlu";
_setText = _display displayCtrl 1015;
((uiNameSpace getVariable "NitroBlu") displayCtrl 1015) ctrlSetStructuredText (parseText format ["<t size='2' color='#006296'>%1 | BLUFOR</t>",(_this select 0)]);
blufor works
disableSerialization;
21 cutRsc ["NitroOp","PLAIN"];
waitUntil {!isNull (uiNameSpace getVariable "NitroOp")};
_display = uiNameSpace getVariable "NitroOp";
_setText = _display displayCtrl 1020;
((uiNameSpace getVariable "NitroOp") displayCtrl 1020) ctrlSetStructuredText (parseText format ["<t size='2' color='#960000'>OPFOR | %1</t>",(_this select 0)]);
opfor doesn't
I'm doing some debugging logs now but it's not the display ctrl or the layer I'm using right?
and I can see it flashes with the right number and format so it's definately working almost
also works in singleplayer
The waitUntil is pointless
They're both identical, aren't they?
The both snippets.
Just different numbers and a different RscTitle
Are their configs different?
I copied one from the other so let me be sure (and yes changed the idcs
ya they are
maybe there is a mod or something using the layer or idd
I'll remove 3 zeros
As for the layers
Instead of
21 cutRsc ["NitroOp","PLAIN"];
try the alternative syntax
"NitroOp" cutRsc ["NitroOp","PLAIN"];
last one will be on top
Unless the layer name was already used
You're not supposed to use numbers there
Either you generate your layer via
BIS_fnc_rscLayer
Or you use the alternative syntax of cutRsc.
Which is the same thing.
Do not use you own numbers...
okay
Yeah, it might be a conflict with two layers colliding
I have a bunch of cutRsc s so I should probably change all of them to alternate syntax
I mean, you can use really big numbers
like 90001
and hope no one else uses them...
or you do it the intended way
idk
I'll just take your advice :>
well it's working
so it must have been a conflict
ya know what? might have been tfar
Could be anything.
Keep in mind that these layers aren't necessarily the same every time
21 could be different things
Depending on loading order
"weak random" so to speak
so if I were to edit or get rid of them it has to be like "NitroOp" cutRsc ["default","PLAIN"];
"NitroOp" cutRsc ["NitroOp","PLAIN"];
so the name essenitally becomes the "layer"
The layer id is replaced with an unique layer name
Same concept. It's an id too, but you can name it
that also sounds easier for documentation too
Yeah, with strings you can use tags and you're set.
You're letting it automate the layer, but you have to have a way to reference it in the future
If you need to have them in any specific order, just use the string id with an empty cutText at mission start.
ya the good news is I don't have to worry about layering, nothing is on top of anything else right now
Although I was having that problem earlier where a cutRsc was hidden behind a diolag?
the ctrls and displays certainly have more editing options
Just make sure you don't forget the layer, or you'll have a mighty headache ๐
onLoad = "with uiNameSpace do { NitroOp = _this select 0 }";
hah, creative use of with
The guy that came up with that initially probably struggled with escaping quote marks for an hour or something.
I was having that issue earlier
onLoad = "uiNamespace setVariable ['NitroOp', _this select 0]";
ya using single quotes
_playerUnit switchCamera "..." don't work with units in vehicles, even (vehicle _playerUnit) switchCamera "..." don't work. Anyone can help me?
Should work, what exactly are you doing?
spectator mode
@little eagle when the unit enter a vehicle the camera stops in air
and if i runb the command again, it not work
repro:
switchCamera to unit1
make unit1 enter vehicle1
switchCamera to vehicle1
right?
can be only that:
make unit1 enter vehicle1
switchCamera to vehicle1
but unit1 is a player
not sure if matters
on Eden editor console i was able to switch to a agent in a vehicle
with agent switchCamera "INTERNAL"
But had no success in my dedicated server
with 2 players
one switching to the other inside a vehicle
0 = 0 spawn {
unit1 switchCamera "EXTERNAL";
sleep 4;
unit1 moveInDriver vehicle1;
waitUntil {unit1 in vehicle1};
vehicle1 switchCamera "EXTERNAL";
};
works for me
in eden editor?
yeah, editor
This is my spectate function http://pastebin.com/9uQ1DYK4
_this is the player spected
the function run on the spectator machine
Not waste so much time with it...
while {!camCommitted _cam} do {};
bad idea
this loops runs 1000 times per frame
But its for precision
That makes no sense
The value will not change during the frame
check 1000 times or even more and the result will never change
nothing is if you use the scheduled enviroment
At least waitUntil doesn't check multiple (1k+) times a frame.
Your current while loop eats up all 3 ms guaranteed and pushes your pseudo thread at the end of the scheduler stack
So much for precission
I have some while loops that don't need a sleep, but that is only really viable if your check changes every time I guess.
I'm pretty sure one could use eventhandlers for all this stuff tbh. They have nice stuff with getOutMan and getInMan now.
i will test it with waitUntil, if the camera movement get blocky
because if the camera commit ends, and another one don't come right after, the camera will stop to move for instants
It's not the player. It's a spectated unit.
Dunno if playerViewChanged works for that.
Donnovan, you have that problem either way.
with while-sleep
or with waitUntil
And you current "sleepless" while only makes it worse
You guarantee to be the last in the scheduler stack by eating up 3ms every time you get your thread to run
i understand. just wrong assumption from me, like many lol
but its the way to learn the "inside" of it
This code have zoom when the player is on foot
because it uses a camera positioned in the head of the spected unit
I'm trying to figure out how it works so I can get back to your original problem.
switchCamera definitely works for me on vehicles.
there is also the code that put the fov in "fov" and the effect in "cmv"
y thy so shrt?
this must run in loop on all clients that can be spected:```sqf
//SETUP
player setVariable ["cmv",cameraView,true];
//IN A LOOP
_cameraView = if (cameraView == "EXTERNAL") then {"EXTERNAL"} else {"INTERNAL"};
if (_cameraView != player getVariable "cmv") then {
player setVariable ["cmv",_cameraView,true];
};```
this records the view effect of the player in playerNameSpace
oh that is pretty bad too. You have a lot of network traffic with that.
and this to record the fov:
//SETUP
KK_fnc_trueZoom = {...};
player setVariable ["fov",call KK_fnc_trueZoom,true];
BRPVP_changedZoom = false;
//ON EACH FRAME
_fov = player getVariable "fov";
_fovNew = call KK_fnc_trueZoom;
if (abs((_fovNew - _fov)/_fov) > 0.001) then {
player setVariable ["fov",_fovNew,false];
BRPVP_changedZoom = true;
} else {
if (BRPVP_changedZoom) then {
player setVariable ["fov",_fovNew,true];
BRPVP_changedZoom = false;
};
};
@little eagle no errors
but the the spected player enters a vehicle
the spectator vision get stuck outside the vehicle
the vehicle can go away and the spected vision stay there, stoped
not sure if i was clear
language barrier sorry ๐ฆ
KK_fnc_trueZoom is a function from killzonekid
Why do you broadcast fov on setup, but not OEF?
OEF?
on each frame
i broadcast it again in the line 4 from bottom to top
ah yes
so if they are constantly doing something (moving, zooming? whatever)
You're pvar'ing every other frame?
it only broadcast when it change and then stop to change
when it stop to change it get broadcasted
so when someone zoom with a sniper, the code see zoom changed and start to monitore it for when it stop to change
when it stop to change the code get the current fov and broadcast it
@dusk sage got it?
Pretty sure the zoom changes all the time even if just slightly.
Because of the way it's calculated.
yes it changes, but not enough to make abs((_fovNew - _fov)/_fov) > 0.001 true.
ok
but the the spected player enters a vehicle
the spectator vision get stuck outside the vehicle(bearbeitet)
the vehicle can go away and the spected vision stay there, stoped
but on a machine running the game with 10000 fps, it will not be true also
when the spected unit leave the vehicle, the camera back to hin and works ok again
switchCamera is not working
abs((_fovNew - _fov)/_fov) > 0.001 is detecting a 0.1% chance in fov
That seems like it's going to change a lot?
its only is true on real zoom
D:?
its not because it is true that i will broadcast something
when its true i use setVariable ["fov",...,false];
switchCamera is not working
Again, works for me
Must be something with your script.
yes
If you think you got an error
Try to reproduce it with a simple repro script.
I don't use switchCamera much or any time at all really, so idk if there are problems with it on remote units.
can anyone remember how to directly call a Control event handler?
for example onCheckedChanged
I have it defined in the class, and it gets called and that's cool, but when I do 'cbSetChecked' it isn't called, so I'd like to call that code in onCheckedChanged directly
okay, I think ctrlActivate was what I was thinking of
(doesn't work for Checkbox, so nm I'll figure something else out)
Why would you need an eventhandler when you're already running a script that does cbSetChecked ๐ค
I have a textfield beside the checkbox, and want it to toggle the checkbox when I click on the text (just for convenience)
I can duplicate the code that gets called in the checkbox, I'd just hoped there was a way to not have to dupe it
it's not the end of the world
Put it inside a function.
I think some of these ui eventhandlers don't trigger when the state of the control was changed from inside another ui event script.
Otherwise you could lock up the game or something like that.
code with 8 levels of indentation ๐ค
People already produce horrible code with SQF.
Imagine what shit they will come up with when they get Enscript (or whatever the name) with OO crap.
Atleast they'll be forced to write with some standards
Why d you think that?
It's fucking OO. And people will use that at every opportunity they get.
Because they won't be aimlessly writing words in N++
It'll give them a kick up the backside when they are goofing
How so?
Well from what we can see for Enscript, it's C++ NET style
C++/CLI blah
So we already have something statically typed
You're way too optimistic about that, but I'm always skeptical about new things which then turn out not so bad.
I'm just hoping they leave in something like SQF as well
Or they'll cut out a large portion of the community from development
I would've focused on developing SQF further. Replace the internals completely and leave the syntax. Or maybe expand it.
I don't see anything conceptually wrong with it for the purpose it has.
I'm probably biased though.
Well something powerful and fast would be a good start ๐ It would've been wise to use something already available in the first place but hey
It's very very different, from what there is to see
Wait, what is going on?
dayz dev tweeted that sqf is dead, they're going with enforce from take on mars
Damn lol. Now I gotta learn new crap
Where did they say SQF is dead @cedar kindle ?
Time to start learning
there's no official statement if it'll be in a3/a4 tho
No . But I want to mod dayz xD
I'm terrified of Enforce
Could be good
But, and I say this with the utmost respect
Something not patched together with glue ๐
SQF started out pretty janky
and it's kind of sorted now
I'm afraid Enforce will start life much the same
not that I have any real basis for those fears
I'm afraid Enforce will start life much the same
It seems they are using something already well established, not some scripting lang they chucked together though
Which is ten fold more hopeful
More power, faster, hopefully better in every way
From what it seems it's C++ / C++/CLI
If it's the same as TKOM
But that in itself can ramp the difficulty up far beyond that of SQF
Don't need a CS background at all
But certainly a programming orientated one
It's all well and good learning SQF, become good with it, but it's far away from a proper language
i think it's easier to get into for beginners tho
which was probably the main intention
It couldn't be easier for a beginner to get into. Everything is on the wiki
Whether that is good or not, is another matter. Can encourage those questionable questions ๐
I think it would be nice if they maintained SQF for backwards compability and newcomers and at the same time offer a proper OO language for the more experienced guys
Well, for a mission maker it's a huge issue
The performance of SQF can be detrimental
Sure, there is perf issues with ArmA itself, but adding SQF on top can completely bomb that
And that's a major issue
Two battles
It's not really due to it being interpreted, although of course there is downsides to that. It's still incredibly slow
footprints are fully local
Have 20 players on empty map in one place, check FPS, tell everyone to shoot up in the sky at same time, watch FPS tank
Hard to say, I've been wanting to do some measuring with prof clients for quite a while but I'm always lazy to do it and find people to help
Honestly Arma multiplayer sometimes feels like SAMP \ MTA, as in singleplayer hacked to work in multiplayer
Which is not far from reality
Considering OFP was singleplayer-only and then made to work with like 4 players for coop on LAN
weak foundation
or it was 8 players, can't recall it all now
Collecting them peaches is very fun indeed
๐ฅ
@tough abyss It is round based now, 3 full rounds and then serverCommand restart
2-3 hours usually
server_shutdownServerPassword serverCommand "#shutdown";
session lost, its proper server closure
@dusk sage I once wanted to make my own Life mission with actual peaches and apples on trees as UserTexture1m_F with flat textures of these peaches and apples under different angles
Now its even more doable with createSimpleObject actually
Hehe, trying to visualise the textures around a tree, would certainly look funky
@tough abyss Point is though, it's meant to be mod free
I also had idea of random household contents of Altis houses that you can break into, rob and then sell somewhere
Maybe doable now we can use our own models with simpleObj, but not before
Random house hold contents, like pretend pre owned houses?
And just setVariable indexes of objects missing from each house
Would be a neat idea
Populate entire altis with it
When client approaches house, contents generate by some pattern so it would be same everywhere, when item is taken, index is setVariable'd so next generation doesn't show it
Get some AI in the houses that shout at you ๐
It's not America.
They'd have guns and shoot at you if it was
The idea was kinda shot down with Tanoa's majority of closed buildings
Omg. I read "shout" as "shoot" ๐
Tbh though, it seems Tanoa went down like a sack of bricks with the life community
Nobody really plays it
paywall?
Nah, people just prefer Altis
Tanoa seemed ideal for Life mission
Most servers I've seen that went Tanoa, have moved back
Minimal servers up in the grand scheme
Tanoa seems like a fun place to hang around casually. It's unusable if you're milsim and operate with IFV and MBTs
But paywall is what would hold it back I'd think.
For life.
It's all jungle though, not really more encounters
Why wheeled APCs in Arma 3 are so terrible and go like 20kmh up 5 degree hill?
I can understand tanks but wheeled APCs?
PhysX sucks. It simply doesn't work with anything that isn't a four wheeled car.
Still better than anything with tracks. Tracked vehicles just flip over when you turn them in place.
Yeah, server owners want to include as many people as possible.
This is why DLC don't work.
Wish they had low res versions like in OA
I've seen Tanoa Life servers with 100 pop die within 2 weeks
It just didn't go down well at all
Odd really
I did my part and voted against the current DLC model every time the community was asked. Oh well.
Will always be a paywall, but they just genuinely don't seem to like it
low res version would not have been a paywall.
I really want to finish that idea household stuff now that I told everyone about it, so I will be first to implement it and never actually use anywhere.
Now people come in this chat and ask for scripts to detect and remove DLC content from their missions.
ยฏ_(ใ)_/ยฏ
What a waste.
Wish they'd let you have like 1 hour a day use of DLC content
Then all this annoying shit starts popping up like it does now
So people could enjoy the content without being obstructed
Can people remove it from requiredAddons, so people can still connect?
Not disappears, only these current notifications start showing up
BoGuu, they don't physically have the assets on their machines.
Yeah, I mean purely connect
Atm I see people in Wasteland run up to DLC gun and get FUCK YOU when trying to take it in a middle of a firefight
Must be fun for them and good incentive to keep playing
That is the problem though. They connect and don't see the assets, can shoot and walk through them etcc.
Lol
And then the mission makers come in here and ask for removal scripts.
Yeh, ignore that for a moment. Just wondering if it's possible
To fix that.
Oh yeah, why on earth Tanoa assets are not available is beyond me
Never tried removing from the list
Do they fear someone would make Tanoa on Altis and make people don't buy the expansion or something?
Enforce have ifs and whiles and for, forEach? lol sorry for nonsense question.
Well take some island, hideObjectGlobal everything on it, spawn Tanoa trees and rocks and here you go you got yourself a mini Tanoa ๐
@tough abyss yes yes yes, maybe
@dusk sage it have arrays?
Ofcourse
Lol
Maybe not in the same sense you're thinking though, if it is C++ based
Ye, quite different
I mean I know nothing about it whatsoever, but I can assure you it'll have the basics which make up any language, regardless what it turns out to be ๐
forEach is a SQF staple, but I'm pretty sure it won't be in anything C++
You can forEach in some senses in C++
forEach is used in other languages
But certainly not in the same manner
^
Quite different tho
^
Beat me to it lol
Ye
select CODE
True that
Well first off it would be in an encrypted format. ...
Ahh
Second, as far as I am aware it is not really in use
If it's the same as TKOM, there is a snippet on BI forums
Idk lol
something something Free software
like half of it is commented out. probably the part that doesn't work
๐
Also, 6 indentation levels ๐
All of them if's, so not even an excuse for it being OO shit.
What's it with you and indentation
I want to be able to read it afterwards.
or then
Okay
Here's the deal
Whether I like Enscript or not
Depends entirely on this one thing:
Does it have elseif
?
If it's C++ based, yes
weeelll
fu2
than*
Why is a variable holding a number named "_isX"?
Strange... but if its less niche, i will be learning sonething for life
Hopefully come enscript we can become normal again, and do if (1) instead of checking equality
private _isBackpack = getNumber (configFile >> 'CfgVehicles' >> (typeOf _inventory) >> 'isBackpack') == 1;
literally I line I wrote before
well double quotes like a normal person
And less parenthesis
Also naming an item "_inventory" is strange
lol
if (getNumber (configFile >> 'CfgVehicles' >> typeOf _inventory >> 'isBackpack'))
Hopefully that in enscript ๐
No, if will only accept booleans and you will like it
Not that learn a niche language dont have their goods, can mean that you is proeminent and this can be presented as a good thing
D:
I want to be a master in... oseudo code lol
So i can master any language
I want to be a master in... oseudo code lol
(needs (more parenthesis))
Especially when it reads it character by character ๐
They are speed boosts, like sonic
They do kinda resemble wings.
if (currentWeapon player != "") then {
if !(currentWeapon player isEqualTo '')
Why do you use single quotes?
Runaway
Why do you SCREAM your booleans?
WHAT
I know style is subjective, but D:
I'm fine with that.
TRUE
== for them classes
Bah, functions