#arma3_scripting
1 messages ยท Page 193 of 1
once the engine dies its dead, ive even broken vehs wen allowDamage is false, once this happens you cannot fix it
ive had this issue too
Heyo, quick question.
If I am checking a complicated condition once, and only once on mission start, does it still make sense to use lazy evaluation? or is it not worth it?
For context, the condition is:
// The macros SET is explained below, it simply is a global variable.
// SET(Lorem) -> AET_disclaimer_SET_Lorem
hasInterface && SET(enabled) && !( SET(disable_in_editor) && is3DENPreview ) && !( SET(disable_for_admin) && IS_ADMIN )
Lazy eval works best when you use a frequent and performance heavy eval. In this case, there is not much impact to have it or not, so your preference matters more
ive done it with the standard vehs nothing seams to bring it back
really?
Testing time
even setting the damage to 0 wont bring it back
i did it alot when playing with velocity in helis
u can break helies even when allowDamage false; lol
Alrighty thank you for the info.
I tend to screw up the setup of it at times so might be simply less headache to not use it :D
handleDamage EH thats why
remove them or return 0/false and gg ๐
and you cant break them
not really when you find out how it works
and when you notice they fire for each hitpoint
i mean in the way of overwriting vars
how you been anyways bro? been a while since we last spoke lol
had a diff name back then, "TrinityNet"
"" even setting the damage to 0 wont bring it back "" <-- what do you mean with that? setDamage 0 on a Wreck?
If yes: Won't work. Models will be exchanged.
on the engine @jade abyss
Hu? oO
arma? lol
Wait
ima check it, been a while since i last did it
please help, when i spawn units in via sqf they are hostile to everything including blufor, but if i use zeus or editor they arent hostile
this is the sqf i am using
_crewGroup = createGroup east;
_crewUnit1 = _crewGroup createUnit ["B_crew_F", getMarkerPos "CNVY1", [], 0, "NONE"];
_crewUnit2 = _crewGroup createUnit ["B_crew_F", getMarkerPos "CNVY1", [], 0, "NONE"];
samething happens with debug
Hostile against who?
anything and everything they are blufor and shoot blufor
Because east is OPFOR?
yeah they are shooting each other? even tho both are blufor then proceed to shoot me who is also bluefor
What is the goal?
originally its to spawn a convoy, but im just trying to spawn units in to put into the vehicle. However they just end up shooting each other even tho they are on the same team
that dont seem right that cant be
ive restarted my game and started this on a fresh mission file with nothing changed
are u useing Mods of some sort
I am using mods, same mod set ive used to do this before and havent had this happen
Do you mean you wanted to create BLUFOR units that behave OPFOR or?
Because east is OPFOR?
okay where are you getting this east from? the units when i look in zeus are blufor
BLUFOR is west or blufor
East = Opfor West = Blufor
yes i get that. Blufor units spawn, but shoot blufor
You said it is east
im cooked
jump out the fire then lol
nice what did u do
changed east to west
nice
funnily enough even if the group iseast they still spawn as blufor
let me clip it
Here, i spawn a group as east they are blufor that are hostile with blufor
_crewGroup = createGroup east;
_crewUnit1 = _crewGroup createUnit ["B_crew_F", getMarkerPos "CNVY1", [], 0, "NONE"];
_crewUnit2 = _crewGroup createUnit ["B_crew_F", getMarkerPos "CNVY1", [], 0, "NONE"];
this is what im using and here is a closer clip of the units being blufor
copy the text into discord
yeah thats above the video its
_crewGroup = createGroup east;
_crewUnit1 = _crewGroup createUnit ["B_crew_F", getMarkerPos "CNVY1", [], 0, "NONE"];
_crewUnit2 = _crewGroup createUnit ["B_crew_F", getMarkerPos "CNVY1", [], 0, "NONE"];
_crewGroup = createGroup West <-----fixed;
if your useing West then make um B_crew_F if your using East then O_crew_F
(((((((((( Dont spawn a East group and and give the grp Blufor soldiers )))))))))))
yep, still dont work
you see what's going on there, you createGroup East and then made the soldiers B_crew_F, B_crew_F belongs to the West team, you don't want to do that, cuz that would be kinda funny
take a veh, plow it in the water.. TP it out and you cant fix it
yeah i see how its gone whacky
yes
good great
_crewGroup = createGroup West;
_crewUnit1 = _crewGroup createUnit ["B_crew_F", getMarkerPos "CNVY1", [], 0, "NONE"];
_crewUnit2 = _crewGroup createUnit ["B_crew_F", getMarkerPos "CNVY1", [], 0, "NONE"];
@jade abyss want me to record it?
lol ive known this for atleast a year
yeh, i dnt think much of it
in the beta if you busted a wheel THEN fixed it the engine would come back on
not the case anymore
@lunar lichen Ah! In the water! Correct!
ya
That doesn't work. Noticed it a few month ago also
yeh, there was a way around it in the beta
but that was fixed
so i assumed this was meant to be
In Arma: "Its not a bug, its a Feature" ๐
interesting!
yup lol
Pretty old bug, tbh @fallen locust
a bug by design
lol
Sounds like ArmA
You just have to love the RV-Engine ๐
No recoveries for you xD
Unit's side depends on it's group. You join blufor unit into a opfor group, then they gonna be opfor.
There is nothing whacky about it. People have been using this forever to change unit's side.
drainWater _vehicle;
yeah but it doesnt change the units side? its still west but acts east
its one of the more fun enviroments ive played with
Side command might still return blufor, despite unit being in opfor group
^ it's a janky quirk of createUnit, it happens when you spawn a unit whose type is associated with a different side than the group's actual side
But units in group always have been behaving like they are of the group's side
which was what was throwing me off, so spawning 2x blufor units as opfor would make them both opfor but seen as blufor so would shoot each other even tho on the same side
Side depends on group side
I don't think there is any correlation with createUnit command. Unit behaves like it's side is group's side, regardless how it was added into the group.
I think i'd have to agree, RV and its brokens do make for some fun times
When using createUnit, you have to rejoin the unit to the side you created if the unit doesn't naturally belong to that side right after. It's buggy.
Ok 
it's a known bug that's been (kind of) documented in the wiki for a while:
https://community.bistudio.com/wiki/createUnit#Example_6
Creating a unit from a different side may lead to issues: ```sqf
_grp = createGroup east;
hint str side _grp; // EAST
_ap = _grp createUnit ["C_man_p_beggar_F", position player, [], 0, "NONE"];
hint str side _ap; // CIV, not EAST// workaround
[_ap] joinSilent _grp;
hint str side _ap; // EAST```
the only game that can stress me out -.-
some times this game shows me somthing so un-belivable that i just facepalm the desk
IE: the backpack "incident"
I luckily haven't come across much anger yet, although I have faceplamed many a time, mainly related to model work xD
Like flying downwards with about x000Km/h (can't remember wich one it was) and watching the attachment slowly moving away from the weapon XD
_veh enableSimulationGlobal true; ??
Simulation is not disbaled
it can coast# still
just engine fked
sos for the spelling -.- not slept in a few days lol
Well you're functioning better than I do with a lack of sleep ๐
i spent 4 hrs trying to work out why my display was not working..... Pvt vars -.-
My favourite is missing any of the following , ; ][ )(
i came in here expecting somone to rip me a new hole lol
i feel out of place with all those people ------------------------->
My feels before I joined model makers, most of us are a delighful bunch although @fallen locust isn't he's usually grumpy ๐ think he's having a good day today?
lol, ive spent enough time on the forums to know that xD
been a lurker since the begging of arma 2
only just started giveing back to the community
I remember the day he taught me to PV/PVC/PVS ๐
Look at my avatar my avatar is amazing!
lol
You seem happy today Grim ๐
alot of people in here showed me most of hat i know now
Grim, Maca and Co for me
guess thats why i feel out of place lol
If it wasn't for a few others back in the skype channel I'd have been lost too, so many names
yeh
a few never made it to A3 ๐ฆ
saying that ive had a few fuses blow over this game
i dont know how you all do it all the time
Still need help.
apparently im spamming -.-
Ill be deamed , false means something!
ur bots being mean to me ;-;
try { if(false)throw(systemChat "False means NOTHING!"); } catch{};
-.-
It gets frustrating, most of my issues stem from not having any previous code experience resulting in not knowing effective ways to do x/y/z but someone usually points me in the right direction, I just think I'm doing this for 'fun' and seems to work alright
Better than batch/cmd ๐ thats pretty much my extent of code outside of ArmA
Very fancy batch xD
PS ftw ๐
ABC
but yeh, VB does not translate to C++ Well lol
can anyone tell me whenever i write a code it shows Type Script,exppected nothing what to do about it
Wrong parameters? Maybe some command is getting some parameters. While the command does not take any?
Is jet defined?
thing i hate the most about scripting in this game is i have a crap computer... does not make things easy lol
can u just help me by coming to a vc?
Where do you executing this? Do you have some code before or after it?
im using a trigger and dont have any code
In activation field?
yes
Define 'crap' as I used to do A2 work on a Athlon x2 64 @2.1GHz, 4GB of RAM and a HD3750 xD
I'm scripting on a netbook from 2011.
^
my mac-air?
like that bad
lol
You put it in On Activation, not Condition right?
Mac Air is fairly sensible Nathan xD
When do you see the error message
when i press the okay
Screenshot your trigger setup
okay wait
have to do all my work in VR to make things quicker
http://i.imgur.com/P8Ze5t9.png anyone know what mod that is?
that looks like DayZ SA
ahhh
"Not a mod xD"
Arguable ๐
LOL
True, true
@fallen locust its not quite a game lol
DayZ has a slower time scale than BI lol
does it run good? being on A2's engine?
Its not A2 Engine
its like RV 2.5
thought it was
i bought it day 1 on steam and have less than an hr in it
same, just bought it for "Support", since dayZ for A2 was just a Gamebreaker ๐
i dno, i cant stand it for some reason
will just stick to CS:GO lol... looks better xD
if you wanna see somthing funny take 3 hunters attach them with rope then drive one off somthing
entertainment for days
I recently fired it up after not playing for a year or so, a bit nicer to play if i'm honest, I can actually get over 12 FPS now, that was the most depressing part, ArmA 2/3 60FPS max settings DayZ SA less than 20 ๐ฆ I expected it given early access but c'mon xD
still in alpha?
is there away to get the RPM of a tank while driving?
rpm is an animation source as well
Oh yah, I know that but if I'm truly honest its spoiled the game, pushing it out so early ahead of being playable, up till a year after release I had 10 mins play time
yeh, its not done. dont look like it will ever be done
If it'd had been pushed out now I'd likely have been far more interested
'dont look like it will ever be done' agree
it was just a money maker, they got their money... no need to finish the game
thats kinda actually why I am tryna find it, cause if I did ti right the vics rpm is 7200
which seems too high
that and for sounds
"Life begins at 10k rpm."
Idk from where I have that memory
nice my idle rpm is 2400.05 and when driving at max speed its 5000
๐ where as merkava is 1400 to 3000
I tried not to consider that but its slowly looking that way
^^
Rocket should have just stuck with the mod in the first place, it was atleast half enjoyable xD
as far as he cares, he has enough money to retire
screenshots cant be posted here
?
I did DM you the ss
maybe Im on phone that's why
You did not verified yourself on #offtopic_bot_cmds and #rules check
No, because it worked finely to me
a website like I wasn't getting any speed on steam so my isp had a local server I downloaded it from their server
So you say you pirated the game. Good, I'll boot you up
i did
!ban 902648635521654864 0 software piracy
*PewPewPew!!*
RIP @idle moss
Hello, I am looking to add to a module that we create to put arsenal the option to limit to X categories, does anyone know of a place where I can learn how to do it? I just want to limit to certain items, and then I will find the life to get the system to list everything.
https://community.bistudio.com/wiki/Arma_3:_Arsenal#Modding
Blacklisting them or Adding them into the particular Arsenal object
You'll also need this https://community.bistudio.com/wiki/Modules
lol
Still can't get over how its planned to port DayZ to PS4 + XBOne
i dont think the HW can even handle the engine
^^^
my phenom out powers an XOne lol
This is likely true ๐
TBH the 'next gen' consoles were already 5 years behind before they were even released
yeh, not like the 360, PS3 which wer acctaully on par on launch
Hey, had another question, this time regarding the ED-1E UGV. I'm looking for a way to have a trigger activate after interacting with a certain object (object1).
I've had a look at https://community.bistudio.com/wiki/Arma_3:_Probing_Mechanics, but it's really out of my depth, I don't really know what do do with the provided scripts and what the different "params" are, how to set them up etc.
FML BI -.-
Yeah, they were close, the problem is PC hardware advances so quickly now
anyone know how to hude the stamina bar?
showHUD [false,false,false,false,false,false,false,false];
does nto work
Hmmmm, no idea TBH
just have this random orange bar -.-
@fallen locust Teach us
CfgDifficulties I believe
StaminaBar[] = {1,1};
I assume change the 1's to 0's
FML, but is local -.-
Then make it global ๐
i meant the mission, can u set CfgDifficulties in .ext?
ive allways done it in config.cfg
I would like to say yes but can't be too sure, haven't played with it TBH
not yet anwyway
hmm, i haz a bug
i think it does hide it
i was not calling it -.-
someone hit me
.
Can't use that on a public official server.
On your own, adjust the filters https://github.com/AsYetUntitled/Framework/wiki/BattlEye-Filters
Almost forgot, and possibly https://community.bistudio.com/wiki/Arma_3:_CfgRemoteExec
ok, if you call showHUD at the begging of the mission it dont work
i gues the HUD has not loaded yet for it to be hidden
Is there a way to prevent allied AI going hostile when civilians are killed?
player addEventHandler ["HandleRating", {0}];
you can at least allow positive rating tho ๐
change it to abs (_this # 1), then you can get promoted 
Why, it's a garbage system :P
Cheers!
but yeah, change 0 to abs (_this # 1) if you want to keep positive rating changes for some reason
Is there an option to remove scene visibility on a waypoint added using addWaypoint?
You can also use setWaypointVisible to change it for individual waypoints
Thanks Nikko, what I needed
im trying to debug my script and whenever i load in and get an error or get multiple errors they eventually go away, is there anyway to find where the errors go?
so i dont have to load out, load back in to screen shot the error
https://community.bistudio.com/wiki/Crash_Files
Errors are logged to the RPT file
sweet thank you
Keep in mind that the RPT file also contains a large number of log entries that are either not errors, or are internal errors that don't matter
And I was using *(-1)
... thanks for that
hello
I read about side relations
but the following code does not work
east addFriend [sideEnemy , 1] ;
west addFriend [sideEnemy, 1] ;
I don't notice the effect of the statements.
Why is that?
Probably because the command is actually setFriend, not addFriend
That being said, I'm not totally sure that you can make sideEnemy friendly
so what exactly are the exceptions?
I noticed that it's possible to let the same faction kill each other, make armed civilians kill blue red or green.
but the others just do not work, and it's not documented.
maybe i was using setFriend all along because I did see the hints of arguments appearing when i was coding.
I don't know.
You could find out with some testing though, there aren't all that many combinations.
but still, no effect
so any combination that do not work are all intended instead of bugs?
I mean, probably.
A lot of the sides other than the main 4 are meant for special cases and game mechanics, so it's quite likely that they don't respond the same way.
are there any vehicle unflip scripts made public?
I think the only way is via CfgDifficulties
There's one in KPLiberation
I know there's a github with the sources and I think they have a license that permits reuse
Might be able to do it on server directly in the profile
https://github.com/KillahPotatoes/KP-Liberation
MIT license, so basically fully permissive, just retain the license and original source
The actual unflip script is https://github.com/KillahPotatoes/KP-Liberation/blob/master/Missionframework/scripts/client/actions/do_unflip.sqf
Though it needs something to call it for it to work
I'll take a look into that, thanks
if you'd like another reference, this one's from my gamemode:
https://github.com/Warriors-Haven-Gaming/WHFramework/blob/main/WHFramework.Altis/Functions/Unflip/fn_initUnflipAction.sqf
it does the same thing that KP Liberation seems to do theirs, using setPos which resets the vehicle orientation
the extra part you might be interested in is the hold action itself, and the condition to determine when the player's looking at a flipped vehicle
what's the best method for detecting a flipped vehicle, vectorDot?
trying to understand all of them so I can write something lightweight for myself, and learn at the same time
https://community.bistudio.com/wiki/canMove
canMove might be a simpler option, although i don't think i've actually tried it, so not too sure about its reliability
It works fine, it's what I use for my flip vehicle stuff
How do mods like Enhanced Soundscape know what kind of environment you're in? I would like to use a similar thing for my pub Zeus spectrum device script.
nah showHUD does it
You can also just use _vehicle setVectorUp [0, 0, 1]; to unflip ot
You can just look at the pbo(s)
just have to set it after the game starts
I'm even more confused now.
Thank you so much
TAG_fnc_createMarkerAO = {
params [ [ "_pos", [ 0, 0 ] ], [ "_type", "o_unknown" ], [ "_size", 50 ], [ "_visible", false ], [ "_color", "ColorOPFOR" ] ];
private _alpha = [ 0, 1 ] select _visible;
private _name = hashValue systemTime;
private _marker = createMarkerLocal [ format [ "%1", _name ], _pos ];
_marker setMarkerSizeLocal [ 1, 1 ];
_marker setMarkerTypeLocal _type;
_marker setMarkerColorLocal _color;
_marker setMarkerAlpha _alpha;
private _border = createMarkerLocal [ format [ "%1_border", _name ], _pos ];
_border setMarkerSizeLocal [ _size, _size ];
_border setMarkerShapeLocal "ELLIPSE";
_border setMarkerBrushLocal "BORDER";
_border setMarkerColorLocal _color;
_border setMarkerAlpha _alpha;
private _ao = createMarkerLocal [ format [ "%1_ao", _name ], _pos ];
_ao setMarkerSizeLocal [ _size, _size ];
_ao setMarkerShapeLocal "ELLIPSE";
_ao setMarkerBrushLocal "FDiagonal";
_ao setMarkerColorLocal _color;
_ao setMarkerAlpha _alpha;
[ _marker, _border, _ao, markerDrawPriority _marker, markerDrawPriority _border, markerDrawPriority _ao ];
};
when creating marker, I get random results, markerDrawPriority is always 0
calling [ getPos player, "o_unknown", 100, true, "ColorOPFOR" ] call TAG_fnc_createMarkerAO; for debug
if not visible where the problem is, that north marker semi-alpha is created with same call, they should be same as others
Are you sure that some of those markers don't already exist?
If you call createMarker on a name that already exists, it will quietly fail.
using private _name = hashValue systemTime;
should be unique to milisecond, these markers were created at least 1 second apart
Well no, hashValue isn't guaranteed to be unique even if systemTime is different.
Not sure how you ended up with half alpha though. That code can only generate 1 or 0.
So the issue is probably in other code.
there is no other code, just snippet + debug console
I go further, loaded vanilla arma, different map
hmm, could be problem with '/' in name due hash ? "TK6/tT4jF1U"
does not explain opacity tho
Yes, see POLPOX's comment on https://community.bistudio.com/wiki/createMarker
The opacity isn't different, it's in a different channel
I suppose you can just replace with * or something, if that's the only character that createMarker cares about.
forum dead, suppose to find easy replace string function somewhere
I guess trim would do
forgot about regexReplace
ah yes, regex, the nightmare
private _name = ( hashValue systemTime ) regexReplace [ "\/", "*" ];
How would one go about getting the direction vector for where the player is looking at?
getCameraViewDirection
Thanks, it worked.
I simply do vectorUp _target select 2 < 0.2
Just do str random 1e6, no weird symbols
Actually maybe slight chance for e notation number, but no /
I managed to get it working via the other 2 people's help above :) ty though SM, appreciate you!
The stamina bar cannot be disabled with showHUD
You can disable it if you are using the latest version of ACE (3.4.2)
(call ace_common_fnc_getStaminaBarControl) ctrlShow false
Keep in mind that this will hide it as long as the game is running, even if you switch missions.
Hey, my earlier message got drowned out, so I figured I'd try again
How would one go about detecting an interaction of the ED-1E UGV w/ a predefined item? The biki page on the subject is not easily comprehensible
Bit more detail here
No idea how it works, best bet would be downloading that demo mission and dissecting it
Is there a specific app you'd recommend?
There are tons of tools to unpack the mission pbo, I think even official ones?
All I'm left with is a .bin file, does that differ from a PBO in a significant way?
There is a way to turn bins back into configs too, google the tools
Or you can just open the mission in editor instead
How does one go about that? Do I just paste the folder into my missions folder?
I don't know what that addon from workshop contains, download it, unpack it there probably will be a mission file in missions or MPMissions, just copy it into your profile's missions directory to open in editor
will do, thanks!
nofiication invoked by BIS_fnc_showNotification or completion of a task sometimes doesn't go away on dedicated server...
Anyone familiar with how it might be possible to clear notification on the rare occasion it fails to disappear?
Even just the IDC for the notification GUI would be helpful if anyone could find it, I couldn't
I'd better look at the source of the problem rather than hacking a fix which will probably break it even more
Confirm. Faced with that issue in a CDLC scenario recently.
Sorry still being stuck on this, but from what I've gathered so far on google, I need to use either CfgConvert or BINtoCPP.bat to open the .bin file
However, the programs always returns an error stating
"Error reading config file 'C:\File\Path\Blah\Blah\Blah\784110538843228437_legacy.bin'
Press any key to continue . . ."
I suspect that this is due to the fact that it's a mission that requires Contact DLC, any known workaround?
You can use that https://github.com/SteezCram/Armaholic-Archive/tree/main/ArmaUnbin
Just did, got the following error:
"This is not valid raP file.
Was expecting signature 50617200, got 74696e69"
Well looks like the .bin is corrupted then, never had this problem.
Strange, because the mission opens fine in the game when using Contact, would it still work if the file was corrupted?
I'll redownload it and test it all again
Nope, still doesn't work, even on a different computer
Are you trying to convert a binarized mission.sqm or what?
Then you need to load it via eden editor, and save it again unbinarized.
It's possible to unbinarize mission.sqm using CfgConvert.
I don't have a mission.sqm or anything like that
I downloaded this mission from the workshop https://steamcommunity.com/sharedfiles/filedetails/?id=1841970902&searchtext=ED-1E
After going into the SteamLibrary/steamapps/workshop/content/107410/1841970902 folder, the only file there is called "784110538843228437_legacy.bin".
Seeing as I want to open the mission in editor, I'm looking for a way to transform this file into a mission.sqm file or any format allowing me to edit the mission in eden
no clue then 
It's most likely Steam related file.
Try to find the mod in Arma 3 folder.
OK, then try this instruction: https://steamcommunity.com/sharedfiles/filedetails/?id=287378519
Oh my god it worked
I love you
i didnt understand what that meaning
You need to create filter exceptions for the scripts in battleye or disable the corresponding battleye filter
\serverRoot\battleye\scripts.txt probably, check the newest filter log, there you can see it.
But how am I supposed to do that? The script isn't for me, but for the public zeus.. Players should be able to customize their night vision color/filter as they wish.
You cant do that on public servers, admins must allow it / add it.
Hmm.. Okey
I think with script competition level 2 or not? Some servers has that
Or generally not
No clue about zeus + scripting sorry
Composition script level is a separate setting. It also has to be changed at the server or mission level; it cannot be changed on the fly.
Composition script level determines what scripts can be executed from a saved composition, when it's placed. 0 means none of the composition's scripts will be executed. 1 means only object attribute scripts will be executed (anything triggered by an option in the object's Editor attributes panel). 2 means all scripts will be executed, including scripts in the object's Editor init field.
If the composition script level setting doesn't permit scripts to be run, they won't run at all. You won't be kicked, nothing will happen.
Composition script level does not affect BattlEye and CfgRemoteExec security settings. If a composition script is allowed to run in principle, but does something that's forbidden by the security settings, then it will be blocked by that.
The problem you're facing is that you're trying to remoteExec something that's forbidden by the server's security settings. You need to either refactor your code to remoteExec something that isn't forbidden, or refactor your code to not use remoteExec. I don't play on public Zeus servers so I don't know what they forbid or allow - and it can vary from server to server anyway.
I need help with multiplayer scripting. I want my script to be useable with JiP that's in an init spawned by a Zeus. I don't know where to start.
What script.
And where usable.
Like addaction or some other script.
It does a bunch of things to make the Spectrum Device usable in normal gameplay. It attaches invisible radio objects to soldiers and then reads variables off of them to calculate the received power.
jip is i think in draw3Dhandler but idk
So you want to execute this script from unit init that is spawned via Zeus?
Yeah, with an invisible helipad or something.
no. he means: unvisible helipad->init-> zeus place the helipad on the ground -> zeus enabled hisself and aktivate the script
thats what i doing tho with the NV-Script but i cannot bring effekts to other players with remote exec or something like that
From a composition like EZM and stuff.
thats like the problem that i have. they say me its not possible but i know there is any way to do that becurse core do it to
ya bro. i hanging like january in a fucing nightvision script
and trying something like EZM
i created my own TWR /Desert Fraktion and a lot more but the nightvision sucks
everythink what u try in Mp u need to be carefull with remote exec. for testing u can use remote exec call 0 BUT only for testing on servers without battleeye like ur own privte server or i give u acception to mine wehre u can test public zeus scripts. otherwhile u can use this trick:
that shows u 1st is ur script running local if a player on a server with u. after that u need to testing on servers
@sly cape
showHUD has disabled it
More specifically is that I want to know if putting createVehicle in the init will only make one or if it will make one for each machine.
u need to know the asset name
iirc an object's init field in a typical scenario would run on every client, but when it's part of a zeus composition, it only runs on the zeus's machine
but it's been a while since i checked so i might be wrong on that
showHUD [false,false,false,false,false,false,false,false];
What? The script works in SP, but I want to know if it will work in Zeus MP.
remote exec, public variable, and strings
3D event handler
i know a while ago i made my own zeus comp that had issues with locality (it had an addAction but other players couldn't use it), so i came to the conclusion that the init field wasn't globally executed
do u have knowlege about strings or the right form of remote exec?
doesn't using "EntityCreated" MEH solves the problem?
showHUD [true,false,true,true,true,true,true,true];
Oh right. It's linked to the weapons info box.
seams to be
(call ace_common_fnc_getStaminaBarControl) ctrlShow false
can disable it without hiding everything
yeh, not running any mods
Thats new though. Last time it stayed no matter what
it does like to come back tho
I'm afraid that the method with ACE is the only one I know.
It's based on some config changes.
yeh, i just did
_HudDisabled = [false,false,false,false,false,false,false,false];
_hudStatus = shownHUD;
if !(_HudDisabled isEqualTo _hudStatus) then
{
hint "Removing HUD";
showHUD [false,false,false,false,false,false,false,false];
};
and tied it into my HUD Refresh
crazy
GL. I couldn't do anything without CBA
This is exactly correct
If you're going to try to answer a question, please read it properly first
To be honest theres alot you can do without mods, just some things have to get really 'hacky'
I read them. And if he wants to create a vehicle over the init, I gave him the asset page where all the vehicles are listed with their cfg and class names.
Hello guys im having trouble with an error message popping up as soon as the respawn screen is displayed
20:57:47 Error position: <param [3,"",[""]];
private _uniqueID =>
20:57:47 Error Type Array, expected String
20:57:47 File \A3\Functions_F\Respawn\fn_showRespawnMenuDisableItem.sqf..., line 88
Im not using the function BIS_fnc_showRespawnMenuDisableItem anywhere, which i believe is creating the error.
My Respawn template is working as intended too, still the error message is quite annoying.
Does someone have a clue how to solve this?
I assume it is a function that automatically is getting called on every respawn? How and where can i define the parameters that the function uses?
You did not read it properly. He was not asking how to create a vehicle in general, he was asking a specific question about the locality of the command.
Yep, this was what I was assuming he needed and create event(s) via that for every client.
you're passing invalid parameters somewhere. it could be your respawn template
My respawn template is very simple.
respawnTemplatesGuer[] = {"Tickets", "EndMission", "MenuPosition"};
That's known bug: https://feedback.bistudio.com/T176682
Oh I see. Thank you very much.
That wasn't apparent beforehand, either in his description or anything else. What's the point of this discussion??
The point is that if you read and understand the question, you can give a helpful answer and not a useless one that clogs up the channel
and it's just easier to say "you were right, sorry" 
You can't hide the stamina bar without mods.There is at least no way that I am aware of.
With mods it's super easy. If you know where you have to look.
Degah, I didn't misunderstand any of the questions. Why are you bothering me with this? He asked if he could create a vehicle with this command. And he can, depending on which vehicle he wants. All the content for that is on the page.
If you understood the question, you wouldn't think that's what he asked
he explicitly asked a question about locality, I don't see any "hey Idk how to use this command" lmao just say "ok sorry"
Who are you that I should apologize to you for anything? This is my interpretation of the question and my answer. If you're so obsessed with putting on an act here and telling me that you understand answers, then tell me why, after almost six months and multiple inquiries, I haven't received a reasonable answer to my questions or scripts. You constantly tell me that it wouldn't work or something without you even beginning to engage with anything. Core, for example, did this in their script, but I personally am not in a position to expand it to 9-10Filter. This isn't the first time I've asked a question here, and the only person who really contributed anything was -hypoxic . Please don't act like that, and above all, don't make fun of me, because you're not exactly the ones who should be amused when someone, according to "your level of knowledge," doesn't understand a question when you yourself aren't even very capable of it. And while I have 14,000 hours in Arma 3 and know a lot, I'm not going to try to help anyone if they come at me like you do and tell me I have something to apologize for because of a different perspective and understanding of an issue. Seriously,
omg ๐
Anyways, Iโm running into a problem with my postInit.sqf triggers: I want the vanilla radio channels to play a beep sound when you press/release Push-To-Talk, but I want to exclude the direct chat from making any noise because obviously that makes no sense. Right now, even when I switch to the direct channel (proximity), the trigger for general PTT (pushtotalk) still fires the beep. How could I set it to ignore a specific channel? Below is how I have it set up currently...
private _trig7 = createTrigger ["EmptyDetector", [0,0,0]];
_trig7 setTriggerActivation ["ANYPLAYER", "PRESENT", true];
_trig7 setTriggerInterval 0;
_trig7 setTriggerStatements [
"inputAction 'pushtotalk' > 0",
"setCurrentChannel 7; playSound 'beepIN2';",
"playSound 'beepOUT';"
]; ```
You can redesign your trigger so that it first checks which channel you are currently on, and only then plays the beep. For this, you use the command currentChannel in SQF, which returns the number of the currently active radio channel (in Vanilla Arma, 'Direct Chat' is usually channel 0). So if currentChannel == 0, nothing should happen; otherwise, the beep should sound when pressing/releasing PTT.Below you see 1 example: one with just one trigger (but with a small conditional check in the 'else' branch).
private _trig = createTrigger ["EmptyDetector", [0,0,0]];
_trig setTriggerActivation ["ANYPLAYER", "PRESENT", true];
_trig setTriggerInterval 0;
_trig setTriggerStatements [
"(inputAction 'pushtotalk' > 0) && (currentChannel != 0)",
"playSound 'beepIN2';",
"if ((inputAction 'pushtotalk' == 0) && (currentChannel != 0)) then { playSound 'beepOUT'; };"
];
(idk if that works)
but u can try it
Thank you very much, I was having a hard time trying to find where the radio channels are designated
but thats very helpful
You did ๐คท
Just for future reference, this works great but direct channel is actually 5
Just found it lmao
Huh? Why clown me?
Becurse u ar
Why?
You didn't contribute anything to this
He's the one who originally asked the question
What? I don't think one (I) contributes to anything when they (I) ask a question. They (I) ask for other people to contribute.
@brittle badge Oh also I forgot to mention I wanted to have a static sound play while the PTT button is held, does this look good?
_trig1 setTriggerActivation ["ANYPLAYER", "PRESENT", true];
_trig1 setTriggerInterval 0;
_trig1 setTriggerStatements [
"(inputAction 'pushtotalk' > 0) && (currentChannel != 5)",
"playSound 'beepIN2'; \
[] spawn { \
while { ((inputAction 'pushtotalk' == 0) && (currentChannel != 5)) } do { \
playSound 'static1'; sleep 0.5; \
}; \
};",
"if ((inputAction 'pushtotalk' == 0) && (currentChannel != 5)) then { \
playSound 'beepOUT'; \
};"
]; ```
Ahh I see
Thought you were a random coming from around the corner๐
Hm... ๐ค On the 1st eye i think its okey but i didn't test it. And i don't know every arma 3 sound out of the head
Ohhh I shouldve mentioned too that its a sound I have in a folder
I made a class for it in the config
Good news, it kinda works, no static plays... weird
But the beep and beep out work
while { ((inputAction 'pushtotalk' == 0) && (currentChannel != 5)) } do {
playSound 'static1'; sleep 0.5;
};
It's checking for the input state being 0 - that is, not pressed. That should probably be a !=, so it plays while the state is not 0 - that is, while it is being pressed.
A User Action Event Handler would be better than using a trigger for this, though.
Ohhhhh
How would I go about setting one of those up?
addUserActionEventHandler ["PushToTalk", "Activate", {
if (currentChannel != 5) then {
playSound "beepIN2";
0 spawn {
while { inputAction "PushToTalk" > 0 } do {
playSound "static1";
sleep 0.5;
};
};
}];
addUserActionEventHandler ["PushToTalk", "Deactivate", {
if (currentChannel != 5) then {
playSound "beepOUT";
};
}];
CAUTION: there are several different input actions for push-to-talk. You'll want to make EHs for all of them, except PushToTalkDirect I suppose.
I see, thank you very much
In some mission somewhere, I remember seeing a sick animation, where the unit was puking or retching. Via polpox's viewer I searched for sick, wounded, puke, inj, etc. and couldn't find it. I don't think it was a mod, but maybe it was. Anyone know this animation name?
anyone have suggestions on the best way to have an when a player picks up a body via ace carrying a checks runs to see if the AI is in line of sight of the player
I have a script kinda put together which is below and I get into the while loop where the hint is but it seems like its getting tripped up after that part and not triggering the if statement even if I look at the AI in the eyes. It works when I pickup a body infront of the AI but if I pick it up and walk infront of them then nothing happens
if (player getVariable["UC_Checked_Carry", []] isEqualTo true) then{
} else{
player setVariable ["UC_Checked_Carry", true];
_carryEventId = ["ace_dragging_startCarry",
{
params ["_unit", "_target"];
hint "EVH was added";
private _aiUnits = allUnits select {
side _x != side player && {alive _x && {_x distance player < 500}} // only enemy AI within 500 meters
};
{
while {player getVariable ["ace_dragging_isCarrying", []] isEqualTo true} do
{
hint "check is running";
private _ai = _x;
// Check if AI has line of sight
private _eyePosAI = eyePos _ai;
private _eyePosPlayer = eyePos player;
private _hasLOS = lineIntersectsWith [_eyePosAI, _eyePosPlayer, _ai, player] isEqualTo [];
// Check if AI knows about the player (value from 0 to 4)
private _knowledge = _ai knowsAbout player;
if (_hasLOS && {_knowledge > 1.5}) then {
player setCaptive false;
hint "You were spotted carrying a body! You are now OVERT!";
player setVariable ["UC_spotted", true];
};
};
} forEach _aiUnits;
}] call CBA_fnc_addEventHandler;
};
hi @foggy stratus
howdy dude!!
i love the barrel script
It's fun, especially when many near so you get a chain reaction.
lol yes its awsome thx m8
I have never seen such. In vanilla some Civil injured anims would look similar
Might be an Old Man one.
ok, maybe I imagined it, thx
Tried to figure out out no luck, very difficult to reproduce
In the mean time made this little failsafe, @faint burrow incase you're interested as well
[] spawn {
if (!hasInterface) exitWith {};
scriptName "BIS_fnc_showNotification failsafe";
_clearNotifDialog = { ["RscNotification_1", "RscNotification_2"] apply {(_x call bis_fnc_rscLayer) cutrsc ["Default","Plain"]} }; // clear notification dialog
while {sleep 5; true} do {
waitUntil {sleep 1; missionnamespace getvariable ["BIS_fnc_showNotification_queue",[]] isNotEqualTo []}; // wait until notification is active
sleep 30; // 30 sec timeout for notification to go away
if (isNull (missionnamespace getvariable ["BIS_fnc_showNotification_process",true])) then {call _clearNotifDialog; continue}; // no active notification script
terminate (missionnamespace getvariable ["BIS_fnc_showNotification_process",true]); // terminate active notification script by handle
call _clearNotifDialog;
missionnamespace setvariable ["BIS_fnc_showNotification_queue",[]]; // clear notification queue
};
};
Hmm, I can see a weakness in showNotification.
A good chunk of it should probably be running in unscheduled.
Calling it twice in close succession with the first call in scheduled can result in broken state.
Not sure if the queue loop is entirely safe either though.
Well if CBA are using their own script to do it you can just replicate said script in your mission, just call it after the game has started
ACE sorry
^
Was adding a config file to conditionally set respawn template in description.ext, I keep getting Preprocessor failed on file X - error 11, with #if while #ifdef has no problems, what am i missing?
//#MISSION_CONFIG.hpp: #define MISSION_SPECTATE true
#include "#MISSION_CONFIG.hpp"
// works fine
#ifdef MISSION_SPECTATE
respawnTemplates[] = { "ace_spectator","Counter" };
#endif
// Preprocessor failed on file X - error 11
#if MISSION_SPECTATE == true
respawnTemplates[] = { "ace_spectator","Counter" };
#endif
// Preprocessor failed on file X - error 11
#if MISSION_SPECTATE
respawnTemplates[] = { "ace_spectator","Counter" };
#endif
maybe **true **not defined?
It is, I imported the file and checked the value, in debug console, it's defined
try #define true 1 before all that still?
Ah, will do
debug console is not the same as preprocessor though
(also that is more of an #arma3_config thing but since it's started and most likely soon done, let's keep it here)
Gotcha, that fixed it, tysm
For future reference, it possible to get the stack trace of a running script? One of my objectives was taking excessively long to generate whenever it was next to a coast. I managed to fix it, but it took me a while of spamming diag_activeSQFScripts to figure out which function it was spending the most time on.
(to clarify, the game wasn't performing poorly, the script just did too many position checks)
there is diag_stackTrace or something like that
but anyway for that you can use Dedmen's Arma Debug Engine or Arma Script Profiler
That's more of an #arma3_config question
thank you
Entirely separate question, one of my new objectives randomly freezes the game for around 4 seconds, but I'm not sure what's causing it. This is the trace I recorded with diag_captureSlowFrame ["total", 0.5]:
actually might be better to post this in #perf_prof_branch, oops
-# reposted there #perf_prof_branch message
You said this is running in scheduled, not unscheduled?
yup
How much stuff is it spawning, typically?
this objective's relatively small compared to my other ones, about 20 units, 2-5 objects, and a few vehicles
I'm gonna blind-guess that one of your spawning functions is doing a safe-position test that blows up in some circumstances.
just place some timers around the suspicious parts
It's quite hard to jam anything in scheduled though.
it's hard to say which it is
oh duh, why didnt i think of that ๐
but as John said selectBestPlaces is the most sus
It's probably the worst thing in that function but I suspect the issue isn't in that function directly.
yeah just
_startTime = diag_tickTime;
...
if (diag_tickTime - _startTime > 1) then {diag_log 'Freeze in line __LINE__'};
well yeah it could easily be an array operation (e.g arrayIntersect) if the array is large
or many other things
welp, you were right
@errant iron another thing: regarding the end of the fnc where you do GC queuing, just remember that deleting many objects at once does freeze the game
I mean that doesn't take 3s, it's more like 50ms.
its timing can differ tho
3s is more like it's doing 3ms of it and then having a scheduler break, except something is bugging out.
based on where it samples
yeah good point
if the scheduler is too slow tho
oh, I guess if it's doing the whole map it might need to disk load.
yep
So first run is 3s and then next one is 30ms.
good to know, i hadn't actually noticed it freeze before, but i do have a consistent chunk of objects that get deleted at the same time (1000+ simple objects from a finished main AO)
that sounds about right, i don't encounter any freeze if i spam objectives afterwards
hmm, can't replicate though. Are you on an HDD or an SSD?
SSD
if you use the diag_codePerformance you might miss it due to averaging
Even with 1 as the cycle count?
idk it was a maybe ๐
I can switch maps, run with cycle count 1, and livonia finishes in 10ms :P
i only noticed it occasionally while i was testing the objective too
Hmm, maybe if it tries looking outside the map boundary...
in the meantime, code has been shipped :)
Bear in mind that during startup, code that takes 50ms in unscheduled could easily take 3000ms due to contention with other scripts.
Freezing is weird though. Not even sure if selectBestPlaces can take scheduling breaks.
ok, it doesnt'.
Easily tested with precision = 10.
does the scheduler allow stopping in the middle of a script command? or is it always in between?
btw the command preloads all objects and the terrain in the radius
no
not for this no
Surely not to full detail? I don't give it that much RAM :P
no but maybe it does include the base model (minus visual lods)
also it has this comment ๐
// Allow up to 1 minute freeze here, due to disk access for terrain loading it may get stuck here for a while
1 minute freeze ๐
Well, if it can freeze for seconds on an SSD...
you're lucky with just 4 seconds
just puzzled that I can't replicate it.
Restart arma, start Altis editor mission, first cycle still 70ms.
Maybe Windows disk cache is just working really well
@errant iron which branch are you using btw?
the function is multithreaded (iirc Dedmen did it) and maybe you're using the stable with the old job manager? (and it's locking for too long for some reason)
profiling branch only, first noticed it in performance and then tried profiling exe to see if the slow frame capture would be useful
and you tried it on stable and dont have the same issue?
What CPU & cpuCount settings?
5900HX, unset
id hope not, task manager says 8 core 16 threads, and arma3_x64.exe affinity says all allowed
Not likely to be one of those all-threads-slower issues then.
repro'd on stable after a few runs
yeah it's probably the preloading that's slow
you can cache the result of that script command into a grid (2D array) and use it statically tho
that way you won't get freezes (except the first time)
How would one get simulation type of an object?
getText (configOf >> _object >> "simulationType")
umm nada, but since its base macro is House_F, its safe to assume its House?
Ah got it, thanks it was "simulation" instead of "simulationType".
yeah sorry, working from memory
all good, thanks!
It's just simulation, not simulationType
Unless simulationType is some separate thing too
Nvm discord didn't load those other messages :/
hello all: So as the respawn tickets start running down, what syntax would i use to count the respawns, that are left
you mean respawn tickets or what
@thin fox yes sir tickets
https://community.bistudio.com/wiki/BIS_fnc_respawnTickets
Example #2 or 3
Awsome WoW thats cool man thx @thin fox
@thin fox holy shit man that works Awsome thx you so much @thin fox
glad that it worked!
oh yeah i made a script that shows the count, in systemChat, every time you die, and when your out of respawns it say OUT OF RESPAWNS lol
Awsome i love it lol
also i have types of respawns, and the script takes in to account, for each type of respawn, some of my respawn types are: "No Respawn", "10 Total Respawns", "Team Respawn"
in terms of network optimization in arma, is it better to send stuff it via string or array (I would assume string)?
"[42, ""Hello there"", true]"
or
[42, "Hello there", true]
eather or is good @naive needle
yea but what is better ๐
I think I was reading from dedmen that strings are always better
ummm i guess string is better
Apparently the network transfer format is a lot better than the profilenamespace storage format, but that's not saying much.
yea what even is the format
I was reading that in one of dedmen scripts
// We send as JSON, because string is more efficient over network
private _messageEncoded = toJSON _chatMessage;
@thin fox wow thats the 1st time i ever got something to work perfect on my 1st try, thx you so much @thin fox
now if i could just get my golfswing to work perfect on my 1st try every time lol
I have a question: Is there a way to set the date of a mission for the actual date? (Meaning, if the Date of the server is 15th of January and the mission is started, the mission also has the date 15th of January) Vanilla or modded (CBA?) and sec. question: The same for the time?
I mean dynamically on every mission start
setDate then
don't want to edit the date all the time
^ is that what you mean?
Yes, so...nothing I can achieve I'd say ;P
There is no way to get the current real date / time in SQF. An extension could do it.
As Grim said
Okay, thanks (I just think thats nothing I can do, since my scripting skills are....limited. xD)
- Alot fewer (because they wouldn't move/animate/change much), but not none.
1.1 no, afaik it never was
1.2. Position, animation.. The objects "state". Different per object type- - I don't understand that question, the command itself would not use network (other than the global one which informs all other players about the change)
If you want no network traffic, create the object local-only. createVehicleLocal, or the local only flag in editor
Global
usage would be
setDate call compile ("dllName" callExtension "");
KK has a real time / date DLL
But sadly not scheduled, at the moment.
Though by now, it could (tracy has support for switching between coroutines). I just don't have the time
It loads and creates entities for all the objects. But it does not load their models or textures
string. But not necessarily network traffic.
Also have to consider that it needs to encode/decode the data into networking format.
A single string, is just calculating the size and copying bytes, super fast.
But other datatypes need to be converted, and the more values you have, the more conversions need to be done.
But the json conversion is probably more expensive, than the native encoding would be. But they are in different places
Hello everyone,
I'm working on a horror mission in Arma 3, and I'm trying to summon a custom enemy when a player interacts with a special object. However, when the summoning is triggered, instead of the enemy appearing, I get a message on screen that just says: "not found".
Here is the script I'm using to create and manage the boss enemy:
sqf
_jefe = "WBK_SpecialZombie_Smacher_Hellbeast_3" createVehicle position spawn_jefe;
_jefe setPosATL (getPosATL spawn_jefe);
_jefe allowDamage true;
_jefe setVariable ["bossMaxHealth", 1000, true];
_jefe setVariable ["bossCurrentHealth", 1000, true];
_jefe setName "EL ELEGIDO";
["", 0, 0.9, 2, 1, 0, 0] spawn BIS_fnc_dynamicText;
{
_x cutRsc ["RscTitleDisplayEmpty", "PLAIN"];
} forEach allPlayers;
[] spawn {
waitUntil {
sleep 0.1;
!isNull _jefe
};
while {alive _jefe} do {
_hp = _jefe getVariable ["bossCurrentHealth", 1000];
_max = _jefe getVariable ["bossMaxHealth", 1000];
_percent = _hp / _max;
_bar = "";
for "_i" from 1 to 20 do {
if (_i < (_percent * 20)) then {
_bar = _bar + "โ";
} else {
_bar = _bar + "โ";
};
};
{
_x setTitleText [_bar, "PLAIN"];
} forEach allPlayers;
sleep 0.3;
};
{
_x setTitleText ["", "PLAIN"];
} forEach allPlayers;
};
I double-checked that the spawn marker spawn_jefe exists on the map. Still, the boss doesnโt appear and I get that "not found" error. Could it be that the class name is incorrect? Or am I missing something related to mod dependencies?
if spawn_jefe is marker name you must use getMarkerPos "spawn_jefe" instead
Does anyone know how to script props like furniture in a room from a house?
so using a single string is faster on the CPU side (less encoding overhead) I guess
But in terms of actual network packet size, is a native array (like [42, true, "hi"]) still smaller than the equivalent JSON string ("[42, true, "hi"]")?
Or does armas engine compress/serialize strings in a way that makes them comparable to arrays in network transmission?
_f = createSimpleObject [_type,[0,0,0],true];
_f setPosWorld (AGLToASL(_House modelToWorld _pos));
_f setVectorDir (_House vectorModelToWorld _dir);
_f setVectorUp _HouseVectorUp;
Array: Datatype 1 byte, size 1 byte
42: Datatype 1 byte, value 4 byte
true: Datatype 1 byte, value 1 byte
"hi": datatype 1 byte, null-terminated string 3 byte
== 12 bytes.
String:
Datatype: 1 byte, null-terminated string 17 bytes
== 18 bytes
Arma does not compress strings, the performance overhead wasn't worth it.
If you have something big to transfer though, you could compress it yourself with 2.20 ctrlWebBrowserAction
Do u have a link for the wiki for that script
I'm trying it, but no results so far, thanks.
Zeus Enhanced has a 'Execute Code' module and it says the following, but I'm not sure how to utilize the 0: Module Position ASL param
Thought it'd just be like this but apparently not?
createVehicle ["R_TBG32V_F", this select 0, [], 0, "CAN_COLLIDE"];
_this instead
whats wrong? u need https://community.bistudio.com/wiki/ASLToATL probably
_this is also an array, with the position and object
That did it, thanks :)
Oh nvm you do have a select 0 in there
I love discord's code blocks going off the screen on mobile
Hi, does anyone have any idea how I can find out if the current mission is on an island or not.
This is important for me to send reinforcements by water or air.
I have already tried all possible variants, but have not yet found a 100% satisfactory solution (via pathfinding, spiral shape to see if there is water around it, etc.).
These variants are often very time-consuming and cost a lot of resources. I already do this so that it is cached in the preinit but I would like to have another variant that I can also use during operation (resource poor).
Maybe someone has a better idea or can give me some new food for thought.
setTitleText does not exist. Probably meant titleText. However, even assuming that, you have the wrong syntax for both titleText and cutRsc.
titleText has no left argument. cutRsc can have a left argument, but it's for specifying a UI layer, not an object.
this is how I check for island map (just quick solution...) ```sqf
isWaterMap = false;
{
if(surfaceIsWater _x) exitWith {
isWaterMap = true;
};
} foreach [[0,0],[worldsize,0],[worldsize,worldsize],[0,worldsize]];
checks the corners for water
I have tried that instead of making the enemy span the area, he teleports and it has worked for me, thanks for the help
You could unpack Phronk's furniture mod and see how he does it. https://steamcommunity.com/sharedfiles/filedetails/?id=1203678801
Thank you
Thank you, I think I need to explain in more detail what I mean.
For example the Virolahti map:
It has about 50 small islands (estimated), headlands, bays, lakes, rivers.
My mission plays on the whole map, everything is randomly generated.
By mission in my first post I meant mission object, there are also over 200-300 spread over the map.
Now some of these objects are on islands.
As objects are taken in the course of the mission, a front is formed where the enemy can no longer push through if reinforcements are to come, so reinforcements only come from the objects that have not been taken.
My current system works 80% of the time with islands, but has vulnerabilities. I would like a variant or idea if from Pos A to Pos B (is island) it is determined that there is no access over land, as a quick check. During operation not before (preInit), as I have it now.
4 corners does not work, as there are also headlands, spiral is bad because of longer islands but possibly expandable as a combination.
Is there a possibility with Pathfinding (in move mode) where it spits out that you have to swim from there?
Is there an appreciable speed difference between drawIcon3D vs repositioning a UI ctrl, both per frame?
I would assume drawIcon3D to be quite faster indeed, however we do not have any benchmarks at hand (feel free ๐)
not sure what I am doing wrong here so maybe someone is able to see something I am not able to see
I get the error in the screenshot when I place the module I have down and this is the area of the code it is pointing to
{
private _player = _x;
if (!isPlayer _player) then { continue };
private _nearbyCivs = civManager_allCivs select {
(_x distance _player) < _spawnRadius
};
private _civsToSpawn = _maxCivsPerPlayer - (count _nearbyCivs);
for "_i" from 1 to _civsToSpawn do {
private _pos = _player getPos [random _spawnRadius, random 360];
private _type = selectRandom _civilianTypes;
private _civ = createUnit [_type, _pos, [], 0, "NONE"];
[_civ] call TFR_fnc_setCivBehavior;
civManager_allCivs pushBack _civ;
};
} forEach allPlayers;
speed in terms of performance? or delay?
there's a 1 frame delay for UI
meant performance, but yeah that is good to know as well
createUnit needs group on the left
application is for optimizing cockpit interaction system, which is currently drawing cursor+labels using BIS_fnc_dynamicText 
on the left?
wiki:
group createUnit [type, position, markers, placement, special]
https://community.bistudio.com/wiki/createUnit
On the left
so after the _civ = add in group
yes
Units can't exist outside of a group, so you need to specify a group to create the unit into
alright thank you I shall try that
I had it as createAgent before while I was working on it and changed it to unit so I can actually have them doing things and such and react to firefights
You mean versus accessible by road or what?
Ah no, just whether it's an island map or not. Never mind.
Thanks- cheers :)
No, they wanted to find whether the specific position is on an island within the map, not necessarily whether the whole map is an island
Yes, road or to foot not swimming.
Foot's a lot more expensive than road.
Maybe semi-plausible if you do 50 or 100m precision.
you can approximate to doing the road check and then searching to the nearest road.
Roads you can build using the alt syntax of roadsConnectedTo.
Do you know how often the map entities get unloaded? I've got a cache set up now, but I'm debating whether I should pre-calculate my objectives' expressions right away, or wait until the objective spawns with the desired expression.
For now it's only four unique expressions total, but not all objective functions might spawn at the same time (some not at all, depending on lack of player activity), and it'll incur a small maintenance cost to keep track of these expressions in a separate list.
-# and i'll most likely forget to do it anyway >:(
cc @granite sky, @still forum
Apparently I can't convince them to unload at all :P
I remember having this sort of replicability issue with the hideObjectGlobal startup bug. Something like map entities not loading in before hideObjectGlobal ran, but I could never convince it to happen in a simpler mission.
lag causes such things
Localhost.
You have successfully reduced the term to meaninglessness :P
if you want a example on how lag can affect features such as respawning take a look at my ticket: https://feedback.bistudio.com/T183228 maybe that will help you also
There's a common thing with UIs where onLoad is called scheduled, because otherwise it fires before the controls load.
Now usually that means it still fires in the same frame, just slightly later. Spam enough scheduled scripts and it often won't.
yea maybe turning the code to non-suspending would fix it
It's one of the big irritants with the UI system.
Should have made an event that fires after the controls are loaded.
true
It's probably possible to abuse the undocumented load order logic to tack the onLoad onto your last control instead, but this sort of hack is not sensible when other people have to work with your code.
So the common situation is non-deterministic UI loading.
im not sure if we are talking about the dialog/display "onLoad" script because that seems to work well. is it non scheduled? i forgot
It's unscheduled but in practice it's commonly used to spawn a function, because of the load order issue.
ok
i use it alot (or more or less)
and i havent got issues but thanks for the heads up , maybe i'll run to those someday.
regarding global setVariables on an player object, do they get broadcasted again on respawn or is it linked to the object var so it only sends once. Also for jip players do they get broadcasted twice if someone respawned for the dead bodie and for the respawned player?
depending on how much memory it has
they get broadcasted when you call setVariable
and doing nil global true on them will remove them from the jip right ?
๐คท
I checked it via exportJIPMessages , and then looked for the object netID to check if the message count goes down when using nil and it dosent , in fact it goes even up when using nil on variable which he didnt had on before player setVariable ["SOMERANDOMVAR",nil,true] , so yea it stays in jip
Yeah, it's kinda documented:
To remove a variable, set it to nil (see Example 5) - note that this does not work on Object and scripted Location namespaces (the variable will be set to nil but will remain listed by allVariables).
Respawns are odd though. My recollection is that the variable copying between old and new units is actually done on the client side.
But then the client doesn't have the JIP queue, so it doesn't know if a variable is supposed to be published.
Looks like every machine copies over its current variables for that object on respawn. Not sure if the JIP entry is copied or not.
interesting
what about when the object gets deleted
does the var stay in jip ?
let me check with exportJIPMessages
I only tested player respawn. I don't know how general it is.
In general I'd hope that JIP entries for setVariable on objects would be deleted when the object is...
yea I checked and the netID gets deleted from JIP
also interesting with containers, I know dedmen mentioned it before that containers for example that every inventory interaction will get put into jip. I wonder how much of an impact it has because you could also reduce it to its minimum by deleting the object and replacing it with its inventory
How do I check if a backpack can be assembled into a UAV? There are AI UAV operators scattered around my AOs, and I'm thinking of having those AI assemble their backpacks into autonomous FPV drones on the fly. Making them do the actual assembly action would be nice too, but I don't mind faking that if needed.
Well, clearing also works.
iirc there was a config entry called assembledTo
Item add/remove always adds entries each time so if you have a particular inventory that gets changed frequently, it can help to replace it occasionally.
booting up game rn, let me check that
"assembleInfo" >> "assembleTo"
backpacks, vests and uniforms which the player is wearing also have an global container. If you put stuff into it or remove it , the message also gets into jip. If you put the backpack in an container and pick it up the netID stays the same ( which would allow you to put persistent vars on it btw). With player setUnitloadout (getUnitloadout player) you can easily give yourself an new container object and it removes the jip to 0 of the container
yeah something like that.
got it, thanks!
clearItemCargoGlobal will reduce it to 0 jip ?
will test it
I forget whether you have to do backpack cargo separately.
but IIRC they clear the related JIPs.
tested it once.
yea it works, it resets it
would be kinda dope to have an command to check how many commands are in jip que for this object, so if its to many you can just clear it back to minimal ammount. But I guess inventory related commands dont really cause any issues for the network traffic
if its not possible to force an AI to lean via sqf, what exactly is making them lean in combat/while in stealth mode?
I don't think I've ever seen an AI lean on its own.
You certainly could force them with animations. I would guess you have a mod that's doing that.
Is there any way to make playSound3d not queue the sound for people who are out of range? ArmA behavior seems to be to "remember" the sound in the location so when someone who wasn't in the area comes into the area, they start hearing the sound.
(Other than some kind of manual distance check. I've tried using the distance parameter but it doesn't seem to control this.)
@granite sky if you set an AI to stealth and tell it to move, it will lean around corners. I cant send screenshots unfortunately
In the general the AI is a black box. You can poke it a bit at the edges, and it responds unpredictably.
They do sometimes lean indeed
I find funny glitch
The player can bypass EH HandleDisconnect while loading the mission.
The entry conditions that I had.
Skip the lobby with automatic slot selection.
I just kept pressing esc while loading the mission. And the player who was supposed to appear remained in the mission as a bot, although AI is disabled in the description.
When I joined again, then the player did not occupy the slot on which he was and created the AI, but the next one.
I'm trying to teleport units within a random radius. This works, but they get stuck inside the floor of the building, instead of at the proper height (the height of the destination gamelogic)
params ["_source","_destination","_radius"];
if (!isServer) exitWith {};
{
private _center = getPosATL _destination;
private _angle = random 360;
private _randomSquareRoot = sqrt random 1;
private _distance = _radius * _randomSquareRoot;
private _position = _center getPos [_distance, _angle];
_x setPosATL _position;
} forEach (allUnits inAreaArray _source);
Invocation:
[dropbay_0,warehouse_0,5] call ASH_fnc_tp_squad;
dropbay_0 is a trigger, warehouse_0 is a gamelogic.
The randomization code is directly from the wiki...
getPos [] always generates results with 0 z-coord for some reason.
pain
you'd need to copy in the z coord from _center
_position set [2, _center#2];
this what i use sometimes
// random radius
private _angle = random 360;// angle definition (0..360)
private _distance1 = 90;// distance1 from the center (Radius)
private _distance2 = 90;// distance2 from the center (Radius)
private _position = getMarkerPos "Center";// [_distance, _angle];
_spawnPos = [_position, _distance1, _distance2, 4, 6, 1.0, 0] call BIS_fnc_findSafePos;
hey guys. Im using the following code to detect objects in an area around me. A vehicle has recently exploded near me.
(player nearObjects 15);
it returns this:
[2017f32d600# 163959: lha_med_1.p3d LHA_Med_1,bis_o1,2019c49c080# 164035: heli_light_03_f.p3d I_Heli_light_03_dynamicLoadout_F,164042: krater.p3d #crater]
The last object is a crater. Now if I find its type by doing:
typeOf(player nearObjects 15 select 3);
It says its "#crater". Now checking if isKindOf "crater" or isKindOf "#crater" returns false.... anyone know why? Or how I can exclude craters from my list of objects found.
I just need to exclude craters from my search of objects. Im trying to check if an area is clear of objects to spawn a vehicle. SO im already excluding, animals, insects, birds etc. But I cant see how I can exclude craters
even after the exploded vehicle is removed the crater remains.
I guess just compare typeOf is the way
Or, I think using other command than nearObjects
ill try that. there seems to be a range of craters in the game, craterLong, CraterShort and they dont have a inheritence in common ๐ฆ
any suggestions?
I guess nearestObjects?
and then speicify types? The problem I worry about with that is I can specify ["Air", "Ship", "Car", "Tank"] but that dosnt include a whole host of objects with inventory etc that could get in the way
nope
ill double check config too see thanks
AllVehicles
Actually, it there a reason to check it, since createVehicle's "NONE" does it already?
Can "Wrong signature for file" messages in the bottom left be intercepted by HandleChatMessage mission EH?
Hi all
I have a small problem. I want to make a prison transport when i have a BluFor unit in a truck filled with OpFor unit.
i have setup the Blufor unit like this:
[Hostage] JoinSilent AmmoTruckD;
Hostage AssignAsCargo hostage_Truck;
Hostage MoveInCargo [ hostage_Truck , 6];
Hostage AllowDamage false;```
But he keeps going out of the truck, when it start to follow the Waypoints that is setup for it.
is there a way i can force him to stay inside the truck?
You mean like this ?
Hostage addVehicle hostage_Truck;
yourGroup addVehicle hostage_Truck;
he is only one unit and not in my group, so i gues i need to use his variable name.
In Arma even single unit is in a group.
yes i kon w he is in his own group
In your case, you should add the vehicle to the group you're adding the hostage to.
ohh so at it to the OpFor group, i think i got it..
I am assuming that Strategic Map Module is client side ? and should be only used in SP missions ?
would need permission to use it
here were the results of that btw:
even if its client side it can still be used in multiplayer mission (i think), just only in client
might need more scripting though depending what you want to do with it
It can be used in MP, although it does not update realtime, when you change variables. So, its use is limited in my opinion. Its rather useful for SP. But in theory you can do some stuff. Lets say you wanted a mission to spawn, but only a certain slot or class could do it. That would be scriptable.
Is there a reason why HandleChatMessage EH fires only on global chat (and not side chat)?
That's DS/HC specific. On normal clients it fires for other channels.
It's just a guess, but I'd speculate it's because DS/HC don't have a player that would be in the side channel to give them access
nvm i thought it didnt work at all on DS
now im trying to figure why isnt the EH catching player sideChat _msg;
i guess its not the same as typing the message to side channel
The note on the EH page that says it doesn't work with chat commands could be a clue
oh somehow i missed that
the wiki is contradicting itself when it says first this: "Does not trigger for any of the chat related script command such as systemChat, sideChat, or other." and then it says: "Do not put any of the chat related script command such as systemChat, sideChat, etc in this EH code as it would naturally cause recursion and the game will freeze."
see the contradiction? or is it just me XD
so that passage is already partly unreliable
You could mention this other contradiction in the wiki channel (and mention that linked message again since it doesn't seem to have actually been updated to account for it). The wiki can be changed to correct it, or Dedmen might provide clarification
yea wanted to first see if you guys agree
is it somehow possible to show message like when you type it and press enter to send it, via script command? sideChat always adds quotation marks
question marks?
*quotation * ๐
I'm blind ๐ฅฒ
Where in the mission.pbo can I find the real names and values for these mission parameters to use in the "mission override" config?
hello all: is there a way to Remove the mag that's in your Rifle, when you Reload, so like if i Reload, can i delete that mag on Reload
oh cool awsome man thx alot
Might have to manually find the mag in inv and delete it after the reload tho, not sure never used the reloaded evh
@atomic niche ok m8 thx you very much this will get me started
You can debug all parts and check out does it work like you want it to work.
You want just delete "empty" < 5 ammo left mags from unit?
Our script will delete without checking how many ammo you have, tiu you asked earlier if unit has under xx ammo left, then delete
no no
@stable dune i just want the old mag to be deleted and the new mag to come in on Reload, whenever you reload, even if you have a full mag in your gun
If working in a foreach loop, and I need to re-use a private variable every time, should it go
private _createdGroup = createGroup [_spawnSide, true];
{private _unit = _x createUnit [_spawntargets, _createdGroup];
_unit disableAI "PATH";
sleep _interval;
} forEach _spawnTargets;```
or should the variable be made outside of the foreach loop and reassigned inside of it
You can't remove specific mag, instead you should count how many mags player has with that ammo count in uniform, vest and backpack, remove all those mags, and then add minus one.
oh i see ok cool awsome @faint burrow
so i can't remove the mag thats in my gun at the moment
But you wrote
i just want the old mag to be deleted
this is better
that's what I do, at least
@faint burrow yes i want the old mag or the mag in my gun to be deleted, and the new mag to come in my gun on reload
yes i wrote, i want the old mag to be deleted and the new mag to come in on Reload, whenever you reload, even if you have a full mag in your gun
like if your going along and shooting and you see you only have like 3 bullets left in your mag, and you reload, i want that mag to be deleted that's in your gun, and the new mag to come in your gun
player addEventHandler [
"Reloaded",
{
params ["_unit", "", "", "", ["_magazine", []]];
if (_magazine isEqualTo []) exitWith { };
_magazine = _magazine select [0, 2];
_magazinesCountsPerContainer = [
backpackContainer _unit,
vestContainer _unit,
uniformContainer _unit
] apply {
_container = _x;
[
_container,
if (!(isNull _container)) then {
{ _x isEqualTo _magazine } count (magazinesAmmoCargo _container)
} else { 0 }
]
};
_ammoCount = _magazine select 1;
_magazine = _magazine select 0;
_unit removeMagazines _magazine;
_magazinesCountDecreased = false;
{
_container = _x select 0;
_magazinesCount = _x select 1;
if ((isNull _container) or { _magazinesCount == 0 }) then {
continue;
};
if (!_magazinesCountDecreased) then {
_magazinesCount = _magazinesCount - 1;
_magazinesCountDecreased = true;
if (_magazinesCount == 0) then {
continue;
};
};
_container addMagazineAmmoCargo [_magazine, _magazinesCount, _ammoCount];
} forEach _magazinesCountsPerContainer;
}
];
@faint burrow oh cool wow Awsome man
i love you man @faint burrow its just hard for me to believe that you can't remove or delete the mag that's in your weapon, "i don't know that much i guess" what iv been doing is drop the mag, and reload lol
I can't remember the damn command for "force this group to stand up and stay standing"
and of course the forums are down (are they ever up anymore)
setUnitPos
This one is actually https://github.com/official-antistasi-community/A3-Antistasi/blob/unstable/A3A/addons/maps/MissionDescription/params.hpp
Antistasi Community Version - work in progress - Discord https://discord.com/invite/TYDwCRKnKX - official-antistasi-community/A3-Antistasi
the command naming scheme makes this feel ilke it should be "set unit position" and I hate it, thanks
like genuinely thanks but this scripting language makes me feel insane
How do I make a drone less likely to be targeted? The AI seem very good at spotting and engaging my FPV drones before they ever make it close, and I want them to focus on other conventional threats more often. If push comes to shove, I'll just mark them as captive until they're close to their target, but I'd like to know of other alternatives before going that route.
Also a second question, what happens to a drone (or any turret) object when it's disassembled? I noticed my variables persist on them when they're reassembled, but I'm not entirely sure where those objects go in the meantime.
it gets broken down into two backpacks, and those backpacks get placed into a WeaponHolder. both backpacks and the weapon holder are objects
I guess one of those backpacks maintains the variables
and regarding AI spotting, did you make the drones yourself? or do you want a scripting solution for all drones?
The vehicle object itself also persists, it's just hidden somehow. That's how its state is maintained across disassemblies, and why it's still counted as alive while disassembled.
Unfortunately, I don't think we have any way to retrieve a reference to the vehicle object from its associated backpacks.
About detectability for drones, I've been wondering for a while whether setUnitTrait camo and audible coefs work on vehicles
IIRC objectParent works in one direction.
might be vehicle -> backpack though. I suspect the state is maintained so that static weapons retain their ammunition, for example.
not as in they're my models, but i create the drone associated with a given backpack and spawn a script to attach a charge and track targets closest to it
the script could theoretically work on any drone (or a person with some tweaking >:) but i don't need to initialize every created drone as one
I meant config wise. iirc there was a config entry for this?
no
Via script, you can try lowering the audible and camouflage coefs. In loose terms, they limit the detection radius.
https://community.bohemia.net/wiki/setUnitTrait
"BIS_fnc_VRHitpart" will this command work on objects other than VR_OBJECT?
I was able to see the white edges when I used the "BIS_fnc_VRHitpart" command on a real tank, but when I shot the tank, it didn't change color in the area being attacked.
You can remove: https://community.bistudio.com/wiki/removePrimaryWeaponItem
i wonder why this script doesnt add the second player to the channel when testing in dedi: ```sqf
waituntil { sleep 0.1; !isnil "chatChannelID"};
// putting sleep 2 here seems to "fix" it
chatChannelID radioChannelAdd [player];
the chatChannelID is set through public variable and is not nil
Have you checked if player is not null?
question about custom radio channels, do i have to create new channel for each side when i want only same side players to see the messages?
well. not exactly.
oh neat! i didn't think setUnitTrait would work on drones at all until i tried it
i guess it depends on what you want to do. for instance, say you want to make a status update channel (like hey we captured xx), you might want 3 individual status channels and only worry about adding the units to that channel that are of that side
Well literally one message above that, Leopard20 says it doesn't. So there's that.
otherwise, you have to add and remove constantly from the channel
i personally prefer having individual channels for each side if you can afford it (have the slots) and only have the units of that side added to it, rather than constantly adding and removing from the channel depending on who you want to see it
im making a chat dialog. so need custom channel for all 3 playable sides
oh oops, i didnt see that at all, but weirdly it does seem to work
i was thinking of using HandleChatMessage to prevent showing messages from other sides but then they would still be sent over net
Does it actually do anything to noticeably change detectability, or does it simply not cause a script error?
it sets the trait on the commander (invisible AI) not the drone
unless the game uses the trait of the commander for detection (which I'm pretty sure it does not), it shouldn't work
oh cool thx thats Awsome @faint burrow
ok looks like it does work. weird 
from a few non-scientific tests using _drone setUnitTrait ["camouflageCoef", 0.02]; and sending 16 drones at 20-50m altitude in front of 4 assault squads at ~20% unit skill / 100% skill difficulty, it appears to reduce their initial engagement distance from 200m to ~50m
yeah the game does use the commander's trait for detection
it even works on other vehicles (if a soldier with that trait gets into them and is the effectiveCommander) 
raises an eyebrow
I never knew that, very interesting.
I wish we had a similar command for targeting the vehicle itself, but this is useful information
Good. ๐
There are few other ways to accomplish that via scripts, which involve looped checks or event handlers, but they are complicated and unreliable.
Additionally, if you ever needed to prevent just some units engaging the drone, like turrets or AA vehicles, you can try the new ignoreTarget command. It's an alternative to setCaptive.
How to simply reliably and efficiently count
All civilian, independent, opfor that died during a mission, tracking this.
And al Blufor that died
Is there an easy way ,
Yeah if you want simple and reliable then EntityKilled is the way.
What would I use in the condition of a trigger to active it by a certain classname?
What're the trigger settings?
I just want a trigger to activate by using the classname of a unit.
trigger on what? What should the object with the specific classname do?
He probably means if a certain type of unit enters the area.
That's why I asked about the trigger settings, so that we wouldn't have to guess what we were talking about.
That's what I thought it would be, but I don't know what the proper syntax for it.
isKindOf == "vn_b_men_jetpilot_10"
^^ this doesn't work
That's why I provided the link to the article describing the command syntax.
I don't see an example that would work in this case.
Something like this into the activation condition:
{
if (typeOf _x == "class_name") exitWith {true};
} forEach thisList;
You probably need to set activation to anybody and present. It will then go through the list of present units and check the type.
The only problem with triggers in this case is if you want to check the presence repeatedly or continuously, the unit/s would probably need to leave and re-enter, or at least one more enter the volume.
The first syntax is yours.
Something like this:
(thisList findIf { (typeOf _x) == "vn_b_men_jetpilot_10" }) >= 0
Hey can anyone explain to me how i can make a folderstructure for my kampagne? idk how because everytime i make some folders arma cant find the stuff in it
nope that doesnt helped me out
file patching on?
whats that ๐
its launcher parameter, that allows reading of loose files
ah okay ill check it