#arma3_scripting
1 messages ยท Page 412 of 1
The waitUntil is nowhere in that code snippet
Yeah couldn't see it either
@peak plover You can use call Extended_DisplayLoad_EventHandlers in description.ext too, but obviously it will do anything without CBA.
commy2 has been typing for several minutes
CBA_fnc_addDisplayHandler is for adding ui eventhandlers to the main display... The benefit is, that those are removed if you restart the mission, and reapplied when you load a savegame, and also addded correctly even if the display doesn't exist yet. The point is to make ui events very easily addable at pre/postInit, and therefore compatible with SP and local host savegames, weird restarts, #missions etc.
Yeah, sorry. I'm not feeling well, and that slows my thoughts and typing.
@lone glade What do you mean I don't do the functions header documentation correctly? I skipped a few inlined scripts tbh, but those aren't really functions anyway I think.
Sorry to hear that commy, get well!
Quick question: would that be possible to apply this cba display handler add similarly in a vanilla environment?
Well, it would require a constant loop that has serialization not disabled (seen a few which do that, not savegame compatible) and you have to do the "data managing" yourself.
Hmmm, seems feasible
With addon like CBA, it doesn't need a constant loop, because you can append the config with load events and manage stuff from there.
It used to be a trigger that checked every 0.5s before I rewrote it to use config events and therefore have 0 impact. ๐
So, CBA = performance effective,
Vanilla = Costly but possible?
anyone know how map brush marker alpha works? 100% alpha would, you'd think, cover anything below it. but you need at least 6 by my experiments.
any way to make a 100% alpha marker actually opaque?
I think it's fine for missions (therefore vanilla), but if you start making loops for every addon you have lots of duplicate work chipping away from the already scarce scheduler time.
And imo it's unacceptable if an addon has like 3 loops checking the same thing all the time. That's just sloppy.
@lone glade I completely missed your reply... I always thought CBA and ACE have basically the same function headers... All that matters is, that it looks reasonable after tabler is done with it.
You betrayed ace commy, from now on all your headers should be reverted to // By commy2 ๐
english people aren't too stupid, we'd understand what you mean
you'd sound like a kid though
OK. That's just how they're named in my mother tongue.
everyone knows germans don't use words
Habit hard to get rid of.
they use sentences mashed together
washassudajesachtduschnegge?
๐
"What did you just say you snail?"
Esistzeitfurinternationalewitze
What was the force loading screen command?
uhm ... i think he is talking about this one @lone glade https://community.bistudio.com/wiki/progressLoadingScreen @peak plover
there are all three commands that are required for this to work
Thanks
Hello Scriptors could you help me understand what I did wrong ?
put that in initServer.sqf
[
Intel2,
"Capture Data",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"_this distance _target < 4",
"side group _caller == WEST",
{},
{},
{[_obj,1] call BIS_fnc_dataTerminalAnimate; Sleep 2;},
{},
[],
5,
0,
true,
false
] remoteExec ["BIS_fnc_holdActionAdd", -2, Intel2];
remove that sleep
it's ment to be there cuz i'm gonna put stuff after that
remove it.
jesus christ that BI func...
I think @still forum would have an ulcer reading it
why ?
eeeeh, hard to explain
BI shit ?
also the "debug" stuff in it... wow
unscheduled...?
yes unscheduled midnight ๐
[
Intel2,
"Capture Data",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"_this distance _target < 4",
"Side _caller == WEST",
{},
{},
{[_obj,1] call BIS_fnc_dataTerminalAnimate;},
{},
[],
5,
0,
true,
false
] remoteExec ["BIS_fnc_holdActionAdd", -2, Intel2];
//increment progress
_frame = _frame + 1;
//execute supplied 'completed' action code
if (_frame == FRAME_MAX_PROGRESS) then
{
beautiful
Oh my god
is my script correct ?
then why isn't it working ?
:/ no idea
The little spinny thingy to update paa progress @lone glade
Whats wrong with 24
it's only wrong if you're trying to be salty
"Trying to be salty" 
the spawned code wait 24 frames before running
it evaluates that if until it's 24 frames later
what could go wrong.....
oh, no it's even better
do you mind pastebin-ing it so that we can all take a look? ๐
at least it explains why it breaks so easily....
I'm still saying salty ยฏ_(ใ)_/ยฏ
I just realized CBA / ACE3 has better debug logging than BI
BI can do actual debugging though ๐
eeeeeeeeeeeeeeh
Anyone know of how to wildcard a variable check e.g: sqf aaf_* nato_* csat_*
uhm, what?
Really can't think of valid reason for this, except for some hack script trying to detect random generated variables
"detect random generated variables" ๐ SPOT ON
it's more geared towards mission maker markers.
Store the names in an array then
How would I make it storage all aff_* variables to infinite number?
by adding the variable names when you create them and you can remove them when the marker is deleted etc
Well. I wont be creating them... think of the check as like a parent class to all aff_ markers.
you mean any var that contains aff ?
Yeah
honestly it really sounds you are trying to script a crappy hack script
toLower + in
How would I utilise the toLower command, to achieve my goal?
I'll let you figure it out
Lowering the case sensitiveness?
This, correct? https://community.bistudio.com/wiki/toLower
yes.
O.o, I just realized the STRING in STRING syntax for in isn't on the alternative syntaxes
just in the examples, wow
oh nevermind, I meant find
goddamn I keep mixing them around
What now??
I meant https://community.bistudio.com/wiki/find not in ๐
oh
both commands work so similarly I confuse them ๐
yes
nope.
or atleast entered as a string
anyway
My whole check is to make it so that any marker that has a sqf aff_car_mrap_* getPos _marker then create vehicle then setPos of vehicle to _marker
in checks if something is in a collection and find attempts to find the index of an element in a collection
besides that, your avatar is mesmerizing
basically and in it's simplest form allowing anything to place a marker (globally/server exec) and have a * spawn.
thanks @tame portal
for what you want you'd do:
markerArray select {tolower _x find "aff" > -1}
it's not a command
I can't remember how to retrieve all markers ๐ on the top of my head
allMapMarkers or entities should work.
Would that include player created ones?
yes
allVariables exist
WHAT!
@lone glade p
see you guys in three months with a series of RGM that are modular... bieeee
yes, but those aren't the vars :/
oh
oh right i missed out on the conversation a bit xD
Yeah you did ๐
im sooo happy. I can continue with my life now
always something so simple yet hard to find...
the biki search function S.U.C.K.S
it does
Requested variable is either undefined or nil
So that I would have this:
if (_varcheck isNill) exitWith{}; {true};
?
getVar found via https://community.bistudio.com/wiki/Namespace
_varcheck = allVariables missionNamespace;
if ( "aff" isEqualTo "_varcheck") then {_varcheck = 1} else {_varcheck = 0};```
_pokus = 0 is not in the right scope
Nah, it's fine
I hate you optix
_varcheck = allVariables missionNamespace;
if ( "aff" isEqualTo "_varcheck") then {1} else {_varcheck = 0};```
the worst is that it's valid
Wich one?
the if then after =
๐
The allvariable
select {tolower _x find "aff" > -1}
How would I mix that in?
_varcheck select {tolower _x find "aff" > -1}
_pokus = (allVariables missionNamespace) select {toLower _x find "aff" > -1}
_varcheck = (allVariables missionNamespace) select { toLower _x find "aff" > -1};```
yes.
_varcheck = (allVariables missionNamespace) select { toLower _x find "aff_car_mrap" > -1};
_varcheck = (allVariables missionNamespace) select { toLower _x find "fia_car_offroad" > -1};
_varcheck = (allVariables missionNamespace) select { toLower _x find "nato_car_mrap" > -1};```
would I have the _ at the end or not?
not necessary
it will match anything that has aff_car_mrap_in it
so derpsqgdjaff_car_mrap_dqfdsqfdqsf is valid
oh okay so it works not absolute
either way can be changes..
shouldn't matter that much
so long as I specific at this point. Shouldn't mess it up.
_varcheck = (allVariables missionNamespace) select { toLower _x find "aff_car_mrap" || "fia_car_offroad" || "nato_car_mrap" > -1};```
Oh true
also _varcheck would end up being the last one ignore the 2 above
Yeah
baader meinhof effect
?
@drowsy axle Do you need one result or many?
wut, what are you trying to do?
One??
run a foreach on what varcheck returns?
@drowsy axle Well the first to find, or find all that you define, because i've seen at least 3 strings.
I want to after finding the variables in missions that have that name. to get the pos and create a Vehicle.
run a foreach on what varcheck returns? yes
{
_x = missionNamespace getVariable _x;
} foreach _varcheck;
sweet
I thought it would need the getvariable
I just didn't know how to go about it
I have all the pieces... just cannot put them together correctly.
after that then what?
do whatever you inteded to do?
{
_x = missionNamespace getVariable _x;
_x getPos = _position;
_x createVehicle position _position;
_x createVehicleCrew;
} foreach _varcheck;```
wrong way around for =
so... a question
objArr = [];
objArr resize 6; //6 objectives
objArr apply {false}; //init all 6 to false```
when run on init (execVM'd a script from init.sqf) it doesn't seem to apply anything - all values remain null. Works fine if i do it from debug.
What's up with this?
resize changes the indexes to nil since they don't exist
@drowsy axle is that vars objects actually?
try apply {_x = false}
@drowsy axle or just positions?
^
oh markers ok
nope, that didn't work either alganthe
oh shit
_varcheck = (allVariables missionNamespace) select { toLower _x find "aff_car_mrap" || "fia_car_offroad" || "nato_car_mrap" > -1};
{
_x = missionNamespace getVariable _x;
} foreach _varcheck;
``` @unborn ether all of it
I know why suicide ๐
apply returns the array, it doesn't modify the existing ref
forgot about that
private _collection = ["aff_car_mrap","fia_car_offroad","nato_car_mrap"];
{
_x = missionNamespace getVariable _x;
if (!isNil "_x") then {
private _position = getMarkerPos _x;
private _vehicle = "somevehicle" createVehicle _position;
createVehicleCrew _vehicle;
};
} foreach _collection;
then
correct me, might be wrong?
(yeah now it works. lol)
the find is finding all variables within the mission (all markers with that name) it not a "static" array.
that contains those strings^
_varcheck = (allVariables missionNamespace) select { toLower _x find "aff_car_mrap" || "fia_car_offroad" || "nato_car_mrap" > -1};
{
_x = missionNamespace getVariable _x;
_position = getPos _x;
_vehicle = "somevehicle" createVehicle _position;
createVehicleCrew _vehicle;
} foreach _varcheck;```
wrong use of the ||
you need toLower _x find there too
Could I have a var with all the sqf toLower _x find "markervar" inside?
(allVariables missionNamespace) select { toLower _x find ("aff_car_mrap"|"fia_car_offroad"|"nato_car_mrap") > -1};
just one |
nope and nope unfortunately
yes that's what I meant ^
instead of: sqf toLower _x find "aff_car_mrap" || toLower _x find "aff_car_mrap" || toLower _x find "aff_car_mrap" || toLower _x find "aff_car_mrap" || toLower _x find "aff_car_mrap" || toLower _x find "aff_car_mrap" || toLower _x find "aff_car_mrap" ||
and array. of those
yes, hopefully with highlighting ๐
but then it would be a string not code... hm
aaaaaaaargh
arma why you be so hard xD
wait a second, i'll type it
changed the above ^^^^^^^^
_varcheck = (allVariables missionNamespace) select {
toLower _x find "aff_car_mrap" > - 1 ||
{ toLower _x find "fia_car_offroad" > -1} ||
{toLower _x find "nato_car_mrap" > -1}
};
Its just better to know that markernames seriously ๐
_varcheck = (allVariables missionNamespace) select {
toLower _x find "aff_car_mrap" > - 1 ||
{ toLower _x find "fia_car_offroad" > -1} ||
{toLower _x find "nato_car_mrap" > -1}
};```
or double brackets?
_varcheck = (allVariables missionNamespace) select {
toLower _x find "aff_car_mrap" > - 1 ||
{ toLower _x find "fia_car_offroad" > -1} ||
{toLower _x find "nato_car_mrap" > -1}
};;```
nested it looks like this:
BOOL || {BOOL && {BOOL}}
&& is and, || is or
I knew that ๐
I just used && for my example :p
I should have a var with a shitload of lazy eval around wait one
erf, I put them in macros, woops
I'm trying to get the vest items array for several filled vests in a box. "vestItems" works for the player unit, but not for the box
do it the other way.. Can you take the vests out and back in (with code)?
out (find internal shit) in (still in box when player looks in)
thanks. I got it ๐
lol
you can then use cargo commands on the container @thorn saffron
containerCeption ๐
going to test this: sqf _varcheck = (allVariables missionNamespace) select { toLower _x find "fia_car_offroad" > -1 //toLower _x find "aff_car_mrap" > - 1 || //{ toLower _x find "fia_car_offroad" > -1} || //{toLower _x find "nato_car_mrap" > -1} }; { _x = missionNamespace getVariable _x; _position = getPos _x; _vehicle = "C_Offroad_f" createVehicle _position; createVehicleCrew _vehicle; } foreach _varcheck;
containerCeption that a command ๐
I does not seem to get the rifle. I guess having some dummy unit I put all of the shit from the box and go through it one-by-one to get whats inside backpacks, on weapons etc. is something that might be needed to be done.
nasty, crude, but it might do the job
rifles aren't containers
@thorn saffron https://community.bistudio.com/wiki/everyContainer
only uniforms vests and backpacks should be returned afaik
say you have 10 rifles with attachments and shit in a box, how would you check whats on each one of them, disassemble them and put weapons and detached items in a box? I would use the dummy unit idea
https://community.bistudio.com/wiki/weaponsItemsCargo / magazinesAmmoCargo / getItemCargo
The only thing you cant do script wise, is add a weapon into container with attachements, need to add the attachments seperately into the container
Unless you have AI unit do it for you (kinda hacky), or got a weapon config for every posssible combination of attachments (way to much work/hacky)
The most thing i don't like about managing a container is that you cant actually have remove*CargoGlobal and only go through clear*CargoGlobal
"Stash & Pop" is the only scheme around this.
You know, maybe I could kinda skip all of it if I could do something like this: open the shop box inventory (as normal), save the current gear on player, let player take stuff from the box, check what changed and charge him based on that.
would save a lot of work with UI and stuff
Still will force you to do a lot of job anyways, like what magazine with what count he did put in his backpack
@lone glade but what about gear splicing?
there is still an issue of actually showing player how much stuff costs
For now I'm focusing on a "sell box" where you can dump all of the stuff you want to sell in one go.
right now its just moving stuff from box to box
is there a way to read data from the web in arma into an sqf string? I can see the data in a RscHTML with htmlLoad, but is there a way to get the text out of that control? (ctrlText is "")
@vapid frigate not possible
k ๐ฆ
I'm running into an issue where if I try to pass a 6 digit number via remoteExec it works fine, but if that same remoteExec is located inside of a ctrlAddEventHandler, it passes nil. Anyone know what's up here?
Variable probably doesnt exist in uiNamespace does it?
I didn't put it there. I don't really know how Namespaces work though.
I suspect the problem lies in the variable I'm trying to use within the ctrlAddEventHandler is not holding the value it is supposed to be or cannot be accessed for some reason
Yea, pass it using missionNamespace getVariable ["varname",defaultvalue] instead then
@vapid frigate use an extension
@lone glade Doesn't work: https://gyazo.com/f0f1fbf411a02e2a2ea6ad11c3eb3df6 ingame hint for: ```sqf
_varcheck = (allVariables missionNamespace) select {
toLower _x find "aff_car_mrap" > - 1 ||
{ toLower _x find "fia_car_offroad" > -1} ||
{toLower _x find "nato_car_mrap" > -1}
};
hint format["%1",_varcheck];
{
_x = missionNamespace getVariable _x;
_position = getPos _x;
_vehicle = "C_Offroad_f" createVehicle _position;
createVehicleCrew _vehicle;
} foreach _varcheck;
Those are classnames of objects arent they?
Why not check allMapMarkers?
can I pin the above @lone glade ๐
Its just better to know that markernames seriously ๐
he want markers that contain those strings
so derpdsqfaff_car_mrapdqfdqsfds is valid
Yea but that script is checking allVariables? Why not check the allMapMarkers array directly and filter that?
Because that has player markers
I havent read up too much, sorry
use allMapMarkers
Ah, those are hard to filter? Cant you cache at missionstart?
allVariables somehow doesn't contain those
their varnames are
Markers dont have to have varnames do they?
Dont trust eden terminology
how the fuck are you supposed to reference them otherwise ? ๐
There might be a difference for Variable and Variable Name?
nope
no there isn't
If you createMarker it returns a string
Eden just reuses those controls
The whole is that the mission maker (after me) can make _x of aff_mrap_x and have _x of the mrap's spawn
huh, TIL, markers aren't entities
just use allMapMarkers
ill test thjat now
If youre concerned about players cache it at missionstart
you'll have to change the script a bit tho
_varcheck = ( allMapMarkers missionNamespace) select {
toLower _x find "aff_car_mrap" > - 1 ||
{ toLower _x find "fia_car_offroad" > -1} ||
{toLower _x find "nato_car_mrap" > -1}
};
hint format["%1",_varcheck];
{
_x = missionNamespace getVariable _x;
_position = getPos _x;
_vehicle = "C_Offroad_f" createVehicle _position;
createVehicleCrew _vehicle;
} foreach _varcheck;
Nooo
nope
_varcheck = allMapMarkers select {
toLower _x find "aff_car_mrap" > - 1 ||
{toLower _x find "fia_car_offroad" > -1} ||
{toLower _x find "nato_car_mrap" > -1}
};
hint format["%1",_varcheck];
{
_vehicle = "C_Offroad_f" createVehicle (getMarkerPos _x);
createVehicleCrew _vehicle;
} foreach _varcheck;
<MarkerID> - a marker counter id
Check what alganthe did
testing
Dont blindly test but also examine the changes in the code
im not not worry
dont worry
welp
fuck that ๐
Broke my mission in the process.... why is the USS freedom so buggy ๐
gg
๐ฆ
@drowsy axle Well @lone glade did the most job, kinda thanks him i think ๐
@drowsy axle by format you mean send it, because format is a text formatter?
_varcheck2 = allMapMarkers select {
toLower _x find "nato_car_mrap" > - 1
};
sideChat format["%1",_varcheck2];``````sqf
hint format["%1",_varcheck2];``` works but I have a few hint one after the other.
True but not the current issue
As an aside, kina interesting that - 1 is a number, with the space
yeah
got a problem...
ffs i only want to this one thing why is it sooo hard....
/* ///////////////////////////////////
NATO Forces
MarkerName Key:
b_mrap_01 = "B_MRAP_01_F"
b_mrap_01_hmg = "B_MRAP_01_HMG_F"
b_mrap_01_gmg = "B_MRAP_01_GMG_F"
/////////////////////////////////// */
_var1 = allMapMarkers select { toLower _x find "b_mrap_01" > -1 };
{ _vehicle = "B_MRAP_01_f" createVehicle (getMarkerPos _x); createVehicleCrew _vehicle; } foreach _var1;
_var2 = allMapMarkers select { toLower _x find "b_mrap_01_hmg" > -1 };
{ _vehicle = "B_MRAP_01_HMG_f" createVehicle (getMarkerPos _x); createVehicleCrew _vehicle; } foreach _var2;
_var3 = allMapMarkers select { toLower _x find "b_mrap_01_gmg" > -1 };
{ _vehicle = "B_MRAP_01_GMG_f" createVehicle (getMarkerPos _x); createVehicleCrew _vehicle; } foreach _var3;```
what's the issue?
double spawning
ofc
var2 has var1
yup
b_mrap_01 also includes b_mrap_01_hmg
yeah
ik
how else would you solve this problem. of
markers names and spawning
I'd said remoteexec
with params
wat
i've tried this so many ways
this works perfectly fine, just name them something else
how can I?
change the name of the markers ?
no?
nato is the same as otan
just call them "marker_mrap_1", "marker_mrapHMG_1"
marker_mrapHMG_1 would spawn both
no
how
no
find checks for a matching string
"dsqfdsqfdsqfds_this_worksdsfsdqfdsqf" find "this" would work
anything containing "this" in it would match, but for example, "tHis" wouldn't
Or use equalto, if you know the exact name
to be fair am amazed its still going on
lol xD
I don't know, why it's so difficult you use allmapmarkers select find
and here we go
use execVM
switch (true) do {
case (toLower _x find "b_mrap_01_gmg" > -1): {
_vehicle = "B_MRAP_01_GMG_f" createVehicle (getMarkerPos _x);
createVehicleCrew _vehicle;
};
case (toLower _x find "b_mrap_01_hmg" > -1): {
_vehicle = "B_MRAP_01_HMG_f" createVehicle (getMarkerPos _x);
createVehicleCrew _vehicle;
};
default {
_vehicle = "B_MRAP_01_f" createVehicle (getMarkerPos _x);
createVehicleCrew _vehicle;
};
};
} forEach (allMapMarkers select {toLower _x find "b_mrap_01" > -1}); ```
It's sooo difficult
This take me 1 hour to find a solution ho my god
I wish i was stupid enough to post something wrong and act like this
Welcome to learning how to code haha
(edited) incoming
Ive spent hours on typos
{
_x = toLower _x;
switch (true) do {
case (_x find "_gmg" > -1): {
_vehicle = "B_MRAP_01_GMG_f" createVehicle (getMarkerPos _x);
createVehicleCrew _vehicle;
};
case (_x find "_hmg" > -1): {
_vehicle = "B_MRAP_01_HMG_f" createVehicle (getMarkerPos _x);
createVehicleCrew _vehicle;
};
default {
_vehicle = "B_MRAP_01_f" createVehicle (getMarkerPos _x);
createVehicleCrew _vehicle;
};
};
} forEach (allMapMarkers select {toLower _x find "b_mrap_01" > -1});
Thanks for the correction demellion
np, just less to read like this.
It's just take me 10 seconds to take over a solution, not search too much
shitting out a half baked solution isn't the point, it's to make him get there
๐ค
If he want to learn, he look at this solution, and learn about it, if he want to do an solution, he can do one too
not really
better to tell someone where their solution went wrong rather than to write your own solution they don't understand
literally just leads to copy/paste tyvm cya later
teach a man how to fish
If the person is willing to learn, he will learn my solution, and create a new one
i'm here to put a solution, if he want only copy paste
it's his problem, and not mine, because giving him a solution
@little oxide Well by my experience - they are at the right point. Its better to give a fishing rod instead of fish.
if he can't debug his own script he can't debug yours
I know why i'm only go terrain makers channel now
oneoh have you tested my "shit"
i don't think so
Dude, just stop, I've tried that recently - there's always some dudes saying something against you.
Just be a wave, be a water, be a wind, whatever
๐
I feel like I'm being told how to teach people the script, but I'm not here to teach people
Well, thats his point of view, thats yours. Just leave it like this.
i don't have points of view i have objective facts
@rancid ruin well thats subjective, because there are different ways to teach. Whatever bad or good.
objective fax
i'm a facts machine
fax machine ๐
Wow.. On windows its 3:11AM and on Linux it's 9:11PM although both are in the same time zone.. Weird stuff discord.
@lone glade When I saw the hold action in the apex campaign I already knew I don't want to see the code for that.
Hello guys, i'm having some issues with an Headless client on my server. Therefore, I wanted to know if it is possible to find logs for it, can you guys help me ? ๐
Wrong chan maybe
didn't saw Headless client chan
@tough abyss It has own instance folder like your server does.
Windows, and ok I change, thx for ur help ๐
Me again ๐
is there a way to force the respawn in the RespawnMenu after the counter run out?
there is https://community.bistudio.com/wiki/forceRespawn but thats not what I want
What RespawnMenu?
this new one that came with apex(?)
Didn't hear about that. #arma3_scenario might know more. I don't think you can script that. Either you get always to the menu or not which is probably controlled by config
this one
there should be a way to modify what is executed when pressed that respawn button but where? ๐
The screen is shown only if respawn templates MenuPosition and/or MenuInventory are used in a mission! For more info see Respawn documentation.
I guess you could look into the UI config for the respawn screen
Debug console -> config viewer -> search manually through all UI classes till you find it
kk
If that calls a script function then you have to read that script function and check if you can inject your code somewhere in there. If not then you need a mod to edit the UI. If that is in-engine though you are out of luck
Can someone contact any of the enscript people and tell them to build more EHs ?
So many things would be possible if there were more EHs ๐ฆ
Actually I guess that's also security risk so....
I just realized when doing a few functions that I need to add my own EHs ๐
I dream of an actual suppression EVH with engine based calculation with indirectHit involved.
Hmm
If I'd make a onEachFrame and instead of calling new functions I add them to an array, and maybe allow only a few ms of functions to run per frame :|
Wait a minute
This is basically normal scheduler
Intercept could add EH's if you want
No EH's aren't really a security risk
What EH's would you need?
Creating EH's that fire when someone calls some script function takes literally 2 minutes
What you said is basically CBA PFH.
Just it doesn't limit runtime
everything. I've ran into that all the time
ohh yeah..
nothing on my mind right now. But so many things...
If you're willing to require two mods and don't use Battleye then.. ez
:]
I thought about doing the onframe and then have a check before running the code for EH, which would be like if _function isEqualTo EH. and the one after
CBA also has player eventhandlers
which is basically that for some things about the player
linux already there
And yeah.. I think BE will happen
As Intercept core doesn't do anything bad and plugins also need sign
anyone knows anything about disableChannels (https://community.bistudio.com/wiki/Description.ext#disableChannels) as they don't seem to disable anything? tried both the old and new syntax. I need to use it with ACE, so I don't know whether this has an impact.
@candid jay Haven't seen it not working, besides they are getting re-enabled scripted https://community.bistudio.com/wiki/enableChannel. Also according to a notes, global channel is always enabled for arma admin. So all of your channels are enabled, or just few of them?
if I use enableChannel everything works.
the issue is with disableChannels in description.ext
Well the source might be any script, even ones coming from addons you launch. Since enabledChannel is working fine for you, stay with it.
ok
Are you sure you fully reload the mission?
getArray(missionConfigFile >> "disableChannels") to double check
Anyone here use scripted lobby yet?
yes iโm sure
one question on EH: in MP, is there an event when game starts, i.e. when players first enter the game after seeing the map?
is that PreloadFinished?
that doesnโt give an event when playing starts though
briefing end just means that it has been read, not that mission has started
does anyone know why I get a bunch of errors and issues when trying to select a bit type sql datatype using extdb3?
I just changed it from bit to int, I don't think extdb3 supports bits
question: how the hell does publicVariable work?
I need to use it to turn off the Unsung voices but I have no idea how it works and wiki doesn't really explain it well
What part about it are you specificially confused about? Do you understand that it takes a variable and sends it to all clients?
I understand that
I just don't undertsand how I set it up
like, where to put it and shit
I know I need to use pubvariable to set RUG_DSAITerminalDistance = -1;
I just dont understand where I would do that or the exact proper syntax
RUG_DSAITerminalDistance = -1; to set it and then publicVariable "RUG_DSAITerminalDistance"; to broadcast it
alright, and would I put that in an init.sqf?
I'm not really sure what Unsung voices are, but does your system have multiple clients, or is this a singleplayer mission?
doesn't matter, if he want to put it in init.sqf he doesn't need pubVar
He doesn't know where to put it
It's multiplayer
Unsung has voices it plays ambiently through zeus and such
However they EXPLICITLY required them to use pubVar.
However not where to place it.
with how terrible unsung was made I'd say the instructions to use pubVar are wrong
just set the var in initPlayerLocal or init and you're done
unless they have a PVEH for it
they've recently added a module in their dev build that fixes the issue. However others have gotten it to work.
However the details have been fairly obscure ยฏ_(ใ)_/ยฏ
If you're just looking to disable the rug_dsai voices (Vietnamese, American and ARVN voices) in your mission because it's driving you crazy then go ahead and do this simple task!
Put this in your mission:
RUG_DSAITerminalDistance = -1;
( variable / publicVariable )
An example of how we turned them off in Arsenal:
__
if (missionName isEqualTo "Arsenal") then {
RUG_DSAITerminalDistance = -1;
};
true
__
Hope this handy dandy trick works!
Have a good night or day!```
^the message from them exactly
regular var would work with JIP?
I'lll explaint he voices a bit
@ocean hare Have you already tried just putting RUG_DSAITerminalDistance = -1; in init.sqf?
so what they did was add an extra ambiant thing where it would force voice lines over any unit for the particular side, aka BLUFOR units always have these ambiant voice over them no matter what the actual voice is set to. Even when not in combat they say things like "gimmie a smoke" or some other shit.
The problem is, Unsung made no way to turn this off (at first) and when you're in Zeus you hear every AI all at the same time as if they were arround you. Meaning at a certain point you cant hear anything other than the voices endlessly.
@river meteor I think so? I'll try again though
oh god my sides
wait, what happens if you try switching voices mid mission?
does it spam it twice as much ?
it's not affected by the normal voice thing
it's seperate audio lines played via the effects track
Basically Faces of War does the same but you need a module to start the voices rather than turn them off
I'm pretty sure iot's meant for cinematic videos or ambiant AI around bases
all i really know though is that's annoying af
Mid op it's very distracting
and causes the odd illusion of thinking there are enemies around you
@river meteor tried it again, can confirm that doesn't work
@ocean hare Sounds like there may be an issue with Unsung. Those instructions are relatively straightforward and I can't think of a mistake on your end. Maybe @bitter bough knows more
I love that random true in the instructions too
I'm also one trying to figure out how to help him
We are in voice chat together trying to figure this out
Didn't you say it's a known issue with Unsung? Were those instructions recently released, or are they old and possibly outdated?
oh no, they are new
they didn't think about releasing these instructions until I went on their discord and said something
it's been an issue since their first Arma 3 release and apparently has been brought up to them before according to their PR guy but none of them thought to tell anyone the solution publically
they are working on adding a module to do this for people in next release but in the mean time, I have to do this for all our missions
Could you ask them on their discord where to put it? The only thing I could think of is that they set that variable in their code base somewhere after init.sqf is ran
it's in an init
yea, I was about to go there next
but then again, it not working wouldn't surprise me in the slightest
if (typeOf _crate not in _crateList)
``` would work, right?
@chrome mason or just
if !((typeOf _crate) in _crateList) then {code}```
Ah, cheers cloudy boy!
๐ monkey
I'm tired ๐ด
Someone did something stupid with my script today, so i'm idiot proofing it... which is why i'm up at 1:40am ๐
there's no need for parentheses around typeof _crate
yes whether or not it's better is entirely subjective, however whether or not it's required is not
@lone glade @river meteor Hey guess what? Found the issue with the Unsung voices. They forgot an underscore in their command. was supposed to be RUG_DSAI_TerminalDistance = -1; not RUG_DSAITerminalDistance = -1;
@ocean hare Glad you found the issue!
A !in command would be neat I guess? ^^
arrayIntersectCI
gib
Make PR :u
๐ฆ
I didn't do what we talked about for mags, the second array is 10 indexes large at best, not worth it
(also lazy and forgot about it)
yeah
all mags are not 10 though
yeah but meh
The problem was toLowering the global magazine array with a forEach
apply ^
no big diff :u
but yeah, pretty much the same
I fucking hate that config / commands have such a disrepancy
I guess I'll PR that fix later then :u
it's beyond stupid and should've been fixed by adding more case insensitive stuff
or make the returns consistent....
what do you need? inCI?
yep
I can easily remake the important Arsenal functions in Intercept.. I wonder how that will change the perf :3
But.. I need devenv for that :/
tbh it's not really slow, the change would be imperceptible
Not imperceptible to my profiler though
Anything that makes Arsenal faster is good. When playing with TFAR I get dropped out of the TS3 channel because of the performance-lag.
not arsenal
ACE Arsenal
which is already stupidly fast compared to BI Virtual Arsenal, also TFAR 0.9 has perf issues
Does the new ACE Arsenal "overwrite" the default?
Alright. Have to tell some people to switch over.
How is TFAR connected to Arsenal performance? It isn't at all related
And Arsenal load is scheduled. That doesn't stop the TFAR updates
Right there. On github
When entering BI Arsenal, occasionally the game will freeze for up to 3~5 seconds, making TFAR move my channel
on top of the loading screen?
Don't have that even on my modset. In 1.0 you can configure the timeout to up to 10 seconds
It is different alganthe. Even after you preloaded, it would occasionally happen.
jesus
Maybe some mods is influencing it.
oor, or it's just it sucking
But I am part of multiple squads and it is beyond my control what mods are used.
I have seen bis_fnc_arsenal, I am a changed man
Power to the little! Boycott the establishment
> In 1.0 you can configure the timeout to up to 10 seconds
Amen
Or up to infinite if you run a script manually in debug console
New update wheeeen ? ๐
fix #1366 ๐ฆ
Tired of telling people to restart plugin
What is 1366?
Thanks
#1366 > #350
Well, It's weird because it didn't happen a few months ago (i think)
before TS3.1.7, not sure what tfar v.
The TFAR version in like september I think was fine
OR not as often atleast
If I didn't notice it then it must not have excited
If I didn't notice it then it must not have excited
question
_caller playaction "putdown";
for "_i" from 0 to 1 do {
_state = animationstate _caller;
waituntil {_state != animationstate _caller};
};
this is BI code
curious why they need a for loop with one iteration
maybe they wanted to loop it even more times at a different point in time
//--- Play taking animation and delete the object afterwards
_caller playaction "putdown";
for "_i" from 0 to 1 do {
_state = animationstate _caller;
waituntil {_state != animationstate _caller};
};
deletevehicle _object;
[[_var,"diary"],_fnc_scriptName,_recipients,_persistent] call bis_fnc_mp;```
the usage of bis_fnc_mp tells you everything you need to know, haha
sooo
getpos alternative syntax
origin getPos [distance, heading]
It seems very easy to do things similar to ALIVE, where cached(deleted) units move towards their waypoints
Anyone other than ALIVE do that ?
Is there a way to execute files in a scheduled environment? Let's say I execute a config where a lot of variables are set and before the next file is executed, the script waits until the config is done. I thought 'call' does that. That's how I did it:
call compile "scripts\test_config.sqf";
call test_start;
test_start is a function defined in my compiles so it should be fine.
execVM
Or just spawn compile "script"
or spawn test_start
And.. yes.. call does that.. What was the question again?
I want the config to be fully loaded first before the test_start function starts
The code you posted does that
I thought so too but it doesn't, the function gives me the error undefined variable of a variable that is set in the config
preprocessfilenumbers or sth
You mean that
call compile preprocessFileLineNumbers
Tested aswell, doesn't work either
If the path is correct then.. it does that
Hmmm, ArmA wants to troll me again I guess
jsut use functions library
private ["_ctrl", "_fileExists"];
disableSerialization;
_ctrl = findDisplay 0 ctrlCreate ["RscHTML", -1];
_ctrl htmlLoad _this;
_fileExists = ctrlHTMLLoaded _ctrl;
ctrlDelete _ctrl;
_fileExists
// killzonekid
what effects does disableSerialization have to the code following it?
It disables serialization
What is serialization?
If you save the game. and load it again the variables will be nil
instead of the value that would've been saved
so if the script suspends at htmlLoad and you save the game at exactly that time
when you load it again _ctrl will be nil and you'll get a script error
So disabling serialization prevents such things from happening?
disabling serialization disables serialization
Which causes the game not to serialize(save) things
Then why a lot of scripts deal with displays after disabling serialization?
What's the benefits?
Because you can't serialize displays
So if you try to serialize them but can't -> error
But as far as I know the MP mission doesn't impletement game saving
how to debug ctrlDelete? There weren't any errors but the control could not be deleted
is it part of a control group?
do a systemChat str _control; bfore deleting
try to put the ctrlgroup instead of display in ctrlDelete
How long does a cutRsc need to create a display before i can store the uiNamespace in a variable?
You can't store a namespace in a variable
that's the countrary
You can store a reference to it.. I guess.. but why
_layer cutRsc["_style_" + str(_style), "PLAIN", 1];
_display = uiNamespace getVariable["_style_" + str(_style), displayNull];
That's what I mean
I do that in my display. in the onload line:
onLoad = "uiNamespace setVariable ['rlnt_weaponhud_style_1', _this select 0];";
Ah..
ooooh,
:D
so you set rlnt_... variable and expect it to magically appear in _state_... variable?
What do you mean? I always did it like that and it works. I am just wondering if I need to place something like a sleep before I can store it into the _display variable.
you need to disable serialization if it's scheduled
I did
but, that's not your issue right now...
the var you set and the var you get are different if you didn't notice
Copy pasta mistake
_layer cutRsc["rlnt_weaponhud_style_" + str(_style), "PLAIN", 1];
_display = uiNamespace getVariable["rlnt_weaponhud_style_" + str(_style), displayNull];
So between those two lines, do I have to place a sleep?
yes, but separating the func that opens the display and the one that handles what happens after onload would be even better
I use the _display variable to edit elements of the display, that's why I do it like that
something like that:
(_display displayCtrl 1207) ctrlSetText(getText(configFile >> 'CfgWeapons' >> (primaryWeapon player) >> 'picture'));
stop the func at cutRsc and continue it in the onLoad EH
I tested it. When I place a uiSleep or a sleep with 1 second between the lines I get error in expression
yes, that's normal
That's normal?
It's called
add systemChat str canSuspendand check what it returns
if it's false it's unscheduled and you can't sleep it.
@lone glade what do you mean by putting the ctrlgroup instead of display in ctrlDelete?
My code is ctrlDelete ((_this select 0) displayCtrl 8811)
ah, right, different syntax
maybe his control created not with ctrlCreate
Okay, ty @lone glade I was able to fix it. It really was a scheduler error.
Now my last problem is the switch. I currently do it like that:
if !(isNull findDisplay 7211) then {
[] spawn startSetup; //sets up the display
} else {
1300 cutRsc["DEFAULT", "PLAIN", 1];
};
I read on the wiki that setting the display to default will remove it (which works) but when I trigger this if condition again it will not show up again, it goes in the else again and I don't know why.
Is there something else than using findDisplay to check whether the display is gone or not because i have the feeling the even if i set it to default findDisplay gives the result that it's still active.
findDisplay should return displayNull if the display isn't found
Nevermind, I used a variable for it. Thanks for your help :)
Is it possible to make showing a control conditional at the time of defining it?
nearestObjects for the types i can put ["Plane", "Tank", "Ship", "LandVehicle", "Air"] right?
sneks
ctrlShow
@stable wave > I use classes and createDialog to create it
Then you need ctrlShow false or ctrlEnable false, ctrlDelete works only with controls created with ctlrCreate...
ctrlEnable != ctrlShow
ctrlShow then
ctrlEnable false controls are still clickable ๐ฆ
same for faded controls ๐ญ
whut
Reading this https://community.bistudio.com/wiki/User_Interface_Event_Handlers for the UI EH and trying to setup a LBSelChanged EH. Says that it returns the control and the index of selection, but how would I access these variables? I have _myControl addEventHandler["LBSelChanged", {}]; so far
You can send it to the back and disable, pretty sure I've disabled controls before
also was same with ctrlShow... but i think its fixed (right click)
especially buttons
they're passed as _this
Ok, thanks
the second syntax of ctrlShow worked. Thanks a lot
@river meteor
_myControl ctrlAddEventHandler["LBSelChanged", {
params ['_ctrl','_index'];
}];
@river meteor and ctrlAddEventHandler instead of addEventHandler
@river meteor Notice that ctrlAddEventHandler stacks an UI EVH, so if you willing to override anything before use ctrlSetEventHandler
@unborn ether Thanks for the advice.
Can someone help me understand the merits of ctrlSetEventHandler over ctrlAddEventHandler?
setEH set's it. AddEH add's one onto the list
You usually want ctrlAddEventHandler
If you want the set variant you'll know that you want it
Using the createvehicle and attachto commands to create a vehicle attached ontop of a vehicle in Zues with the debug console. My problem is that the vehicle I created and attached has no collision with vehicles that drive into it. Is there a fix to this?
Here is the code so far: this setObjectTextureGlobal [1, ""];
this setObjectTextureGlobal [0, ""];
veh = createVehicle ["B_APC_Wheeled_01_cannon_F",getPosATL this,[],0,"FLY"];
veh attachTo [this, [0, -1, -1], "Pelvis"];
veh setObjectTextureGlobal [2, ""];
veh lockturret [[0,0],true];
veh lockturret [[0],true];
veh setObjectTextureGlobal [0, "A3\Data_F_Tacops\data\APC_Wheeled_03_Ext_IG_02_CO.paa"];
yes it does
it do?
Odd how it has collision with players, but not with other vehicles.
it says on the page that they don't have collisions
So is there a command to change that?
nope
Well thanks for the help, saved me allot of time trying to get it to work.
just ran an eachFrame EH for every vehicle in the server, checking if it's bounding box collides with any attached object
should be very performant
you dropped this /s
no i'm being serious
i do it on my life server and nobody complains
they say it runs very well
*triggered*
pulls the trigger
considering the usual framerate on life servers I don't think they'd notice
or the desync, jesus christ the desync
it's like watching a bunch of mages with guns
shhh
we all knew what you said was false oneoh
it's like nigel suddenly saying that scheduler is superior
if you died (from old age or something) i bet you could be revived by someone saying "can any1 help me with this arrest script for my life server?" at your funeral
I like how you can easily detect life guys. Please don't tell them that their idiocy is unmasking them
i'm still amazed that nobody's just made a fucking life game yet. see how many dayz rip-offs/inspired-bys there are
if someone just made a life game it'd make them rich and fix arma
THEY DID
they did?
oh that Identity thing on kickstarter?
their feature list was like
- impossible thing
- thing that would require AAA budget
- stupid thing
- literally nobody wants this thing
- AAA budget thing
...
he probably thinks all his players are retards too
weeeeeeeeelllll
that should be added to the Great Quotes From Arma Discord book
okay, time to make my quote list
you'd much rather play a dedicated Life game rather than play on a shitty server for arma 3 right?
no life server has devs that know sqf very well i'm pretty sure, don't worry about that
Some do have some skilled guys, but... thats maybe 0.5%
Arma ยฏ_(ใ)_/ยฏ
not enough skilled for make it standalone, they just skilled...
@rancid ruin One of them are...
if you can figure out how to write good SQF then you can definitely figure out how to write good C#
therefore you could make a game
although i guess the networking aspect is not a walk in the park
C# ๐คข
in regards of creating a game: i currently think of creating a top down RPG
like the old baldurs gate games on PS2
simply because there is non of those today
but i am horrible with UE simply because i never worked with it
Well... Wouldn't that be a good reason to get started with working with it?
You lose a lot that ArmA gives you when you try to make a standalone. It's not as simple as knowing sqf vs knowing C++ or any other mainstream language
There is a good reason why identity doesn't have any aircraft for example
using unreal for an RPG doesn't make sense at all imo
Also, isn't identity the Asylum team?
it's not a game, it was a demo with stolen market modules
or they're incredibly stupid and actually paid for them
I think they got inspired by the star citizen model
@still forum yes ... but it is a hell lot of work and stuff is not easy and straigth forward : /
would even be more temted using a c++ graphics library and doing all myself but that requires actually hell of complicated math
getting to learn bullet will be helpful for arma 4
@rancid ruin looks like a good engine
but ... want to try unreal engine (and use the asset store simply because i am a horrible designer ... but i can code <3)
since BI is dropping physX ๐ญ