#arma3_scripting
1 messages · Page 450 of 1
You can test missions in local hosted MP with yourself by starting another instance of the game and connecting via "LAN".
Host a LAN game and tab between game instances. It's basically all the MP testing I ever needed.
windows 10's second desktop feature comes in handy with that lol
Lucky you.
Or use loopback with dedi
sup lads, i got a question if y'all don't mind
Just ask the question
Don't ask if you can ask a question, or wait until somebody responds to you
got a script that keeps either working or not and can't figure out why, here it is:
Format it please: #info_help_tips
ads addEventHandler ["InventoryOpened", {
_h = [] spawn {
disableSerialization;
waitUntil { !(isNull (findDisplay 602)) };
button = (findDisplay 602) ctrlCreate ["RscButton",1928];
button ctrlSetPosition [0.05 * safezoneW + safezoneX,0.7 * safezoneH + safezoneY,0.12375 * safezoneW,0.033 * safezoneH];
button ctrlCommit 0;
button ctrlSetText "Call Artillery";
button buttonSetAction "mortar1 doArtilleryFire [pos,'12Rnd_230mm_rockets', 3]";
_action = buttonaction button;
_map = (findDisplay 602) ctrlCreate ["RscMapControl",1928];
_map ctrlSetPosition [0.05 * safezoneW + safezoneX,0.3 * safezoneH + safezoneY,0.2 * safezoneW,0.4 * safezoneH];
_map ctrlCommit 0;
_map ctrlAddEventHandler ["mouseButtonDown", {
_ctrl = _this select 0;
_x = _this select 2;
_y = _this select 3;
pos = _ctrl ctrlMapScreenToWorld [_x, _y];
createMarker ["Marker", pos];
"Marker" setMarkerShape "ELLIPSE";
"Marker" setMarkerSize [50,50];
"Marker" setMarkerPos pos;
"Marker" setMarkerColor "ColorBlack";
"Marker" setMarkerBrush "DIAGGRID";
hint str _action;
}];
};
}];
0h god
Probably going to have be more specific than that in your question...
its seems scary, really isnt, just some ui shit and buttons
the button however, doesn't seem to want to do execute doartillerfire
No. It's things like
Waituntil{!isNull (findDisplay 602};
It's the most reundant thing ever
You add a evh for inventory open
And then you wait for it to be open?
had the waituntil but found it didnt make a difference, ui stuff worked fine without it
Use params, select zero and shit is awful
button is a shit global variable name, and it should also error for putting a CONTROL in one.
i know, its still in early stages, that'll be changed, but the button seemed to be fine with controls, since it can execute hints and everything
But why write it if it errors?
don't think the button gives any errors tho. it just simply will execute the code to no effect.
sometimes effect, which is even weirder
Yes, button is a global variable name, and it will create a popup error if you store a CONTROL in a global variable.
Something about disableSerializtion which makes no sense, but it will error.
right I see
The whole script is scheduled and even a local variable requires the serialization to be disabled.
Another only semi related problem.
doArtilleryFire is one of those wonky ai commands. It orders the ai to fire, but maybe their fsm has other plans and nothing will happen.
I had a feeling that might have been the case as well
since the code seemed to work with some players, but not others
as in, before the button it was simple scroll wheel option of:
ads addAction ["Call in Mortar", {mortar1 doArtilleryFire [pos,"12Rnd_230mm_rockets", 3]}];
which worked fine for some players on a dedicated but not others
What is mortar1?
that would be the variable name for the mortar that would fire, the one with 230mm, ads is the variable of the player its being applied to
pos being the pos set by the marker ui before
Editor name? And is it of the mortar vehicle or the gunner?
mortar1 I mean. Is it the vehicle var name set in the editor?
But it has a gunner? And is the gunner in a group or is the gunner it's own group leader?
it's spawned with full crew all in a team, don't remember who i set as group leader
So it's spawned by script? Maybe the mortar1 variable is not synched.
nah its properly synched
but still, I've literally been able to work with the script fine in editor, but feel like as soon as you try and apply it in multiplayer doartilleryfire module fucks itself over
The mortar is created on the server right? Gunner local to the server. Because maybe doArtilleryFire only works for the local machine.
yea its on the server
Now you're saying it doesn't work in MP and only in SP. Before you said it sometimes worked in MP 🤔
still stands true, sometimes works, sometimes not, can't find logic to it really
Try executing doArtilleryFire on the machine that owns the mortar/mortars gunner/gunners group leader.
applied the command to one player, was not able to order it to fire, followed by about 20 mins later gave it to another guy who used it just fine
Well, do what I suggested. If it doesn't work then doArtilleryFire is just shit. There's been a few people asking about that command.
cool, I'll try it. if not thats another idea off the list 😛
tbh I'd just spawn in the arty shells.
yeah, probably gonna have to stick to that
unless the post on armadev reddit for converting editor module thing works for him
Could use
private _position = _origin getPos [_radius * random [- 1, 0, 1], random 180];
to create a random positon for impact by using normal distribution. I just wrote this for something related.
pos and ads etc. are ballsy names for globals.
does the current arty shell module have the randomisation already?
Idk, the modules are written like crap most of the time, it's probably broken lol
yeah i know, its shit i've used in a code before that has worked and stuck as a go to for some reason, i change em later to make more sense dont worry 😃
I never understood this though. Many people seem to do it. Write their code twice or more for no reason. Seems like twice the work.
well, theres two stages to trying to add new modules for me really, screwing around to see what works, and then actually giving it proper structure and variables
¯_(ツ)_/¯
I outline what I want on paper (or text file for quick things) and then go to town.
its kind of shit when you spend extra 15 mins on a code giving it proper structure and variable names only to find it never had a chance 😛
or theres a better option
some random function somewhere in gamefiles that already does it
Eh, maybe it's a learning experience.
anyone got a clean layered addaction menu with a submenu or two?
That sounds horrible to use. Why not create a proper ui?
Talking to me m8?
you got ares?
Yeah, Slay. That sounds clunky.
with ares its a simple function called Ares_fnc_showChooseDialog
but yeah it would be clunky, but i just need it to say Drones on the one then have 3 sub options for different types, and I'd use ares if I didn't have so many required mods as is 😦
If you know neither how to make a menu with addAction, nor how to make a custom ui, and want one. Why look for the inferior of the two? And if you want to learn how to do it yourself, why choose the harder and inferior one?
Feel like learning to make a UI option would be the harder of the two options since addaction is some code and I'm asusmng a UI would need some sprites and whatnot
Sprites? What?
If it's just buttons, they can be mono colored and that doesn't need any textures.
Sprites as in 2d graphics.
Yes i know. But i don't understand where that came from
Well, a menu is 2d, and things have textures. Other games say sprites to this.
I'm not sure how I'd do a UI if I had the option of setting one up tbh
addAction's that allign in a menu sounds like a pita to write.
How should this menu be opened?
I've seen them exist before, where one opens a sub addaction menu with various options but i can't find an easy one to strip and repurpose
Yeah, but people have lots of bad ideas. Doesn't mean you have to emulate it.
I just need it to say "Drones" under the general scroll menu then open an option with 3 subs
Okay, gimme a minute. I can't start my game, so you'll have to do the testing...
3 execVM menus to be precise
I got it open atm
basically ready to slap something in and test lol
player addAction ["Drone", {
// forces unscheduled, because ui
isNil {
private _mission = uiNamespace getVariable "RscDisplayMission";
private _display = _mission createDisplay "RscDisplayEmpty";
private _width = 0.1 * safezoneW;
private _height = 0.1 * safezoneH;
private _button1 = _display ctrlCreate ["RscButton", -1];
_button1 ctrlSetPosition [
0.19 * safezoneW + safezoneX,
0.5 * safezoneH + safezoneY,
_width, _height
];
_button1 ctrlCommit 0;
_button1 ctrlAddEventHandler ["ButtonClick", {
hint "button 1";
}];
private _button2 = _display ctrlCreate ["RscButton", -1];
_button2 ctrlSetPosition [
0.3 * safezoneW + safezoneX,
0.5 * safezoneH + safezoneY,
_width, _height
];
_button2 ctrlCommit 0;
_button2 ctrlAddEventHandler ["ButtonClick", {
hint "button 2";
}];
private _button3 = _display ctrlCreate ["RscButton", -1];
_button3 ctrlSetPosition [
0.41 * safezoneW + safezoneX,
0.5 * safezoneH + safezoneY,
_width, _height
];
_button3 ctrlCommit 0;
_button3 ctrlAddEventHandler ["ButtonClick", {
hint "button 3";
}];
};
}];
Idk, something like this.
Could be more creative with the names. But idk what these do so fill in the blanks.
will brb gonna mess around with it
does <t color='#a4d1f0'>Deployed Recon Drone</t> work even in hints or only addactions
I supposed hints don't need colored
but for future refrence
I have no idea, but you could always create your own structured text control and not use hint.
hintSilent parseText format["<t size='1.25' font='Zeppelin33' color='#ff0000'>%1 lives remaining.</t>", 12];
apparently this is a thing ^
So those buttons popped up but they were featureless and textless, pretty cool so far, but how should I go about adding text to them?
_button ctrlSetText "blah";
They should print a hint if you click them. That's kind of a feature.
Unless that part didn't work.
It did but it was guessing what they were basically
Well, whatever they should do goes into their code blocks.
Currently it's just "hint", because you can have them do whatever you want. The ui scripting is pretty versatile in this game.
hnmm i busted it somehow renaming the buttons
i gotta start over
unsure why that broke it
wots the easiest way to close these?
_drone_button2 ctrlSetPosition [
0.3 * safezoneW + safezoneX,
0.5 * safezoneH + safezoneY,
_width, _height
];
_drone_button2 ctrlCommit 0;
_drone_button2 ctrlSetText "Deploy Medic Drone";
_drone_button2 ctrlAddEventHandler ["ButtonClick", {
hint "Deployed Medic Drone";
player execVM "scripts\slays drones\medic_drone.sqf";
closeDialog 2;
}];```
tried
```closeDialog 2;```
and
```closeDialog _drone_button2 ```
for example called from the area that closeDialog 2; is
Where might I jam that in? where I had closeDialog 2;?
params line one od the buttonclicked code block.
closedissplay wherever you want to close it.
params is just to define the variable for the button control.
so having the private _drone_button2 = _display ctrlCreate ["RscButton", -1];
doesn't make it work?
In the buttonclicked code block, no local vars are carried over.
All of these gui buttons are brand new, as of a few minutes ago when you helped me lol
i gotta still see if this stuff even works with another client, I've dumped this much time into converting it to buttons lmao
I don't see why not. ui scripts are all local.
indeed, tested it with another client on local and it's working on one player and keeping the others movement intact
fast learner : )
i can't get the close to work still lmao, should i be calling that from my drone file instead of the button itself?
i can't get the close to work still lmao
close display with button ?
/*
_drone_button2 ctrlAddEventHandler ["ButtonClick", {
hint "Deployed Medic Drone";
player execVM "scripts\slays drones\medic_drone.sqf";
closeDialog 2;
}];
*/
_drone_button2 ctrlAddEventHandler ["ButtonClick", {
params ["_control"];
ctrlParent _control closeDisplay 0;
hint "Deployed Medic Drone";
player execVM "scripts\slays drones\medic_drone.sqf";
}];
oh... btw
commy2 - Today at 08:14
params ["_drone_button2 "];
ctrlParent _drone_button2 closeDisplay 0;
so literally it's params ["_control"]; ctrlParent _control closeDisplay 0;
yes, also rename slays drones to slays_drones or anything without space
yes
I never had an issue with the space in there, should i be concerned :O?
the closing works as intended btw ty m8's for the help, i think that's all i'ma do tonight
afaik file/folder names can't handle spaces so it will be another symbol, same as with mission file and "%" (not 100% sure)
I thought doing the "text in between here is excluded from case sensitivity/directories"
either way it works tho doing it with the space in the folder, if i run into issues down the line i'll keep it inmind and change it
@meager heart arma filesystem paths can handle anything. Even emoji if you wanted..
Commy helping people at 4AM.. Man.. I don't feel bad for sleeping and missing all that D:
He just doesn't want to loose his place as guy with most written messages in this discord to me
i know about emojis (saw only one >\☠) , but i'm not sure why mission file with whitespaces will have %🤔
@still forum
Because... Arma ¯_(ツ)_/¯
sad_face.paa
Is it possible to set a nested arrays value without setting the whole root array at that index? For instance _arr1 = [[A, B, C],[D, E, F],[H, I, J]] How can I change 'E' to a 'Z' without just doing _arr1 set [1, [D, Z, F]]?
mayyybe like that
_subArray = _arr1 select 1;
_subArray set [1, Z];
(not sure though)
Will _subArray actually be a pointer to the slot in _arr1 or just now be it's own single dimensional array? (thats what I'm trying to avoid if possible)
I was thinking of doing _arr1 param [1] set [1, Z] but I feel like I'll have the same issue where it's not actually setting the value in _arr1
_arr = array1 is a pointer
_arr = +array1 is a copy
Okay awesome, thanks Lou! As soon as I get over this one issue I'll be able to go to bed -_-
good luck 😄 👍
I know I am asking scripters but is $100-300 per hour a decent amount for development? 😛
I mean, I am literally paying a lot.
Yes it's decent. #creators_recruiting if you want to recruit someone. Good luck
just be wary of some people
That is what I am having to do yeah.
Someone from another community that had developers tried to scam me 😛
The scam-train can run both ways...
It is like, I have done development/scripting since 2012 for the ARMA series (primarily ArmA 2 when that was actually popular) so I know when I can see bad code.
Fuck you. 😛
If you are implying that I am a fraud, you don't need to blurt it out.
That is just vile and rude.
I'm just saying, do you have proof that you're genuinely able to pay?
Yes.
Tons of people who were coding in Arma 2 literally write the worst code. Because they don't know the new Arma 3 stuff.
Exactly, that is why I am not writing my own stuff.
And I have to deal with a lot of other stuff.
Ever heard of Dami? 😛
@tough abyss watch your tongue please. No need for the F word.
Dude literally is implying that I am a scammer .-.
Also, @still forum I didn't see a rule that said no swearing?
I read the BIStudio Guidelines
Also, you aren't a moderator from what I can see.
You're coming across as very young and abrasive or at the very least highly immature. Good luck finding someone willing to work for you.
Well I didn't ask you to do a psychological evaluation of me, but obviously you are a nitpicker.
Have fun, doing whatever you do.
Styxx stirring shit in every single channel, reeeee
anyway, nothing to do with #arma3_scripting right now.
Yes, about the a2 devs being bad in a3
Inarea etc.
Are a godsend
But many people still don't know about em
@winter rose I just ran a test regarding the nested arrays. _arr1 param [1] set [1, "Z"]; Actually works!
w00t! thanks for your feedback 🙂 👍
Your suggestion worked as well so I guess it's just shooters preference at that point haha
yeah, I just wasn't sure how Arma dealt with array within array refs. good to know one can get through with this way
if there are no default values, data types cheks with param... maybe just
(_arr1 select 1) set [1, "Z"];
🤔
Yep, that's pretty much exactly what I had done. Here's my test harness for reference:
_arr1 = [["A", "B", "C"],["D", "E", "F"],["H", "I", "J"]];
if(true) exitWith
{
_text = format ["Hopefully E: %1", _arr1 param [1] param [1]];
[_text, "new_fnc_MPHint"] call BIS_fnc_mp;
diag_log _text;
//_arr1 param [1] set [1, "Z"];
_subArray = _arr1 select 1;
_subArray set [1, "Z"];
_text = format ["Hopefully Z: %1", _arr1 param [1] param [1]];
[_text, "new_fnc_MPHint"] call BIS_fnc_mp;
diag_log _text;
};
Thanks for the tip! Three weeks ago I'd never laid eyes on SQF. Now it haunts my dreams...
you can use # instead of select now
whys that 😉
Because it's also used in the preprocessor
It's a relatively new syntax right? Since 1.82 according to the BIS wiki... Which is the most recent one lol. New things are evil! Continues scripting for Arma in punch cards
Why would the preprocessor be a negative reason for using it to reference an array index? As long as it's not followed by a keyword the preprocessor should happily leave it alone... Though I will say on a personal note that I might agree with the sentiment to not use it lol
Well not in sqf at least. Lmao that'd be annoying
@winter rose you shall not make jokes
they might become true 👀
i thought @ was select 😦
@tough abyss #rules. Read them. I know.. You said you did read them in #general_chat_arma. Still 17 minutes later after you said you read the rules you broke literally rule number 1. Which I already told you about over an hour before that. So I'm sure you didn't read them properly yet.
Yeah I am not a Moderator.. And? There is a rule stating I have to report rule violations. Would you prefer that I tell you that you did something wrong and give you the ability to fix it and not do it again.
Or should I call a moderator immediately that takes care?
@viral gust # itself is a preprocessor keyword. used to "stringify" things.
Hello, I have a question. I want to use zombies from Breaking Point in Exile, but the zombies are using FSM. I know what a FSM is, but how would I start porting this over to Exile? I need some general guidelines on how to do that, thanks 😃
FSM is a "Finite State machine" basically SQF script wrapped in plastic.
Porting over.. I would say.. Copy-paste?
I don't know if the breaking point license allows just taking parts of their stuff and copying them though..
Yes that's allowed 😃 You can look on their Steam Workshop page
Thanks... So there is the FSM file... Does that need to be called from somewhere? Because basically right now I get zombies to spawn but they just stand still
Porting something is a very specific thing. It always depends on "from where" and "to where". You won't find a guide on how to do exactly that.
And the general porting stuff guideline is "copy-paste it over"
I don't know how Breaking point does it. Usually the FSM is defined in the units class and it calls it by itself. I think
_var[index] plz
[09:58] Dedmen: Commy helping people at 4AM.. Man.. I don't feel bad for sleeping and missing all that D:
The 24 hour cycle is not for me. I fall asleep tired as fuck Wednesday after I come home and wake up 11pm and pull an all nighter. It's almost every week.
Have a guy in my class that only sleeps every other day... Must be awesome
I also skip meals friday. I'm a weirdo.
So there is the FSM file... Does that need to be called from somewhere?
it calls it by itself
also it calls byexecFSM "something.fsm";😀
Why are you talking about FSM? Just don't bother with it, it offers nothing of value and only obscures things.
was question about it, there ⤴
English?
yes ?
Ah, seems like an Exile dev wasted their time with this.
fsm's "in action"... that is from BI end game mission https://imgur.com/a/cpw5azR
This is stupid.
also we have EndGame_OnObjectiveStateChanged scripted EH... dont know why fsm's there 🤷
That fsm looks like it does the same exact thing 10 different states.
if (_direction > 0) then {_direction = -0.04} else {if (_direction < 0) then {_direction = 0.04};};
Just perfect...
@unborn ether I think my brain is fried from that. Thanks.
Jesus.
player in player
^ what for?
If(player in player) then
{
waitUntil{true};
while{true} do
{
};
};
🔞
is it not player != player for JIP, or didJIP, etc.?
If(player != objNull)
?
no, objNull is different from objNull 😄
isNull objNull; // true
objNull == objNull; // false
Yeah but the first line is different
?
player will always be different from objNull, you should check isNull player if you want to know if player is objNull
Yup it will always be true, (player != objNull) that is.
intended 😄
condition = player getVariable "cheater";
if (condition == true) then {
hint "you should probably try that again";
sleep 2;
player setpos (getpos mazetrigger);
};
gives me error
'...er getVariable "cheater";
if (condition == true) then {
hint "you should proba...'
Error Generic error in expression
Number,Object,side,group,Text,Config entry, Display (dialog),Control,Network object,Team member,Task,Location
even though player setPos(getPos mazetrigger) works
what am I doing wrong?
If(condition)
//not
If(condition == true)
^ no can do boolean comparison
one can. But it just doesn't make sense
even if, sometimes for human readability, it could be welcom
At some point you'll end up at condition == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true == true
lol
nah, escalation argument ^^
but this ^ very example from montarion is quite precisely where it can be useful:
if (player getVariable "isCheater") then {
vs
if (player getVariable "isCheater" == true) then {
vs
private _isCheater = player getVariable "isCheater";
if (_isCheater) then {
Lol
But the first and last will actually continue (not error) in case the variable is nil or something not boolean, where as your second gives an error.
okaaay, add parenthesis if you will
?
if ((player getVariable "isCheater") == true) then {
if you scroll back I know that this code ^ will give an error (bool == bool), but for human readability it is quite welcome
add there defaultValue ^
Ah yeah, completely forgot you can't even compare even if one is bool
if (alive player == alive john) // either both are alive or dead... no can do
Yeah it bit me a back while on something like: if (_isActive != _shouldBeActive) then { // Toggle };
== true
Only valid if (isCheater isEqualTo true)
Because it also checks type
== true in the trash
silly question, but how can i check if a group exists? specifically, i want to run some code on the units in a group if it exists, but if nobody has slotted in the group I want to avoid a server error; I am trying this, but it doesn't quite work:
if (!(isNull fth_grps_blu_th)) then {
if (not isNil "groupName" && { not isNull groupName })
I'd say
the group var isn't even initialised on the server if it is empty, it gets deleted
_group isEqualTo grpNull 🤔
check for var with isNil first
thanks both - but neither approach works
if (not isNil "groupName" && { not isNull groupName }) can't ever work 😄
Or can it?
The not's are confusing me
if (!isNil "groupName" && {isNull groupName) That's the same right? ^^
nope
😄
isNil checks that the var exists, where isNull checks the var state
btw what error there ?
zero divisor
can you pastebin plz?
wait - hang on
(don't wait - I am going to try something)
thanks all - saw the issue: the var for the group had been declared already, so it was never null - but it could return 0 for 'units', so I made that the check; all good now 😃
hey @little eagle you here?
thanks @gleaming oyster ! okay, no booleon comparisons
Empty groups are by default not autodelted btw
But they shouldn't be created at all if no one is in the mission slot
Ungroup, and skip lobby. If you need role selection do it ingame 🤷
In MP the command [player] is not initialised in functions called by initline or init eventhandlers does that mean it would work if I put it in a sqf file and called that from init?
no
in functions called by initline or init eventhandlers
So you think in functions called by functions called by initline or init eventhandlers is fine then?
anyone got SQF Encryptor?
sure
Does remoteExec-ing something from the server to the client trigger the battleye filter? (if the function is indeed blacklisted)
@high prism The filters only apply to clients
Server can call anything on the clients as he wishes
So if I lets say remoteExec a function from the server (that is blacklisted on the client) to a client of my choosing, it won't trigger the filter?
No
Only if a client tried to remoteexec a blacklisted function anywhere but on himself (executing on yourself might kick you aswell, I'm not sure about how intelligent remoteexec is)
So if a client remoteExecs a function it'll trigger, but if the server remoteExecs the function for the client it won't trigger.
pretty neat :>
thanks a lot man
Basically the filter doesn't punish who runs something blacklisted but the one who tells others to run it
Except the server
The server can tell anyone to run anything
(the remoteexec filter)
player getVariable ["isCheater", false];
``` forgot that one Lou 😉
don't worry, it was for example
private _options = [life_settings_enableNewsBroadcast,life_settings_enableSidechannel,life_settings_tagson,life_settings_revealObjects,life_settings_showinPhonebook];
{
if (isNil (str _x)) then {
(_options # _forEachIndex) = profileNamespace setVariable [(str _x), true];
};
} forEach _options;
``` this should work right ?
no
BALLS
i dont want to modify the array, just the variable that is in the array if you know what i mean
There are no variables in that array
Only values that were stored in the variable when you created the array
ah shit
you cannot pass a variable anywhere. Besides isNil STRING and getVariable and... Can't think of any other that access a existing variable
if (isNil "life_settings_enableNewsBroadcast") then {
life_settings_enableNewsBroadcast = profileNamespace setVariable ["life_settings_enableNewsBroadcast", true];
};
``` so will have to do it like this then xD
Or...
You put the variable names into the array
and use setVariable to set the missionNamespace one
hmm
true
private _options = ["life_settings_enableNewsBroadcast","life_settings_enableSidechannel","life_settings_tagson","life_settings_revealObjects","life_settings_showinPhonebook"];
{
_var = profileNamespace getVariable [_x, -1];//defaulting to -1 so we can see if it exists.
if (_var isEqualto -1) then {
profileNamespace setVariable [_x, true];
};
} forEach _options;
``` something like that ?
i just chucked it together
xD
better then iz=2
you wait. it will become a thing xD
You are summoning bad things. Please stop.
.hpp File:
action ="
closeDialog 0;
_Display = findDisplay 4561234;
_Control_FPPLocked = _Display displayCtrl 2800;
_Control_MineHints = _Display displayCtrl 2800;
_Control_MapInfo = _Display displayCtrl 2800;
_Control_FriendlyTags = _Display displayCtrl 2800;
_Control_Fatigue = _Display displayCtrl 2800;
_FPPLocked = ctrlChecked _Control_FPPLocked;
_MineHints = ctrlChecked _Control_MineHints;
_MapInfo = ctrlChecked _Control_MapInfo;
_FriendlyTags = ctrlChecked _Control_FriendlyTags;
_Fatigue = ctrlChecked _Control_Fatigue;
_Channels = ctrlText 1401;
_ViewDistance = ctrlText 1400;
0 = [_FPPLocked, _MineHints, _MapInfo, _FriendlyTags, _Fatigue, _Channels, _ViewDistance] execVM ""Scripts\Admin Menu\Kits\Settings.sqf"";
";
Settings.sqf:
_FPPLocked = _this select 0;
_MineHints = _this select 1;
_MapInfo = _this select 2;
_FriendlyTags = _this select 3;
_Fatigue = _this select 4;
_Channels = _this select 5;
_ViewDistance = _this select 6;
hint "Exporting Options";
sleep 5;
hint format ["%1 %2 %3 %4 %5 %6 %7", _FPPLocked, _MineHints, _MapInfo, _FriendlyTags, _Fatigue, _Channels, _ViewDistance];
//Map Information and hints
QS_ST_map_enableUnitIcons = _MapInfo;
QS_ST_enableGroupIcons = _MapInfo;
systemChat str _MapInfo;
//Name Tag Removeal
QS_ST_gps_enableUnitIcons = _FriendlyTags;
systemChat str _FriendlyTags;
sleep 2;
0 = execVM "Scripts\Dialogs\Settings Menu\SoldierTracking.sqf";
Returns _MapInfo & _FriendlyTags False everytime.
the closeDialog at the start. Is that the dialog you are getting the data from?
Why the 0 = ? That's completly useless.
Why don't you use params?
params ["_FPPLocked", "_MineHints", "_MapInfo", "_FriendlyTags", "_Fatigue", "_Channels", "_ViewDistance"]
Well. You are closing the dialog.
You won't be getting the state of the checkbox that you just deleted
regarding the 0 = I have been told to always put that there, can't remember who tho
It's wrong.
Don't
You should maybe get the checkbox state before deleting the dialog containing the checkboxes
It's worked for other things, like ctrlText, closing thedialog last
I gotta close it somehow 😛
First leave the car. Then try to turn the engine off? 😄
Yeah yeah 😛 I have done that before, hence why I stated it worked with text, obviously i'm dumb and didn't spot I placed it at the start lol
Silly error
but you watch
it will for some reason
not work
But atleast you now learned that 0= is useless. And that you can use params to make your code alot easier
Yeah! 😄
Atleast it was worth it
so many scripts with 0 = xD
so execVM [] "File"; works fine?
no. [] execVM "File" you swapped the []
so many scripts with 0 =
tell me about it. the biki is filled with those
you only need 0 = in script fields in the Editor. And also only without CBA. Because CBA fixes that silly bug that BI doesn't wanna fix
Ugly work around, not fix. I wish.
did you try adding a hint or diag_log?
still false inside the action code? Although the display and control are correct?
You are only checking a single checkbox
but you put them into 5 differently named variables?
Char limit is only 2000
The main parts are the map and friendlytags
The rest can wait
but I can't cpoy and paste everything
all of them come from control number 2800
no they don....
According to your script they do
I have gotta stop copy and pasting lines
hmm
Could you have a quick look if you're free, I can't seem to work out why >.<
I'm not free. I'm a fox
haha
hey, how can i make that if i click a button it will link me to a site in the browser\ to teamspeak?
you have the checkboxes 2800-2804 So you have 5 checkboxes. Maybe you should check each once. Instead of checking the first checkbox five times.
I changed that
@verbal knoll In Arma? I don't know if external links work. I'd guess they don't
280X
href
yes but how do i make it on the button click
href you can't. You have to make a clickable label afaik
ik
action ="_Display = findDisplay 4561234; _Control_FPPLocked = _Display displayCtrl 2800;_Control_MineHints = _Display displayCtrl 2801;_Control_MapInfo = _Display displayCtrl 2802;_Control_FriendlyTags = _Display displayCtrl 2803;_Control_Fatigue = _Display displayCtrl 2804;_FPPLocked = ctrlChecked _Control_FPPLocked;_MineHints = ctrlChecked _Control_MineHints;_MapInfo = ctrlChecked _Control_MapInfo;_FriendlyTags = ctrlChecked _Control_FriendlyTags;_Fatigue = ctrlChecked _Control_Fatigue;_Channels = ctrlText 1401;_ViewDistance = ctrlText 1400; [] [_FPPLocked, _MineHints, _MapInfo, _FriendlyTags, _Fatigue, _Channels, _ViewDistance] execVM ""Scripts\Admin Menu\Kits\Settings.sqf""; closeDialog 0;";
};
lol
Why would you do this to yourself?
holy shit
you could just pass the display as argument to your function
I mean...
and remove all that crap from the action string
yeah but still, will it fix my issue?
https://community.bistudio.com/wiki/ctrlChecked says you need CT_CHECKBOXES control in plural.
https://community.bistudio.com/wiki/cbChecked that takes CT_CHECKBOX singular
action = "\
_Display = findDisplay 4561234;\
_Control_FPPLocked = _Display displayCtrl 2800;\
_Control_MineHints = _Display displayCtrl 2801;\
_Control_MapInfo = _Display displayCtrl 2802;\
_Control_FriendlyTags = _Display displayCtrl 2803;\
_Control_Fatigue = _Display displayCtrl 2804;\
_FPPLocked = ctrlChecked _Control_FPPLocked;\
_MineHints = ctrlChecked _Control_MineHints;\
_MapInfo = ctrlChecked _Control_MapInfo;\
_FriendlyTags = ctrlChecked _Control_FriendlyTags;\
_Fatigue = ctrlChecked _Control_Fatigue;\
_Channels = ctrlText 1401;\
_ViewDistance = ctrlText 1400;\
[] [_FPPLocked, _MineHints, _MapInfo, _FriendlyTags, _Fatigue, _Channels, _ViewDistance] execVM ""Scripts\Admin Menu\Kits\Settings.sqf"";\
closeDialog 0;\
";
I'd say put your scripts in SQF files and not config, but here's a tip. You can escape newlines in config with a backslash.
Seeing that you have multiple singular checkboxes.. You are probably using the wrong commands.
You immediately see that this statement is broken:
[] [_FPPLocked, _MineHints, _MapInfo, _FriendlyTags, _Fatigue, _Channels, _ViewDistance] execVM ""Scripts\Admin Menu\Kits\Settings.sqf"";
Syntax error.
I deleted that in paste bin by accident while switch 0 = execVM
Enable showScriptErrors and you'll see that next time
How are we supposed to help you. If you don't show us your code while saying "here is my code"?
I thought that i'll switch so he doesn't say to me to switch in again
I have shown you it in a pastebin
hey @little eagle remember the doartilleryfire thing we talked about last night?
Yes.
do you think it could be a possible fix with remoteexeccall and do it both server and every client?
[_mortar, [_position, _magazine, _rounds]] remoteExec ["doArtilleryFire, _mortar];
If you use CfgRemoteExec, white list doArtilleryFire.
since it will no longer be the player ordering the fire, but the server?
@still forum https://pastebin.com/p6RTWap4 here it is agian if you could find it 😉
since it will no longer be the player ordering the fire, but the server?
Not it's even more flexible. You order on that machine that owns the mortar. That way, it should work in every possible case.
I wasn't sure if you saw it because you said "If you don't show us your code"
Yeah
you didn't show us your code
you showed us a similar version to your code. That was broken.
You should show us the actual code you are using. Showing us something else won't help
Why does no one listen to me?
[] [_FPPLocked, _MineHints, _MapInfo, _FriendlyTags, _Fatigue, _Channels, _ViewDistance] execVM ""Scripts\Admin Menu\Kits\Settings.sqf"";
This statement is bugged and breaks the whole script.
I reposted the link, did NOT update it as I wasn't sure if he listened to me, and on that, I did change it. I'm not trying to be arsy guys, you're the ones helping me
I do appreciate itm i'm making the changes locally
Wait, I don't get it. Why are you reposting it if you no longer use that?
He asked for my code, so I reposted the same link, I mean, it's not hard to skip over that one thing you corrected
But apparently it isn't you code anymore.
@little eagle cool, I thought it could be a solution since another module used that type of execution. So for it to work I just have to define all of those parameters before in my script?
Yeah, you'll have to edit the local variables according to your script.
I just posted generic placeholder names. Descriptive ones. Basically what I'd use in a script for this from the beginning.
Certainly not global variables with ballsy names like pos.
^ ballsy placeholder variables 😛
I was talking about my button and pos
Okay, forgot you're determined to write this twice. 😛
god save find and replace
god save regex mode
_position = get_position player
that looks like intercept code 🤔
god save the save button without which all our code would be lost
amen
Edited the code so you know what to ignore, just the main parts are left, check comments - https://pastebin.com/BccP2vvJ
Imagine the guy that had to invent the save button. What a genius. He couldn't ever save his efforts until he was done.
Becuase it works
it doesn't make sense though
but why?
one moment
May I ask what the problem is and what I have to look for?
What returns false?
ctrlChecked inside the action script
checkboxes, sorry forgot you've jsut joined
Already asked if the display and the controls are valid. And I got a "yes" back
Okay, I believe it.
How is UserSettings created?
I'm using createDialog
Then closeDialog is correct.
Okay, while trying to debug this, what is really annoying is the backwards naming of the controls.
RscCheckbox_2800
I'll just be sitting here and waiting on results for cbChecked
I can re-order them if it makes it easier?
Controls named after their idcs...
Usually you do it the other way around. Give them a reasonable name and then use a macro reflecting that name for the idc.
"ctrlChecked works though
Just keep using that"
You are calling a command for checkboxes control on a checkbox control.
instead of using the command for checkbox control.
yeah
Just as 0=
everything works perfectly
which is why you are here and seeking help right?
.<
switch it and get back to you?
cbChecked for RscButton is what I do.
Idk what cb is for. CheckBox?
https://community.bistudio.com/wiki/cbChecked Why think wrongly if you could just read correctly?
yeah I guessed that
but I read somewhere that it was for that reason I jsut said, so I went with it
on a fourm post, not a wiki post 😛
guess that teaches me
We cannot curate bullcrap forum posts.
inb4 the wiki is wrong and this is for CT_BUTTON as well as CT_CHECKBOX.
We can curate bullcrap wiki pages though and fix them.
i use rsc tho
Same thing.
@little eagle so something like this would work?
_butt buttonSetAction "[mortar1, [getMarkerPos 'TarMark', '12Rnd_230mm_rockets', 3]] remoteExec ['doArtilleryFire', mortar1];";
I see
I don't see why not, Don. Unless doArtilleryFire really is bugged, or as I said, overwritten by another doX command executed from the units danger.fsm or some other ai script,
thanks ma dude, not all hope is lost in the command
I lost it already, because you're like the fourth guy coming here having problems with a script desgined around that command.
I don't know.
Alright
I use cbChecked for RscCheckBox.
I'll give it a try
Did I write button? I meant RscCheckBox .
Yeah. Multiple times 😄
maybe I'm going insane ¯_(ツ)_/¯
I was confused why a button involved checkboxes, but I presumed someone would ahve picked up on it if it was wrong haha
I wonder what the difference is between cbChecked and ctrlChecked.
Seems like cbChecked is for CT_CHECKBOX
And ctrlChecked is for CT_CHECKBOXES
Which are great names in fucking deed.
depends on your defines then I guess
Yep works now
CtrlChecked seems to always return false then
Orrrrrr
No, you're using CT_CHECKBOX, but ctrlChecked is only for CT_CHECKBOXES.
I ahve my defines differently
^^ just said that 😛
I made my defines, didn't grab a copy pasta one
well kinda did
but lik
I adjusted it all
for only what I needed
You don't "make your defines", that's dumb. You just include a file from the base game.
Or copy paste the file in case description.ext, because that one is still bugged.
Again, I was told to make a new file with the defines you need, saw a video on it.
Damn it
I guess you should seek new tutorial sources...
This was wayy back when I first attempted GUIs like last year, got back into them a month ago
Is there a single good tutorial on this though?
I guess I should
I don't think there is
lol
wouldn't it be nice if we had good and curated tutorials on biki?
They all expect you to redefine all the base classes and memorize magic numbers. And no one ever questions that.
Like the really good modeling tutorials on... third party wikis... That are not on biki because.... ¯_(ツ)_/¯
Could at least link them tbqh.
"\a3\ui_f\hpp\defineResincl.inc"
This one has all the CT_STATIC etc.
but have to keep in mind that you can't in description.ext because BI has a bug and refuses to fix it
I'm starting to see a recurring pattern here...
@still forum @little eagle Thanks for you patience and help with this. Sorry I was being silly, still learning and such. Thanks again 😄
Yeah, I'd just copy paste the file to
hpp\defineResincl.inc
in my mission and then
#include "hpp\defineResincl.inc";
in the description.ext
You weren't silly. Atleast not in comparison to the other silly people that visit this channel
xD
Cheers
You can skim the other files in that folder. It has pretty much all the macros you'll ever need for editing ui,
Cheers 😄
And here is the most awesome thing no one uses for description.ext ui editing:
Note line 1. You can generate a header file that has all the addon config base classes for mission config.
I suppose that is what you're meant to use if you're doing description.ext, since they apparently can't be arsed to fix the include bug on dedicated servers.
@little eagle it is nice making your own defines for controls if you use them multiple times tho
if you want to change some stuff on specific controls
but you use them multiple times, but dont want to edit the base class.
Idk, changing what CT_CHECKBOX is actaully sounds like a recipe for desaster long term.
yup
so I make my own version of that control >> and use that one.
instead of adding all the edits to each control
The only defines I use in dialogs/gui is for making broad adjustments to the style itself. E.g.
#define UBER_CTRL_WIDTH 0.16
#define UBER_CTRL_HEIGHT 0.030
#define UBER_CTRL_LEFT (safezoneX + safezoneW * 0.7 - UBER_CTRL_WIDTH - 0.05)
#define UBER_CTRL_TOP (safezoneY + safeZoneH - 4 * (UBER_CTRL_HEIGHT + UBER_CTRL_SPACING) - 0.08)
#define UBER_CTRL_SPACING 0.008
#define UBER_CTRL_FONTSIZE 0.026
#define UBER_CTRL_BACKGROUND {0.8, 0.4, 0.4,0.6}
#define UBER_CTRL_BACKGROUND_FRAME {0.8, 0.4, 0.4,0.2}
#define UBER_CTRL_TEXT_COLOR {1, 1, 1, 1}```
I'm having trouble imagining what you mean and why you don't just use base classes, but maybe I'm missing something.
left top width height
I like it.
class XPhoneIconControlButton : Life_RscButtonMenu
{
text = "";
w = 0.02475 * safezoneW;
h = 0.044 * safezoneH;
animTextureNormal = "#(argb,8,8,3)color(0,0,0,0)";
animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0)";
animTextureOver = "#(argb,8,8,3)color(0,0,0,0)";
animTextureFocused = "#(argb,8,8,3)color(0,0,0,0)";
animTexturePressed = "#(argb,8,8,3)color(0,0,0,0)";
animTextureDefault = "#(argb,8,8,3)color(0,0,0,0)";
colorBackground[] = {0,0,0,0};
colorBackgroundFocused[] = {0,0,0,0};
colorBackground2[] = {0,0,0,0};
color[] = {0,0,0,0};
colorFocused[] = {0,0,0,0};
color2[] = {0,0,0,0};
colorText[] = {0,0,0,0};
colorDisabled[] = {0,0,0,0};
};
this is one of my defines
That's not a define.
its not a control.
Sure looks like one.
nope
Yes it does. Anyone agrees?
its just a edited base class
I am guessing that parent class defines the necessary missing properties, like idc and style, and that makes it a control to me (e.g. have all the minimum necessary properties needed for a control)
Looks like a control to me. I don't see why a control cannot be a base class, but include's certainly cannot be base classes.
I just use these as parent classes for all my icons.
That's a good thing, but that's no longer a define.
They are classes. And since you inherit else from them they are also "parent classes" but they are not #defines
Yeah. And it's not even an either or thing. You can use base classes with macros.
You just don't.
If you were, instead of writing ugly "#(argb,8,8,3)color(0,0,0,0)", you'd write nice ProcTextTransparent for example.
Color_Empty not {0,0,0,0}.
etc.
if I've saved a gui in one the config files linked to description.ext, how would I open that from the editor?
Open what?
open the gui for editing in GUI editor?
I don't think the gui editor can do that.
i tried doing ctrl i and it asks me for config path
Just get a pencil and ruler and design it that way. Seriously.
@little eagle you're still in here helping peeps again lol
ty for the help btw
that finished up nicely, doesn't feel like trash now
Sure, I need distractions. Working on the same thing for hours in solitude is exhausting otherwise.
Today I'm trying to figure out how the ambulances work
I tried config viewer to see if it had a on and off type deal but no luck
Trying to make my medical drone not so trashy, it's the vanilla, and I'm going for a wacky arcadey feel with them to mimick wildlands, having a heal option directly off the thing would be a good start.
Like, heal all nearby units?
Basically yes
ATM i'm using the idap dlc was, that drone they included in that with the med pack. But clicking items is a bit slow and doesn't fit the feel i was going for with it.
private _units = _position nearObjects ["CAManBase", 20];
{
_x setDamage 0;
} forEach _units;
Maybe add some wacky red cross icon spinning above each units head.
is there a way to make an RSC button not have a background when active?
Probably.
yay arma wants to not start now lmao
Task manager, close all arma3.exe tabs.
i jumped right to verifying it
You're on windows. Verifying by Steam probably fails silently while some ghost tab is still running.
it downloaded one thing but i think it does that for most games tbh
Did you even listen?
there's nothing
i'd have said it if there was lol
And regarding CAManBase, is that on the wiki for me to read about?
It's just the base class for all person type objects in Arma.
If you want your drone to work for animals too, use Man instead.
I know it's weird, but Animal inherits from Man in this game.
Do dogs what?
fall under Man
or would i need to go see how he's creating them?
_eastGrp = createGroup east;
for "_i" from 0 to random 4 do {
_type = ["Fin_random_F", "Alsatian_Random_F"] call BIS_fnc_selectRandom;
_unit = _eastGrp createUnit [_type, _pos, [], 1, "FORM"];
_unit setVariable ["BIS_fnc_animalBehaviour_disable", true];
_unit disableAI "FSM";
_unit disableAI "AIMINGERROR";
_unit disableAI "SUPPRESSION";
_unit disableAI "AUTOTARGET";
_unit disableAI "TARGET";
_unit setCombatMode "BLUE";
_unit setBehaviour "CARELESS";
[_unit] spawn RVG_fnc_dogBark;
[_unit] spawn RVG_fnc_dogBehaviour;
0 = rvg_garbage_collector pushBack _unit;
_unit addRating -10000;
//_unit addEventHandler ["Killed", {if (random 10 > 6) then {playSound3D ["A3\sounds_f\ambient\animals\dog4.wss", _this select 0, false, getPosASL (_this select 0), 5, 1, 75]}}];
};
[_eastGrp, _pos, 250] call BIS_fnc_taskPatrol;```
The dogs from the base game inherit from Animal, same as eagles, seagulls, kestrels, rabbits, snake, fish, turtles and sheep.
theres dogs in the base game 😮
i never did campaign
went right into servers and mods
I don't know about the campaign. They are in the editor, but on their own, they just stand around and do nothing, so don't expect much.
I wish i remember where I seen that good dog script
anyone know why on eden editor i carnt move my items normal nomore anyone help its like trying to snap into different spots and not in line off other stuff?
Wrong channel.
Try copy and pasting them, i seen something weird happen on mine where they got like stuck to debug, unsure why but htat fixed them'
cut and pasting*
0 = rvg_garbage_collector pushBack _unit;
wacky
Why store the index of the new element inside a number.
Fun excercise, start a random mission and in debug console, do:
missionNamespace getVariable str 0
And see what it reports.
want me to try it in mine?
Do it.
Report something.
It does say 3 for you?
it popped up 3 for a second
"for a second"?
Press LOCAL EXEC
0 is true
in your mission apparently.
I was hoping for something more interesting, like <spawn>
0 ehh
kinda whack
thats ravage's dog system though from the mod
but that';s how it's done in mine ehh?
So you could do
terminate (missionNamespace getVariable str 0);
to kill a semingly random script in your mission.
Dunno, someone uses
0 =
on something that reports true.
May be addon, may be mission. May even by some script in base game Arma,
well whatever that did, i'm unsure if it's related but it locked up and stopped responding lmao
why the hell 1 isn't true is weird
just now going to go test that healing lol
so
{
_x setDamage 0;
} forEach _units;```
for animals too?
Yes.
by chance do you know how to use the attatch to command off hand
say i want to ride this drone
i knew how to use it a2 but haven't got it in a3
obj1 attachTo [obj2]
Anyone have experience switching targets/watch position with dowatch? It only seems to apply the first target or position for me. Trying to delete the object, move it, or _x dowatch objnull doesnt work for me. Does the unit need to be dostop'd?
You could try it and tell us.
is there an rsc input textbox type thing?
Yes.
Im thinking about use agents to just stand around doing animations for perfomace sake, tough compare to a normal AI how much in performace it benefits or if there is even better options since I dont need that unit to do anything more than a prop.
Do you think it's possible to have clients disconnect and connect to a server, from another server?
It is. Someone made a proof of concept ui script that keeps pressing the buttons and filling out ui elements with the correct strings and activating them that it makes you connect a different server. But it's very fragile as you can imagine.
is there a command to get the direction name from an angle, like North for 0, or south for 180 or should I just do a switch case to get it?
I believe there is a BIS function that does this.
Otherwise:
localize ([
LSTRING(S),
LSTRING(SSW),
LSTRING(SW),
LSTRING(WSW),
LSTRING(W),
LSTRING(WNW),
LSTRING(NW),
LSTRING(NNW),
LSTRING(N),
LSTRING(NNE),
LSTRING(NE),
LSTRING(ENE),
LSTRING(E),
LSTRING(ESE),
LSTRING(SE),
LSTRING(SSE),
LSTRING(S)
] select (round (_direction / 360 * 16)))
Replace with your strings.
idk about direction names functions but we have bis_fnc_dirIndicator looks like this https://imgur.com/a/j6mz25n
is missionNamespace case sensitive
getVariable/setVariable is case insensitive.
anyone got a weapon classname list with dlc stuff without excess stuff?
nearestObjects [MissionSelected, ["Sign_Arrow_Large_Green_F"], 600]; //returns 13 elemets on the Array;
{systemChat format ["%1",_this]} forEach nearestObjects [MissionSelected, ["Sign_Arrow_Large_Green_F"], 600]; //returns a empty array on every systemChat notification
Why?
I though that would execute a script for each one in the array
So _this does not work with forEach?
_x and/or _forEachIndex
check examples and comments there https://community.bistudio.com/wiki/forEach
_this works inside forEach just fine, but _this is something different than _x and it seems to me that you want to use _x and not _this.
Welp, time for work.
gl o7
Is there any good documentation on logging in Arma 2?
diag_log. Done.
I'll look it up. Thank you
Im having problems with the setObjectTexture that the texture is black when far and only apears when close, any fix for that?
Lod issue
@astral tendon Thats issue with model LOD
that also might be hardcoded to that specific selection afaik.
Is there a way to zoom in/out an image (displayed as a part of dialog GUI) with a mouse scroll?
There is a eventhandler for scroll I think. Don't know how to zoom an image.
Also move it with LMB or RMB. Look at it as a simple custom map without markers
@MJRamon#7777 Fit RscPicture into RscControlsGroupNoScrollbars and resize the picture on the way.
Map is not simple
Map is a specific control
No, it's not a map, it's an image, but with interaction
Well as I said thats the only workaround I came up with, there is no such engine solution if you mean that.
There are a lot of ways to do a lot of things in Arma.
If you are not touching precision, or.. try to color weapon selection, or try to forget that your player is a car.. eh.. yes.
Just have faith bro 😄
RscActivePictureKeepAspect < clickable picture
so maybe ctrlEH MouseButtonDown, MouseZChanged and ctrlSetScale or ctrlSetPosition 🤔
probably better will be ctrlSetPosition... with ctrlSetScale it could be off when scaled
Anything with MouseButtonDown is a button tbh. 😃
Anything can be made a Button but not everything is a Button
button down 😱
Would it be possible to mod the Rhino such that its rear wheel axles can extend down, giving it an improved gun depression angle?
Are there codemetrica for sqf?
Code metrics
what exactly are you looking for?
Code metrics is a set of software measures that provide developers better insight into the code they are developing. By taking advantage of code metrics, developers can understand which types and/or methods should be reworked or more thoroughly tested.
yes, but what exactly are you looking for
regardless of what tbh ... most likely not
though, there are plenty of tools out there that allow you to write such a tool on your own
@queen cargo So whats actually your meaning about the differnce of RscButton and something under MouseButtonDown, since I don't know, I can achieve the same with both of them.
it is just a definition kind of thing
logically, they are both just simple UI controls
but they render different and are supposed to be used different
hey lads, how would you remoteExecCall something like
[_unitUnderCursor] call ace_cookoff_fnc_cookOff;
[_unitUnderCursor] remoteExecCall ["ace_cookoff_fnc_cookOff"];
vewy hard
is it that simple?
https://community.bistudio.com/wiki/remoteExecCall according to the wiki... yes.
thought the "call" would make it complicated, nvm carry on with your day 😛
carries all the 🍪 away
hey trying to make a script spawn something but it keeps spawning it 10m off the ground even when i use posATL
@marble basalt How do you mean? What do you create it with? How is this executed? Details are in the cake
"Even when i use posATL" most important is that the position formats match
tell the script to get pos of an item and trying to spawn something on the ground where its at
What is the doFire type command for throwing smoke grenades?
I think it's like put or something
Thanks. I'll search up put. I tried throw already. That's not it's functionality, I don't think.
any ideas on my issue?
You didn't answer the questions that were asked ^^
What do you create it with? How is this executed? Details are in the cake
In short. Show us the script that's currently not working
pastebin if it's big
Offsets have worked for me in the past, @marble basalt.
trying to find it on bistudio
Offset isn't a command. It's just like, if your coordinates were [X,Y,Z], then in your script, you'd say [X,Y, (Z-10)]. But don't do it like that, because that's wrong, just trying to illustrate the logic.
guessed as much but how do i employ it
Can't say, you haven't shared your script. That's why they kept asking you for more information. I promise you no one here needs to steal your script, so whatever your hang up is, get over it. I probably couldn't help you anyway. I'm not good. I have to learn everything again for every script I construct.
Why not just return first x and y fron the object, set both of them as the first two parameters. Then manually input your z
pos set [2, 0]; for example
So post the script line where you spawn or position the object.
So, this script was working until I added the "if alive" catch. Anyone care to check it out?
If (damage Chuck > 0.7) then {
// Jon dotarget Chuck;
// [Jon, "SmokeShellMuzzle"] call BIS_fnc_fire;
// Sleep 5;
Ralph domove (position Chuck);
Waituntil {Ralph distance Chuck < 2};
Dostop Ralph;
Ralph action ["Heal", Chuck];
If (!alive Chuck) then {
Ralph dofollow leader Ralph;
} else {
Sleep 10;
Chuck setdamage 0;
Chuck setunconscious false;
Waituntil {damage Chuck < 0.2};
Sleep 5;
Ralph dofollow leader Ralph;
};
};```
Now it works if Chuck is dead, but has stopped working for when Chuck is merely unconscious, which originally was working.
Edit: Found the problem.
Edit 2: Didn't find the problem.
@marble basalt , take note ^
Yeah, drats. Still not working.
Can you check where it's "not working"? Does it get stuck in the Waituntil {damage Chuck < 0.2}; ?
Also it'd be simpler to do:
Ralph action ["Heal", Chuck];
If (alive Chuck) then {
Sleep 10;
Chuck setdamage 0;
Chuck setunconscious false;
Waituntil {damage Chuck < 0.2};
Sleep 5;
};
Ralph dofollow leader Ralph;
Holy shit. Dammit. IDK WHAT happened, but I'm disheartened. This morning, everything was working fine. I add in that stupid if alive else check and now I can not get it to work again, even if I remove that catch.
This is in scheduled right?
It is.
Is there any method to detect when a player executes a specific command?
no
you can use CfgDisabledCommands or Battleye scripts filter to block it completly
but you cannot detect commands
I´ll give CfgDisabledCommands a try, thank you
This command works well with addon sounds, however getting it to play mission sound files is a bit tricky. Follow this guide
Is that your problem? Mission sounds?
I was testing those defaults sounds and i copy and paste the exemples
so the exemple sounds did not played
because i have a file with a shit ton of audios that i wanna use for dub, because I was lazy to put all of they in the description.ext
@astral tendon the sound file doesn't exist yeah
please try with one of your sounds (fileName, not CfgSounds class!) and tell me
the example sound files don't exist? waow
it seems not, but I didn't see them in sounds_f.pbo
playSound3D ["Sounds\test.ogg", player];
playSound3D ["Sounds\test.wav", player];
None of they played
of course I have those files inside Sounds
"\Sounds\test.ogg"
If inside missions then you should follow the guide linked in the notes on the wiki
huh, same…
I need to do something else before execute this command?
missionConfigFile returns the mission config file / description.ext CONFIG type.
If there is no description.ext, then it reports config null.
In the game, config null is serialized as "".
So if you use systemChat, or hint or the debug console, nothing is shown.
Yet,
isNull missionConfigFile
reports true.
hum... it actually returns false
Well then a description.ext exists.
For what?
for it to work and get the missionConfigFile
Okay, what do you want to do with it?
To get the mission config file = description.ext CONFIG type, you do
missionConfigFile
I wanna play a custom sound from my mission file
with playSound3D
the comment says about the missionConfigFile
but testing with it i found that it returns empty
false
""
isNull missionConfigFile
false
If it was null it should stringfy <cfg-null> or similar
0
But you do have a description.ext ?
yes but its empty
Are you testing in 3den or in the preview?
preview
Did you save the mission once?
Well, try putting:
commy = 1;
into the description.ext, then save and load the mission, then preview, then do
str missionConfigFile
"c:\users\roque\documents\arma 3 - other profiles\roque_the_gamer\mpmissions\swat%20prototype%20mission.altis\description.ext"
Well that looks better already.
oh now missionConfigFile is returning something
Apparently str missionConfigFile select [0, count str missionConfigFile - 15] is how you get the path to the mission folder.
Although, it doesn't look like it would work in your example.
Maybe it would.
Actually yeah, this should be correct.
"c:\users\roque\documents\arma 3 - other profiles\roque_the_gamer\mpmissions\swat%20prototype%20mission.altis\"
yup got it
It seems like the game craps itself if the mission config file is empty. ¯_(ツ)_/¯
so its wort note on the missionConfigFile page?
Also delete example 3 and write the description of it above example 4.
commy write me something
If your description.ext file is empty, str missionConfigFile may report an empty string instead of the path to the file.
Where write that? I wanted to write that into the red warning box. Because it's kinda related to having settings in mission instead config
Do another red box in "Description Description:"
Also afther that fix
_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
_soundToPlay = _soundPath + "Sounds\test.ogg";
playSound3D [_soundToPlay, player];
_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
_soundToPlay = _soundPath + "Sounds\test.wav";
playSound3D [_soundToPlay, player];
Now both play the sound
@winter rose
He was with me trying to fix it.
He's invited to celebrate too, lol
Commy dis gud? Me wait confirm becuz me unsure
Add something like "put anything inside of your description.ext in order to work"
lgtm
done.
Thanks.
Is there a way to use the attachto command to place items in the editor and have them keep their position, when mission start it stays on the point attached to the object
Hey there, I'm very new to scripting, and I need help getting AI controlled vehicle's to have there lights on all the time during the day.
Did you ask XiviD about that ? 😄
noooooooo 😉
He just asked in another discord that I'm in if anyone knows 😄
😄
If no offset is specified, the offset used will be the current relative positioning of objects against each other. Sounds like a fantasy.
https://www.reddit.com/r/arma/comments/4bw7cz/daytime_vehicleflash_lights/
https://forums.bohemia.net/forums/topic/142184-force-vehicle-lights-on/
Here are some things I found.
https://forums.bohemia.net/forums/topic/142184-force-vehicle-lights-on/?tab=comments#comment-2292400 That seems to work according to answers
Although later answers say that doesn't work anymore and that there is no way to do it :/
ive looked through all those Threads, i got it working but only with one vehical
https://feedback.bistudio.com/T85432 Sounds like a "impossible"
What if you hideObject the actual vehicle, attachTo an empty vic, and do setPilotLight on the empty?
im very new to scripting, so i dont really know what im doing 😦
HOLY SHOOT, I think i got it
😄
nope NVM 😭
if only there was a toggle that would make AI drive with lights on all the time. 😭
attachTo work lights to the vehicle? Like offroading
is there a way to disable the AI's ability to operate the vehicle lights?
@still forum
You can use this and check if there is a AI driver https://community.bistudio.com/wiki/setPilotLight