#arma3_scripting
1 messages · Page 407 of 1
doing something else right now, so nothing better than this is coming to my mind
oh wait
mouse eh
and what if I wanted in the future to adjust a map marker
i wouldn't want to have to edit an array of x y z coordinates
well, it's better than having n number of markers pre-placed and "hiding" them....
i have a new problem, even if i use disableAI "move" the car still moves if the gunner order to move
gunner too swole
any work around to that?
is the gunner a player?
is it intended for sp or mp?
the gunner is never supouse to give orders anyway
he's the current commander of the vehicle, so yes he is
Did you consider using a trigger?
I did.
i have a blah.sqf script that is attached to an addAction. is there some way to keep a variable between invocations of this script, e.g. "some_variable = time" such that it doesn't lose value between calls via the in game menu? I've tried currentNamespace but it always turns out to be = 0 at the start of the script, unless I'm missing something obvious...
literally some_variable = time;
_timeSinceLast = missionNamespace getVariable ["quakephiltag_some_variable", 0] - diag_tickTime;
quakephiltag_some_variable = diack_tickTime;
whats the typical naming convention for variables in armaverse? blah_blah? blahBlah?
i guess blah_blah
tag_myVarName
CBA / ACE has the GVAR macro and all it's variants for making that easier
is there anything like hashes in arma scripting? can i ever do something like var[somestring] = blah?
no, but we do have cba hashes
What do you mean with "hashes"?
https://community.bistudio.com/wiki/Array i may have found what i needed here under "associative array approximation"
var[somestring] = blah
var = "abc"; ?
another question, is there a way to disable vehicle brakes?
no
@astral tendon You can disable breaks via config (0.00001 breakforce), but NOT the handbreak, when the Vehicle is not moving.
this hole week i am trying to figure ou how to make gunners not give orders to the driver, now i am trying to fix it with unit capture, but the AI brakes
you mean nested arrays?
That's why i asked. No clue what he rly wants ¯_(ツ)_/¯
wile the car does move with unitplay but the AI keep braking because hes loveling gunner is not ordering to move
so the wheels drag on the road
my last atempt is to remove the driver entirely
so that blah.sqf that i'm calling from my addAction has a variable which, naturally, is undefined at the beginning. somewhere in my script i set it to a value, but is it possible to check earlier in the script to see if it has been set (previously) or not?
I tried "if (!isNull myvar) then { ..." but it is still telling me Error Undefined variable in expression: myvar
i guess I can just set it to a blank value... duhh
thanks again for your guys help over the past few days, i'm actually cracking this sqf crap 8)
isNil
If you want help, you have to be more precise
isNull = Checking for an Object
isNil = Check if Var exists
if ( isNil "_Var" ) then{systemchat "Var isNil"};
_Var = 1;
if ( !isNil "_Var" ) then{systemchat "Var !isNil"};
I was missing the double quotes TT
Not rly with isNull
_player = player;
if(!isNull _player)then{systemchat "player is not ObjNull"};
Save this page in your Favs:
https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3
you might not believe me, but i already have, and i was staring at those two exact pages for several minutes before realizing i was missing the double quotes TT
i must not have even had an object at that point
Then why do you check for IsNull?
because i want to check if the variable has been set or not
ISNIL

