#arma3_scripting
1 messages ยท Page 504 of 1
Is remoteExec reliable? Does it guarantee packet delivery?
yes
would be pretty horrific if it was not
Anyone know how to sort this error out? https://cdn.discordapp.com/attachments/522195344600072213/522212654241021984/20181211194544_1.jpg It's when the Export to SQF is pressed.
Pretty sure thatโs a bug atm. Was mentioned here earlier iirc.
does the "IncomingMissile" event handler not work? I can't seem to get it to work at all
I created a rectangle marker, set its name to "foo" but getPos foo is resulting in nil
do markers work different?
getMarkerPos
fine getMarkerPos
BOOM
Do I always have to provide a group for createUnit?
What if it is a single
can I just say nil?
was using createGroup [West, 1]
hope it is a "good" practise
Probably createUnit creates a new group for the new unit if you provide no group
But your unit must belong to some side, and you do this by creating a group of this side first
createAgent ?
Depends on what you need from unit though
Sometimes I wish there was selectLast command to do selectLast _array instead of doing _array select (count _array - 1)
A man can dream
(Don't suggest macro)
Is there a way to add a line to a vehicle's init through script without wiping whats already in its init?
What? How does it make sense even?
@meager granite You mean.... Like this:
https://github.com/dedmen/Intercept_CBA/blob/master/src/SQFExtension/Utility.cpp#L537
https://github.com/dedmen/Intercept_CBA/blob/master/src/SQFExtension/Utility.cpp#L120
๐ I wrote that a year ago
@drifting dragon that doesn't make sense, at the point where you can run scripts on the vehicle, it's init already ran through
I have a question for the C++'s here. I have started to learn the basics of C++ by using a website which offers alot of tutorials on it. Can anyone with experience tell me if this website is a proper learning tool or if I am better off using a different source. I have finished the 0.? chapter, and started on the 1.? chapter.
thank you for any help
On first look it looks good I guess.. Though.. Using libraries with Visual Studio Express 2005 Uh.. we are at Visual Studio 2019 now..
Once you're through that though, continue watching conference talks on youtube (cppcon, ACCU, Meeting C++, C++Now) (https://isocpp.org/wiki/faq/conferences-worldwide/)
You never stop learning
that last part is true
but the version im starting off with atm
is the Visual Studio 2017
Oh nice. Just started looking into the actual chapters.. They don't make the mistake to Teach C instead of C++. Kate Gregory has a very good cppcon talk about that topic ("CppCon 2015: Kate Gregory โStop Teaching C")
They also incorporate all the new features into it.
I only checked half a dozen pages, and honestly I haven't seen a better c++ tutorial, that's even better than some of the paid professionally-made video learning thingies that I've seen
If you need specific help, you can join the "#include cpp discord" (just google for it) or ask in #arma3_tools there are many c++ devs in that channel
IMO Chapter 15 should come right after 6.9, to not let you get used to doing it "wrong"
Btw you can also script for Arma using c++, although that's "experimental" still
well #arma3_scripting/#programming isn't that far off.
Also #arma3_scripting is the inofficial #offtopic channel anyway ๐
ah so this was the wrong channel
my bad @frigid raven
But thank you @still forum for the help on that question. For future reference which channel do i need on this server?
for what I was asking
#arma3_tools is where the c++ devs hang out
Ty
have I gone too far
isComplete = [call {
if (cond1) exitWith {};
if (cond2) exitWith {};
if (cond3) exitWith {};
if (cond4) exitWith {};
false
}] param [0,true];
โฆโฆโฆyyyyyes.
@still forum Oh lol, exactly same command name too
Kllrt gave me the ability to bring some new script commands into the game. If that works out in the end maybe I can get that one too
Nice
I can suggest few if you're interested
Well depends on how much I'm allowed to bother him.
so far I have addWeaponWithAttachmentsCargo(Global) Commands to retrieve the visual bounding box (only visual LOD) and geometry center.
and removeBackpackCargo
Oh and surfaceTexture
- Getting\Setting UI scrollbars
laserTargetTurretsto return lasers from all turrets (laserTargetworks only with primary)- Checking if two arrays are the same (not comparing contents, only if two variables point to same array)
- Return missile target, set missile target (and release if null target is supplied)
Array one would be extremely useful, have a ton of uses for it
I also wanted to give a hashMap. But that would need a new datatype
hashMap would be amazing too
The one that's already in Intercept_CBA.
ANY type key to ANY value.
I'm not really confident enough that my implementation is flawless though
Hm, how about creating\deleting namespaces to work as hash maps, to avoid new data type?
Sa-Matra, love the suggestion to get missile target. I was literally asking about that in here the other day
Yeah, have a need for it as well
creating namespaces is a big nono
They cannot be stored essentially. You can only store references to existing namespaces
It would greatly help me with the APS system I plan to create
You always need something to hold them. Object or Location or one of the static namespaces
Quite shitty tbh. Also objects and locations aren't even namespaces. It's a mess
Oh, another thing about arrays, some kind of command to increment and decrement number in array
_array = [1,1];
_array inc 1; // [1,2]
Instead of _array set [1, (_array select 1) + 1]
you can already use set/select for that. Seems a bit too special use case. I'm wasting kllrt's time with that stuff, so I'd rather make it count doing things that we just can't right now
Sure, you can also do selectLast with count and select, its a quality of life thing and to decrease number of commands executed
Not expecting anything to get into the game though, I already gave up many years ago
Also always a complexity thing. Kllrt is not a programmer so he basically just copy-pastes my stuff
We'll have to see what the future brings. There's no guarantee anywhere
A map implementation would be fantastic to have in the core API. One thing I have been wanting was a way to store and load large data, like 100s of MBs in a reasonable way without an extension, putting that much in the profile seems like a bad idea.
I have also been thinking a periodic callback. The idea being if there is spare cycles and time call this function. It is a not guaranteed to be run at any reasonable period but it also refuses to get in the way of the games normal operation and hurt performance.
Yeah saving significant data without extensions is something I'd love to have as well
Always imagined it to work similar to saveProfileNamespace
<Something> saveNamespace "something" saves serialized namespace into <Profile>.something.Arma3Profile
"something" loadNamespace <Something> loads serialized data into namespace of <Something>
Not sure what Something can be here, anything that has namespace attached to it?
The periodic callback kind of works with it. ACE does all this cache generation every load now and causes stutters on every mission start, we have the same problem with caching of terrain density and both mods and likely many more would happily save their data around a terrain and avoid doing it over and over if they could store it and generate it less invasively
How can I check if a given owner ID is valid, that is, currently connected to the server? So far I can only think about looping through allPlayers until I find a match.
I don't know any other approach, but why would you need to validate them anyway? At the very moment you ask for the owner ID, it's certainly a valid one.
Just making my code a bit foolproof. The function manages transferring ownership of a group to some other machine.
Yes I agree that generally one doesn't change owner until he knows who will take ownership ๐
I would say if you do all your stuff in unscheduled env, you don't need a check. If the machine disconnects in the next frame, the group will be transferred to the server automatically.
Good point, I was just going to wrap everything into a nice isNil {}
Yes, so you are in unscheduled env.
Can i put muliple foreach behind each other like foreach 1;foreach 2; or should i use an array?
Does it matter?
K just wanted to make sure i dont break it
{
{
} forEach [1,2,3,4,5
} forEach[1,2,3,4,5];
Perfect thanks
@tough abyss @meager granite Yeah saving significant data without extensions is something I'd love to have as well
How about LZ compression of a string, and then output in base64 or something like that?
Also a serializeToString command would be nice. I already have serializeToJson in Intercept-network. But using that you would only see how terribly inefficient it is.
@meager granite giving users the ability to create files is probably not a good idea.
Hm... One could do a Serialize to binarized command.. But... I think when you try to deserialize invalid data, you will crash the game, so that's a bad idea in general. Though attaching a checksum... maaaybe
Hmm how would I better do synchronous remote execution? Maybe CBA has it?
So I want to remoteExec something and get an ACK from the other computer that it has executed it.
Just use remoteExec
and remoteExec something back
you have remoteExecutedOwner to get the ownerID of the guy that sent the request
yes, but I will need to waitUntil {} something happens. How would you send the ACK from the other computer? By storing a special variable in the first computer's mission namespace? ๐ค
huh?
Ah
yeah.. Just use a global var I'd say
could also generate a random one. And send the var name along with a string
Yeah I also thought of it. Thx!
I do that in TFAR too. But I don't have a waitUntil
I send something like a uniqueID along. And if I do another request before I got the answer, I "invalidate" the old UID and just ignore the old answer when it comes back
To get rid of scheduled env, you could create an event handler on your first computer that is called from the second one.
That's cool but would need a sort of heap of sent requests that have not been ACKed, I think ๐ค The whole thing starts to resemble a communication protocol.
well yeah. array/cba_hash/cba_namespace
To get rid of scheduled env, you could create an event handler on your first computer that is called from the second one.
I think I'm ok with scheduled env. The point of it was to avoid remote disconnection in the middle of owner change. But it will be solved by the acknowledge protocol anyway. I just need a reasonable timeout in the waitUntil.
hey
i want to blackout everyone screen until everyone loads
to eliminate failstart in TDM
what to do?
i've tried something like
{getPlayerUID _x != ""} count allPlayers == count allPlayers
but how to use it
step by step
Uhhh.....
uhm.. wat
nothing in that line of code will work.. I think?
I guess the != will "work"
[] spawn {
[ "MyLoadingScreen" ] call BIS_fnc_startLoadingScreen;
uiSleep 10;
[ "MyLoadingScreen" ] call BIS_fnc_endLoadingScreen;
};
waitUntil {
//If there are no current loading screens
if ( missionnamespace getvariable ["BIS_fnc_startLoadingScreen_ids",[]] isEqualTo [] ) then {
//Continue
true
}else{
//Otherwise log current loading screens to RPT
diag_log str ( missionnamespace getvariable ["BIS_fnc_startLoadingScreen_ids",[]] );
false
};
};
i've tried something like that
i've seen it in post on BIF
Nope that doesn't work
i've noticed that
You can never be sure that all loading screens are done
damn
because once you see that there are no loading screens open.. And your condition returns true... Half a second later a mod could open another loading screen
so how do you suggest to make everyplayer start at the same time?
start loadingScreen
Where did you get that first one at? Don't tell me someone posted that somewhere
And on server wait till mission has been running for 60 seconds or so. and remoteExec stop the loading screen
something like that
[] spawn {
[ "MyLoadingScreen" ] call BIS_fnc_startLoadingScreen;
uiSleep 60;
[ "MyLoadingScreen" ] call BIS_fnc_endLoadingScreen;
};
should work?
then everyone will start at a slightly different time
scheduled scripts only start running after preInit
people that take longer to load, will execute later
So the best option is to create trigger which fires is 1 player is connected and deletes all invisible walls after 90 seconds?
What I told you will work. But only if noone takes longer than 60 seconds to load (unlikely)
That might work too
But...
Why is it not an option to wait in the briefing screen till everyone is done loading?
that's how I always do it
Do cba PFH scritps run even when alt tabbed and without -noPause
noPause doesn't matter in MP
I can tell you that they don't run in SP when tabbed out without noPause
https://gist.github.com/X39/709ecbf88c5fda594586c9b995c8c6a0 cough (promise.sqf)
though ... few hours too late
@queen cargo nice but as I see the array of requests doesn't get smaller
@astral dawn https://gist.github.com/X39/709ecbf88c5fda594586c9b995c8c6a0#file-promise-sqf-L50-L52 no need for that due to this
essentially, old IDs just get reused so the array does not has to be resized over and over again
Oh that's nice
wait ... no
i think i accidentially removed that functionallity at some point ๐ค
because i cannot find the spot where i set it to -1 again
though ... that at least allows Promise_Done to be used correctly ๐คท
ahh
nah forget it
https://gist.github.com/X39/709ecbf88c5fda594586c9b995c8c6a0#file-promise-sqf-L33 sometimes scrolling up helps
remoteExecSync should be in base game IMO. The fact that you did it on your own proves that some other guy might be reinventing it some time. I am sure they have it in the engine somewhere.
not really ๐คท
implementing such a thing is trivial as you can see
though ... inengine solution would be faster
Yes, you get any printed, for instance, when an element in the array is not defined or in other words isNil for that variable returns true.
keep the quotes in mind with isNil
or curly brackets
I have a mission file where when a marker is selected from treeView the marker changes color, this works in singleplayer but not in mp. any ideas?
the command "marker1" setMarkerColor "ColorRed"; works when I execute it manually but not when it is run in missionfile
Is it possible to ragdoll a unit without killing it?
_unit setUnconscious true; should ragdoll unit for a moment.
@outer fjord
I use this to ragdoll players, the only downside is that it doesn't last very long, 15ish seconds.
http://killzonekid.com/arma-scripting-tutorials-forced-ragdoll/
Sweet, just what I needed ^-^
@astral dawn no they don't have it in the engine. Freezing the game for an answer to come back isn't something you do
I want to find players within given circle area(_center and _radx, _rady). is it corret?
allPlayers select {alive _x && _x inArea [_center, _radx, _rady, 360, false]};```
I just wished you could use a command to permanently ragdoll units. I have some workaround which are really glitchy to say the least. Main issue is control of the state when the ragdolling should stop
networking packets in Arma can't do that
Implementing that would be alot more work than just adding a command.
Though you could add a "doragdoll" command like I have in Intercept and a "ragdollEnded" eventhandler. Then you can just start a new ragdoll with 0 velocity once the ragdoll ends
what i am doing right now for some testing shenigans is setting setunconscious false and then true the next frame.
hence why i say "glitchy"
you like people wobbling around and slide around the floor? Boy do I have news for ya
why do they need to be constantly ragdolled?
ace medical reasons for me. I play with ace for so long that i can tell by looking at someone 400 meters away if they are dead or not
and for goofing around with firends, as in walkinto someone, fall down "Help I've fallen and I can't get up"
and to emulate an older arma bug which made people ragdoll if they walked into someone
That (almost) singular unconsciousness anim is one of my biggest niggles with ACE
Just make a dozen and add them to ACEX
well i do "have" some and i am too lazy to intergrade them into medical rewrite
iirc there is no logic in place to apply these instead of the vanilla after ragdoll animation
these animations are right now only available in my mod tho
@quasi rover allPlayers select { _x distance _center < _maxDist };
If you talk about a circle, that is
Maybe it's a circlette. Don't be so sexist
did you just assume its gender??
thx, the _maxDist mean the radius of circle?
Yep! You only check if the unit is less than X metres from the centre
you are missing the alive check tho.. And
allPlayers inAreaArray [_center, _maxDist/2, _maxDist/2]; HAH!
still missing the alive check :u
/(._.)\
can someone tell me how i can make this this addAction[localize "STR_MAR_Rebel_Clothing_Shop",life_fnc_clothingMenu,"reb",0,false,false,"",' license_civ_rebel && playerSide isEqualTo civilian'];``` into a [] spawn``
I don't understand the question
just put a spawn around it and it will be a spawn?
Oh you mean
calling the fnc_clothingMenu via a spawn?
ye
"[] spawn life_fnc_clothingMenu"
you need to put it into a string
tried it
your argument is a string... But in your [reb] example it's not a string
can you show what you tried?
action = "closeDialog 0; ['reb'] spawn life_fnc_clothingMenu;";
should i change 'reb' into ""reb""
๐ค
I have no idea what that's supposed to be
show me the whole thing, not just a part of it
is reb supposed to be a string or not?
class
wat
1 sec
class reb {
title = "STR_Shops_C_Rebel";
conditions = "license_civ_rebel";
side = "civ";
uniforms[] = {};
headgear[] = {};
goggles[] = {};
vests[] = {};
backpacks[] = {};
};
""Reb"" and 'Reb' should be the same, no? Double quotes or single ' escapes?
thx guys.
Any idea?
Your giving the script a string
If it needs to be a class then you should be referencing to the location of the class
Try using something like this to get the class
"configName _x isEqualTo 'reb' " configClasses (missionConfigFile >> "Location" >> "to" >> "class");
That will return the class for your script in an array
it will return you an array with a single entry
which is kinda stupid if you could instead just do
missionConfigFile >> "Location" >> "to" >> "class" >> "reb"
Question is what the function actually wants as parameter. And what "doesn't work" actually means. And why it wouldn't work without a "spawn"
are there any setName commands, or a way to create dynamic "identities" in description?
Crazy idea: can I run this on a headless client to yield more CPU cycles for my scheduled code?
https://community.bistudio.com/wiki/startLoadingScreen
๐ค That's a interesting thought
Credit goes to this guy ๐ @unreal leaf
You can run my Intercept SQF-Assembly. It has a custom implementation of the scheduler. You can just ... Eh.. where is my custom scheduler.. It should be right there.. Or was it in the debugger?
No it's not.. Where the heck is my scheduler?!
Ah! Found it! https://github.com/dedmen/interceptTest/blob/master/interceptTest/Interpreter.cpp Uh... Crap.
loading screen being open is indicated by a display being open. And... Opening a display on HC....... Doooess.... cmon go faster.....
Should work ๐ค
I expected it not to
So we don't really know... need to try it some time
I gotta find my custom scheduler now.. I have it somewhere I swear!
If it doesn't work you could always use Intercepty stuff for it
(getPosATL player select 2 < 150))) exitWith // 30m ``` can someone help me understand the math here so i can increase the height?
getPosATL player returns [x,y,z] where z is hieght
select 2 means select z
then you check if its smaller then 150
is if its less then 150 it exitWith
Why is it 150 and // 30m though ๐ค The coordinates in arma should be in meters
_result = false;
{
if ((((_x select 0) distance2D _position) < (_x select 1) && (getPosATL player select 2 < 150))) exitWith // 30m height restriction on trader god mode
{
_result = true;
};
}```
does that help
Your current height limit is 150
What's _x?
private["_position", "_result"];
_position = _this;
_result = false;
{
if ((((_x select 0) distance2D _position) < (_x select 1) && (getPosATL player select 2 < 150))) exitWith // 30m height restriction on trader god mode
{
_result = true;
};
}
forEach ExileTraderZoneMarkerPositionsAndSize;
_result```
As others already told you the limit is clearly 150m within the zone limited by the radius (_x select 1). You can convince yourself that this is true by adding a logger like diag_log format ["God Mode: %1", _result]. Just watching a player die doesn't proof anything. It's obvious that this small code is called from other code that is actually responsible for making the player invincible. We don't know what's happening there.
Better question is whether you actually know what and how your function works, or did you just copy-paste it from https://www.exilemod.com/topic/23661-restrict-height-of-god-mode-at-traders/ without checking to see if it's compatible
Looks like someone copied/pasted the code and changed the height without changing the comment ๐
Also that code should be using findIf and private keyword
@astral dawn why do you need scheduled code anyway? ๐
if you need performance then unscheduled
If I need to calculate a lot do I freeze the whole frame then?
yes
Let's say I have 60 FPS, so it's 16 ms per frame
And I need to calculate for more than 16 ms, then what?
then you just do that
fps will go down
game will "freeze" till your calcs are done
which doesn't really matter on a HC I'd say?
But if I play my scenario alone or if I'm the one who hosts?
Wouldn't this freeze the units local to the HC?
then you'll get a short stutter when that code runs
It's not like your script freezes the game for seconds right?
But but... if i need to calculate for 100ms or so? ๐ฎ
Cookies!
So far I do my stuff with unscheduled scripts and message queues, works fine, but might port some things to per frame EHs which don't take a lot of time, maybe
just write better scripts. All problems will begone
Well it's easy to say so but some things really take a lot of time
A lot of config look-ups can't be really optimize, can it? That's usually the problem with code that is expensive for me.
But I get that for something like TFAR you don't need to calculate a lot so you better do everything unscheduled
what is that you need to do?
AI planning and things like that
because if you have something for 100ms, then you either dun fucked up, or you're making something very special which usually means you already know when to use what ๐
Message queue is great to sinchronize things
TFAR needs to calculate alot. and it drags your FPS down quite a bit. But it has to be ran predictably. If someones position just stops updating for 10 minutes because some idiot wrote a stupid scheduled script... People will scream at me instead of that idiot who's fault it actually is
But a scheduled script doesn't stop my position from updating for 10 minutes
If you need to calculate a lot in unscheduled, you divide it in pieces, right? Like no more than 10 units per frame. Well that's like scheduling in some sense.
yeah
'always run unscheduled' is like saying 'always write single threaded code' IMO
yes you are prefered to deal with as little amount of threads as possible, no you must not write it in one thread in all cases
Well besides that scheduled is also single threaded ^^
I'd say its more like one of those guidelines for new people, once you become adept enough you'll learn to use the exceptions
Well you could grab Intercept and move stuff to multithreaded :3
Well in the end if you have single-core CPU then it can run one thread at a time
And you pay for all the thread switching code, and the code that checks at every semicolon whether the 3ms are already over
Really, in any engineering-related task I have never seen a situation where you don't pay with something for something else ๐คท
For example, If you're at the point when you do your own scheduling in sqf (no more than 10 units per frame), might have let arma's scheduler decide it for you because it will do it faster at engine level?
nope
A forEach and deleteRange is faster than a check whether 3ms are over at every expression plus the sorting that's done for scheduled scripts
When you need custom scheduling.. Your code is probably quite heavy, meaning the scheduling code time is probably very negligible.
But moving it to scheduled would add overhead to every expression
3*N+5 is better than 4*N if N is big enough
I guess at some point your own scheduling might become quite complex and overweight the engine-based one?
Don't know how it would
If your scheduling code is slow.. then maybe the slow code shouldn't run in there
I would pay the price for using scheduled for expensive code to avoid freezes on the HC. My two cents.
I would launch a second HC that just runs the slow scripts ยฏ_(ใ)_/ยฏ
You must calculate all the AIs and all the player's radio propagation for TFAR and ... and ... except that the whole thing must not take more than xxx ms of your frame, and some parts must get more priority that other parts
You must calculate all the AIs and all the player's radio propagation for TFAR no. Neither of those
No worries ๐
Just do yourself a favor, if you take code from others, don't be a dick when people ask you about it.
lamo
LMAO
take code from others?
thats exilemods code?
from the client?
tf?
do u mean
and some parts must get more priority that other parts no. But with custom scheduler code you could actually do that. With BI scheduled you cannot.
lmao sheep go back to ur exile discord.
if i wanted to talk to u id PM you.
now ur just starting shit for no reason
@signal pulsar I'd recommend you stop that now
You took other peoples code and didn't know how to use it.. So...
its not tho?
It's actually very simple. What you posted is a edited version of a released script. Which is, to my knowing only available to privately handed out people. So either you took it from somebody's mission file or stole it some other way.
whos code?
It's just pure accident that the code that someone else wrote 1,5 years ago is EXACTLY the same as yours?
It's not Exile's
noone said stealing
Is a edited version of that released by somebody else and then edited again and now u took it from somebody's server mostlikely.
"I took code from somewhere" yeah. That's exactly what Sheep just told you
lol im not even gonna bother
And the version that "was" public, is not what you posted.
" So either you took it from somebody's mission file or stole it some other way."
ok
Yeeh. Very simple.
I think we lost the point of this channel a long time ago
Also worth noting that the version you modified is marked as non-derivative, but that's a rabbit hole we'd best not delve down.
But instead you answered our question you went mayhem on a very well known member of the Exile community and tried to shit all over him.
"Can you prove that I took code from someone else, because I can link you to the page where I took it from"
Uh.... You are just confirming what he's saying dude ๐
yeah
thats not from someones mission file
ur trying to say
i went on someones server
and took their code
thats not the same
" So either you took it from somebody's mission file or stole it some other way."
The thing is Dedmen, there was a version that was public. What he has is a edited version of that script which was never released.
as going on the forums and installing something
@still forum Well BIS scheduler gives equal share to all scripts. So I can divide my 'objects to update' into threads based on priority. So I can do that with BIS scheduler. Except that some other dude's scheduled script will take performance from my scripts as you said, so I get your point, with unscheduled code you get more control of that.
that some other dude's scheduled script will take performance from my scripts That's basically the reason why ACE,CBA,TFAR,ACRE are all unscheduled
\o/ because they must be pluggable into any scenario, but i'm writing a scenario so I can afford that ๐ค Maybe that's the reasonable boundary between scheduled and unscheduled?
Do you also know which mods are running together with your scenario?
Because these can also introduce shit
I had to pull so much crap out of MCC to make it acceptable ๐
And to find the crap. I just searched for "while {true}" and "spawn"
Haha don't worry I'll test my thing if it's done with TFAR and ACE at least ๐
In fact I can't play without these two, so...
Ares is almost entirely based on scheduled, which Achilles inherited. Will take quite some time to get rid of it ๐
Yeah I love it when you drop a module and the dialog takes seconds to open. Or when you press ok in a module dialog and... nothing seems to happen. That's awesome
With the game freezing for like 200ms when you press a button, you know that the game is working really hard
but when it's running along at 60fps and nothing happens, you feel like the game is trolling you
Also with freezes, you immediately see that something is wrong. Plug a profiler onto it and you see where it's wrong.
You can't really see shit scheduled scripts that cause other scheduled scripts to execute less often
That's also kinda putting the burdon onto you of having to fix it. Because people are more likely to complain. Forcing you to write better code
But for parts that search every mod for vehicles and units, I don't really want to move such expensive stuff to unscheduled. Maybe a progress bar would help in such cases.
or prepare some things at game start. Like ACE Arsenal does
Well, if you know that a certain module is almost always used, you could do that for sure.
Or atleast cache once it's first used
That's already there ๐
I prefer a 200ms lag, over having to wait 2 seconds after pressing a button till it actually does anything
lags ingame while running around are unacceptable.
But lags while pressing a button are not that problematic unless they are really too long. Like entering/leaving zeus interface... BI could use some caching there... -.-
But also depends on the kind of button. On a okey button you can freeze longer than for example on the "add item" button in Arsenal. You wanna add 5 items and immediately click the button again, freeze there is just annoying
Just the thing about Zeus is that I suspect that lags caused by expensive scheduled code affects the gameplay, since by design all units placed are local to the Zeus.
is Ares on github?
https://github.com/astruyk/Ares/blob/master/src/addons/ares_zeusExtensions/scripts/Arsenal_CopyToClipboard.sqf
missing private keywords.
You shouldn't actually need the "str" for the arrays. Format already stringifies them
https://github.com/astruyk/Ares/blob/master/src/addons/ares_zeusExtensions/scripts/Util_ExecuteCodeServer.sqf#L21 compiling code is a waste. The game will turn it back to string. Then send the string over, and compile it on the target to execute it there. You're better off just sending a string and compiling once.
You are using try except on a function that doesn't throw?
I don't think I've ever used try except in SQF. What is it even good for?
That code is a very nice playground for people that wanna do optimizations
if you execute a throw command inside a try block. It will basically do a "exitWith" chain and jump till your except block
you can use it to quickly and easily exit deep nested scopes.
Or you could just use breakOut/breakTo commands instead
It's always a question of time. It's a trade-off. Do you want to spend more time on new features or on optimization? Stuff is working, just not really good ๐
params [ ["_pointOfReference", [0,0,0], [[]]], ["_candidateObjects", [], [[]]] ];
private _distObjects = _candidateObjects apply {[_pointOfReference distance _x, _x]};
_distObjects sort false;
(_distObjects select 0) param [1, objNull];
https://github.com/astruyk/Ares/blob/master/src/addons/ares_zeusExtensions/functions/fn_GetNearest.sqf
same code. Just sort true
Does anyone know of a way to remove gps in vehicles? I've made it so you can't get one on the server and gps is set to 0 in description but you can still use built in gps's in certain vehicles etc.
I guess you can't without a mod.
You can close the dialog/display though if it's open
Thx for the suggestions. I've added a new issue for it.
Hello to everyone here. Anyone has a tip and guide on how I can start scripting and modifying arma 3 to the way i want it?
the wiki is the key to all the SQF knowledge you need! โ @polar stag
https://community.bistudio.com/
@winter rose wow thank you so much! Do you need a private server set up inorder to run your modifications and scripts or there are other ways of testing them if they work?
hmm ok. It's time to read and learn! Thanks much ๐
enjoy, and don't hesitate ๐
FAMOUS? Does no one ever remember 2D sweetness?
NO
The good old days of the 2D one are over ๐
I hated the 2D editor so much
YES! Damn you kids and your fancy crapA
it was enough for basic stuff, but come on 3den was soooooo a step forward ๐
@high marsh old fart!
๐
๐
Eden was like a new dimension
I even felt too much freedom at first ๐ "omg omg omg, I can do this and this and that, and place and rotate everythiiiing"
You can even do amazing attachTo compositions with it
directly in 3den?
Yes ๐
By placing the attachTo in the init field
We did some insane mad-max inspired vehicles like this some time ago
Battlebus without having to preview the mission after every 5 seconds of work
Yes I was also amazed when I discovered this
I might make a Ares PR when I'm at work
maybe I can someday stop complaining about how bad Ares scripts are ๐
You mean Achilles, since Ares is no longer being worked on.
Anyway, your wisdom would be appreciated ๐
playing around with playSound I look for a list of vanilla sounds
most of these do not work https://community.bistudio.com/wiki/Arma_3:_SoundFiles
am I mixing up things here?
Using them like this playSound "\a3\missions_f\data\sounds\radio_track_03.ogg";
nothing tho
most vanilla sounds as encoded in .wss, unless the ogg extension is in the path
Hey guys any idea how to stop arma from kicking me if i join one server with two instances logged in on the same computer and steam account? I am trying to test interaction on a mission on my dev box
not sure if that works on dedi then it that case if you already got that
@high marsh Thank you ! that is what i was looking for
Finally i can test alone without the need of a second person
How to check best for an vehicle to have completly no ammo
I spawned a truck with 5x magazines and checkit it with waitUntil to have getAmmoCargo _vehicle isEqualTo 0
but that son is always returning 1
even tho the inventory is blank
oh
Nah I am talking about cargo of a truck
magazineCargo
sure.
well does BIS has any convenient function to check if cargo is all blank?
I made an own func that checks getMagazines, getItems, getBackpacks etc.
but feels very hacky
just count ti
_magCount = count magazineCargo _veh;
if(_magCount == 0) then
{
hint "It's blank, bleh.";
};
if (magazineCargo _veh isEqualTo []) then { โฆ };
^ I see it more and more written like thisโฆ isEqualTo is better performance-wise (but less understandable from my personal pov)
Makes perfect sense.
isEqualTo?
if(magazineCargo _veh isEqualTo []) then
{
};
Well, I guess there might be an "old school" side to me too but I also think that here you are saying "is what this command returns an empty array" and not, more human readable, "are there no magazines in there"
I don't know if I make sense here
The only thing wrong with how Midnight is doing it is the newline for the open bracket. lol
Oh dear god, gnashes please no.
No, Allman style all the way!
And then obviously if you want to check for no weapons, backpacks, etc, etc at once just stack the commands before the isEqualTo check
kinda wish we had an actual getContainerContents command that returned everything at once. Including container contents within the container.
Course, that's also probably asking for just a messy return format
Just a blurry memory but don't we have that now? Or am I mixing it with some vehicleWeapons command?
I don't think we do? You'd have to loop everyContainer coupled with get(x)Cargo currently unless I'm having a massive blonde moment (i.e, to return contents of containers stored in a larger container)
no no really, don't trust my brain at this time of the day ^^ I will check on my side, for my brain's sake
Yeah, nevermind.
Actually I was asking for a more convenient way to check for ALL types of "stuff" in a vehicle cargo
To check if a truck is fully empty I actually do fn_hasEmptyCargo
#include "script_component.hpp"
params [["_object", objNull]];
if (_object isEqualTo objNull) exitWith { false };
(count itemCargo _object == 0) and (count weaponCargo _object == 0) and (count magazineCargo _object == 0) and (count backpackCargo _object == 0)
I was looking for something like BIS_fnc_isCargoEmpty or something but no luck
@frigid raven have you tried reading the wiki?
https://community.bistudio.com/wiki/playSound
"From CfgSounds" it doesn't take file paths
Use a configViewer to find all possible sounds. RadioChatter is probably not in there
@still forum alrighty
What is the reason for that?
player inArea "insertion" // true
(vehicle player) inArea "insertion" // false
ok it was just a pixel further away xD
nevermind
[itemCargo _object, weaponCargo _object, magazineCargo _object, backpackCargo _object] isEqualTo [[], [], [], []]
ah nice wasnt aware this poppible
or array + array + array isEqualTo []
Is it possible to get the current camera position. eg. if playing as unit the pos of the unit, but when in spectator mode and free flying get current position of where you are. and when in spectator mode but 3rd person of a unit get their position?
is there a single simple command for that? or does CBA/ACE has?
so, positionCameraToWorld [0,0,0] would be center of head when as a unit? but also center of camera as spectator.
ye
k thanks
@astral dawn if you want your HC to run more scheduled, you could also grab the fps unlocked server binary.
I think default FPS lock of the server or HC is 50, right?
ye
Should give 18% spent on scheduled SQF considering it can do everything during the rest of the frame
Yeah, interesting idea
I thought a bit today. If I run unscheduled inside the frame, can I just save all the local variables of current function so that I can implement the context switch through SQF in case I want to suspend the current function until better time?
theoretically... but that would be alot of work
I think for an MP scenario it would be preferable for the server to run all scripts inside frames
Yeah i mean inside the onEachFrame handlers or their CBA counterparts
I mean, even if it takes 100ms for the server to crunch my data, and if it stretches the whole frame to 100ms, it's not as noticeable for clients as if it happened on player's computer and he would have a noticeable freeze. Or am I wrong and having one long frame is still very bad for MP?
server freezing means no network messages are passed around. No AI's are simulated
everyone would essentially desync as long as the server is frozen
at 100ms it doesn't matter much thouch
Yeah that's what I thought
You can freeze a HC as long as you want. But on server that's not really a good thing to do
As long as it owns no groups or objects I suppose?
yeah. If it owns AI's they will freeze
Then that's a solution of making an HC just crunch data, make it run a function through remoteExecCall. No 3ms or framerate limitation. ๐
Did you see anyone do it though?
I wonder if there is a way to halt the rebeather from working ? Appart from taking it from the unit ?
Maybe this can do something?
@vernal mural https://community.bistudio.com/wiki/setOxygenRemaining
Hell O_o I have never seen such a command O_o Nice catch, sir !
Phrase 'remaining oxygen' got stuck in my mind so I just googled arma 3 remaining oxygen ๐
Hmm although here they say that it doesn't change anything
https://forums.bohemia.net/forums/topic/177822-simulating-defective-rebreather/
okay I apparently got the weirdest error ever in one of my scripts.
_unit = _this select 0;
removeAllWeapons _unit;
removeAllItems _unit;
removeAllAssignedItems _unit;
removeUniform _unit;
removeVest _unit;
removeBackpack _unit;
removeHeadgear _unit;
removeGoggles _unit;
_unit forceAddUniform "U_BG_Guerrilla_6_1";
_unit addItemToUniform "FirstAidKit";
_unit addItemToUniform "MiniGrenade";
_unit addVest "V_PlateCarrier2_rgr_noflag_F";
_unit addItemToVest "HandGrenade";
_unit addItemToVest "SmokeShell";
_unit addItemToVest "SmokeShellGreen";
_unit addHeadgear "H_ShemagOpen_tan";
_unit addGoggles "G_Balaclava_TI_blk_F";
_unit linkItem "ItemMap";
_unit linkItem "ItemCompass";
_unit linkItem "ItemWatch";
_unit linkItem "ItemRadio";
_unit linkItem "NVGoggles_OPFOR";
Error is that _unit is not defined at line 3...
_unit will be nil :3
is _this an array? How do you call your script?
inb4 _unit call _fnc_thatscript
from my lightLoadout.sqf
_unit = _this select 0;
_handle = [_x] execVM "loadouts\generalUniformLoadout.sqf";
waitUntil {scriptDone _handle};
_unit addWeapon "arifle_AKM_F";
for "_i" from 1 to 6 do {_unit addItem "30Rnd_762x39_Mag_F";};
_unit addPrimaryWeaponItem "optic_Aco";
_unit addPrimaryWeaponItem "30Rnd_762x39_Mag_F";
weapon is added.
But the uniform stuff from the script with the error is not...
_handle = [_x] execVM "loadouts\generalUniformLoadout.sqf";
waitUntil {scriptDone _handle};
So uh.... call compile preprocessFileLineNumbers? ๐
thats the same as doing execVM
it's not
why spawn it and then waitUntil if you can just call?
hmm.... true
I better put it into the CfgFunctions anyway
though Im not sure if thats going to fix the error
i mean you're using _x, why not unit?
yeah
params is one of those good arma commands you should 100% understand beacuse you use it just about everywhere
I understand it
though I usually only use it on functions with multiple parameters
@astral dawn oh, disappointing... Thanks anyway !
Maybe still worth trying though
Or maybe if you make a mod which inherits a rebreather but makes it not rebreather but a vest and then you simulate it with constantly setting player's oxygen until you decide it should break ๐ Not totally sure that it's possible in arma though
Yeah you don't even need to constantly set the exygen of the player. If I have an "exhausted" rebreather, I can just take out the true one from the player and give him the empty one instead
But I'm still trying to figure out what in the config make a rebreather a rebreather
It looks like the most promising value is "vestType = Rebreather" under ItemInfo, but not sure
What was the unit[] property in config.cpp good for again? I missed maintaining that part as I continued to add more editor modules but everything ran fine - so what do I need to care about that for again?
@vernal mural check fn_feedbackMain.fsm
although that just seems to link to getOxygenRemaining player :/
Where is located this FSM ?
functions_f\Feedback
might wanna unpack yourself though, didnt update my stuff in a while
yeah it looks like it's when the player is underwater without a rebreather
How does the difficulty settings for AI skill and AI precision influence the actual AI skill? does it act as a limiter or as a coefficient?
thats the same as doing execVM execVM is the same as spawn compile preprocessFileLineNumbers
You are putting unit into _unit... And then try to pass _x as unit.. _x is not unit.
Yes I'm slow :u
@astral dawn there is no unit property that I can think off. There is units though. in CfgPatches
Not me but @frigid raven
yea sry I meant that CfgPatches thingie
is defined in my config.cpp
mixed that up
oops
Well it defines what CfgVehicles entries are contained within your mod.
Zeus references that to check if the vehicle should be spawnable. 3DEN editor might too. And other mods might use that too to check which vehicles you are adding
ah ok - its just for external purposes
so not needed for the addons functionality itself
depends what your addon is doing
if you add vehicles and want them to show up in zeus... then...
ok I see
It's also used to build the requiredAddons list in the mission.sqm
Curator goes through it's "allowed addons" to collect all classnames from the CfgPatches units entry for these mods to find all spawnable units
Yeah I thought my browser was dammaged or smth like that
Hopefully I have a local copy of that page ๐
@cosmic lichen broke it. Here is a working link: https://community.bistudio.com/wiki?title=Category:Scripting_Commands_Arma_3&redirect=no
https://community.bistudio.com/wiki/unitAddons also uses units entry in CfgPatches
Curator also uses it to allow addons for objects that have been pre-placed in a mission
Okey fixed the wiki again
Second time someone tries to break the script command page this month ๐
my turn now!
w u ppl do tis??
for the Glory of Satan, of course! ๐ ๐น ๐
ah carry on then
How do you set a variable for the people inside a trigger only?
EM_enable = [false, false];
//in trigger turns it off for everyone. Is there any way to do something like
{EM_enable = [false, false];} forEach thisList;
oh great a volunteer!!
would setVariable work for that though?
I was under the impression that setVariable needs to be gathered using getVariable
@tough abyss what exactly do you want to do? set a public var only on people's computer?
Pretty much, if possible.
It's for disabling enhanced movement (3rd party mod) inside certain areas.
Currently it disables it for everyone whenever a guy is inside base.
you can create a trigger with only "player" as trigger, NOT server-side
this should do, the trigger will only have local effect (DON'T publicVariable of course ^^)
Wait, how would one go about doing that? heh
what you did, without the forEach
I guess there's no way then. Currently I have it set to
if (!isDedicated) then {
EM_enable = [false, false];
};
"player activated", and not "server side"
Just EM_enable = [false, false];
Are there additional features for triggers when made outside the eden editor?
I have it set to:
Activation: Any player
Activation type: present
Repeat: true
Server only: False
condition: this
On act, deact is the code above
oh wait, there is no "activation = player" maybe
then in conditions use this && player in thislist
should do the trick ๐
Ok, thanks! ๐
I just realised conditon is an if statement
My knowledge of triggers has widened lmfao
Hehehe welcome to Arma
This might be an awkward question but...
Is it possible to force the rotor on a helicopter to be completely on? Like skip the animation of slowing building up rotor speed.
In single player you can always just speed up the game for the duration needed?
@delicate lotus not without Advanced Flight Model I'm afraid - or createVehicle one with "FLY" attribute and setPos it where needed
Thats actually what I wanted to avoid. But thanks anyway. Its not really necessary anyway.
i could use a little help here.i want to spawn in some anomalies of different types and i made this ```sqf
// find all anomaly mapmarkers and spawn a anomaly at that position
{
if ( x find "burp" >=0) then {
[getmarkerPos _x] call blablabla;
diag_log format["anomaly markers collected(blablabla): %1" , _x];
};
if ( x find "fart" >=0) then {
[getmarkerPos _x] call blabla;
diag_log format["anomaly markers collected (blabla): %1" , _x];
};
if ( _x find "spark_" >=0) then {
[getmarkerPos _x] call bla;
diag_log format["anomaly markers collected (bla): %1" , _x];
};
} forEach allMapMarkers;
diag_log "finding all anomaly markers done";```
its finding all markers and logs names to the rpt
how do i pushback them into 3 arrays a spawn script could read from?
beacause calling the spawn files from the above will not work
basically i need something that will go through the indexed markers and repeat the object spawn until the array end is reached.to select 0 works for the first marker so i am on the right way,just need a tip for this being done multiple times
declare the arrays before the forEach loop, fill them in it, use them after?
like
private _fartMarkers = [];
{
if (_x find "fart_" > -1) then
{
_fartMarkers pushBack _x;
};
} forEach allMapMarkers;
then you can use another forEachโฆ for each array ๐
how bout a global var the array has got?
I didn't get it?
nvm i was a bit absent^^
nope it will continue to spawn only on the first marker
i double checked for loops tho
Foreach array doesnt work it seems.any other way than having redundant code for each one in the array?
I could do select 0
Select 1
And so on but why
how are you trying to use foreach?
Collect markers depending on name.pushback into an array.do scriptexec foreach arrayname
Script takes select 0,spawns an object and effects
@winter rose your code would be a perfect example where one would use select
You've just successfully told me what I already knew. I meant how exactly. What the script is. aka show me the script
Would take a few mins as i am cooking right now. Its just a createvehicle and the pushback (which may be too late?) with the effects taking the var name of the created vehicle
I'm asking to see the code because I think you have some syntax or logic error in there
you explaining what you are roughly somewhat doing doesn't help at all
Will do after the meal.
Is there a better way to gather nearestObjects without causing a big lag spike?
@carmine abyss it all boils down to what you want to get, check nearObjects, nearEntities (iirc) and others, each has a different usage (sorted or not, dead units, etc)
Okay I will look at those ty
What do you need it for @carmine abyss ?
Sometimes there's a cheaper alternative way
Well I use one nearestObjects to find all anti air vehicles with 1km of a drone. The second nearestObjects I need to find everything except the ones in the first array
and it's causing a stutter?
Yes because I have to increase the range to the size of the map and it freezes for a few seconds until it gathers it all
When I tried using vehicle it wanted the array to be filled with objects in a string
["car", "tank","boat"] but it returned [car, tank, boat]
So nearestObjects would not work with it.
don't use nearestObjects
Ok
private _allAA = vehicles select {(typeOf _x) isEqualTo '<myAAClassName>'}```
Ah ok I'll try that ty
@sturdy cape ```_nodeMarkers = [];
{
_containsStringNode = ["node", _x] call BIS_fnc_inString;
if(_containsStringNode) then{
_nodeMarkers append [_x];
};
} foreach allMapMarkers;
Nice one thanks.
Im doing a similar thing and thats how i did it
it adds every marker containing the word node to an array
Basically thats what ive already tried but your way is way better trackable in debug and looks more versatile
you can easily add more searches aswell
if ( _x find "burp_" >=0) then {
[getmarkerPos _x] call tzr_nuclear_create_burper_object;
diag_log format["anomaly markers collected(burper): %1" , _x];
};
if ( _x find "fart_" >=0) then {
[getmarkerPos _x] call tzr_nuclear_create_farty_object;
diag_log format["anomaly markers collected (farty): %1" , _x];
};
if ( _x find "spark_" >=0) then {
[getmarkerPos _x] call tzr_nuclear_create_sparky_object;
diag_log format["anomaly markers collected (sparky): %1" , _x];
};
} forEach allMapMarkers;```
This was mine
Your way i can leave the pushback out
I think
๐ค
๐
fartArr = [];
sparkArr = [];
{
_containsStringBurp = ["burp_", _x] call BIS_fnc_inString;
_containsStringFart = ["fart_", _x] call BIS_fnc_inString;
_containsStringSpark = ["spark_", _x] call BIS_fnc_inString;
if(_containsStringBurp) then{
burpArr append [_x];
//or do something else
};
if(_containsStringFart) then{
fartArr append [_x];
//or do something else
};
if(_containsStringSpark) then{
sparkArr append [_x];
//or do something else
};
} foreach allMapMarkers;
@sturdy cape
Will try that tomorrow.Thank you very much.
@lost iris replace inString with find
replace append [_x] with pushBack _x
Hi, I would like some help on a trigger I'm trying to make. Basically, there's a gate that I only want pilots to be able to enter. I've put the trigger down but I didn't know that I couldn't set multiple trigger owners and I have multiple pilot slots. Is there a way for the trigger to identify the player as a pilot which will then open the gate?
wHY IS (player call TFAR_fnc_isSpeaking) always returning false?
Hi...im trying to play a xmas music file on dedi server, local testing works great but on server no sound is playing....what am i missing?
Descristion.extsqf class CfgFunctions { #include "Functions.hpp" }; class CfgSounds { sounds[] = {}; class xmas { name = "xmas"; sound[] = {"\Sounds\xmas.ogg", db5, 1.0}; titles[] = {}; }; };
InitServer.sqfsqf _nul = [x] execVM "scripts\xmas.sqf"; _nul = [x_1] execVM "scripts\xmas.sqf"; _nul = [x_2] execVM "scripts\xmas.sqf"; _nul = [x_3] execVM "scripts\xmas.sqf"; _nul = [x_4] execVM "scripts\xmas.sqf";Also what is the code for combining those into one command (the x and x_1 to x_4)
xmas.sqf```sqf
_soundObject = _this select 0;
_trackLength = 400; // Amount of seconds the sound goes for. You will have to adjust this to suit your sound!
_delay = 1; // How many seconds to delay between loops.
while{True} do
{
_soundObject say3D "xmas";
sleep _trackLength + _delay;
};```
Well that was harder than it should of been, but if anybody is wondering how to find difference between unit direction and bearing between two objects, the formula is 180 - abs(180 - abs(_Heading - _Bearing));
@tame stream say3D has local effect, use remoteExec.
@copper raven
xmas.sqf```sqf
_soundObject = _this select 0;
_trackLength = 400; // Amount of seconds the sound goes for. You will have to adjust this to suit your sound!
_delay = 1; // How many seconds to delay between loops.
while{True} do
{
_soundObject remoteExec "xmas";
sleep _trackLength + _delay;
};```
Likeso
no. [_soundObject,"xmas"]remoteExec["say3D",-2];
or playMusic, if it is an actual music
@copper raven thx testing now
does allDead array return also units handled by corpseManager / wreckManager ?
Why am I getting undefined variable in this code
If (_SourceAltChannel == -1) then {_SourceAltFreq = _SourceFreq} else {_SourceAltFreq = parseNumber ((_SourceSettings select 2) select _SourceAltChannel);};
hint str(_SourceAltChannel);
If ((_SourceFreq == _TargetFrequency) || (_SourceAltFreq == _TargetFrequency)) then {
where pls?
I'm getting a hint that says -1, but for that second if it says undefined variable sourceAltFreq
It usually tells you the line and the var nameโฆ
well _sourceAltFreq is undefined
define it outside the blocks first
And atleast according to the code you posted. _TargetFrequency is also undefined
private _SourceAltFreq = If (_SourceAltChannel == -1) then {_SourceFreq} else {parseNumber ((_SourceSettings select 2) select _SourceAltChannel);};
I just posted a snippet of code
You just posted a incomplete snippet of code.
HEre is full code
[TestObject01,player,31.8] spawn {
_Target = _this select 0;
_Source = player;
for "_i" from 0 to 16 step 1 do {
_TargetFrequency = _this select 2;
_SourceDir = getDir _Source;
_SourceDirTo = _Source getDir _Target;
_Distance = _Source distance _Target;
_HeadingDifference = 0;
_SourceChannel = (call TFAR_fnc_ActiveLrRadio) call TFAR_fnc_getLrChannel;
_SourceAltChannel = (call TFAR_fnc_ActiveLrRadio) call TFAR_fnc_getAdditionalLrChannel;
_SourceSettings = (call TFAR_fnc_activeLrRadio) call TFAR_fnc_getLrSettings;
_SourceFreq = parseNumber ((_SourceSettings select 2) select _SourceChannel);
private _SourceAltFreq = If (_SourceAltChannel == -1) then {_SourceAltFreq = _SourceFreq} else {_SourceAltFreq = parseNumber ((_SourceSettings select 2) select _SourceAltChannel);};
hint str(_SourceAltChannel);
If ((_SourceFreq == _TargetFrequency) || (_SourceAltFreq == _TargetFrequency)) then {
_HeadingDifference = 180 - abs(180 - abs(_SourceDir - _SourceDirTo));
_HeadingCoef = (0.95^(_HeadingDifference));
_DistanceCoef = ((((log 20) * _Distance) + ((log 20) * 31.8)) / 200);
_CombinedCoef = _DistanceCoef / _HeadingCoef;
_Jitter = 1 - ((Random 200) - 100) / 1400;
systemChat str(_Jitter);
_SignalLevel = (37 - _CombinedCoef) * _Jitter;
If (_SignalLevel >= -96.6) then {hint format["Signal Level: %1 dBm",_SignalLevel]} else {hint "Signal Level: No Signal"};
Sleep 0.5;
};
};
};
With the private _SourceAltFreq I get generic error in expression on the same line
If no alt freq is set, it returns as integer -1
if alt freq is set it will return as string
๐คฆ oops
you can use
```sqf
<code>
```
to properly highlight your code. makes it easier to read
And you didn't copy what I sent you
of course what you have is not gonna work
= doesn't return anything
you are trying to put nothing into a variable, that causes the script to bail out
Now another issue is that if I change off of that 31.8 frequency I stop getting hints, but if I change back I won't get hints again
If you change it you don't get hints.
If you change it back you still don't get hints?
which hints?
the signal level ones
here is code with your change
[TestObject02,player,31.8] spawn {
_Target = _this select 0;
_Source = player;
for "_i" from 0 to 32 step 1 do {
_TargetFrequency = _this select 2;
_SourceDir = getDir _Source;
_SourceDirTo = _Source getDir _Target;
_Distance = _Source distance _Target;
_HeadingDifference = 0;
_SourceChannel = (call TFAR_fnc_ActiveLrRadio) call TFAR_fnc_getLrChannel;
_SourceAltChannel = (call TFAR_fnc_ActiveLrRadio) call TFAR_fnc_getAdditionalLrChannel;
_SourceSettings = (call TFAR_fnc_activeLrRadio) call TFAR_fnc_getLrSettings;
_SourceFreq = parseNumber ((_SourceSettings select 2) select _SourceChannel);
private _SourceAltFreq = If (_SourceAltChannel == -1) then {_SourceFreq} else {parseNumber ((_SourceSettings select 2) select _SourceAltChannel);};
If ((_SourceFreq == _TargetFrequency) || (_SourceAltFreq == _TargetFrequency)) then {
_HeadingDifference = 180 - abs(180 - abs(_SourceDir - _SourceDirTo));
_HeadingCoef = (0.95^(_HeadingDifference));
_DistanceCoef = ((((log 20) * _Distance) + ((log 20) * 31.8)) / 200);
_CombinedCoef = _DistanceCoef / _HeadingCoef;
_Jitter = 1 - ((Random 200) - 100) / 1400;
_SignalLevel = (37 - _CombinedCoef) * _Jitter;
If (_SignalLevel >= -96.6) then {hint format["Signal Level: %1 dBm",_SignalLevel]} else {hint "Signal Level: No Signal"};
Sleep 0.5;
} else {};
};
};
add diag_log's everywhere for all your variables and check where it stops working
_HeadingDifference = 180 - abs(180 - abs(_SourceDir - _SourceDirTo));
Uh...
where do I find diag_log
?? I thought diag_log output to a file
RPT
%localappdata%\Arma 3
[TestObject02,player,31.8] spawn {
params ["_target", "_source", "_targetFrequency"];
for "_i" from 0 to 32 step 1 do {
private _headingDifference = _source getRelDir _Target;
private _distance = _source distance _target;
private _activeLRRadio = (call TFAR_fnc_activeLrRadio);
private _sourceChannel = _activeLRRadio call TFAR_fnc_getLrChannel;
private _sourceAltChannel = _activeLRRadio call TFAR_fnc_getAdditionalLrChannel;
private _sourceSettings = _activeLRRadio call TFAR_fnc_getLrSettings;
private _sourceChannelSettings = (_sourceSettings select 2);
private _sourceFreq = parseNumber (_sourceChannelSettings select _sourceChannel);
private _sourceAltFreq = if (_sourceAltChannel == -1) then {_sourceFreq} else {parseNumber (_sourceChannelSettings select _sourceAltChannel)};
if (_targetFrequency in [_sourceFreq, _sourceAltFreq]) then {
_headingCoef = (0.95^(_headingDifference));
_distanceCoef = ((((log 20) * _distance) + ((log 20) * 31.8)) / 200);
_combinedCoef = _distanceCoef / _headingCoef;
_jitter = 1 - ((random 200) - 100) / 1400;
_signalLevel = (37 - _combinedCoef) * _jitter;
if (_signalLevel >= -96.6) then {
hint format["Signal Level: %1 dBm", _signalLevel]
} else {
hint "Signal Level: No Signal"
};
sleep 0.5;
};
};
};
What is the for loop for?
It's supposed to run for a fixed time, I just have it set to 16 seconds for testing purposes
It loops 32 times essentially wasting time needlessly if you are not on the frequency
Because the sleep is only inside the frequency checked if thing
Is there an easy way to make it only start running when correct frequency is set?
TFAR has a frequency changed eventhandler
Oh wait. Is that some kind of like... It shows you whether you are looking towards a certain object right?
Yes it's a radio direction finder
https://github.com/gruppe-adler/TvT_BreakingContact.Stratis this mission also uses something like that
https://github.com/gruppe-adler/TvT_BreakingContact.Stratis/tree/master/grad_tracking/functions/player
ALso I checked diag_log and when I switch from 31.8 to 31.9 it shows the switch, but when I did 31.9 to 31.8 all variables still there but it just stopped with the last entry being a 31.9
Yeah that's because of the sleep thing I just told you
if the frequency doesn't match. It will run through all 32 iterations in like.. 2 milliseconds and then exit
Oh okay I see now
ANd i wanted to add to check if target is actually speaking or not but this just shows "Not talking" when I talk, both over direct or radio.
[TestObject01,(_this select 1)] spawn {
_Target = _this select 0;
_Source = _this select 1;
For "_i" from 0 to 32 step 1 do {
if (player call TFAR_fnc_isSpeaking) then {
systemChat "Talking";
}
Else {SystemChat "Not talking"};
Sleep 0.5;
};
};
TFAR 1.0 or 0.9.x?
1.-1.0.302
Try player getVariable ["TFAR_isSpeaking", false]; try that
Yep that works
OOPS. isSpeaking func is broken ๐ Thanks
Old TFAR returned SPEAKING new one returns two numbers indicating whether speaking and/or speaking on radio on a frequency that you can hear
Wait so could i have just skipped all the getting the channel stuff
if the fnc was working
Probably.
private _splitResult = ("task_force_radio_pipe" callExtension format ["IS_SPEAKING %1", name _target]) splitString "";
//_splitResult
//1 - is Speaking
//2 - is Speaking on a Radio frequency that we can currently receive
private _isSpeaking = (_splitResult select 0) == "1";
private _isSpeakingOnRadio = (_splitResult select 1) == "1";
Ah discord doesn't copy correctly. After IS_SPEAKING there needs to be a tab, not spaces. very important
Or wait..
Forget that
way easier
player getVariable ["TFAR_isReceiving"];
I never tested that thing out though... Dunno what happens when you change frequency in the middle of a transmission. The internal variable mooost likely doesn't update correctly
Wait... I think that stuff doesn't even work at all :D
Nope.. Doesn't. That variable only works for player itself, only the local player
Why does everything have to be so complicated ๐
In a perfect world you'd have an eventhandler on both tx and rx that included both rx/tx info about the radios, and unit using the radio
But you start going down that route things start to get bloated
TFAR doesn't really store when you retrieve a transmission from someone else. It recalculates that on each audio packet.
Because you might be changing your local frequencies between start and stop of a transmission, or drop your radio.. or go out of range
So also can't expose that info to Arma. That TFAR_isReceiving var increments on transmission start, and decrements on stop. If you change the frequency while a transmission is going on, it will never decrement and that var will be stuck on true.. Have to fix that someday
Well my script works now at least, might not be pretty, but it's just used on one player for a single mission every now and then
Hello guys, speaking of TFAR, do you have any idea why cba keybind is not blocking its hotkeys?
TFAR has special code to not be blocked, or block other keys
So that you can radio while running or reloading or using the ace menu and so on
Ok, thanks for the info. How do you think, display event handler like that is gonna hit the client fps or not?
waituntil {!isnull (finddisplay 46)};
{
// systemchat str (_x < 250);
if (_x < 250) then {
private _code = {
if (!pzn_transmitting) then {
_handler = (findDisplay 46) displayAddEventHandler ["KeyDown","if ([_this select 1,[_this select 2,_this select 3,_this select 4]] in pzn_radiokeybinds) then {true} else {false}"];
// hint str _handler;
pzn_transmit_handlers pushback _handler;
};
};
["KKA3fix", format['notransmithost%1',_x], ["No transmit host", "distribute transmit blocking"], _code,{false}, [_x, [false, false, false]],false,0,true] call CBA_fnc_addKeybind;
};
} foreach (actionKeys "ReloadMagazine");
player addEventHandler ["Reloaded", {
{(findDisplay 46) displayRemoveEventHandler ["keyDown",_x]} foreach pzn_transmit_handlers;
pzn_transmit_handlers = [];
}];
it looks to be scheduled
Ah that there.
you might wanna use params instead of 4 times select
also if X then true else false is dumb and idiotic and stupid
if x is true.. It's already true. Then true doesn't change the value
If it's not true, it will be false. And call the else statement. Which will return false. But it already is false. That doesn't make sense
So actually.. Half of your code is completely useless.
yep that is not make preety much sence
i was just preety messed up with that true on the end of eventhandler code to intercept other keybinds
Question, when using the rhs launcher by a gear script, it spawns unloaded
Is there any way to spawn it on the unit loaded with a spesific ammo type?
this addWeapon "rhs_weap_smaw_green"; || does not add ammo to it
try reload
add the magazines before adding the weapon
@ruby breach Thanks, that seems to be what I need
mpmissions__cur_mp.kelleysisland\mission.sqm/Mission/Entities/Item0.type: Vehicle class ModuleHideTerrainObjects_F no longer exists
can somebody help me ?
What am I doing wrong? My HC runs this inside init.sqf. I host the server from the editor and remoteExecutedOwner returns 0.
[clientOwner, {
private _remoteOwner = _this;
diag_log format ["---- Connected headless client with owner ID: %1. RemoteExecutedOwner: %2, isRemoteExecuted: %3", _remoteOwner, remoteExecutedOwner, isRemoteExecuted];
}] remoteExec ["call", 2, false];
And that's what i find in my server's RPT:
1:14:33 "---- Connected headless client with owner ID: 3. RemoteExecutedOwner: 0, isRemoteExecuted: false"
yes, you make the server execute the code @astral dawn
wait, I might be wrong in my night logicโฆ
The code above runs on HC, which makes the server execute what is inside {}
ive made a function that applies player damage on being inside a radius.made a diag log to check if things are working and its applying damage twice or 3 times per kill. easy way to prevent a script doing this?
this is on a local machine
What would you like to prevent? The script called 3 times or what?
if I wanted the remote designator backpack camo to match say the RHS version of the assault pack, could I just use setObjectTextureGlobal to do that in a multiplayer mission? Is there anything I have to watch out for?
@spice axle yeah,basically.script is executed by a while that checks every secont for player distance to object
What are you trying to achieve sparker
Holy Shit that is performance garbage @sturdy cape
setobjecttextureglobal should in theory just work fine on selection 0
Use a trigger is eden
Cool thanks
its for a server side addon ๐ญ
What do you want to achieve?
well i am having an anomaly system that spawns anomalies around the map,then checks if theres player approximity,then kills people
First of all take a CBA_addPerFrameHandler
Second, itโs already there. Check out: https://github.com/diwako/stalker_anomalies?files=1
@peak plover Just experimenting with remote executions. Or is remoteExecutedOwner supposed to return garbage sometimes?
if i would throw that into a client mod,could i createtrigger on this anomalies maybe? no no, want to do our own stuff for the map we are making so i wont reuse other stuff than ive already got permission for to rewrite
There is no client and server mod. There is a mod. They should be loaded on client and server. Sometimes there is no need for a server version.
What?
desolation redux mod>>arma plugin management system (APMS)
pretty nice,you throw your plugins into a server folder,a config file in the other and stuff is running server only remotecalling stuff
Then I canโt answer your questions. I have no clue about these kind of stuff
in lazymens terms
Yeah thatโs how a mod works^^
https://www.desolationredux.com/wiki/APMS sorry if putting links here isnt okay,go ahead and delete if so
the client hasnt got any files,only compiled fnc
@astral dawn seems legit, remoteExecutedOwner is 0 because isRemoteExecuted is false. Why is it false, who knows, could be because you run it from editor or could be because it is HC, could be a bug. Try on dedicated.
why is it false?
๐คท๐ป
It worked when I tried it with call
I'd post the code, but it's malicious
I have no clue why it's false, it's very weird
But it worked when i get the clientOwner at the HC and pass it as argument to the server so the server knows the HC's owner iD
yeah I guess
What is the name of the script that allows you to make boxes like this
trying to search through the ace PBO's and cant find it
if it helps I am using ACE, Achillies and CBA
google CBA progress bar
thanks
itโs on their github wiki if it doesnโt show
https://github.com/CBATeam/CBA_A3/blob/master/addons/ui/fnc_progressBar.sqf is this right one?
looks fun...
ya
@surreal peak https://community.bistudio.com/wiki/DialogControls-ProgressBar and https://community.bistudio.com/wiki/progressSetPosition if you don't want to create config
ooo thanks!
You can just make a CT_STATIC and change it's size and use ctrlCommit <time>
But why reinvent the wheel ๐คท๐ป
I have issue with mod ( operator % ). When I run my loop it gives incorrect values.
_c = 0;
while { true } do
{
systemChat format ["_counter: %1", _c];
systemChat format ["_mod: %1", _c mod 3];
if ((_c mod 3) == 0) then
{
_c = 0;
};
_c = _c + 0.2;
sleep 0.2;
};
results: _counter = 26 | _mod: 2.00003
_counter 26.2 | _mod: 2.20003
_counter: 31.6 | _mod: 1.60005
well, _counter: 9 should give _mod: 0 if I am not mistaken
yeah. And what do you get?
16:12:32 "_counter: 0"
16:12:32 "_mod: 0"
16:12:33 "_counter: 0.2"
16:12:33 "_mod: 0.2"
16:12:33 "_counter: 0.4"
16:12:33 "_mod: 0.4"
16:12:33 "_counter: 0.6"
16:12:33 "_mod: 0.6"
16:12:33 "_counter: 0.8"
16:12:33 "_mod: 0.8"
16:12:33 "_counter: 1"
16:12:33 "_mod: 1"
16:12:34 "_counter: 1.2"
16:12:34 "_mod: 1.2"
16:12:34 "_counter: 1.4"
16:12:34 "_mod: 1.4"
16:12:34 "_counter: 1.6"
16:12:34 "_mod: 1.6"
16:12:34 "_counter: 1.8"
16:12:34 "_mod: 1.8"
16:12:34 "_counter: 2"
16:12:34 "_mod: 2"
16:12:35 "_counter: 2.2"
16:12:35 "_mod: 2.2"
16:12:35 "_counter: 2.4"
16:12:35 "_mod: 2.4"
16:12:35 "_counter: 2.6"
16:12:35 "_mod: 2.6"
16:12:35 "_counter: 2.8"
16:12:35 "_mod: 2.8"
16:12:35 "_counter: 3"
16:12:35 "_mod: 4.76837e-007"
16:12:36 "_counter: 3.2"
16:12:36 "_mod: 0.200001"
16:12:36 "_counter: 3.4"
16:12:36 "_mod: 0.400001"
16:12:36 "_counter: 3.6"
16:12:36 "_mod: 0.600001"
16:12:36 "_counter: 3.8"
16:12:36 "_mod: 0.800001"
single precision floating point number.
That's what happens.
on the 3 you basically get a 0.000000...4768...
3 % 3 == 0, not 0.0000000000000000004768
so need to modify: if ((_c mod 3) == round(0)) then
3 % 3 == 0 no that's not how floating point numbers work
Do _c = _c + 2 and _c mod 30 instead?
need that _c = _c + 0.2 as doing internal counter in loop
Divide by 10 where you need it?
my tolerance for SQF in Arma 3 is at my peek at the moment :D, thx for suggestions
_c = 0; for "_i" from 1 to 30 do {_c = _c + 0.2}; [_c mod 3 < 0.1, _c toFixed 100]
=>
[false,"5.99999856948852540000"]
lul
Works only on reaching first 3
[true,"3.00000047683715820000"]
from 1 to 15
Oh wait you reset _c to 0
Nevermind
If I have an array like this classes = [ ["C_1","Class1"], ["C_2","Class2"] ]; how can I edit an element in that array for example use an id of C_1 to edit Class1 to Class1Edited for example
set
classes set ["C_1", "Class1Edited"]; like that?
{
if(_x select 0 == "C_1") exitWith {
_x set [1, "Class1Edited"];
};
} count classes;
then instead of exitWith if you want to do changes to all C_1 in case there are several
thanks, appreciate it
I use the Battleye Extended Control (BEC) on my own server. But i have a problem. I have set the automatic restart. Bec window is closing. But it won't open Bec.exe automatically again. Probably need write a command to the ServrStart.bat file. But I don't know about it. Can you arrange this for me?
My ServerStart.bat:
color 0a
title Spook DayZ Server Monitor
:Serverstart
echo Sunucu Baslatiliyor
F:
cd "F:\Steam Game Library\steamapps\common\DayZServer"
echo Spook DayZ Server Monitor... Aktif !
start "DayZ" /min /wait DayZServer_x64.exe "-mod=@Trader;@KillFeed;@BuildAnywhere;@InventoryPlus;@LogBaseBuilding" -config=serverDZ.cfg -port=2302 "-profiles=ServerName" -dologs -adminlog -freezecheck -scriptDebug=true -cpuCount=4
ping 127.0.0.1 -n 15 >NUL
echo DayZ Sunucusu Kapatiliyor ... Yeniden Baslatiliyor!
ping 127.0.0.1 -n 5 >NUL
cls
goto Serverstart```
@meager granite we also have findIf now ๐
But will it be faster?
uh.. yes..
@digital plover this is #arma3_scripting channel
how can I play sound "from A3" for player locally? e.g. use playSound and use sound from Arma 3, e.g.: "a3\sounds_f\ambient\winds\wind-synth-fast.wss" ?
playsound has global effects if you only want one unit to hear it you probably have to go with say3d and some invisible helper object.
that also needs a cfgSounds entry as well
yeah saay3d can play sounds from inanimate objects as well. My question to you was "Do you want only the one unit/client to hear that sound?"
okay then
1. define the sound in cfgSounds
2. Execute a script that does following on the machine of your choosing.
3. spawn an invisible helipad at the spot you want with createVehicleLocal
4. wait until the sound is gone with a sleep or similar
5. delete local vehicle
- do I need to define sound that is already in a3 ?
- if it already has a cfgSounds entry that all is good
- depends on your use case, really. Here you have to go into detail if you already have something in place or just starting with this.
checking if those sound are defined in some config
a3\sounds_f\ambient\winds\wind-synth-fast.wss
a3\sounds_f\ambient\winds\wind-synth-middle.wss
a3\sounds_f\ambient\winds\wind-synth-slow.wss
i am not sure if these are already defined either, probably used in some showcase.
did not find config for those specific, but found alternatives that have config values
configfile >> "CfgSounds" >> "wind1" | sound[] = {"\a3\data_f_curator\sound\cfgsounds\wind1",0.316228,1};
configfile >> "CfgSounds" >> "wind2" | sound[] = {"\a3\data_f_curator\sound\cfgsounds\wind2",0.316228,1};
configfile >> "CfgSounds" >> "wind3" | sound[] = {"\a3\data_f_curator\sound\cfgsounds\wind3",0.316228,1};
configfile >> "CfgSounds" >> "wind4" | sound[] = {"\a3\data_f_curator\sound\cfgsounds\wind4",0.316228,1};
configfile >> "CfgSounds" >> "wind5" | sound[] = {"\a3\data_f_curator\sound\cfgsounds\wind5",0.316228,1};
configfile >> "CfgSounds" >> "WindBig" | sound[] = {"A3\Missions_F_Bootcamp\data\sounds\wind_big",0.177828,1,80};
configfile >> "CfgSounds" >> "WindNormal" | sound[] = {"A3\Missions_F_Bootcamp\data\sounds\wind_normal",0.177828,1,80};
configfile >> "CfgSounds" >> "WindSmall" | sound[] = {"A3\Missions_F_Bootcamp\data\sounds\wind_small",0.177828,1,80};
you can make mission config yourself for them
Server is supposed to create a trigger that is supposed to add an action menu entry to any player that is inside the trigger area.
_trgW = createTrigger ["EmptyDetector", [1399.276,704.546,0], true];
_trgW setTriggerArea [75, 75, 0, false];
_trgW setTriggerActivation ["WEST", "PRESENT", true];
_trgW setTriggerStatements ["call{player in thisList}", "call{{if (isPlayer _x && alive _x && local _x) then {menuID = _x addAction[""Open menu""];}} forEach thislist;}", "call{player removeAction menuID;}"];```
What am I missing that when testing the action I'm trying to add doesn't show up in the action menu?
As far as I understand the way I'm creating the trigger it should be global and thus created not only to the server but to the player(s) as well
You are creating global trigger but setting its params on local machine only
ahh yes. Can I ask some advise how to make the params available to the players? Need to remoteExecCall?
make trigger in editor
I had that heh ๐
For reasons would like the trigger to be created by the server
then you need to add params in either init.sqf (trigger name then has to be global) or remote exec them with persistent flag
I would go with the editor for safety and reliabilty
Thanks M242. Will see if I can come up with anything and make a return back to the editor when not
I got a weird thing going on. I have the following code in the init field of a group in the editor:
if (isServer) then {
this setVariable ["FKF_GroupMarkers_iconData", ["b_inf", "ColorUNKNOWN", "HQ"], true];
};
The weird part is it doesn't apply globally. It gets set on the server, but not on the client; it has got me stumped. Does anyone know why this might happen?
Hey, how can I force a helicopter to fly to a specific position and then stay at that position while having its gunner engage targets?
The helicopter should not move once engaging targets.
Already tried the "HOLD" waypoint, but that one just makes him wait at said position to identify targets and then fly to engage them.
Alex, there are also SENTRY and GUARD waypoints. Have you tried those?
AFAIK Sentry is just: Go there. Identify Targets. Then Move to next waypoint while eventually engaging them
@forest ore Try
if (isServer) then
{
private _trgW = createTrigger ["EmptyDetector", [1399.276,704.546,0], true];
[_trgW,
{
_this setTriggerArea [75, 75, 0, false];
_this setTriggerActivation ["ANYPLAYER", "PRESENT", true];
_this setTriggerStatements
[
"player in thisList",
"menuID = player addAction[""Open menu"", {}];",
"player removeAction menuID;"
];
}] remoteExec ["call", 0, _trgW];
};
@forest ore And GUARD waypoint only works with GUARD points. The group will move to the next guard point, and then defend it according to their ROE and Behaviour.
Which I guess also include following a target a bit
I guess if I disable the target AI of the pilot it could work. But I have the feeling that the gunner would not shoot since he isn't getting any: engage XYZ from his "commander".
@south rivet what is this?
That is the group, that code is in the group's composition init field
M242 thanks for the example! Tried it but no Open menu selection came available
So you check if it was set like this: !isNil {groupName getVariable "FKF_GroupMarkers_iconData"}?
@forest ore I missed then
added
I checked with allVariables groupName, which returned ["FKF_GroupMarkers_iconData"] on the server and [] on the client.
allVariables could be broken in MP
there were some restrictions applied to the command, now I am not sure anymore how it supposed to work in MP
The array is a valid value, that should not be the problem
Hey guys. I'm trying to have an external file, via a mod, be called in the mission. I don't know where the issue lies. It says that the Resource cannot be found: sqf //description.ext #include "\CAPFunctions\CAP_Main\GUI\CAP_EC_Introduction.hpp" https://pastebin.com/tTc2jE8e <-- CAP_EC_Introduction.hpp https://gyazo.com/95324a04fcd53878b77edc4ac706e883 <-- File Path and Structure
@south rivet what if you set it with delay, like after the game is already running
I'll try, got some other things I'm trying first
I would try first making sure the group is not null: isServer && !isNull groupName
init field could be tricky
But it does get set on the server, so it is not null there.
It is just not broadcasting the value
Works for me if I set it later in game
Does this function require local arguments?
https://community.bistudio.com/wiki/targetKnowledge
It doesn't say so on the wiki but something tells me that it might
@tough abyss Just tested the "then" version of your script but still no dice. I don't see any script errors either so difficult to pinpoint where the problem might be
it is because addaction needs 2 args minimum, I just copied your one, don't blame me for it ๐
added
Well now that did the trick! Thank you M242!
@south rivet
Not sure why your code doesn't set the variable for all clients, but why wouldn't you just use
this setVariable ["FKF_GroupMarkers_iconData", ["b_inf", "ColorUNKNOWN", "HQ"]];
The init line is already global and JIP compatible.
Yea, that was a last resort. The way I did it would have had the most desirable effect for my use
@tough abyss allVariables could be broken in MP yes. on profileNamespace
@drowsy axle you cannot include external files in description.ext in 3DEN missions. BI broke that.
How's that different to the normal way?
mission pbo's are broken
that are generated by 3DEN
BI has their missions in a mod pbo
That's different in that it's a mod that contains a mission.. Not just a mission
There's setVehicleTIPars but is there any way to GET those values?
I vaguely recall seeing something about animations or an animation command having that value but I can't for the life of me remember.
In which way(s) are they broken?
In exactly the way that you experienced