I am tring to get code in a stacked event handler to fire on a dedicated server; I can't seem to get it to work.
["attendanceConnected", "onPlayerConnected", {
_name = _this select 2;
_uid = _this select 1;
_text = format ["Connected: - %1 - %2" + "<br /><br />", _name, _uid];
// {[_x, "Attendance", _text] call BIS_fnc_createLogRecord;} forEach allPlayers;
[player, "Attendance", _text] remoteExecCall ["BIS_fnc_createLogRecord", -2, true];
}] call BIS_fnc_addStackedEventHandler;
does addPublicVariableEventHandler not fire for JIP clients when they receive the JIP queued pubvar?
maybe if you could add the addPublicVariableEventHandler before receiving the JIP queued pubvar but not likely as the JIP queued pubvar has priority and is received first i believe.
or ```sqf
waitUntil {!(isNull player)};
...addPublicVariableEventHandler
wut? is to late by then and will never fire because the pvar has already been received.
pvars sync befor !isnull player
Only that way it was working for me
just check not isnil pvar and do what you need to with the data and let pveh handle from then on
Btw i don't know is it still need it, we have now remoteExec
they are different things, remotexec does not detect updated pvar
Well yes, but i mean you can do things without pVars spam in global
ofcourse you can update the data globally with pvar but you can't make another machine do code when it is updated unless you have a loop contantly cheching for update wich is what addPublicVariableEventHandler does in a very efficient way.
the benefit of pvar is that it has priority, remoteexec global is schecduled
Yes i understand that it's like "right tool" for the job
I would not use pvh
Does on connected not work at all
Isn't it supposed to be missionEH
Do u even need addstacked in 2018?
Oh boy.
@wispy kestrel onPlayerConnected stacked eh doesn't pass it's args in _this, but other magic variables. _name, _uid, _owner etc. You overwrite them with undefined _this select N.
@restive matrix No, PVEH does not fire for JIP clients.
@meager heart @cloud thunder The only limitation is, that it does not work in frame 0. Which only matters if you mess around with preInit functions. All your other beloved init scripts and boxes are executed after frame 0.
@cloud thunder There is no magic priority of PV or PVEH. It's the same as RE, but more efficient and safe due to skipping the CfgRemoteExec stuff. All dumb rumors.
Also, PVEH is not a constantly checking loop. It only checks an array of (decompiled/stringified) functions if a variable was received. This may even be a hash, I don't know the internals, but the array of variable names listened to should be very small anyway. Like zero in vanilla and three with CBA. And maybe six with ACE. It's nothing.
@peak plover Stacked eh has two benefits: EHIDs are strings, so you can easily overwrite (remove old and replace with new) previous eventhandlers. And you can pass arguments. Neither is used here, so they could use addMissionEH, which would pass the args in _this.
There is no magic priority of PV or PVEH. It's the same as RE, but more efficient and safe due to skipping the CfgRemoteExec stuff...
I thought exactly opposite about "the safe way" i know that hackers was using it with BIS_fnc_MP...
BIS_fnc_MP is just a wrapper for remoteExec now
"Safe" as in safe from mission makers breaking it.
yea well... thanks for the info guys
thanks for the info @little eagle
Hey guys! Quick question: Is there any way to reduce the range of which an object is interactable? I made a simple takedown command but you can use it from like 30 feet away so it looks like you're killing a person with your mind.
yes, which type of action? addaction?
addAction?
Yes, addaction
anyways, check:
https://community.bistudio.com/wiki/addAction
check the third arg from the bottom
Haha, faster
This is what I've got on the guy that you're able to take down
this addAction ["<t color='#FF0000'>Takedown</t>", "takedown.sqf"]
go fix the build error you introduced commy 😄
What?
will take a look @lone glade
check #dev on slack
#define PREP(var) FUNC(var) = compileFinal preprocessFileLineNumbers format ["fnc_%1.sqf", QUOTE(var)]
//#define PREP(var)
//is: FUNC(#0#) = compileFinal preprocessFileLineNumbers format ["fnc_%1.sqf", QUOTE(#0#)]
//was: [QPATHTOF(functions\DOUBLES(fnc,#0#).sqf), QFUNC(#0#)] call CBA_fnc_compileFunction
In File \z\ace\addons\arsenal\missions\Arsenal.VR\script_component.hpp: Line 3 #define altered without a #undef
That's a make error if anything.
yeah :/
And redefining macros is valid, only Mikero's Tools errors out on it, because apparently valid syntax is baaad.
#undef PREP before it.
I setup a simple mission Draw3D eh, and use drawIcon3D to draw an icon over a player, works great until they get into a vehicle then the updates seem staggered/glitchy (due to vehicle sync i guess?) , anyone have a workaround ?
Well, once they sit inside a vehicle they become proxies attached to the vehicle. Which probably slows down their simulation frequency. Using the visual getPos etc. commands should solve that.
afaik it does
ok thanks, ill try out getPosVisual
getPos is bad for this anyway, because it reports the distance to the lowest pathway LOD below the object. Your icon would appear under the object if it stood inside a watchtower, on a roof, or on a stone or a harbor pier.
Ok, so I got this- radius (Optional): Number - 3D distance in meters the unit activating the action must be within to activate it. -1 disables this radius. Default (and max) value: 15.
So how would I translate that into the script? (I'm still really new at this.)
Dunno if that's true for getPosVisual. Wiki says no implicitly.
getPosATLVisual and then _pos set [2, <adjust>]; ?
I prefer visiblePosition _x,
You pad your addAction with all the default values for the args you don't want to change. There is an example on the wikis comments. @sullen willow
ASLToAGL getPosASLVisual _object;
visiblePosition is AGLS btw
For getPos this is needed to report AGL, but it may not for getPosVisual.
Yeah, and getPos is AGLS, which is different from AGL.
oh, forgot the S on my second post
AGL and ASL is what most commands need.
Dude.
Whatever. Try it out inside watchtowers and adjust it accordingly.
I'm gonna be trying to get this to work for 15 hours straight lmao
lol @lone glade The wiki says both are the same, but one describes AGL and the other describes AGLS. FML.
still getting simulation issues
mind posting the code / a gist ?
sure one sec
@sullen willow Stare at the last comment on addAction's wiki page.
For 15 minutes and you will get it.
There is no other way to explain it.
addMissionEventHandler ["Draw3D", {
if (!isNull player) then {
private _remoteUnits = missionNamespace getVariable ["Hades_RemoteUnits", []]; //array of players remotely controlling ai
{
private _remoteUnit = _x getVariable ["Hades_RemoteUnit", objNull]; //players current remotely controlled ai unit
if (!isNull _remoteUnit) then {
private _pos = ASLToAGL getPosASLVisual driver vehicle _remoteUnit;
private _text = name _x;
private _icon = "\a3\ui_f\data\map\Markers\military\box_CA.paa";
private _color = [1,0,0,0.7];
drawIcon3D [_icon, _color, _pos, 1, 1, 0, _text, 0, 0.05];
};
} forEach _remoteUnits;
};
}];
Might help if I knew what I was doing in the slightest. Thanks anyway.
@restive matrix Well looks like ACE uses visiblePositionASL, so it probably can't get better than that.
Something like this maybe ? ```sqf
private _position = getPosATLVisual _unit;
if (isNull objectParent _unit) then {
_position set [2, 1]; //--- on foot
} else {
_position set [2, 2]; //--- vehicle
};
that's not related to the issue
^ Also, ATL != AGL
You need AGL, and if there's no command for AGL, you need to convert from ASL.
_target modelToWorldVisual (_target selectionPosition "head")
^ something else you can try.
honestly i'm not sure if AGL was the right name for that, AFL? "above feet level" ?
dang, same issue with visiblePositionASL , for context its on a local dedi
@lone glade The names are beyond hope. No point in trying to rationalize them. Just learn them.
😦
Like you'd a foreign language.
One alternative is to store the relative position of the vehicle type somewhere and to use visible/getPos/ASL/Visual/World/whatever on the vehicle and vectorAdd the offset.
That'd work, but may be not feasible.
that head position trick seems to be how ace3 does nametags so ill give that a shot https://github.com/acemod/ACE3/blob/dbe6a04e8a5606ca88271c06f757fdfcbb04ea04/addons/spectator/functions/fnc_ui_draw3D.sqf#L48
Yeah, that is where I copied it from. Well, nametags component, but same diff.
works perfectly
Nice.
@little eagle
I never said PV was magic.
Rocket said they had priority but what does he know. Shame on former BIS dev spreading dumb rumors.
https://forums.bistudio.com/forums/topic/129103-arma-2-oa-beta-build-94209-160-mp-compatible-build-post-160-release/?tab=comments#comment-2133294
I know eventhandlers are not loops per say. Wrong wording on my part.
On a related a note biki's description of addPublicVariableEventHandler says
- EH will not fire on the machine that executed broadcast command, only on the machines that receive the broadcast.
which is not true..
For example, this code ran from hosted local server will fire the PVeh.
"paddscore" addPublicVariableEventHandler {_data = _this select 1; (_data select 0) addScore (_data select 1);};
paddscore = [player, 5];
publicVariableServer "paddscore";```
OA != arma 3
@ripe imp CBA has Namespaces and hashes which can both be used as "hashes" but Namespaces are the only real hash maps where you can only use strings as key
@cloud thunder publicVariable and publicVariableServer are two slightly different things
both work the same in example context..
you're sending the var to the server, which is where the code is executed
publicVariable means "Send to anyone else" so the local PVEH wouldn't receive it.
publicVariableServer means "Send to server" if you re the server then ofcause you will receive it
yes and where the pveh is
it's like remoteExec'ing something to yourself then wonder why it works.
just tried it with publicVariable and score keeps going up... I don't wonder why it works. Been using it for a while. i know it works.. bibki say those two commands can't be used on same machine.
biki*
I think that note is newer than OA
Where does it actually say that on biki? Can't find it
https://community.bistudio.com/wiki/addPublicVariableEventHandler
EH will not fire on the machine that executed broadcast command, only on the machines that receive the broadcast.
That? As you can see it kinda contradicts itself as if you send something to yourself you executed the broadcast command and also recveived the broadcast
And if you actually read what's on that page
While it is true that the event handler will only fire on the machine receiving the broadcast value. Please note that this machine can actually be the same machine broadcasting it in the cases of publicVariableClient and publicVariableServer.
EH will not fire on the machine that executed broadcast command
works with publicVariable too
So A3 then. was playing A3 in 2013 its been working this way at least since OA in A2.
A3 was released september 2013
nothing has changed then? note is wrong?
And as I said. If you actually read the full page you'll see the note from 2015 that says that exactly what you are experiencing is also expected
Like i said it even works with publicVariable so no, even SilentSpike's note is wrong
or misleading
Maybe just use remoteExec then. It was kinda made to replace PVEH anyway
two different commands. its not a replacement. remoteexec was made to replace call RE from A2.
You mean replace BIS_fnc_MP? Which was using PVEH?
addpublicVariableeventhandler works like a very efficient trigger for custom Vars
no, BIS_fnc_MP was early A3. RE was from A2, wich effectivly did the same as remoteexec. Remote script execution (RE) https://community.bistudio.com/wiki/Multiplayer_framework
Change in remExField triggers execution of eventhandlers on all clients in the network game (initialized in init.sqf), script remExServer.sqf interpretes remExField (remExFP resp.)
do you even read what you post
it was using PVEH
it's just an array that get changed and trigger PVEHs
hell, it's directly said right above:
library of scripts that are performing non-global script commands globally on network
using publicVariable + addPublicVariableEventHandler (EH that fires for each publicVariabled variable on all clients - excluding calling client) + direct call on calling client
well, except you could use it without having to place an eh in init.sqf or any where to make it fire..
same as remoteExec now
if (isServer) then { [nil, nil, rEXECVM, "Scripts\Tasks\clocks\CheckPoinETimer.sqf", time] call RE; };
And not really
🤦
it's written black on white on the page he linked
remoteExec is scheduled
no it's not
remoteExec might run scheduled under certain circumstances
But if you complain... remoteExecCall is not scheduled use that
or, you know, add a scheduled check and re-run the func with CBA_directCall if that's the case
lol
@cloud thunder Yes, it is a dumb rumor. The source of a dumb rumor doesn't matter.
All he said was, that using publicVariableClient/owner reduces network traffic compared to publicVariable sending it to everyone. That is nothing new or surprising.
Most people are just like "That's whats happening! I read the wiki! I might have stopped reading after the first two lines but you don't need to know that."
And that's how rumors happen. Or if the wiki is actually wrong...
remoteExec is scheduled
This is contextually wrong though. RE is the same as REcall for commands and unscheduled for e.g.call.
So saying "remoteExec is scheduled" is wrong.
The wiki is pretty clear:
Scripted function - scheduled environment (suspension is allowed, i.e. spawn, execVM).
Script command - unscheduled environment (suspension is NOT allowed).
were talking about custom code and vars not remotexecing a command. stay on track
Well you utter one falsehood after another. Hard to do so.
"custom code" that's what remoteExec can do.
reading comprehension 0/10
and remoteExecing call myFunction is the same as a PVEH that call's myFunction
RE is short for remoteExec btw. No one cares or should care about A2.
not only that but RE for A2 is PVEHs
Well duh, how else would it work.
so not only his point is moot but it's a link he provided ....
All A2 chat belongs to #end_of_life_arma
Including scripting questions.
So, and now we all agree that PVEH somehow having priority over RE is a dumb rumor.
whast was your source?
The game.
What @cloud thunder called "priority" was just scheduled vs unscheduled.
So calling it priority in the beginning was bullshit
Well, that is not what priority means, and not even what the post of that Arma dev is about. The post is even older than RE.
Because that has nothing to do with that
Yep.
I think what he ment by priority was network stack or que.
but thats subjective like dumb and bullshit
Well, for "priority" to make sense, you'd have to know over what. It's kind of a relative term.
You have no Idea how the netcode works though. It isn't documented anywhere
Certainly it's not over RE, because that was made after the post in question.
but commy does, he has that game
All I see is, that a post talking about how PVclient and PVServer can be used to save network traffic over PV (others) is again and again used to justify that RE is somehow more efficient or some bull shit.
And that is a dumb rumor.
I see it as a Dev who had access to internal engine and says all pvs are high priority netcode and to steam lint the message stack use pvsever and pvclient where you can to limit netcode.
Well, and who's surprised by that?
Well yeah. They are high priority and reliable transfers
Of course sending it to one client is less work than sending it to everyone and then discarding it.
Just like a shot being fired
Just like remoteExec. Though PVAR and RemoteExec are probably lower than fired shots
probably? this is how rumors start
uhuh... yes
sure.. Although it doesn't actually matter at all whether fired shots are higher or lower
and something being "high priority" actually doesn't say anything
because "ultra priority" and maybe 10 or 20 other levels are still higher than "high priority"
Almost as if:
Well, for "priority" to make sense, you'd have to know over what. It's kind of a relative term.
I think high priority here might just be a bad synonym for "reliable".
And what is the unreliable alternative? It's all bs.
You don't have an unreliable alternative in SQF. But the game uses that internally. Like movement, turning
voip/von
position updates are unreliable transfers
That makes sense, but it doesn't affect anything of what we can do, and it doesn't mean what countless people made it out to be and frequently annoy me with.
well you can tune accuracy for that with network settings at expense of bandwith but you can't tune it for pvs necessarily
i know one thing for certain: if you think you know everything about a topic, you probably do not know anything at all
what i also do know is: it is easily testible which one has priority above the other using a dripping network and wireshark
if anyone here really wants to know, he can test it
traffic is encrypted and packed. So no. not really wireshark
Does SQF support scientific number notation? Something like _myNum = 3e123
yes
yes
just had to implement it in sqf-vm to parse the allinone config
get outta here, lol
All game uses packing. Even if you have 60 FPS, the game might only send frames out 20 times per second. It packs stuff into as few messages as possible to get less overhead.
Well. I guess @queen cargo has the lowest ping here
Interesting.. Isn't even listed here: https://community.bistudio.com/wiki/Number
because it is syntax
It is listed
The largest real positive number that can be entered via script is: 3.4028235e38
scientific syntax also includes 1.123e-2 etc. btw.
Degrees are a poetic licence used to indicate a number returned from functions like acos and asin
What? Poetic license?
Even 0xFFe$A
@scarlet spoke http://www.cplusplus.com/reference/cstdlib/atof/ there
and might include the 1.23e+45 variant too
Evene 0xFFe$A
This is a crime against humanity.
wat
hexa also works?
now that rly is broken if scientific wouldwork
though ... sqf-vm does not support hexa ...
do not think i ever will add
though ... it is kidna simple
e, e+ and e- all work. Also big E works, which I prefer, because it's not confused with Eulers-Number as much.
@little eagle true but isn't that what SQF is all about?
big E for president
Fix it.
unfix it
it is fixed
and even pushed now
now go and play around with config stuff my minions @signal peak daddy needs to know if he did wrong somewhere else
But does Arma understand 0xFFe$A I wonder.
I think not... What should that mean anyway?
It probably doesn't work, because E is 14.
he means 0xFFe4A
should not
I just wondered the same
hexadecimal should behave as if you would directly input binary data
should work with floating points, but you would have to calculate the floating point yourself
We need COMPLEX_NUMBER type in SQF. Would make some math on map positions easier 😛
also i yet have to see a language where hexa.hexa would work
Arma needs COMPLEX_HUMAN aka female, but we dont have those either
(╯°□°)╯︵ ┻━┻
you already got a complex number ... a floating point value @little eagle
BIG_NUMBER would be interesting though
allowing for endless growth
You think that can be abused for complex math?
How about double precision floating points?
what complex math?
sqrt -1
nobody wants that @still forum
booohhhhh
Btw.. I think I can easilly replace all script floats by doubles
You think that'd break anything?
dunno if operators like * and such would convert back down to float.. probably would
no..
I think others that want to access them have to convert back to float.. so.. Wouldn't change anything 😄
unless we make new * n such operators
But at that point we could just make a new bignumber type
Intercept can add types right?
if they are casted to float, probably will downscale
yeah
Might be best to just make it a type...
Just go ahead and make a Intercept_CBA PR
haha.
Problem is that you need a custom fromStringToBigNumber function to generate these types
Right after you release TFAR v1.0
such a method would not be that complicated
already wrote numeric parsers
just let me dig through old code quickly
I guess every big number library will have a parse function anyway
@austere granite My friend accidentally created female model https://gyazo.com/070e2f11970abd7d809ae4d558b8c2de
Here's a test to find out which of them has "priority":
"PV" addPublicVariableEventHandler {systemChat str _this};
"RE" remoteExec ["systemChat"];
missionNamespace setVariable ["PV", "PV", true];
missionNamespace setVariable ["PV", "PV", true];
"RE" remoteExec ["systemChat"];
🤔
The remoteExec transmits "RE" and "systemChat" and some flags
the PVAR transmits "PV" and "PV" and some flags
"TystemChat" addPublicVariableEventHandler {systemChat str _this};
"RE" remoteExec ["systemChat"];
missionNamespace setVariable ["TystemChat", "PV", true];
missionNamespace setVariable ["TystemChat", "PV", true];
"RE" remoteExec ["systemChat"];
Like this?
was in C#
and kinda idiotic that i wrote it as i alter realized that i just could have used Convert...
but anyways
https://github.com/X39/asapJson/blob/master/ASAPJSON/asapJson/JsonNode.cs#L582
would parse it different nowdays
but still: big_number is pretty simple
a list containing bytes so that you just can append new ones if needed
after the comma, you also use a byte list that you append
no more floating point due to more complex math required for it and big-number works more simple with bytes
I don't think you're using "complex math" right 🙈
talking about emulating floating point operations yourself instead of just a simple "+" with takign the overhead
To be honest, double floating points would be nice. They have a nice performance vs precison/size tradeoff. Yes, they suffer the same underlying problem as (single-precision) floats do, but in practice the numbers you work with, it is rarely a problem, unlike float which is too imprecise for even time tracking.
but rather then implementing a double_number type a big-number type should be coming
the double instead of float is something dedmen sometime could takle to check
I'm quite sure it won't work like I thought
100%tbh
converting a anonymous value to number calls getNumber func which returns float
There is a huge performance difference between using doubles and a Big number implementation. The precision difference compared to floats is enormous as well, every bit increase is a doubling in what it can accomodate so its actually 2^32 times more accurate. Double is more than enough to measure every point in the solar system with 3 coordinates at sub millimetre precision it has enormous range and precision compared to floats
uhm ... that is complete and utter bullshit
nobody would use double for actual precision
there is too much not covered in floating points
want a simple example? 0.3
hah
there is even a webpage covering this "issue"
that is inb4 also why == floating points can result in false falses
because _myheavychangedfloat might not be 0.5 but rather 0.5000000000001
simply due to some rounding error happening at some random point in time
Can't tell whether you are joking or not. But precision is not about equality.
mhhh?
You cannot get ms accuracy on seconds, if there are more than 1000 full seconds with (single-precision) float. So the 'time' command is not ms accurate. But if it was double (and didn't cap the decimals) it would trivially.
actually you can
diag_tickTime is good enough for millisecond and tens of microseconds
at the single digit microseconds it get's bad-ish
even if you ran the game for hours it's still good enough ish
you cannot use floating point for precision is what i said
simply because rounding errors will happen
they are good enough for most things though ...
but using them eg. in satelites already made some crash
Single-precision floats can only represents numbers with 6 significant digits, so 4243.341 cannot be represented (in general)
You can use floating point for precision. Yes you accumulate errors, but you can reason about that. Numerical analysis, is, amonst other things, about designing floating point algorithms that result in a good enough precision.
https://www.h-schmidt.net/FloatConverter/IEEE754.html -0.0001 error. Oh well..
If I need precision I just make my own timing functions :3
Yes, but do we know whether time command gets that directly, and the n reduce precision, or whether it accumulates it?
Because if it accumulates it, it can reach full second of error in 3 hours.
My point is that big numbers and doubles solve different issues. If you want greater precision then doubles get that dramatically compared to floats. Big numbers on the other hand are a lot slower but can offer arbitrary precision and other reprensetations that can deal with 0.1 better at the cost of performance. They aren't useful for the same things.
obviously not
time etc. in a big_number would be nice though
generally having an int
instead
would already solve a lot of "issues"
enscript will come
and it will be welcomed
((typing at compile time already is 💗 ))
Accumulating error: https://onlinegdb.com/rkdHBPAmG
so yes time is accumulating
I think time resets at mission start
So can you make a working serverTime, without network overhead, using diag_tickTime?
missionNamespace setVariable ["_privatevar", 123]
working or not?
IIRC we already tested once
but i am right now not sure
@errant jasper how? If you get clients and server to use the same time then yes.
But I don't know how you would do that with diag_tickTime
in setVariable you can use anything UTF-8. Just using bare variables in code is very limited
It would not be entirely exact, which is not really possible with distributed systems anyway. But might get close. Idea:
Server sends own tickTime to client A
client A responds immediately . Server records roundtrip (it knows the time it sent), and respond with that
client A responds immedaitely (and then server) again for a couple of times.
clientA now knows roundtrip (by averaging, and maybe dropping the largest one (because reliable transfer may resend), and may assume network delay is half, so it can correct for network delay for the initial time
servertime? the hell is that @errant jasper
why exactly is that needed?
If you want to debug like FPS. and then later assemble them, you need a unified time
debug ... fps?
See at which point how many fps did cleint/server have?
time is probably not synchronized
in 2018 however
I belive date is decent to measure it
as it seems to be synchronized
what is that useful for?
server should have always the same depending on how many units it has to simulate and how much is running in awaited space
client depends on area he is in due to rendering etc.
debuging FPS is literally the most useless crap one ever could do
Date has minute accuracy
serverTime is what most mods use to use a time that's synced across clients
aka, wanna show a cooldown, timer, whatever that isn't local, serverTime is the usual way to do it
So u do like spawnwaves like that? for ex.
Yep. Cooldown is what prompted my original need.
for cooldown just make ur own timer, remove 1 from the variable every second and then once it's negative it's good to go
CBA_missionTime, is almost that, except it AFAIK does not try to correct for latency, and it accumulates (thus also accumulating error).
i still do not know how it is important for anybody to have exact measurements on clients here ... important is that the server ends correctly
the clients "just" get a display
that needs to be roughly correct
CBA doesn't correct latency and accumulates yes.
@queen cargo Maybe things are better now. But I remembe in A2, that if a server was struggling it would have vastly different ideas of time than clients.
So for instance a waitUntil {time > X} would trigger on completely different times.
it still does not changes
as long as you got a number that grows upwards on all clients the same, you can relyably get a timer off correctly
time slows down with fps
like minutes
and only the server needs actual accurate time to stop whatever event centralized
just run your thing on the server
all other designs are designed to fail
doing stuff on clients event based is bs nonetheless
a client does not has to be bothered with anything until it happens
^
that includes a bool that is awaited @peak plover
You can get your second headless client handle the scripts and run all ai on the first hc
@queen cargo doa action >> is bool true? >> do action
not really waiting for it
you not even get off with an excuse for anything
nowadays, you can offload whole scripts to a separate entity
in future, you can spin up a different sqf environment to run your code on locally (thx to sqf-vm getting more and more features)
it is waiting because somewhere you got code running that waits for the bool
use remoteExec
and skip the waiting part completly
just useless crap that runs on a client for no reason
No need to wait
For ex
Player wants to use a butrton
once button pressed, check condition
Don't have to loop that
that is even worse. .. that requires player input to proceed
What
In my idea, you need the condition to use the button
Do you mena for something like
otherwise you just get promted with "not ready yet"
Player will die if sth
Yeah, button that when pressed detonates a nuke
1 nuke per 3 minutes
Ofc you can't just do it as soon as the time is up
dialog is the only exception to the waiting thing
you need the button to be pressed
but that is due to the nature of dialog
But the point with the server struggling was that for instance, you generated a side mission using scripting. It get's cancelled within 30 minutes (using waitUntil on the server only). But because the server is struggling, player's get 37 minutes to complete it.
If you then had a "countdown" on the clients ,it would be off
I think you need 🇮 🇳 🇹 🇪 🇷 🇨 🇪 🇵 🇹
and clients get a performance boost because they do not update themselves in a loop
If your server is struggling to remain >30fps and time slows down then you have some other problems that need fixing before you can generate side missions
Like maybe only allow side missions if server fps > 40
i hadnt looked at intercept in awhile, is that still being dev'd on?
oh nice it is, heres the link for anyone not familiar https://github.com/intercept/intercept
there is also this @restive matrix https://github.com/dedmen/SQF-Assembly/
that is there to optimize stuff
When a player spawns in on a mission what is the best way by means of scripting to remove the magazine that is attached to the weapon the player spawns with?
probably player removeMagazine currentMagazine player after waiting for the player to not be null
Next option to try will be: player removePrimaryWeaponItem currentMagazine player;
Which is working....
"player to not be null" unless you're doing this from the server this can be safely ignored
removeMagazine removes it from the inventory I think.
removePrimaryWeaponItem removes it from the rifle slot weapon.
Is there any Event Handler that triggers on the vehicle horn, similar to Fired?
hasn't been so far for me, it doesn't work on weapon with an empty mag either.
horns are weapons
hmm, interesting
LeftClick hotkey handler 😉
Yeah, looks that way, cheers anyway 😃
Fired eh will work only if it was added when unit was in a vehicle
FiredMan in this case will be better
No ?
fired should still work if attached to the vehicle, not the driver.
Fired: vehicle
FiredMan: Anything that person fires
Well, maybe the horn does indeed not trigger fired. Can't remember if the counter measures and smoke launchers do either.
they do
I remember something weird about all these.
can't say anything for the horn, but countermeasure launchers definitely do
well the horn essentially is a "weapon" right?
It is.
it doesn't fire anything tho, which is probably why fired doesn't fire
CM launchers do fire grenades / flares
You mean no projectile?
yeah.
@peak plover you still alive? you writin so littl
well maybe if you bulli less dedmen nigel would be lively
No, I get it.
throwing a grenade?
You're firing it through your arm 😄
class CarHorn: Default {
cursor = "";
cursorAim = "";
scope = 1;
displayName = "Horn";
reloadTime = 0;
drySound[] = {"A3\Sounds_F\weapons\horns\MRAP_02_horn_2", 1, 1, 200};
canLock = 0;
optics = 0;
enableAttack = 0;
};
This is the config.
The sound is the drySound.
@subtle ore yeah. Nigel always bully me ._. so evil
aaaaaah
.... I want a combat horn now
@still forum Stronger than quik that's for sure. Watch your back, nigel may have you on your back 😉
piggy back you mean? That would be awesome. I'd show nigel my Arma scripting engine bullshit museum
😄
my Arma scripting engine bullshit museum
👀
BikeHorn
there's also stones
But the sound file attached to it is empty.
It's a weapon... Can you addWeapon that to players?
😄
Persons can't have vehicle weapons I believe.
._.
Who says we can't use the wav\ogg from it?
Sure, you can do that.
loud speaker?
lautmachtüte
megaphone?
yes!
M.E.G.A phone
tfar_megaphone.pbo
That actually would be cool
I wanna do that... But..
pct rescued: 2.47%
current rate: 21493 kB/s
remaining time: 1d 2h 9m
get a loudpseaker to broadcast someone's voice
I think people already requested that
lol
biggest problem is the directionality of the megaphone
That'd be in scope for the mod imo.
It obviously not omnidirectional
But with players you already have directional sound sources.
not really
Do you mean multiple sources?
they are omnidirectional
I don't respect where their mouth is facing
yet
they emit the same volume to behind as in front of them
Yeah, I guess that wouldn't be accurate for a megaphone, but for a loudspeaker?
The 3D sound library can do that though. but didn't feel need yet
Loudspeaker would be fine I guess
we already have that in 1.0. kinda
you can place Radios on the ground set their volume to 20000% and enable speaker
I think in Eden I made a limit of about 300m range
There is no eventhandler to detect if a certain object is spawned on the ground aka dropped? Besides put EH
I think you could use init for the ground weapon holder, which should work since CBA v3.4
I nearestObjects every frame to find speaker radios on the ground.. which is shit
Thaaat would be awesome
hahahahahahhahaha
You never know if someone didn't put it inside a different gwh though.
I find all gwh in range via nearestObjects and check if they have a radio
Using the EH I could keep a list of existing gwh's so that's atleast a bit better
But... That might have all gwh on the map then :U So it won't really make it much better
For the Intercept variant that would be useable I guess.. But not a improvement for the script variant
So I've screwed with this horn a bit, and it becomes increasingly distored as you move + 4 horns playing at the same time doesn't sound bad...sounds like some keyboard music with 3 notes lol
flute with distortion
how to move out after BIS_fnc_moveIn? I tried unit action ["getOut", vic]; which does kick out the unit but then it runs back and gets inside the vehicle again
Add ```sqf
unAssignVehicle unit;
As the unit will still be assigned to the vehicle
So will go and get back in
does the sky falling animation use a EH to determine when to stop the animation?
if so
shit,well is there away to determine when someones hit the ground or when they hit a solid object, im tryna make a jump pack script
HandleDamage I guess
wouldnt that conflic with ace? cause ace handles dmg diffrently?
Not sure. maybe
is this allowed in SQF? can't remember
obj1 = obj2 = obj3 = obj4 = obj5 = obj6 = false;
XD
totally not
_var = value is like the worst SQF bug I know
Actually the only SQF bug I know.. I think.. The others are just buggy commands but this is a bug in the language itself
ah, thanks 😄
I'll fix that someday
™
The BIS transport unload waypoint is a bit spotty and can result in death and injury of the cargo units (helo sometimes files up when units are disembarking so they fall down).
A land waypoint with this in activation field works really well.
{doGetOut _x} forEach units group player;
Now, how can I run the doGetOut for any and all units in cargo? Even if there are multiple ones, with players mixed in.
crew command will help you out @thorn saffron
you just selet anyone in cargo from crew for that vehicle and run the foreach loop on it
@thorn saffron if you haven't figured it out by now you should use fullCrew with cargo as param, select all non player entities and give them "doGetOut"
moveOut also works
I want to track all player UIDs and IDs with something like
arrayIDs = [];
arrrayUIDs = [];
onPlayerConnected{
arrayIDs = arrayIDs + [_id];
arrrayUIDs = arrrayUIDs + [_uid];
};
but I'm having trouble referencing those global variables in functions
use addMissionEventHandler instead of the single use eventhandler
use tags on your variables
don't misstype array in your variable name
also one of those two vars has 3 r
arrrrr
arrrAAAAAAAAAY
No @tough abyss That's 5
grr
5 is not 3
simple maths
5 == !3 -> true
i can make bool a string
I should replace == and != by returning random results :3
lol
when i use pushback do i need to encapsulate the added value with brackets?
ye
i was looking at it on it
arrayIDs = [];
arrayUIDs = [];
onPlayerConnected{
arrayIDs = arrayIDs pushBack _id;
arrayUIDs = arrayUIDs pushBack _uid;
};
arrayUIDs is not returning an array
Look at wiki for pushBack again
oh lol
is anyone familar with using the ace arsenal?
trying to figure out how to make it only allow you to select nato items
It allows everything by default
and only allowing specific items is very similar to BI Arsenal
how do you find the names of the variable arrays
like all the nato items are in one array right?
variable arrays?
so i can just reference them all at once
No idea what you are talking about.. So I guess no
yeah. You need an array of classnames for that
Items don't have the information to which side they belong
besides uniforms
well its more uniforms that i wan to restrict
So you have to make that list yourself
ace_arsenal_configItems contains all possible items
and how do i view that (total noob)
so its looking like i have to make a whole whitelist file
joy
thaaats a long string
so is there no easy way to sort out specific types of things?
really just trying to keep people from wearing opfor gear
lol
If I would do ```sqf
private _fogAction = [
QGVAR(fogAction),
"0.2",
"",
{
1 setFog 0.2;
},
{true}
] call ace_interact_menu_fnc_createAction;
in a function, would it run this on the server or client?
That is in a missionfile btw
That depends on which mission file, not the function. The function has local effects.
Hmm, how do I set defaults for cba settings for a server?
Fifth value in cba_settings_fnc_init.
store on profile
and if my 3rd (array) value is "server"
so with the ACE3 settings to cba settings converter
I have to maunally write every line?
?
To make these work on the cba server settings and save
I have to "server", true] call CBA_settings_fnc_set;
every line
Ah, I remember. You can thank the guys that wanted copyFromClipboard disabled in MP for security reasons.
https://github.com/CBATeam/CBA_A3/pull/832
There is this ui in 3.6 where you can Ctrl+V it in a dialog.
Or setup the dev environment for CBA and make the master branch 🍌
Nah, you can still use the Arma 3\userconfig\cba_settings.sqf file and paste it in there.
I guess I can get the settings pbo from master
ohh
okay
But does cba_settings.sqf use classes?
or is it the same format as the converter converts to?
🤷
Thanks, I'll try the cba_settings, if that does not work I'll just custom CBA for a bit with settings from master
I think you could also SAVE your personal current settings in SP.
IMPORT these converted ones and SAVE them too,
And then LOAD them on the dedicated server SERVER tab.
Will that save into server profile?
Alright
that sounds ez
Ohh btw, before I foregt about this
When I used cba settings to change the mission settings from an sqf file
it says WARNING: Source is mission but not in 3DEN editor.
How does that make senes ? 😄
Well, you can only store the settings in a mission in the editor.
Because it requires writing to the mission.sqm.
ohh
Okay
So if I wanna change a setting with a script I should just change the server setting but false for saving
Eh? We were talking about "mission", not "server".
It's a setting that's different every mission
But set in a script in the mission
I cannot use mission setting
I should use server setting without save?
for ex.
// fatiuge
ace_advanced_fatigue_enabled = true;
ace_advanced_fatigue_performanceFactor = 2;
ace_advanced_fatigue_recoveryFactor = 5;
ace_advanced_fatigue_loadFactor = 0.75;
ace_advanced_fatigue_terrainGradientFactor = 1;
I should use
"server", false] call CBA_settings_fnc_set;
instead
Ok, I'm trying to create an array for a vehicle for all of the units in cargo AND units in FFV positions. Problem is fullCrew [helo, "cargo", false];Returns only the cargo units, so I would need to go through each crew position and check if its an FFV position. Fortunately "fullCrew " does return that in the 4th param, true in case the unit is in FFV position, false in case of pilot, gunners etc.
I tried this:
private _crew = fullCrew helo1;
private _fullCargo = fullCrew [helo1, "cargo", false];
{
if ((_crew select 4) select _forEachIndex) then {
_fullCargo pushBack ((_crew select 0) select _forEachIndex);
};
} forEach (_crew select 0);```
But I get zero divisor error.
I basically want to add the 1st param from the _crew to the _fullCargo array if the 4th one is true (ie. the seat is FFV).
private _crewNoFFV = fullCrew [_vehicle, "", false] select {!(_x select 4)} apply {_x select 0};
This?!
I actually want the FFV seats
Well, invert the bool:
private _crewOnlyFFV = fullCrew [_vehicle, "", false] select {_x select 4} apply {_x select 0};
Will test it now
@little eagle Damn, it returns an empty array and I do have units in FFV seats
What vehicle?
CUP UH-1H
Eh, I have no CUP atm. Can you try it on the Chinook-eque heli from vanilla?
Shouldn't that put an on screen error message then?
nope it just didn't do anything
Generic error (because undefined variable inside array used as arg)
ok it worked perfectly now
private _crewCargo = fullCrew [helo1, "cargo", false];
private _crewOnlyFFV = fullCrew [helo1, "", false] select {_x select 4} apply {_x select 0};
_fullCargo = _crewCargo + _crewOnlyFFV;
{doGetOut _x} forEach _fullCargo;```
this makes all of the cargo and FFV guys disembark the helicopter, while leaving gunners and such mounted
I think that would have some of them doubled.
Like every Cargo slot with FFV would be twice in that array.
FFV seats are treated as gunners, not cargo
Really?
yup
[B Alpha 1-1:5,"Turret",1,[3],true]
Turret, not Gunner
But I know what you mean.
private _crewCargoAndFFV = fullCrew [_vehicle, "", false] select {_x select 1 == "cargo" || _x select 4} apply {_x select 0};
Makes more sense to me.
_crewCargo in your example would be an ARRAY full of subarrays, and therefore make doGetOut error.
nope it works fine
Tested with cargo slots that are not FFV? Because doGetOut shouldn't accept arrays.
I tested on a fully loaded helo
It looks 100% like error to me. Maybe the heli has no cargo slots. ¯_(ツ)_/¯
it does
Well then it would error. Let me try...
I configed that thing myself including the FFV
stumbled across a quite strange behviour of setPosASL
if an object has set vectordirandup and I execute obj setPosAsl (getPosAsl obj) the object rises toward z axis
does anybody has a clue why this is happening and how to prevent this?
Nice. Apparently doGetOut accepts an ARRAY full of Object or sub ARRAY's with garbage data and objects:
{doGetOut _x} forEach [["garbage data", player]];
Ah, and if you use subarrays, everything that isn't an object is ignored, but the units disembark one after the other.
Instead of all at the same time.
and player gets dismounted as well
Yeah, it works for playable characters.
I basically wanted to create an alternative to the transport unload WP, one that does not result in injuries or death due to erratic helo behaviour
private _crewCargoAndFFV = fullCrew [helo1, "", false] select {_x select 1 == "cargo" || _x select 4} apply {_x select 0};
{doGetOut _x} forEach _crewCargoAndFFV;```
Also works perfectly
transport WP ends up the way it does because they try to regroup and just fall off
I think it's better to use this one ^, because it doesn't use a syntax with bad data that may break some time in the future.
{doGetOut _x} forEach crew cameraOn; // works
{doGetOut _x} forEach [crew cameraOn]; // works
{doGetOut _x} forEach [[crew cameraOn]]; // fails silently
The nesting cannot be too deep.
than maybe just create a "clean" array
third one would end up with
_x = [crew1, crew2, crew3]
I think that ^ is why it accepts units in nested arrays. Making multiple crew _vehicleN disembark with one command. Still weird that it accepts non-objects.
true
The garbage data can only be inside the nested arrays:
{doGetOut _x} forEach ["garbage data", player];
This one errors "generic error".
I would add it to the wiki, but:
Registraion of new accounts for the Community Wiki has been temporarily suspended. We apologize for the inconvenience.
can't use your bohemia account?
I do, I receive arma mobile ops ads from it 😄
I can't use my old accounts anymore. They changed the website twice since, and the old logins don't work anymore.
Damn, if I straight up put:
private _crewCargoAndFFV = fullCrew [vehicle this, "", false] select {_x select 1 == "cargo" || _x select 4} apply {_x select 0};
{doGetOut _x} forEach _crewCargoAndFFV;
into an activation filed of a land waypoint the helo does not wait and files up when units are disembarking resulting in deaths and injuries
If your account is still there then i can probably send a password reset email
"You" can? xD
yeah
@thorn saffron I think those waypoints have conditions. Just give either this one or the next one (can't remember which) the condition to be empty on those slots.
_crewCargoAndFFV isEqualTo []
Tho no I probably can't. I can send for wiki accounts but you need one for BI account
Or I can but it's not gonna do anything
Oh, and if this is still about custom waypoints with config, then you could put a waitUntil there. The waypoint isn't finished until the script is done.
crew and ffv's different groups there ?
FFV is in Turret, but non-FFV may also be in Turret.
Cargo is in Cargo.
He wants FFV and Cargo. But I guess that includes the commanders of tanks.
Its mostly about helicopters
It would include a copilot if he had ffv enabled. But idk if that even works.
doubt those exist
why not something like this ?
private _group = group driver _heli;
{_x leaveVehicle _heli} forEach units _group;
they did for a single day, then got removed 😭
copilot is a dead weight anyway 😛
Because then the pilot and the gunner would disembark too.
Also, you can use units on a unit, so you could skip thegroup command.
Then i don't get what he trying to do...
Make everyone BUT the gunner and pilot disembark.
basically I want the helo to dump the cargo people including guys that can FFV
Is this for a waypoint in the editor?
kinda, I'm looking at the scripted WP now to see if i can work out the waitunitl to prevent helo from moving when units are disembarking
They have some fancy stuff for the config waypoints since Orange:
class Demine //sources - ["A3_Functions_F_Orange"]
{
displayName = "CLEAR MINES";
file = "A3\functions_f_orange\waypoints\fn_wpDemine.sqf";
icon = "\a3\Ui_f\data\Map\MapControl\waypointeditor_CA.paa";
class Attributes //sources - ["A3_Functions_F_Orange"]
{
class ClearUnknown //sources - ["A3_Functions_F_Orange"]
{
property = "ClearUnknown";
displayName = "Deactivat All Mines";
tooltip = "When checked, the group will clear all mines in the area, otherwise it will target only mines known to the group's side.";
control = "Checkbox";
defaultValue = "true";
expression = "_this setWaypointScript (waypointScript _this + format [' %1',_value]);";
};
};
};
the land WP points to "A3\functions_f\waypoints\fn_wpLand.sqf" if I have a mission with scripts folder, then could I use "scripts\fn_wpLandDisembark.sqf"? For testing
The script path has to be absolute most likely.
I guess I will have to re-run the loop for creating _crewCargoAndFFV array to finally satisfy the "_crewCargoAndFFV isEqualTo []" condition
is it will be not easier with just scripts ? 😀
But this way you do it once, and then it's the easiest for forever.
I want something that I can use as a waypoint in editor
/*
Author: Karel Moricky
Description:
Let group members fire artillery barrage on waypoint position
Parameters:
0: GROUP
1: ARRAY - waypoint position
2: OBJECT - target to which waypoint is attached to
3 (Optional): NUMBER - number of fired rounds
4 (Optional): STRING - magazine type
Returns:
BOOL
*/
private ["_group","_pos","_target","_count","_magazine","_wp"];
_group = _this param [0,grpnull,[grpnull]];
_pos = _this param [1,[],[[]],3];
_target = _this param [2,objnull,[objnull]];
_count = _this param [3,100,[0]];
_magazine = _this param [4,"",[""]];
_wp = [_group,currentwaypoint _group];
_wp setwaypointdescription localize "STR_A3_CfgWaypoints_Artillery";
private ["_vehsFire"];
_vehsFire = [];
waituntil {
private ["_countReady","_vehsGroup"];
_countReady = 0;
_vehsGroup = [];
[...]
sleep 1;
count _vehsGroup == _countReady
};
//--- Cleanup
{
_x setvariable ["bis_fnc_wpArtillery_magazine",nil];
_x move position _x;
} foreach _vehsFire;
true
Shortened, but this is how a scripted one from vanilla works.
I'm actually looking at the land cunction
fn_wpland.sqf
/*
Author: Karel Moricky
Description:
Let group members land at the waypoint position
Parameters:
0: GROUP
1: ARRAY - waypoint position
2: OBJECT - target to which waypoint is attached to
Returns:
BOOL
*/
private ["_group","_pos","_target","_wp"];
_group = _this param [0,grpnull,[grpnull]];
_pos = _this param [1,[],[[]],3];
_target = _this param [2,objnull,[objnull]];
_wp = [_group,currentwaypoint _group];
_wp setwaypointdescription localize "STR_A3_CfgWaypoints_Land";
private ["_vehsMove","_vehsLand"];
_vehsMove = [];
_vehsLand = [];
waituntil {
private ["_countReady","_vehsGroup"];
_countReady = 0;
_vehsGroup = [];
//--- Check state of group members
{
private ["_veh"];
_veh = vehicle _x;
if (_x == effectivecommander _x) then {
if (!(_veh in _vehsMove)) then {
//--- Move to landing position
_veh domove _pos;
_vehsMove set [count _vehsMove,_veh];
} else {
if !(istouchingground _veh) then {
if (unitready _veh && !(_veh in _vehsLand)) then {
//--- van 't Land
_veh land "land";
_vehsLand set [count _vehsLand,_veh];
};
} else {
//--- Ready (keep the engine running)
_veh engineon true;
_countReady = _countReady + 1;
};
};
_vehsGroup set [count _vehsGroup,_veh];
};
} foreach units _group;
//--- Remove vehicles which are no longer in the group
_vehsMove = _vehsMove - (_vehsMove - _vehsGroup);
_vehsLand = _vehsLand - (_vehsLand - _vehsGroup);
sleep 1;
count _vehsGroup == _countReady
};
true```
Yeah, that is the other scripted one next to clear mines and arty.
ok "scripts\fn_wpLandUnload.sqf" fired up on a pure scripted WP and helo landed, now I need to plug my get out thing and it should be fine
_heli land "get out";
waitUntil {isTouchingGround _heli};
_group leaveVehicle _heli;
@meager heart I only want cargo and FFV guys to get out that is why I use sqf private _crewCargoAndFFV = fullCrew [vehicle this, "", false] select {_x select 1 == "cargo" || _x select 4} apply {_x select 0}; {doGetOut _x} forEach _crewCargoAndFFV;
¯_(ツ)_/¯
I'am stoped...🙅
damn can't paste what I tried
Ok, kinda got it working, but one issue, if the commander of the squad is inside the helo he will order units back in
also my waitUntil does not seem to end and helo stays grounded.
nevermind
the UH-1H is pretty derpy and pilot just smashes it into the ground, testing UH-60 with FFV instead, it lands it drops the droops, but it does not proceed to the next waypoint. My guess is that the script does not finish and the scripted WP is not completed
systemChat debug time.
TRACE / LOG masterrace
: /
Real debugger debug time
I didn't see any TRACE_n in the ACE arsenal.
I removed them
What's the point then?
I used a shitload when I was writing it tho
Well, why remove them? They're noop without DEBUG_MODE_FULL
I don't see how they're better than systemChat then. That's like their main benefit.
allrighty got it working fine for the player group, now I need to stop the AI commander from ordering the units back in
I think that is just unassignVehicle _x.
@little eagle Nope, they still get ordered back in by the commander, tried this
{unassignVehicle _x} forEach _crewCargoAndFFV;```
OK! sqf {_x leaveVehicle _veh} forEach _crewCargoAndFFV;
Worked!
Ok, multiple separate helicopters work perfectly fine, they drop the troops and move on only after all of them disembarked. Multiple helos in one group fly up when one of them dumped the cargo, even if there are people left inside of other helos (results in fall and death).
Still it worked supprisingly well for a simple insertion WP, when helos were separate groups nobody died or was injured.
is it possible to make it so that when a player holsters a certain weapon it always drops on the floor instead of going on their back? (basically If im doing it the way I want too then it means making the main object a weapon but if they can holster it on there back it wont work so I want it to either not be able to be holstered or drop on the floor when they do)
{
diag_log format ['%1 => %2',configName _x,getText (_x >> "displayName")];
} forEach ("true" configClasses (configFile >> "CfgVehicles"));
``` I have this script for exporting classnames to vehicle names. How would I add an `if` so it only prints vehicles (cars, planes, etc.)?
got it
{
diag_log format ['%1 => %2',configName _x,getText (_x >> "displayName")];
} forEach ("getNumber (_x >> 'transportSoldier') > 0" configClasses (configFile >> "CfgVehicles"));
I'm on a CUP map and I'm trying to dynamically populate towns, but some are only listed under NameLocal rather than NameVillage or NameCity. I don't want to use NameLocal because it includes things I don't want to use. Has anyone had this problem before? Did you find a solution?
@little eagle Showed an interesting example for a new waypoint config. I did manage to create my own working custom WP, but but his example had an extra option you can check. How can I actually make use of that? THe orange DLC is ebo file so I can't look into it how the function is actually using that waypoint option.
class Demine //sources - ["A3_Functions_F_Orange"]
{
displayName = "CLEAR MINES";
file = "A3\functions_f_orange\waypoints\fn_wpDemine.sqf";
icon = "\a3\Ui_f\data\Map\MapControl\waypointeditor_CA.paa";
class Attributes //sources - ["A3_Functions_F_Orange"]
{
class ClearUnknown //sources - ["A3_Functions_F_Orange"]
{
property = "ClearUnknown";
displayName = "Deactivat All Mines";
tooltip = "When checked, the group will clear all mines in the area, otherwise it will target only mines known to the group's side.";
control = "Checkbox";
defaultValue = "true";
expression = "_this setWaypointScript (waypointScript _this + format [' %1',_value]);";
};
};
};```
I can gather that it somehow sends the "true" value into the script
thats standard 3DEN attributes
so use it like that
its code that executes once whenever the - in this case - waypoint is spawned
( @thorn saffron )
Whats interesting is that these can be used for every entity that can be places in 3DEN , so also markers and triggers for example
We use a marker attribute to hide them from certain sides
doesn't arma lazy evaluate && conditions?
Yes && {like this}
It doesnt indeed
so is it possible to use disableCollisionWith and enableCollisionWith to make a object so that anyone and vic can walk through
"enableCollisionWith is a script that when you apply it to an object, it will be solid and the player will not be able to go through it. However, if you want your unit to go through it, you may want to use the disableCollisionWith command. An example for this is: "
expects another object so no
{ _Object disableCollisionWith _x;} forEach [ListOfObjects];```
ah cool ,I was tryna find out if there was a way to do it without a forloop but I guess it wokrs
thanks
alright so for some reason,it disableCollisionWith doesnt work for vics, this is wat im using
mergedList=allUnits;
mergedList append vehicles;
{ _this disableCollisionWith _x;} forEach mergedList;
hint "done";
any ideas why?
it works with infantry
@edgy dune
mergedList=allUnits;
mergedList append vehicles;
->
mergedList=allUnits + vehicles;
@Andrew#0693 It needs that because SQF requires to have the values passed to commands before it's calling the commands.
isPlayer _unit is a command so it has to evaluate it first and break it down to a single value. I think internally it even does lazy eval. As in if the left side is already false it doesn't even look what the right side value is. But it still needs to build the value to be able to pass it. {isPlayer _unit} is a CODE value. So nothing to do here.
Dirty fix but it works
@edgy dune On a Dedicated server?
@torn juniper Discord being shit again. See above
anyone know how to change the name of the AV in the UAV terminal? selector in top left of interface
That is the name of the vehicle you are controlling right?
@still forum i was actually testing in a quick misson i made in eden,will it work if i do it on my units server)
Not for players on your server https://community.bistudio.com/wiki/disableCollisionWith Read the big warning
But if you test in editor it should work. What are you doing to test if collision is disabled?
Well wat im doing to test is
I spawn a vr block,one of the big ones
put the gode I have
code*
then walk through it,which works. Then I spawn like a tank and see if it works,which doesnt
You run the code after you spawn the tank tho right?
yes
after the tank is spawned
I have a feeling it doesnt work for vics,unless someones done it then in that case im messing up
LUL
You know.. Reading helps
Even I didn't read that
This command doesn't disable collision between PhysX objects.
Vehicles are PhysX
thats wat I thought XD
I had a feeling they where,I didnt want it to be true
So theres no way around it?
What im tryna do is
u know how in star wars hangers have sheilds? well someone iin my unit has a "shield object" a transperent blue object basicly. Wat id like to do is have that object be so that ppl and vics can go through ,basicly like a static object
I don't know another way atleast with disabling collision via script
Did you make that shield yourself? Can you modify it?
If you did model it yourself you could make a animation that disables the collision quite easily
yea cant edit the mod cause its not our mod to edit u know,dont wana piss the devs off
also
If it's a easy model maybe you find someone to remake it for you and add that animation
I would. But I'm disabled for this whole week sooo...
RIP
welp I guess our misson maker will have to get creative and use wat static object they have,atleast it works with infantry
When is the mission?
Like if you ask in #arma3_model if someone can help you with that and make a simple shield model with a animation. For me it would probably be an hour of work. Maybe someone is nice enough to quickly slap something together
would having disableSimulation on a addAction for a vic where it sets the speed to a constant velo untill an other addAction say "re enable sim" work?