#arma3_scripting
1 messages · Page 187 of 1
Why would you check the config for their loadout and not just their current inventory?
Oh man I'm struggling with these damn dog "agents", is there no way to synchronize them between players?
Sync as in synchronizeObjectsAdd?
As in dog position, direction and movement looks the same for all players
I thought it would work if the logic was all server side (dedicated server), but then the dogs just walk in one direction, but if I run it as local in the debug console then it works fine but obviously only for me
So locality of Agent in dedi is the question? 🤔
I believe so
[] spawn {
_dogArray = ["Fin_sand_F", "Fin_blackwhite_F", "Fin_ocherwhite_F", "Fin_tricolour_F", "Fin_random_F", "Alsatian_Sand_F", "Alsatian_Black_F", "Alsatian_Sandblack_F", "Alsatian_Random_F"];
_dogs = [];
for "_i" from 0 to 1 do {
_dog = createAgent [selectRandom _dogArray, ([] call randomDogPos), [], 0, "CAN_COLLIDE"];
_dog setVariable ["BIS_fnc_animalBehaviour_disable", true];
_dogs pushBack _dog;
};
[[sideLogic, "Base"], "Guard dogs spawned."] remoteExec ["sideChat", allCurators];
{
[_x] spawn {
params ["_dog"];
private _animMovement = ["Dog_Walk", "Dog_Run"];
private _animStop = ["Dog_Stop", "Dog_Sit"];
while { alive _dog } do {
_randomPos = [] call randomDogPos;
_dog playMoveNow (selectRandom _animMovement);
_dog moveTo _randomPos;
format["%1 moveTo %2", _dog, _randomPos] remoteExec ["sideChat", allCurators];
waitUntil { sleep 0.5; (_dog distance2D _randomPos) <= 1};
_dog playMoveNow (selectRandom _animStop);
sleep ([15, 60] call BIS_fnc_randomNum);
};
};
} foreach _dogs;
};
And basically you want to follow a client's dog to the client player?
No sorry, they're just meant to randomly patrol inside of an area marker
randomDogPos = {
private _randomSafePos = [];
while { count _randomSafePos == 0 } do {
private _randomPos = [["dog_area"], ["water"]] call BIS_fnc_randomPos;
_randomSafePos = _randomPos findEmptyPosition [0, 10];
};
_randomSafePos;
};
Which again works fine locally but on dedicated server, the dogs just walk straight north no matter what I do
remoteExec the dog anmations seem to work but I cannot get them to go where I want
Do you need them to be agents?
I suppose not, didn't know it was possible to spawn dogs any other way
You can spawn them as units. It's what Antistasi does.
Ain't no way...
Yeah that fucking worked lol
Had to change moveTo to doMove as well, but it bloody works
Spent a good 4 hours or so on that today lol, thank you very much
Agents don't get used much. They're probably even more busted than the rest of Arma.
Can I also make the dogs be on the same side as OPFOR somehow?
for "_i" from 0 to 1 do {
_grp = createGroup east;
_dog = _grp createUnit [selectRandom _dogArray, ([] call randomDogPos), [], 0, "CAN_COLLIDE"];
_dog setVariable ["BIS_fnc_animalBehaviour_disable", true];
_dogs pushBack _dog;
};
setSide only refers to locations from what I can tell
The normal way to change the side of units is to join them into the group.
But I don't know if there's any difference for dogs.
They're civ by default? I forget.
Yeah Civ
For whatever reason, creating a unit in a group doesn't change its side, but joining it into a group does.
Hmm, _dog joinSilent _grp; didn't work
Ah wait, think I didn't save the changes
Nope didn't work
Works for me. Did you join it to another group first?
Ah have to feed it an array
Now it works
They stutter a bit when walking but it's better than them not working at all
Is it possible to script a car to make the people getting in it to switch to civilian and when they get out, they go back to the side they were before? I want the players to be able to drive through an enemy area but not have to set the enemy AI careless/hold fire.
@granite sky hi sir do u perhaps have scripr for artillery
Safest way is usually to setCaptive on them.
Then the enemy treats them as civilian.
But they cant get out of the vic by them selves, or can they?
Yes, I did it once, if I recall I added two event handlers to the vehicle, OnGetIn and OnGetOut (or something like that)
And then did player setCaptive true when they entered and back to false when they disembarked
cool, Ill give that a try. Thanks
I just turned off my PC unfortunately but I can dig up my script for it tomorrow if needed
setCaptive doesn't have any effect on the captives.
Oh ok. I thought it made them captive so they couldnt do anything
There's an ACE thing where you handcuff people and they lose functionality, but setCaptive itself just makes them look civilian to everyone else.
Had it saved to my Dropbox, here you go
this addEventHandler ["GetIn", {
params ["_vehicle", "_role", "_unit", "_turret"];
if (side group _unit != opfor) then {
[_unit, true] remoteExec ["setCaptive", _unit];
"You are now undercover." remoteExec ["hint", _unit];
};
}];
this addEventHandler ["GetOut", {
params ["_vehicle", "_role", "_unit", "_turret", "_isEject"];
if (side group _unit != opfor) then {
[_unit, false] remoteExec ["setCaptive", _unit];
"You are no longer undercover." remoteExec ["hint", _unit];
};
}];
It's been a year or two since I made it so it might not be the best lol
Your awesome, thanks!
This just gets put into the init box of the vic right? It doesn't seem to work.
Do you put that on AIs or just players?
can cursorObject also detect simpleObjects?
Should be
Yes it does
Hey, i have a workshop mod that spams the chat with messages, can i check what mod causes that?
That is called "unload some Mods and see you hit the jackpot" process
Especially if you have a lot of mods, you can utilize a technique called 'binary search'
hello all : So if the leader player dies does he leave the group, and does he have to be Rejoined to the group
after he respawns
group should stay
so he will stay the leader @proven charm
yeah
ok what about if the leader is a player and the rest of the group is Ai
same thing
ranks dont matter, i know because i just tested in MP editor 😉
really ok cool thx m8 @proven charm
yeah im not sure about that myself
you can always test
thats a roger m8 @proven charm
make quick mp mission for testing 🙂
yes sir will do
i have seen that after the leader dies and respawns for about 30 seconds another ai takes the lead
yes i think its the same like if any Ai dies it takes time for the game to see that the Ai is dead
thats probably for the "effect" to give impression leader doesnt always know everything
right
well 30 sec respawn was ok in editor
yes i saw after all my Ai were dead i still see the team marker is still on them for some time
yup
then it gos away after a bit
lol i was giving orders to my dead team and no respond lol
i was like dam Man Down lol
man i love Team Respawn its Awsome
i put together a nice script that gets Exec by the params if you like team respawn
oh w8 no it does not work for Ai
only players cuz Ai get deleted if thay die in my team respawn script
maybe AIs cant respawn. vehicles can though
yeah i just make a new team and join them to me in team respawn if we need Ai
but i really only like team respawn for players with no Ai
sep for maybe a Ai chopper pilot
yes Ai can respawn very well you just have to set the loadout you want on them in a EH
MP EH that is
or EntityKilled EH and Respawn EH
and ofcorse i always clean up all the groups, unless the mission is counting groups
i have created the below:
0 spawn
{
private _keypad = createSimpleObject ["a3\structures_f\data\doorlocks\lock_indicator_2.p3d", getPosWorld player, true];
_keypad setPosWorld (player modelToWorldWorld [0, 0, 0]);
_keypad setDir 0;
};
but cursorObject returns <NULL-object>
It can be anything, for example, objNull spawn { ... };. I prefer array.
copy that
then the p3d must be missing some geometry
Trying to make AI fire a mortar at a target, he raises the mortar with the dummytarget but shell doesnt go to the original targetpos of blufor regardless, it goes to where he's watching i think and then falls somewhere in vicinity. How can i fix this
He just never seemed to be in range with other methods even though i checked the mortar with the computer at the position my self and it was in range and i switched the gun mode properly
can you just use the Arty Moduals to do all that stuff
oh you said mortar oops lol
i know one thing tho them Arty Moduals work Awsome
or support Moduals as it were
Current inventory needs to be compared against something.
I also said I DONT want to check the configs since loadouts may be edited.
Ideally Id use the same logic which makes units call out "I need ammo" which is why Id like to know either what the conditions for that are, or some way to get the ammo status of the sitrep
Just count magazines for each weapon, if less than x/y/z, display a message
is this your script?
Did you test it with vanilla assets, no mods, etc?
Yeah it should just go into the init box of a vehicle and work, but my script only works for BLUFOR or INDEPENDENT players, not OPFOR
Is there a function that returns whether a unit is a Man or Animal?
Preferably exactly like that "Man" and "Animal"
Was hoping to make a annoucement message to Zeus players that tell them what kind of civilian they killed
[[sideLogic, "Base"], format["%1 (OPFOR) killed a civilian (Type: %2)", name _killer, (_killed call BIS_fnc_objectType)]] remoteExec ["sideChat", allCurators];
_unit isKindOf "CAManBase"
There's probably a more technically correct method but that's hours of fiddling with config.
Nothing similar to how nearestObjects [player, ["house"], 200]; works? Like how you can give it "man" or "animal" but the other way around?
You can just do:
_unit isKindOf "CAManBase"; // true if unit is a person
_unit isKindOf "Animal"; // true if unit is an animal
Also don't use Man for inheritance / object checks to test if something is a unit, because animals also inherit from Man
Takes roughly twice as long if just checking one
player isKindOf "CAManBase"; // Execution Time: 0.0005 ms | Cycles: 10000/10000 | Total Time: 5 ms
getEntityInfo player select 0; // Execution Time: 0.0009 ms | Cycles: 10000/10000 | Total Time: 9 ms
What about alt syntax?
Didn't know there was one
~1ms faster on 10k iterations
Just to have all three
player getEntityInfo 0; // Execution Time: 0.0004 ms | Cycles: 10000/10000 | Total Time: 4 ms
thanks for the help, its now working after removing those remote-execs, cheered when it worked lol
thanks for your patience
how you make code look cool?
```sqf
// your code here
hint "good!";
```
↓
// your code here
hint "good!";
hint "thanks";
Is there a way to lock something in place without disabling simulation.
depends on what you want how
I want a radar to not be able to move even if it's pushed or something.
you can attachTo a GameLogic, it will be unmovable
Thanks, I didn't think of that.
(still be destroyable, unless you make it invincible ofc!)
I'm using High Command during the first part of a mission and I noticed that once in the HC view, you can see friendly units on map that are hidden with disabled simulation (enabled only during the second part of the mission). Is there a way to hide them if they're hideObject true? I assume it could be done through ungrouping all of them, but I'd rather not do that if there are other options
Don't have too much experience with HC, and not sure how much it's even used by the community other than through supplement mods
it should be simple as player setvariable ["MARTA_hide",(player getvariable ["MARTA_hide",[]]) + [_group]]; but no guarantees 🙂
noted ✍️
yep, that saved me from some headache. thanks a bunch 🍻
can someone help me install grad_replay cause i cant install A3RR (steam workshop aint working for me)
Use ocap
Hello scripters I have yet another funny question
I have exactly 10 poi_ markers I want the AI to randomly move to, once they spawn.
I used to have cheap script that randomly selects a position on the map to move to, using addWaypoint. How would I have them instead select one of the 10 waypoints instead?
// keep the markers and use this for selectRandom marker
_mrk = selectRandom ["poi_1","poi_2","poi_3","poi_4","poi_5","poi_6"];
Oh sick. I didn't think it would just read the x/y of the marker without some crazy scripting
rgr that m8
Well, getting the x/y for the marker is markerPos _mrk
some of the less crazy scripting
Also getMarkerPos, because once upon a time BI didn't care how many commands they added.
And now it takes years of begging to get something as useful as "return the nearest position/object/whatever from this array"
// heres ex of my SuB spawn script
_mrk = selectRandom ["Sub1","Sub2","Sub3","Sub4","Sub5","Sub6"];
sleep 1;
//SDV createVehicle
_vtype = "O_SDV_01_F";
SDV = createVehicle [_vtype, (getMarkerPos _mrk), [], 0, "NONE"];
SDV setDir 180;
and hello @granite sky
hay did you guys here about that Dolly Parton display they are going to put up, there's only 2 reasons i would go see it , he he
Is there a way to figure out the workshop ID of an addon in-game using configs?
man that's a tuff one i have no idea
getLoadedModsInfo
Looking into it, thank you
If isOfficial is false then it should be a steam workshop ID (or 0)
Now here is a follow up question, is there a way to get that ID using CfgPatches some how?
Let me write some context as well
Context:
I have a list of ID64s, using them I would like to find all addons that belong to those ID64s and store the CfgPatches names into an array. Something like:
['diwako_dui_main','diwako_dui_nametags','diwako_dui_radar','diwako_dui_buddy','diwako_dui_indicators','diwako_dui_linecompass'];
The reason for this is to automate a process with ACE's PBO whitelisting.
So, using a list of ID64s I need to get the CfgPatches of all addons related.
holy crap thats way beond my skill level
Ugh, I guess you can use ConfigSourceMod on the CfgPatches entry, and then lookup that dir in getLoadedModsInfo.
Input is what though, the whole of CfgPatches?
Make a dir -> ID hashmap from getLoadedModsInfo so it's not horribly slow, I guess.
Should only need to run this script once every few weeks at most
Not meant to be ran through gameplay
_allOptionalWorkshopIDs = ["2992224248","3004062886","3000985517","3115927691","3127461009","2994372610","2993941361","2993942266","2994371430","2993939553","2041057379","766491311","1376867375","1911374016","2369477168","1105511475","2147472177","2791403093","767380317","2257686620","2664678033","2447965207","1638341685","825181638","2480263219","2467590475","825179978","2513044572","825172265","1838330945","861133494","1624804924","1624803912","1841917016","1848649183","1429098683","945476727","2068033599","1180534892","1486541773","1180533757","929396506","1845100804","2779626552","3189261753","1439605692","2480245230","498740884","825174634","1317053909","3142300742","853303947","1538673636","1786056727","925018569","642912021","750186990","1251859358","2387297579","3053177117","3324043515","3283635033","3283612524","3283642267","623475643"];
_allPatches = "true" configClasses (configFile >> "CfgPatches") apply {configName _x};
AET_CfgPatches = [];
{
_patchAddonID = configSourceMod (configFile >> "CfgPatches" >> _x);
if (_patchAddonID in _allOptionalWorkshopIDs) then {
AET_CfgPatches pushBack _x;
};
} forEach _allPatches;
AET_CfgPatches;
Sooo maybe I do need that, I tried running the code above and my game crashed >_>
Damn it, gonna figure out where I went wrong tomorrow, I need sleep now, it's 6 AM already ;-;
That won't work because it lacks the mod folder -> ID translation, but I'm not sure why it would crash.
["3denEnhanced_ACEArsenalShortcut","3denEnhanced_EventScripts","3denEnhanced_CaptureFrameUI","3denEnhanced","AdvDevTools","AdvDevTools_Fonts"]
It seems to have worked, this was the return array which is what I need.
I added a sleep 0.01; at the end of each loop which seems to have prevented the crash
Downside is it takes about 20 seconds with little to no mods loaded to get done
Or maybe the sleep has nothing to do with it and I changed something else?
Ah welp, it works, I can sleep in peace
_allOptionalWorkshopIDs = ["2992224248","3004062886","3000985517","3115927691","3127461009","2994372610","2993941361","2993942266","2994371430","2993939553","2041057379","766491311","1376867375","1911374016","2369477168","1105511475","2147472177","2791403093","767380317","2257686620","2664678033","2447965207","1638341685","825181638","2480263219","2467590475","825179978","2513044572","825172265","1838330945","861133494","1624804924","1624803912","1841917016","1848649183","1429098683","945476727","2068033599","1180534892","1486541773","1180533757","929396506","1845100804","2779626552","3189261753","1439605692","2480245230","498740884","825174634","1317053909","3142300742","853303947","1538673636","1786056727","925018569","642912021","750186990","1251859358","2387297579","3053177117","3324043515","3283635033","3283612524","3283642267","623475643"];
_allPatches = "true" configClasses (configFile >> "CfgPatches") apply {configName _x};
AET_CfgPatches = [];
{
_patchAddonID = configSourceMod (configFile >> "CfgPatches" >> _x);
systemChat _x;
systemChat _patchAddonID;
if (_patchAddonID in _allOptionalWorkshopIDs) then {
AET_CfgPatches pushBack _x;
};
} forEachReversed _allPatches;
AET_CfgPatches;
I dunno, I don't think your last code paste is what you're using.
Yep, sent the one above as the latest one that works
configSourceMod doesn't return an ID though. It returns a folder.
Uhhhh yea that's what the wiki said, no idea how I got here but it returns the ID for me
Oh wait... is it becasue I am running it through a hemtt launch...?
I imagine it's because the mod's in a folder named with the workshop ID. Fairly common for servers.
Well I was running this locally, so wouldn't be a server issue
If I run that line here I get "@Advanced Developer Tools", because that's where it is.
Then yea it's prob cause I was executing this through a hemtt launch of the game
Ah welp, just another step to add tomorrow when I wake up
I'd say half way there is still a good way there
Thanks again for all the help
Yep, just confirmed
This is what I get when I launch the game normally
Building the hashmap:
private _folderToID = createHashMap;
{
_x params ["", "_modDir", "", "_isOfficial", "", "", "", "_itemID"];
if (!_isOfficial) then { _folderToID set [_modDir, _itemID] };
} forEach getLoadedModsInfo;
Then just:
private _modFolder = configSourceMod (configFile >> "CfgPatches" >> "AdvDevTools");
_folderToID get _modFolder

Have you got a link for me?
currently made it with: get complete gear -> Get the mass of each single item -> blablabla
hey guys i found a old B-2 mod and it works, only problem is that there isnt any bombs on it and you cant edit the pylons, is there anyway to do this using some code?
Pylons need to be set up per vehicle config. Nothing you can do about it without modding it.
oh alright, thanks
An AI Mod
oh ok isee thx m8
we're faster than Google 😎
yes agree
way faster
and in less words also
but i get your point @winter rose lol
nay it's ok from time to time no worries 😄 I am just kidding about some peeps that would come here and expect Google results (not the case here, no problem)
i got ya Lou, im ok with it all , lol
customer service 😉
hell yeah
let's not forget we are humans, after all :p
lol, thx for reminding me (that we all are)
yup im for sure not a bot
lol thats funny lol
# Hey there ^^
Yesterday we had multiple unexplainable "crashes" on our server. It began with a solid
yellow chain and ended with connection loss of headless clients wich runs on the same machine
as the main server. It resulted in 4.4 server FPS.
I need help in understanding the .log file
Our IT is talking about network errors in the main server.
Excerpt of the .log file:
Server: Network message 4ddf12 is pending T_196
Server: Object 10:14 not found (message Type_126)
Server: Network message 4de34c is pending T_114
Server: Network message 4de34c is pending T_110
Server: Network message 4de35d is pending T_110
Server: Network message 4de786 is pending T_108
Server: Network message 4de78a is pending T_333
Server: Network message 4de80a is pending T_110
Server: Network message 4de80b is pending T_114
Server: Network message 4deefd is pending T_333
Server: Network message 4df072 is pending T_110
Ref to nonnetwork object <No group>:0 (Logic)
Can someone please teach me how to understand whats going on / back follow the problem?
when you send a message while not having an Internet connection, the message is pending until a network connection has been established and then it is sent normally. so im guessing the net connection if falling off
if i had to guess your sending lots of stuff thoo the net, and it cant seem to get thoo, so it w8s and w8s and w8s then crash
imho
Good call. So I DDos myself..
Can I send you the whole file? Maybe you can see more than me.. [170.000 lines x2 -> Before/After crash]
like one time i was sending the exact clicked position on every machine when i did not need to
i would check the mission to see how many things you are sending to every machine
Im sending you everything with no limitation. Im not one of the copyright freaks hahaha
well im not the best at this others could help better imho
it seems to me that the mission is sending stuff thoo the net that only needs be on the server
hes useing Liberation
The thing is: Our server contain 250-400gb ram and is splited on 4 instances: Server|HC1-3
The even more confusing thing is that weve hardbenched with 1.700 units and it worked.
We have the theory that groups arent getting deleted. Im prooving this but think that Liberation already got a preset for that.
Maybe its not working with the headless
look at HC1
Isnt that the proof that the groups are not getting deleted?
And is it possible to reuse existing groups? Because after waiting the Liberation spawned in
new units again and put them on the headless again. 3 groups getting created so far I can see and
the count only goes to 7. Now I have 7 groups with 9 units
i'm failing to understand the need for 3 HC's
I thought that it brings in more performance then using 1 HC
hmmm yeah i wish i knew more about this
I would test this:
ImNotGoodAtRemoteExec remoteExec [{ if ((count units _x) == 0) then {deleteGroup _x;}; } forEach allGroups, 0, true];```
yeah i have trouble having 1 HC, let alone having 3 HC's
that would fuster cluck me
there must be someone in here that know more about this
or maybe that's it
that's the best civilisation has achieved
we can't go further
who knows
remoteExec structures aren't that difficult to learn. If you just take a moment to understand it, instead of writing it off with "I'm not good at it", you can figure it out.
#arma3_scripting message
Maybe you've forgot deleteGroupWhenEmpty
https://community.bistudio.com/wiki/deleteGroupWhenEmpty
it's true by default, but maybe they set it to false at a point for some reason
anyway, they are nowhere near the 288 groups limit nor should it crash a server
i was thinking it was 144 groups
Personally, I doubt groups not being deleted is causing your problems. You have what, a total of ~50 groups in the game in total, and ~130 units? That's well within limits, and your performance is basically fine - all HCs are running at the 50fps default limit, and while the server isn't doing so great, 30fps is acceptable.
Having a huge number of groups could affect performance, but if many of them were empty then it probably wouldn't be that bad. Also, you don't have a huge number of groups, and performance is fine.
doubled in A3 1.68 (https://community.bistudio.com/wiki/createGroup)
The OG who helped me, designed the command in a time without this luxury.
I will change the command
If you did hit the group limit, it could break scripts by making it impossible to create new groups, but it's unlikely that would cause the server to crash
Its not impossible
so @winter rose is this correct the group usually gets immediately auto-deleted ?
Im into this rn:
https://community.bistudio.com/wiki/Arma_3:_Remote_Execution
&&
https://community.bistudio.com/wiki/remoteExec
Is there any more relevant to get full understanding?
up to 60s deletion but yes
not really, but we can assist
Those pages are generally complete, especially the remoteExec page which shows you exactly how to write a remoteExec. The message I linked to also has a concise example.
DoubleCheck please:
The params of remoteExec is the index of the arguments/parmameters Im using in the targets parameters of remoteExec itself, right?
I dont fully understand params parameter/argument. Thats also why Im not safe to use it. Althought it would have great effects like enumerations of targets..
cool yes because some times i count the groups in a mission for win condition @winter rose
These entries, to me, don't suggest a groups problem. Too many empty groups could cause issues, but probably not this kind of issue.
Some possibilities:
- a script is running out of control and generating thousands of network messages in a very short time
- a client's connection is shitting itself and dragging the server down with it
- problem with the server's network interface outside of Arma (possible but not very likely)
link to an good example
Hi, i have a question ? Is it possible to disable the system that makes the AI avoid collisions while driving a car against an other car ? Because when you create a vehicle that drive to a waypoint for example, if you try to enter in collision with that car even by coming behind it, the car will try to avoid you by a quick turning to the right side of the road. I thought it was this : https://community.bistudio.com/wiki/useAISteeringComponent but apparently not
I think we can exclude the groups theory. Liberation screwed it back to 6 again. So something is deleting groups also on the headless clients.
I will still create the remoteExec command with groups deleteWhenEmpty for training.
Im back in ~15-25mins
@hallow mortar Ive sent you a .rar with everything used including the .log files from the evening before and after the crash
If you want more, like .rpt files, just say it.
If you care here is the latest version btw, confirmed working:
private _allOptionalWorkshopIDs = ["2992224248","3004062886","3000985517","3115927691","3127461009","2994372610","2993941361","2993942266","2994371430","2993939553","2041057379","766491311","1376867375","1911374016","2369477168","1105511475","2147472177","2791403093","767380317","2257686620","2664678033","2447965207","1638341685","825181638","2480263219","2467590475","825179978","2513044572","825172265","1838330945","861133494","1624804924","1624803912","1841917016","1848649183","1429098683","945476727","2068033599","1180534892","1486541773","1180533757","929396506","1845100804","2779626552","3189261753","1439605692","2480245230","498740884","825174634","1317053909","3142300742","853303947","1538673636","1786056727","925018569","642912021","750186990","1251859358","2387297579","3053177117","3324043515","3283635033","3283612524","3283642267","623475643"];
private _allCfgPatchesNames = "true" configClasses (configFile >> "CfgPatches") apply {configName _x};
AET_CfgPatches = [];
private _folderToID = createHashMap;
{
_x params ["", "_modDir", "", "_isOfficial", "", "", "", "_itemID"];
if (!_isOfficial) then { _folderToID set [_modDir, _itemID] };
} forEach getLoadedModsInfo;
{
private _modFolder = configSourceMod (configFile >> "CfgPatches" >> _x);
private _cfgPatchAddonID = _folderToID get _modFolder;
systemChat _x;
systemChat _cfgPatchAddonID;
if (_cfgPatchAddonID in _allOptionalWorkshopIDs) then {
AET_CfgPatches pushBack _x;
};
} forEachReversed _allCfgPatchesNames;
AET_CfgPatches;
make sure to count the amount of alive groups in it
e.g ```sqf
units _group findIf { alive _x } != -1
oh cool thx @winter rose
so that line counts all groups of all factions is that correct @winter rose
no
it checks if said group has one unit
oh ok cool
Ive got some new returns I dont understand.
I noticed that multiple happenings dont happen
with headlessclients so I tried to isolate the issue and got this results:
in .log file
Error in expression <i_fzg2;
} forEach units sascha_grp2;] remoteExec ["true", "HC2", true];>
Error position: <;] remoteExec ["true", "HC2", true];>
Error Missing ]
Performance warning: SimpleSerialization::Write 'params' is using type of 'NOTHING' which is not optimized by simple serialization, falling back to generic serialization, use generic type or ask for optimizations for these types
[17:26:12] [System:Monsterframe Error/19] : Socket exception: ConnectionRefused. Retrying...
[17:26:12] [RCON:Monsterframe Info/19] : BattlEye RCON disconnecting...
[17:26:13] [RCON:Monsterframe Info/19] : BattlEye RCON disconnected successfully
Ref to nonnetwork object Tafel1
With this input:
in Debug Console -> Server exec
[ {
_x assignAsCargo sascha_konvoi_fzg4;
_x moveInCargo sascha_konvoi_fzg4;
} forEach units sascha_grp4] remoteExec ["true", "HC2", true];
It created issues and similar effects then before the server meltdown yesterday
Can someone explain what is going on?
Groups aren't specific to factions, do you mean the groups in each side?
If so, allGroups gives you all groups* regardless of their side.
Return a list of all groups created on the following sides east, west, resistance/independent and civilian only
https://community.bistudio.com/wiki/allGroups
yes @tulip ridge
oh cool ok thx m8 @tulip ridge
wow thats Awsome so simple and easy woohoo
Pretty much everything in that code is wrong.
You probably wanted something like this:
{ {
_x assignAsCargo sascha_konvoi_fzg4;
_x moveInCargo sascha_konvoi_fzg4;
} forEach units sascha_grp4 } remoteExec ["call", _machineID];
Maybe "HC2" is legit for the second parameter. I wouldn't know.
remoteExec ["true"] is kinda funny 😂
no!
i have always wondered, is true in arma a command or variable?
im guessing it can be both
but i dont know for sure really
i would think its a variable but i don't know much
perhaps no one knows... 
lol yeah they know
there is a command that gives you the list of all commands but I forgot its name
i dont mean the page 🙂
ok sorry lol
data type?
nay, Boolean is the data type
game-wise, it is a command
by definition a variable could be changed, e.g true = 42;
however
until an Arma 2 patch, it was totally possible to do player = 666;, true = false; and other horrible things of which I am very proud to have found 😁
hey peeps theoretical question, would it be somehow possible to add a permanent variable to a gun actively being used by a player, even if the player drops it etc?
No.
Weapons aren't tracked the same way that objects or magazines are, so there's no way to track a weapon like you could one of those previous items
The usual way of attaching information to items is to define ~1000 of them in config :/
oki fair
is there a scripted way to kick people from a server? had a dig through some commands and cant find one (hoping not removed due to abuse)
How does one even finds that false can be written into true? 
I would assume it would be read-only
"until an Arma 2 patch"
I think they're saying that they would assume that they would be read-only so they never would try setting them to other things.
Hey, is there a possibility to increase the height of a listbox item? Or to make a new line space in a listbox?
it is "read only". but previously it would create a variable with that name and that's what the game would end up using instead of the command
or at least so it seems
Aha, I see now. Thanks for clarification. 
Sounds like something, which could happen
Im trying to find it, if i recall there is an event handler for chat?
witchcraft 😮
script-breaking*
of which I am a Master of the Craft 😂 so much that I have a company emoji named after me 😁
Not sure if anyone can help with this, but I would like to add the option for players to enter spectator mode during the multiplayer mission to be able to take better screenshots (not the splendid camera but the nice spectator mode you can use when running a mission from inside the eden editor). I think it might be possible to do so with the "BIS_fnc_EGSpectator" function? The question is where to put that exactly. Any help is appreciated.
(normally would check the BiStudio Forums but the ARMA forums are down sadly - sure as hell hope they will come back again soon as there was so much info there!)
but is that not only for when people get killed/die? What I am looking for is a way for the players to switch to the spectator mode during play, take the screenshot and then switch back and continue playing.
Check the commands
// Start spectator
["Initialize", [player, [], true]] call BIS_fnc_EGSpectator;
// Exit spectator
["Terminate"] call BIS_fnc_EGSpectator;
can just add addactions to the player or keybind etc to execute that
oh ok, thank you very much! will see if I can get that to work :)
@jade abyss https://community.bistudio.com/wiki/loadAbs
!!!! @stray kindle THX ALOT!
thanks mate, we actually managed to cobble something together via addaction and a sqf script
No need to. Need it for something different 😉
oh ok, did not even think of something like that
a different question in regards to addaction that is interesting:
player addAction ["Spectator Mode", "picturemode.sqf"];
that is the one we have used, but the wiki mentions something interesting: that one can get the action to appear on top or lower on the possible action list with the "priority" number, where does one put it?
alsop might be a very stupid question but "in the radio command" is that a different sqf file I have to make or is that put in the init or player init sqf files?
Rgr, good luck 😃
(you should see some of the garbled scripts I try to cannibalize and get to work - most often not to work lol - think you would roll your eyes and burst laughing)
thanks much appreciated, I always found it amazing what people can do with scripts since the days of OPF ;)
there were some BRILLIANT mods even back then!
definitely one of the Veteran names! like DeltaHawk who made the first CrownVic police car in OPF (and is still modding -> he made the Nassau mod which allows sailing ships - I was once again amazed!) or Triglav who made the ACW mod back then, or ProfTournesol who made lots of great stuff back then... there are so many brilliant people!
thanks mate, much appreciated :)
it is the same with some of the missions out there if one looks at things like the famous Liberation missions - this is amazing what is possible, adding a lot more depth to any CTI mission, there are others too... - ...great work all around
variable propagation - if I run missionNamespace setVariable ["testVar", 1, true]; to send a variable across the network,
can I just query testVar with private _value = testVar;
or do I need to do private _value = missionNamespace getVariable ["testVar", 0];?
I'm getting unexpected behavior where it feels like data is somehow getting dropped between clients and im thinking it might be because I mix and match the two
the former is ok
the latter also allows you to have a default in case the var's not defined
hm, ok. different issue then.
regarding data seeming to be dropped, it could be a race condition, or sending large data, or...
yeah, need more testing, otherwise known as convincing the clients to send me their RPTs :D (or just querying them for their copy of the var as the server for testing)
I mean you could be right, but first rule out other possibilities
For a little fun OP I'm working on, I'm working with Sectors, and I want it to be so that when a side captures a sector, 3 game logics within that sector turn into spawns for the side which captured it, below is what I'm working with, but it just doesn't seem to work flawlessly in any way I'm trying to do it:
if (_owner in [west, independent]) then {
private _logics = [
[SA1, "Sector A (1)"],
[SA2, "Sector A (2)"],
[SA3, "Sector A (3)"]
];
{
private _logic = _x select 0;
private _name = _x select 1;
if (!isNull _previousOwner && {_previousOwner in [west, independent]}) then {
[_previousOwner, _name] call BIS_fnc_removeRespawnPosition;
};
[_owner, _name, _logic] call BIS_fnc_addRespawnPosition;
} forEach _logics;
};
In general, adding debug lines (or using debugger) is always helpful. Quickly skimming through the code I can think of these options:
- What's the status of
_previousOwnerat mission start? - Shouldn't this:
if (!isNull _previousOwner && {_previousOwner in [west, independent]}) then {
be like this:
if (!isNull _previousOwner && (_previousOwner in [west, independent])) then {
That && is using a Code type for its right argument in order to use lazy evaluation. The right argument won't be evaluated at all unless the left argument is true.
These are quite simple checks so it probably doesn't save too much performance in this case, but it is valid.
I see, thanks for letting me know 😄
Had no idea that lazy eval requires that
probably quicker to just drop the isNull check.
If it was an isNil check then it's another matter, and then the purpose is not to throw errors.
Yeah honestly that is suspicious and it's probably supposed to be an isNil. There's no side that returns true for isNull.
I dunno how sectors work, I'm not sure what the previous owner would be given as if the sector was previously uncaptured (if an uncaptured state even exists)
Either sideUnknown or nil would be logical. Otherwise it's some very weird type mixing.
Hello everyone, hope you're all doing well; got a project similar to Stoneworth's above. Though my issue is "script functions/fn_genSec_taktis.sqf" not found for my mod i'm trying to make. General jist is, it's a sector control system but hoping to implement some FSMs to determine AI behaviour based on some conditions within the defined battlespace. However, before I can even get as far as the AI elements. I've got the issue that when ever I start the game to test my code so far, I immediately get the error upon start up of Arma 3.
I've attached the PBO file structure, screenshot of the config.cpp and the genSec_taktis (they all error out according to me .rpt file, but suspect the error is universal..) I am lost for ideas as to why. I had tried chatGPT but that's just telling me there must be an execVM somewhere, which is not the case.
Any ideas?
hi guys is there any way that I can make my friend high command and add units to him AFTER we enter the scenario
You wrote all that before testing anything? :D
Ha, yes... i know, i got carried away
technically some of it was written from other projects i had tried admittedly
It looks like a prefix isue. Read the upper part of this a few times: https://community.bistudio.com/wiki/Arma_3:_Creating_an_Addon
Let me go and have a read; thank you!
Mod PBOs have a prefix and you need to include that in the function path.
is this the $PBOPREFIX$?
ahh, ok ok; in terms of building - mikero's tools for packing the pbo and notepad++
According to that page it's $PBOPREFIX$.txt for mikero, but maybe it works without the extension.
Yeah, that section caught me eye - i had assumed i was doing something wrong with the path, but i tried many iterations and couldn't figure it out. Let me digest this a bit more and see what I conjure up
appreciate your time though!
If you don't set a prefix then Arma will automatically generate them according to undocumented rules. So that's no good if you want to link anything.
file needs to have the path to the pbo, not just the folder name
Thanks Discord for only loading messages after I hit enter
Is there a proper way to delete a mortar shell projectile (which seems to be local on every machine)?
When I deleteVehicle on it, it only deletes it on the machine the command is executed on even though it's supposed to be global. When I try to remoteExec deleteVehicle, it says it's objNull on all the other machines. Can't even setPos it somewhere in the water. Seems to be specific problem for just shells.
if I have a statement of the form _replacement action ["getInDriver", _victimVehicle]; - how would I rewrite that to use remoteExec to execute on the machine where _replacement is local - does it follow the normal form - I looked on the biki and I can't see anything about how actions work with that form
Off the top of my head, try:
[_replacement, ["getInDriver", _victimVehicle]] remoteExec ["action", _replacement]
@formal grail that seems to work TY :), (context is when a player shoots the driver of a vehicle with cargo (passengers), I promote one of them as the new driver, make him get out then in the drivers seat (could just TP him but that looks bad and some vics have separate crew/cargo areas) (and then unrelated, I make all other passengers part of a new group called "counterAssault" and set a taskRush on that targetting nearby players with the vic as the center 😈 ) - essentially assaulting through the ambush 😄
players know if you shoot the driver the vic will just sit there then they schwack it with an RPG - I want this to be one of lifes little surprises
If you want to get a headache check if any is in the driver's compartment and have them movetodriver directly.
Well, there's no global reference to them (same with bullets). What you can do is add a Fired EH everywhere to pick them up locally, but whether that's useful depends when/why you want to delete them.
I tried looking to see if there was way of doing that, I found the Cars Config biki but my google-fu failed - I couldn't see a way to just check if a unit can move that way - hence I wanted them to get out and back in as fast as possible and it seemed like getInDriver was the fastest way to do it without them straight just TP'ing to the slot - originally I used assignAsDriver and then get in - but the dude ran 10m from the vic first and then got back in the vic which well he's gonna die faffing around outside the vic that way 😄
Hm ok I might have to do that. I think deleting it on the spawner does delete them all right?
I don't know.
That is the ...compartment config. driver, cargo... And gunner...
wait.. so if a unit is in the driver compartment, fullCrew will return say two units both set with "driver" as the 2nd item in the list it returns?
You have to check what the driver compartment string is, check each occupant what type of seat, check that seat's compartment, and see if it's the same as the driver's
ahh interesting, I did wonder that that last item in the array was 🙂 - that might be workable since I can just grab the corpse info and select {} on his string to see if I have any _primaryDriverCandidates I can TP before I make someone in cargo get out and in as the driver 🙂
fullCrew positionName is not the compartment xD
I think that's gonna be a v2 SomeDay(TM) feature then, I'm happy with someone jumping out the back, yeeting the corpse out hte drivers seat and getting in the drivers seat and moving away while the rest of the cargo leaps out and ruins someones day
that's already an improvement over "the driver is dead, lets all just sit here quietly and wait for the RPG"
Although shouldn't it be either new driver floors it, OR all discount (except gunner) and assault? Doesn't make sense to drive empty vic
ah, it doesn't go anywhere until the driver is in the seat - I pull him out of whatever group he was in and put him in the vehicle group and then give that group the move order - so the vic won't move til he's in, other crew stay where they are
and unassign the new assault group from the vehicle so effectively they are two separate groups again - the guys who are currently doing the lambs taskRush (the cargo passengers) and the vic just does whatever it's told independently (or at least that's the goal when I've tested/finished it 😉 )
Very cool. I put a replace gunner module into zen, but this is sorely needed too
for now I'm just making the new driver a complete coward so he runs away 😄 - I need to check if the vic has a gunner and change that, should only run away if it can't fight back - otherwise set a taskRush or taskAssault on the vic as well - so it charges the ambush while the dudes spread out and start flanking
https://www.youtube.com/watch?v=LYN4iG7NE6s seems to work though, if vic speed is <12 I use action Eject - if it's greater I'm gonna force the vehicle to slow down to <12 and use action eject - so they'll crash bail out of a moving vic as it slows - rather than the "get out by one congo line of player fire"
https://www.youtube.com/watch?v=b3kkRXuvskM that's gonna be fun the next time they snipe the spec ops driver and the entire team hops out to suggest that was a poor idea - thanks for the help 🙂
so many "edge cases" 😄 - I love that the config say it takes 9 people when it actually takes 5 - I assumed (as any dev should) I'd screwed up but nope, can only put 5 people in it in zeus as well.. 🤷♂️
3 in "Arma 3" is because each and every piece of content is a combination of 3 unique edge cases :3
what does the config say exactly?
just glad I happened to spot it - it explains why I've been occasionally seeing enemy dudes off map when I do !v sf90 c (vehicle, spec ops, VM90 spec ops, with cargo or whatever) in zeus - I can't 100% trust the config 😄 - which is fine, now I know about it, it goes on my checklist to test when I add new stuff
the game uses the config tho. if you get a different result it's because you interpret it wrong
(or because some init EH locks half the spots, or some other meme)
or maybe a UAV driver gets added silently
except I'm not intepreting the config, I'm using BIS_fnc_crewCount ```sqf
params ["_vehicleClass"];
_allSlotsIncludingCargo = [_vehicleClass, true] call BIS_fnc_crewCount;
_actualCrewSlots = [_vehicleClass, false] call BIS_fnc_crewCount;
_actualCargoSlots = _allSlotsIncludingCargo - _actualCrewSlots;
systemChat format["all: %1, crew: %2, cargo: %3", _allSlotsIncludingCargo, _actualCrewSlots, _actualCargoSlots];
_crewSlotInfo = createHashMap;
// Because arma is just weird - https://community.bistudio.com/wiki/BIS_fnc_crewCount
_crewSlotInfo set ["all", _allSlotsIncludingCargo];
_crewSlotInfo set ["crew", _actualCrewSlots];
_crewSlotInfo set ["cargo", _actualCargoSlots];
_crewSlotInfo;``` which is just a nicer wrapper over the biki note - https://community.bistudio.com/wiki/BIS_fnc_crewCount - the thing is on the vast vast majority of vics I've used that on it exactly gets it right (boats, planes, cars, etc I use it all over the place and it works fine) it's just this specific vic it returns anomalous numbers for
well it's the function's fault then
yaaay, vanilla functions misbehaving?
what is the class name of the vehicle? and from which mod?
I don't doubt it - but since I've used it for nearly 3 years across multiple campaigns (with at least 6-8 different country/region mods) and it's specifically this vehicle in the Pedagne mod thats doing it - I'll just put an override in for that specific vic to values I know will work 🤷♂️
ASZ_VM90spop from Pedagne
btw did you try fullCrew on the vehicle too? to see what it returns? (it should return the correct number of seats)
would have to use includeEmpty since I'm using that function above to figure out how many people I can put in crew/cargo - 👀
yeah with empty
[<NULL-object>,"driver",-1,[],false,<NULL-object>,"$STR_POSITION_DRIVER"],
[<NULL-object>,"cargo",0,[],false,<NULL-object>,"$STR_GETIN_POS_PASSENGER"],
[<NULL-object>,"cargo",1,[],false,<NULL-object>,"$STR_GETIN_POS_PASSENGER"],
[<NULL-object>,"cargo",2,[],false,<NULL-object>,"$STR_GETIN_POS_PASSENGER"],
[<NULL-object>,"commander",-1,[0],false,<NULL-object>,"$STR_POSITION_M2"],
[<NULL-object>,"commander",-1,[1],false,<NULL-object>,"$STR_FRONT_GUNNER"],
[<NULL-object>,"gunner",-1,[2],false,<NULL-object>,"$STR_REAR_GUNNER"],
[<NULL-object>,"gunner",-1,[3],false,<NULL-object>,"$STR_LEFT_GUNNER"],
[<NULL-object>,"gunner",-1,[4],false,<NULL-object>,"$STR_RIGHT_GUNNER"]
]``` (done via ```copyToClipboard str (fullCrew [_this, "", true]);``` - which matches what the function above says (in that there are 6 crew, 3 cargo) but I physically can't put more than 5 in in zeus
why does it have so many commanders and gunners?!
I'm sure you can only have 1 of each
Not the mod author but it's a spec ops variant of a normal vic - so it's kinda festooned with guns
well they shouldn't be gunners tho (i.e primaryGunner). they should just be turrets
you are right that the vehicle is misconfigured
🤷♂️ I didn't create it, all the other vics seem to work fine from that mod - it's just that one that's screwy but since I can put 5 dudes in and they'll man all but the front right gun that's Good Enough(TM) - thanks for sanity checking it though 🙂
I wouldn't bother but players "love" (they really really don't) that vic when it rolls up with the recon team onboard 😈 - hearing them scream "SPECOPS" on the radio warms my cold dead heart 😉
the other guns seem useless right? only the top gun works?
they work for players in that they can man them when they inevitably loot it (which is part of why I do it - it's a convenient way to "give" a small team a vic when they are stuck miles away without anything nearby)
well, i can still get into this thing after having 5 bots onboard
ultimate shenanigans
maybe it was intentionally done to block non-players from using them 
up to count crew vehicle player of 9 if i command some bots to enter 😓
it's weird because I don't do anything exotic to put the units I created into the new vic either - it's just moveInAny for crew and moveInCargo for pax
memes in - memes out
which method are you using to command them to get in? - TP'ing them with moveIn or using getIn type?
having them in my squad, selecting all and clicking on the poor vehicle
lol, if I do it in zeus, create a group of 9 and order them to getIn - 8 do, one is currently ignoring me and staring at a tree 🤣
if I drag him "vehicle is full" - outstanding 😄
god I love arma at times (I mean I do actually but also it can be hilariously frustrating)
well, i have 5 people inside and my squad outside. And when i tell my dudes to board the car - one of the original passengers just nopes out 🤣
and commanded bots refuse to take that free position. And i can board it myself
that probably explains why 5 works - because if the vic says 6 (for crew) but that slot isn't usable then I'd get what I was seeing - 5 in the vic and one dude left at the spawn point because "moveInAny" failed - cargo none of them want to get in (at least with assignAsCargo/moveInCargo) - it's definitely an outlier though - never seen it happen with any vic I've used anywhere else (across CUPS and RHS - 3CB etc) - I'm curious why but not enough to spend a tone of time when a if(_vehicleClass == "ASZ_VM90spop") then { // handleSillyThings covers it 😰
interestingly, the front slot that no one will get in, is one of the two "commander" slots - not even sure if it's possible/usual for a vic to have two commander slots (would seem weird but I don't know that that isn't expected)
for me that slot was left cargo (idx 1) 
may be caused by units belonging to different squads (or not)
https://pastebin.com/tRqzA21U that's how I put them in vics normally (it's old code that's worked for so long I haven't touched it in literally years...til today) 😄
I have a question about something pertaining to server mission scripts / addons etc.
I run a mission, and in the mission there is a main init, as well as a client init, and between these 2 inits there is a library of functions that loads with the mission.
Within the main init for the mission module, there is a bit of code that blackens the screen and then later, in the clientinits.sqf the removes the black screen with the titleCut ["", "BLACK IN", 1]; as some sort of loading screen.
For some reason, when players join after the mission has already began it takes several minutes for the mission loading to get from main mission init, then to client init.sqf, however, if I am the first person joining after the server restarts and the mission is being ran for the first time in the session, there is NO waiting time and everything loads at once without waiting.
Does anyone have an idea on why this happens, and if there is a way to circumvent this? Is it waiting for JIP data to load or all addons to load between the initialization of each sqf in the missions functions?
To be more specific its the warlords game mode. WLinit.sqf will load and darken the screen cause it waits for clientinit, but then it takes forever to get to clientinit.sqf and I'm wondering why it's waiting or whats coming between WLinit.sqf > clientinit.swf and making it take so long after the mission begins. And this only happens after the mission has began, if Im the first person to join everything loads instantly
JIP certainly starts before initClient but I'm not sure if it waits for completion. Possible, I guess.
did you try it with initPlayerLocal?
Is there a better solution to splitting an AI group into two teams?
After a lot of trial and error I settled on selecting odd and even units.
It's not the best method of splitting a group by any means...
Ideally I'd want to have AR/MG, Grenadier, and marksman roles in cover group. But, that'll keep for another day!
private _units = units _group;
private _flankUnits = [ _units, { _forEachIndex % 2 == 1 } ] call CBA_fnc_select;
private _coverUnits = [ _units, { _forEachIndex % 2 == 0 } ] call CBA_fnc_select;
You could select first half/second half:
private _divisionPoint = floor (count _units - 1) / 2;
private _firstHalf = _units select [0, _divisionPoint];
private _secondHalf = _units select [_divisionPoint + 1];```
Picking out specific unit types isn't that complex, but you need to figure out what you want to use to identify them. Base unit class is quite simple, but requires you to explicitly specify all possible unit classes that match, so it's not very dynamic.
e.g.
```sqf
private _rolesArray = ["B_soldier_M_F", "B_soldier_AR_F"];
private _overwatchUnits = _units select {
private _unit = _x;
(_rolesArray findIf {(typeOf _unit == _x) > -1};
};```
I initially used a similar method to your example. Not sure why I didn't stick with it though.
Ahhh. The _rolesArray example has got me thinking.
I already have role value set in CfgVehicles of my factions.
Cheers!
it should be [0, divPoint] and [divPoint]. no need for +1
by doing +1 you skip one guy
Are you sure? Doesn't that mean selecting the _divPoint index in both selects?
no. the second item is count not index
selecting from 0 up to divPoint count returns up to index divPoint-1
I know the floor rounding for dealing with odd numbers is probably not exactly correct
oh it is count 🤦
Is there a way to figure out which pbo is a specific class name of a helmet, vest, etc... is from?
I looked at and tried configSourceModList, configSourceMod, and configSourceAddonList but the best I got from those is the mod folder as a whole or addon name which doesn't match the PBO 100%.
no
Has anybody customized the SOGPF Radio support before? I've even tried editing the one off of the wiki.
I've been trying to mess with the radio support in the artillery.hpp. Got the Class names and the magazines. Yet everytime I use the correct classnames. They appear, fly over, dumpflares, and don't drop their ordinanace.
For clarity, the defender spawns, but doesnt fire its lasers at all.
{
displayname = $STR_VN_ARTILLERY_AIRCRAFT_HE_HOBO_NAME;
icon = "vn\ui_f_vietnam\data\decals\vn_callsign_src_1sos_ca.paa";
description = $STR_VN_ARTILLERY_AIRCRAFT_HE_HOBO_DESCRIPTION;
magazines[] = {"LS93_Magazine"};
vehicleclass = "WM_TieDefender";
cooldown = (60*5);
cost = 6;
};```
link to wiki page?
Hi everybody
back too soon, i'm sorry
/// player spawns the vehicle with crew, it uses create vehicle which i believe is global?
action = "[48, player] execVM 'scripts\AI_Script.sqf'";
/// used when the spawned group reaches its waypoint and plays a sound
[HQ, "LOG_ST_DEP"] remoteExec ["sideradio", -2];
/// used for when the AI reaches this waypoint and triggers a script
_waypoint3 setWaypointStatements ["true", "[[2, _driver], 'scripts\logistics\supply_script.sqf'] remoteExec ['execVM', 2];"];
i'm using these commands, on dedicated, it triggered 6 times for 2 players being on.. now from what i know
i'm using -2 for the sound to be played for everybody on the server, that doesnt go off at all
and i'm using 2 for the serverfor waypoints because I didnt want it to kick off for every single player
could this all be fixed with a if (isDedicated)? I just want ask to be sure
The OnActivation code is executed globally, a.k.a on every client! See Waypoints.
my guy, that was super fast - i've completely missed that part - thank you
no idea how i missed that
Oh okay, so instead of waypoint activated scripts - i should try come up with another system?
https://wiki.sogpf.com/index.php/Radio_Support
If you would like the hpp file im working with I can send that as well.
by hpp file you mean a file you've included in description.ext?
if so yes upload it on pastebin
Is there a way I could get the mission functions to load before JIP data starts loading?
Its a mission function called WLInit.sqf and WLClientInit.sqf but WLInit.sqf loads first, then it waits for WLClientInit.sqf
Its warlords so theyre in an addons folder, not the mission file itself
If you're gonna rewrite warlords then you should start by making it send less JIP :P
If it's taking 10s+ to process JIP then that's too much JIP.
I think it is the addons JIP data (lots of addons / mods) but not the missions JIP data
Maybe its just a pitfall to using a lot of mods
Nah, most mods don't generate any.
Well it loads quickly without mods
If I dont have mods loaded, the mission doesnt take this long to load
Figure out which mods you're loading that are doing that then.
It's not the quantity that matters.
There is not going to be any sensible way of changing Arma's init order. Don't even think about that.
I've noticed over time that when I add mods that have a lot of classes like CUP vehicles, or CUP units etc it increases the loading time gradually
Okay I figured this would be the case sadly
Another good example of how mods are making it load longer, are uniform mods that use ace extended arsenal that add a ridiculous amount of individual classes for each variation of uniform
Seems like the mission is waiting for addons to load
Is there any reason the itemId from an addon returned in getLoadedModsInfo would be 0 other than it being a locally added mod?
I have a single workshop addon returning 0
hmm. What's in the meta.cpp?
ah a publishedid of 0 for some reason
Greetings Arma People,
I am trying to have a trigger fire / Activate if Any Captive Unit starts to hold any Gun / is not empty handed. I´ve thus far not succeeded.
The main struggle is to find a trigger condition for:
- Weapon in hand
and a&&condition would be an Object attached VariableisSurrendered(BOOL).
you can remove the weapon and add it when needed, don't know if this is the idea
Idea is you are a person without a weapon in hand and as soon as you have a weapon the trigger fires and executes some code
it checks hands and weapon on back also
Possibly.
Current thing I am trying is:
{
(side _x == civilian) &&
(captive _x) &&
(_x getVariable ["isSurrendered", false]) &&
(currentWeapon _x != "")
} count allUnits > 0
But I fear that this might be "slow" on a populated server
I would add an alive check (dead units are civilian and I don't know that they stop being captive), and use findIf as it's quicker (stops checking when it finds one, whereas count always iterates over every item)
I don't think that would be helpful in this use case, as they're trying to see if the unit is civilian because they're a captive. If they are, the group won't reflect that.
I´ve not gotten findIf to work before. But I shall add
alive _x
The default trigger frequency is 0.5s; you can adjust it and make it less frequent to help with performance.
You can also look at ways to reduce the number of units being checked. For example, if you only care about player captives, you can check only players, rather than all units.
I care about all units, AI and Player
There is a weaponChanged event handler, for what it's worth.
Running that code every half a second is a pretty minor overhead though.
That's what I was about to suggest. The only thing is that it's more annoying to do that for all units + new spawns etc, since it's an object EH
It is possible to make findIf work for this
I´ll run it in a ~5 second interval. Feels most Intuitive for this
I haven´t gotten it to work thus far / my skills using findIf are not sufficient yet
(allUnits findIf {
// Your condition here
}) > -1```
findIf returns the index of the first element in the array that satisfies the condition. If there is none, it returns -1. So we know that if the return is anything other than -1, there was a hit. Quite simple.
The condition works exactly the same as for count, so nothing needs to be changed there.
btw, the fastest way by far to do those multi-condition statements since 2.18 is often like this:
count (allUnits select { captive _x }
select { side _x == civilian }
select { _x getVariable ["isSurrendered", false] }
select { currentWeapon _x != "" });
Which looks like it's doing far more work, but those conditions now all work with simpleVM, and the ordering gives you a lazy-execution benefit for free(ish).
Can often be 5-10x faster.
quick question for MP, is it possible to make it day time for some and night time for others with remoteExec?
I don't think so. skipTime syncs with the server.
Maybe if you spam it on the right frame timing.
setDate doesn't
Clients' local date is automatically and periodically synchronised with the server date.
Wiki can be wrong. I haven't tried it.
Sorry for the delay, Leopard.
Here is the pastebin. The artillery.hpp is located in the Mike Force file/pbo. The one I have in there is from the vanilla file. But I had edited where I'm supposed to for the vehicles and magazines trying to customize it.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
general question sorry
I decided to do an attachto script for an IR strobe, i'm guessing for that not to cause desync it would need to be executed server side so everybody can see it rather than locally? issue I had was when people got in the vehicle it didn't remain attached
is there a way to keep something attached to a player when they enter a vehicle or is it more hassle than what its worth?
what are you trying to edit? and what do you want to make? a mod? or a mission?
Best to delete it when entering a vehicle and then recreate it when exiting
That's how ace handles their ir strobes
oh gg, thanks very much mate!
Won't matter too much really. Also there wouldn't be much of a difference between running it on the server vs just the client that triggered it
If you're really concerned about it though, you could create a local version on each player's machine though
That would save the server doing stuff with it
I'm editing the ordinance being fired for the radio support for the Mike Force mission, like shown here: https://youtu.be/f2mguQc3LhA
Our community runs custom Mike Force missions, currently we're doing SW. We did Halo but I could make the SOG armaments work for it as it's just guns and rockets. The Halo Vehicles appeared and fired them.
All i'm trying to do now is get the Radio Support to fire something else other than the vanilla/sog guns, rockets, and bombs. I can get modded vehicles spawn like a TIE Fighter, or LAAT from the module. But they will not fire anything at all. Especially when I change the magazine/ammo type.
I'm not sure what vehicle you're using here, but maybe that's the problem? are you sure that the spawned vehicle has the magazine at the beginning? (not sure if Mike Force adds the ammo by itself)
Chaining with && would also get simpleVM. It can even do lazy eval
wish we had &&? or something as lazy evel operator so you could do sqf if(bool &&? bool2 &&? bool3) then because the {} is kind hard to work with. but maybe this is not technically possible?
If it was possible to have lazy evaluation using &&?, then I would guess it would be possible using && too and there would be no reason to have &&? in the first place
if they would add lazy eval to && it would probably break scripts
In what situations? It's just avoiding evaluating something you don't need to evaluate
cant think of a good example but it sounds dangerous. its possible for condition code/function to also set variables etc
Not sure why {} is not good for your usage
that's because your code may become: ```sqf
if(bool && { bool && { bool && { bool && { bool && { bool }}}}})
its ugly. and hard to read/modify
It would be the "WM_TieDefender". The Tie Defender from Warmantle.
Im 90% positive its the correct magazine as I went into the cfgviewer to find what magazines and ammo it uses. It should spawn with the magazine in the beginning because it does it with their F4s.
Why && wasn't lazy eval from the beginning I wonder.
I guess this opens up opportunity for lazy eval operator &&&

SQF syntax is the answer
and "no" is the answer to "can we have it?" 😄
It would break in this situation:
private _foo = { systemChat "Hello"; true };
if (false && call _foo) then {}
In a language with lazy eval, the system chat would not execute.
In sqf, it does. Some existing scripts might rely on that behavior.
A &&& or &&? syntax would be nice. Alternatively, a precompiler macro flag maybe?
read above 😄
AKA "if we nag Dedmen enough"
:((
tbh I think you have better chances of asking him an object variable for weapons than for that 😄
Actually yeah I wonder if there is a way to do this with preprocessor macros.
Replace a && b with a && {b}
I'm pretty sure a syntax without {} cannot work because at a basic level, in SQF, code is evaluated when read unless it is contained in a Code type. You can't overcome that with a command.
You would have to parse the RHS as if it's a Code type.
You would have to but I don't think it's possible to make it work like that, without fundamental changes to how SQF works (so essentially impossible)
the eerie silence from the devs when asking a new feature 😁
Honestly, evaluating right side of && when left side is false simply does not exist in my mind. I would do:
private _foo = { systemChat "Hello"; true };
private _bar = call _foo;
if (false && {_bar}) then {}
And until now, not even realising I could do your version
I would much rather see bug which makes DUI Squad Radar look like eclipse fixed than any new command added
can the particles visibility distance be set via script or is it only affected by visual settings?
for some reason i don't like using lazy eval it just sounds to lazy and eval for me 🙂
Same, mostly. A lot of the time it's not faster at all.
When it would be, I use the select chaining syntax.
Also, I just realized that for some reason, saving your variables to the profileNamespace takes up SO MUCH space if you just save things to it, but if you serialize first with toJSON, it's like 100x smaller in terms of file size. (If you save a lot of things, it'll lag the game the next time you try to save something to the profile.)
@proven charm i know nothing about particles i wish i could help you m8
That's super useful to know! Maybe add a BIKI comment about it
It would be also nice to know why it works that way
@still forum plz fix
make JSON 100× bigger
Well, I don't know if I can generalize that comment. I'm saving these large arrays with a bunch of subarrays. No problems with the toJSON and fromJSON, but maybe there is something I don't know here (there are quite a lot of things like that)
np man
the other day i made this small mission and set the View Distance to 400 and holy shit my game ran so fast i was over controling my guy ,, it felt like my game was running to fast
Anyway I was recording player vehicle positions so they can replay it back, kind of like a replay cam. It saves every few seconds. And a 2 hour simulated game was like 400MB, but with JSON, it's 350 KB.
I guess that's a 3 order of magnitude diff not 2, but it really depended on what I was saving. And with the 400MB of junk in my profile, opening the escape menu takes like 2 seconds, which is probably because it's trying to load/save the text I had in my debug console.
Jup, storing script variables is quite inefficient.
But string is very easy and quick
Awesome. Good to know it's not some weird bug on my end. It does kind of make sense why it'd be like that.
isn't that just XML 🧌
@exotic gyro for the next lib update
I keep forgetting that native JSON support was added recently - I've a bunch of places that'd be useful (vic packing/looting particulary since I store a fair amount of data about damage to vics when they go in a crate to be slung) 🤔
You make me so sad
The optimizations!
kp lib saves are pretty small anyway 😦
what if you json json
does anyone know if it's possible to smoothly change the overcast over time like you can with the other parameters?
so like without needing to use forceWeatherChange
you can just pass a time to it, so <durationToChangeOver> setOvercast <WhatOvercastLevel>
or do it like the liberation folks do - https://github.com/KillahPotatoes/KP-Liberation/blob/master/Missionframework/scripts/server/game/manage_weather.sqf which I absolutely borrowed for my stuff at some point 😄
doesn't work, after that you also need to do either forceWeatherChange or skipTime
hmm and this script smoothly changes the overcast? over how much time? 1 hour? Is that the smallest time increments you can do for overcast change?
I think they chose it as a nice round value, I've used less though I think lowest I did was half an hour (1800) - that was a halloween op with blood rain storms 😄
ok I'll give this a go. Thanks!
Maybe im just stupid atm. but was the easiest way to check if a point is inside a triangle? ^^
algo is normally called pointInPolygon - I don't think SQF has an implementation natively though
Shouldn't that work ^^
Will try it now ^^
Yeah does thx. Was searching for triangles or something and didn't thought about polygon atm.
🙂
triangle is just a specific kind of polygon (screams internally - that's high school math, it's the simplest closed polygon - no one wants to remember that)
😄
Well, I'm not 100% sure what's going on. This one has similar performance for both versions:
allUnits select { !captive _x && { alive _x } };
allUnits select { !captive _x } select { alive _x };
But then this one is over twice as fast with the select chain. Just 40 units dropped into the editor, all conditions resolve to true:
allUnits select { _x getVariable ["spawner", true] && {_x == effectiveCommander vehicle _x} };
allUnits select { _x getVariable ["spawner", true] } select { _x == effectiveCommander vehicle _x };
@still forum
Im running trigger that blows up multiple things. Is there a way to delay between the explosions? sleep doesnt seem to work.
hey guys so im doing some work that requires syncing objects in eden to make a system.
Im using this command to get the synced objects.
https://community.bistudio.com/wiki/synchronizedObjects
E.G 3 Objects, Object1, Object2, Object3.
object1 and object2 are synced. So
synchronizedObjects object1;
returns [Object2]
now if I try an add object3 to be synced during the mission with the following
Object1 synchronizeObjectsAdd [Object3];
then ask for Object1s sync objects again I get the following [Object2,Object3G] object3s gunner was added not the object... This is being done on UAVs. How can syncing in eden give the object but using this command syncs the AI inside 😦
Id have to write code to check if its an AI and find the vehicle there in for my system is there no better solution? Or reason why it syncs the AI instead of the object.
Also to note when using synchronizedObjects it only returns the object if there is an AI inside the object being synced it seems... again using UAVS so it proberly works with modules fine.
This is the way I got it setup
smoke = "test_EmptyObjectForSmoke" createVehicle (getPos tank1);
sleep 2;
_bomb = for"_i" from 1 to 6 do{"R_60mm_HE" createVehicle (getPos tank2);}; bomb="Bo_GBU12_LGB" createVehicle (getPos tank2); bomb="Bo_Mk82" createVehicle (getPos tank2);
smoke = "test_EmptyObjectForSmoke" createVehicle (getPos tank2);
sleep 5;
_bomb = for"_i" from 1 to 6 do{"R_60mm_HE" createVehicle (getPos tank3);}; bomb="Bo_GBU12_LGB" createVehicle (getPos tank3); bomb="Bo_Mk82" createVehicle (getPos tank3);
smoke = "test_EmptyObjectForSmoke" createVehicle (getPos tank3);
That's kinda bad but should work fine spawned. No dependent vars.
It blows them all at once
oh, ok
hey sorry for the direct ping @granite sky any idea on this one though 😄
Nah, I don't even know what synchronization is for other than waypoints.
First comment there though: "This command only returns the effective commander of a vehicle that is synchronized."
I think thats incorrect now as I tested and its returning the vehicle object itself when synced in eden which is perfect. Only when synced mid game with the add command does it return the "commander" or gunner in this case as there is only a gunner in a UAV turret
Can anyone help with this code?
_caller say3D [ "PDA1", 250, 1];
I have it written into the Hold Action, Code Complete in attributes.
My main issue with it is that it's playing clientside when I want it to play globally so that people around my player can hear it as well.
This is happening because say3D is a Local Effect command, meaning it only has an effect on the machine where it was executed, and action code is only executed on the machine who completed the action.
The solution is Ol' Reliable: remoteExec. remoteExec is used to order other machines to execute commands and functions.
https://community.bistudio.com/wiki/remoteExec
Converting to remoteExec is quite simple, you basically just turn the left/right arguments and the command name into the left/right arguments for remoteExec, respectively. In this case, we don't even need to use any of the optional parameters for remoteExec, because the defaults are exactly what we need.
_caller say3D ["PDA1", 250, 1];
// becomes
[_caller, ["PDA1", 250, 1]] remoteExec ["say3D"];```
Alright, thank you very much. I will keep this in mind for the future.
use this command instead. Should work without remoteExec it. As it is a global Arg Global Effect
Hello, I'm trying to create a Hearts And Minds mission for my Arma server, unfortunately I can't figure out how Headless clients work, I have 3 basic ones on the mission( btc_hc_1/2/3), in the mission's GitHub doc it says to enable ACE_Headless which I did!
Then via my console (FASTER) I launch my server with the parameter to activate the 3 Headless, except that the mission freezes on loading with a message “waiting for host”, so I decide to relaunch the server without the Headless on FASTER and it works, but I have the impression of forgetting something, the HL still works? or there's something to do in the SMF folders of the mission? has anyone already solved the problem?
[
// Select units in zeus go into CQB mode, if "t" option not specified then radius is relative to the zeuses cursor position
// if t *is* specified then the group will cqb wherever the nearest player is :D
"cqb",
{
private _args = (_this select 0) splitstring "-, . ";
private _argCount = count _args;
private _help = "cqb <radius (CQB around distance)|t (target nearest player)>";
if (_argCount == 1 && {_args#0 == "h"}) exitWith {
systemChat _help;
};
private _groups = (curatorSelected#1);
private _targetPosition = [];
// Safe/Default values
private _radius = 20;
private _surfacePosition = [getMousePosition, "terrain"] call TerryLib_fnc_getPositionAtCursor;
// By default the target for CQB pos is the _surfacePos under the cursor
private _targetPos = _surfacePosition;
// We want to target the nearest player :D
if(_args#0 == "t") then {
_radius = 20;
_closestPlayers = [_surfacePosition, ([] call CBA_fnc_players)] call TerryLib_fnc_unitsOrderedByProximityToPos;
_closestPlayer = (_closestPlayers#0)#1;
_targetPos = getPos _closestPlayer;
systemChat format["CQB targeting: %1", name _closestPlayer];
} else {
_radius = parseNumber(_args#0);
};
{
systemchat format["group: %1, CQB - radius: %2 on _pos: %3", _x, _radius, _targetPos];
[_x, true, true] call lambs_wp_fnc_taskReset;
// Execute CQB on wherever the group leader is local
[_x, _targetPos, _radius, 21, [], false] remoteExec ["lambs_wp_fnc_taskCQB", (leader _x)];
} forEach _groups;
}
]``` - that's one of the nastier things I've done in a while 😄 - https://www.youtube.com/watch?v=vl54nbcIf9A
It heavily depends on what you want to do.
playSound3D is global effect, but the sound is generated at a static position and doesn't follow the target object. If that's important, then say3D is the only way.
say3D has nicer properties as well in that you can grab the return value and stash it with setVariable - handy if you are using it in a case where you want to be able to immediately cancel the audio (or allow the player to cancel it) - or just want to do some lasting emotional damage by having a drone blast psyop music when it gets close to a player [https://youtu.be/nyXV0Ext2zk?feature=shared&t=95] 😈
yup aware of that I should of put that as a note on the comment your correct
hello im have problem with create server to play with my friends
Not scripting, check #server_admins or #server_windows / #server_linux
thanks
anyone? i have script which particles i would like to see from further away
maybe not possible without video settings but I didnt notice distance setting in there either
What would be a good alternative way for waypoint statements? I was told that they activate globally - is there any other method people would recommend?
(Not sure if they are global or not, but if they are)
If you only want some code in a waypoint to run once, just check if the group is local since they'd only be local to one machine.
Alternatively, set some variable globally to say whether the code has run or not, and add a check before doing anything
hmmm a check out probably be good..
I'm basically wanting a truck to drive from A to B - activating when at B, activating when at A - then it loops basically
network messages don't arrive deterministically. you have to have the local check either way (or perhaps better, a server check)
have you actually verified this? it makes no sense for waypoint statements to be global (unless the local computer sends a remote exec message)
i verified using this: ```sqf
_idx = currentWaypoint testgr;
[testgr,_idx] setWaypointStatements ["true", "hint format ['arrived']; diag_log 'ARRIVED'; "];
It's absolutely true. Antistasi had several related bugs because the author thought it was local-only.
Stuck if !(local this) exitWith {}; on most of them.
Okay maybe I should go ahead with a similar approach then? because the code itself is pretty solid (from my end anyway, it works) it just just executing server and client wise
do you think If i did a similar approach it would work ?
well not work but resolve the issue
I don't know what your issue is.
oh sorry let me explain
I basically have trucks that spawn from player interaction using holdaction
i know createvehicle is global, but the waypoint statements for the trucks randomly go off for the server + every client on the server
the code itself is fine, loops and everything - but to cancel out the statements from being global would that command work you mentioned?
Yes.
Okay great
It's pretty rare that you want setWaypointStatements to exec anything globally.
It should do, I've done basically exactly what @granite sky is suggesting myself in the past - it's just checking if the group leader is local to where the function is run - it'll still run everywhere but it will only get past the exitWith if they are local
Okay great, thanks guys I really appreicate your time!
lambs does it a similar way - that's where I picked it up (they don't negate the check but its same thing) - if you look in their taskPatrol (lambs is a gold mine of "huh, didn't know you could do that" stuff, nkenny and co are amazing)
Honestly it became a meme, because I thought it was working fine - then decided, i'll put it on the dedi and test it out.. this voice line played 30 times
damit where did i put my last post, i want to delete it, now i cant find it
how do i find my last post ?
or the 1 before this
Ctrl+F from:Scotty
If it's so far back you can't find it, you probably don't need to delete it :U
@pallid palm you can also do has: image and has: video - for when you know you posted a dank meme somewhere 😉
i might make a war of the worlds mod with this
it has alot of detail on it
but idk where to start
oh nice
would any one be interested in a (Team respawn Script), that i made, Full Explanation on how to exec the script is in the script
i just love Team Respawn lol
its like when your dead your dead
maybe some one can make my script better
in My Team Respawn Script
you go into spectating mode when you die
So you can watch the other alive players, (or playableUnits if you have Ai on),
you can have your Side Ai on or off,
my Team Respawn Script only deals with (Players and playableUnits)
not other Ai like chopper pilots and other (none playableunits)
also Respawn with the Gear you died with,
can set the amount of (time) till the team respawns,
this Script is a good mission testing Script,
or can be used in the mission ofcorse, only works in MP or DED server
guessing you want to animate it etc?, if so A3OB has a decent few tutorials for it but the rigging process is pretty similar from arma to most other animation but this is more so a question for #arma3_animation or #arma3_model
Walking
And more
Firing animation
It's a mech
A giant robot machine three legs that walks around
Your good
Okay
Is there any way to remove the Post Processing blur on death? I'm making a mission where the character swaps on death, but the blur that begins to happen when you die (before you hit the load save screen) continues to stay on the screen when I switch characters.
player addEventHandler ["Killed", {
sleep 2;
if (alive bob) then {
selectPlayer bob;
};
}];
Do you mean a vanilla blur/death screen?
Yes
Have you done overwriting onPlayerKilled.sqf?
Oh, should I put this eventhandler into there? I haven't really played around with respawns before, so I don't know specifics
ah wait, nevermind. Got it working! Thanks Polpox
Your sleep doesn't do anything, its in unscheduled environment
You probably could play with some BIS bools
Check a3\functions_f\Feedback\fn_feedbackMain.fsm
Is there a way to script a player to be incapacitated? actions and everything?
Only thing I see is setUnconsion but that just ragdolls
Vanilla revive system?
i had to Add this line to my chopper command
would this be the correct way ?
if ( Helo2 distance2D SAA_mapPosition <=310 ) exitWith {
"HQ: Cancled Insertion Call" remoteExec ["systemChat"];
deleteMarker "mkr_LZ2";
SAA_mapPosition = nil;
"HQ: (Map Click: To Close To Huey) You Can Walk There" remoteExec ["systemChat"];
};
it seems to work ok but well you know
Not knowing where you put that code I can only say it looks ok. but you are doing remoteExec which sends the message to every player
How do we know it's correct or not is the answer
hi,
i wanted to make a Mechanized assault by the AI, i have 1 BTR "btr1" and 1 infantry squad "inf1"
i want to make sure that a BTR goes to the TRANSPORT UNLOAD waypoint and NOT move off to its next waypoint until inf1 have dismounted
whats more is that this is sometimes gonna happen under fire which messes up the AI reaction so i know a script is necessary
thnx in advance
What mess, what reaction
the vic would veer off the waypoint and sometimes the infantry only dismounts partially
i've sync'd the TRANSPORT UNLOAD with the infantry's GET OUT waypoint as well, which works most of the time when there is no contact
- Use
allowFleeingto make them more patience to getting shot - Use some condition (maybe
crew) to check if all passengers left the BMP disableAIand ordoStopto make BMP patient
Some thoughts
do u have an example for the 2nd one please
count crew == count units this
in BMP's WP's condition
ty
oh cool thx guys if it Looks good it Cooks good @proven charm @warm hedge
and yes thats what i wanted to send the message to all players @proven charm
see the message is from HQ: so all is in contact with HQ:
I have been looking for a command or script not sure that would add every weapon etc to an arsenal or does it have to be done one by one ? Please be kind I have never done anything like this before so have no experiance
every weapon is already in the arsenal @bronze tulip
Does that mean if I add a crate etc then every weapon will be in it automaticaly
yes if you put this line in the init of the ammo box or create
this addAction ["<t color='#ff1111'>BIS Arsenal</t>",{["Open",true] spawn BIS_fnc_arsenal}];
we could get fancy and add and certain distance for when the text would show up, btw some people may not be able to enter the box, if they don't know how, you may have to tell them, i found some people cant seem to figure out how to enter the box, (they end up saying the box is empty) and i say no its not empty, the other way up there is the easy way for people to enter the box, Cuz the BIS Arsenal text shows up Auto, im sorry to say you never know who your dealing with so we may have to Dumb things down to help people, most people don't have all the controls set up, all you need to enter the box would be (per and next) keys binds
this addAction ["<t color='#ff1111'>BIS Arsenal</t>", {["Open",true] spawn BIS_fnc_arsenal},"",1,false,true,"","(_target distance _this) < 5"];
oh thank you that really helps
awsome m8 rgr that
I'm an exoperator and just found arma and want to make missions based around stuff I used to do lol
operator as in CNC operator ?
i was CNC Machinst for 25 years it was awsome i loved it
G and M code
lol I do do a bit of CNC and CAD CAM but no I was a military person
nice nice yes awsome
i was also military Air Force
oh now i see what you ment by exoperator
@bronze tulip biki welcomes you https://community.bistudio.com/wiki/Category:Arma_3:_Editing 👌
@bronze tulip if you want to remove all the other stuff from the box or create then you would need this
this allowdamage false;
clearMagazineCargoGlobal this;
clearWeaponCargoGlobal this;
clearItemCargoGlobal this;
clearBackpackCargoGlobal this;
this addAction ["<t color='#ff1111'>BIS Arsenal</t>", {["Open",true] spawn BIS_fnc_arsenal},"",1,false,true,"","(_target distance _this) < 5"];
also this would make the box unable to be destroyed
cool thanks
rgr m8
btw every one in discord is very nice and helpful, lots of good great people in here, lots of them have helped me in many many ways, love the guys in here
in this channel i mean anyway 🙂
some of my fav people in here are @proven charm @warm hedge @analog mulch @split ruin @wild star i may be forgetting others sorry if i did
i wanna change the face identityTypes[] = {"Head_TK","LanguagePER_F","G_IRAN_default"};
wheen i change it to any in the end the faction mod's unit now has default face instead of desireed, how to fix this
//@superman
[_this,"AsianHead_A3_02","male03CHI"] call BIS_fnc_setIdentity;
thx, i mean in the cfvehicles.cpp file for editing a factgion unit
sqf
class O_ONEW_Civilian_ALMAS_10 : O_Soldier_LAT_F_OCimport_02 {
author = "john";
scope = 2;
scopeCurator = 2;
displayName = "Civilian [ALMAS]";
side = 0;
faction = "O_NEW";
identityTypes[] = {"Head_TK","LanguagePER_F","G_IRAN_default"};
uniformClass = "CFP_U_WorkUniform_BlackGrey";
backpack = "B_AssaultPack_cbr";
ALiVE_orbatCreator_loadout[] = {{"CUP_arifle_AK74M_railed","","","",{"CUP_30Rnd_545x39_AK74M_M",30},{},""},{"launch_I_Titan_short_F","","","",{"Titan_AT",1},{},""},{"CUP_hgun_Glock17_tan","","","",{"CUP_17Rnd_9x19_glock17",17},{},""},{"CFP_U_WorkUniform_BlackGrey",{{"CUP_HandGrenade_RGO",1,1},{"CUP_17Rnd_9x19_glock17",2,17},{"CUP_30Rnd_545x39_AK74M_M",2,30}}},{"CUP_V_B_PASGT_no_bags",{{"CUP_30Rnd_545x39_AK74M_M",2,30}}},{"B_AssaultPack_cbr",{{"CUP_30Rnd_545x39_AK74M_M",2,30},{"APERSMine_Range_Mag",2,1}}},"CUP_H_PASGTv2_WDL","",{},{"ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch",""}};
class EventHandlers : EventHandlers {
class CBA_Extended_EventHandlers : CBA_Extended_EventHandlers_base {};
class ALiVE_orbatCreator {
init = "if (local (_this select 0)) then {_onSpawn = {_this = _this select 0;sleep 0.2; _backpack = gettext(configfile >> 'cfgvehicles' >> (typeof _this) >> 'backpack'); waituntil {sleep 0.2; backpack _this == _backpack};if !(_this getVariable ['ALiVE_OverrideLoadout',false]) then {_loadout = getArray(configFile >> 'CfgVehicles' >> (typeOf _this) >> 'ALiVE_orbatCreator_loadout'); _this setunitloadout _loadout;reload _this};};_this spawn _onSpawn;(_this select 0) addMPEventHandler ['MPRespawn', _onSpawn];};";
};
};
// custom attributes (do not delete)
ALiVE_orbatCreator_owned = 1;
};````
for example
oh welll umm ok
ho do i make sure the face is set to whjat i want, cause when i do face = , it doesnt work
well this is not for me m8 i was thinking way simple
i really don't do mods as it were
some one else will have to help you m8, i dont know that much
ok
but i tryed lol
np
thx for understanding my brother
Hi There everyone I'm super new here, anyone know how to make a test server?
You setup a normal server and then change the name to test server and slap a password on it 
https://community.bistudio.com/wiki/Arma_3_Dedicated_Server
Oh wow so Ive already done that nice!! I played offline for 15 years then got online 2years ago, just learning Arma is just a rough blade that can be honed any way you can write code, so Im needing to learn it lol
Thanks in advance brothers n sisters
I started on the 509th for 3k hrs lol
Truly one of the best wasteland experiences Ive had
I think Ai should be more widely used in fixing and creating code nowadays if its possible
🤣
AI cant code that well
It is easy to realize ChatGPT doesn't run Arma 3
ya I wondered how it would do lol
people sometimes come here with AI generated scripts and they dont work 🙂
ah
I think Ai should be more widely used in fixing and creating code nowadays if its possible
It very much is not possible at present, the AI's all suck to a various extent
I'd be astounded if they did, the state of the art AI's fail on massively popular programming languages never mind something as esoteric (from the point of view of the amount of training data) as SQF
ya it would have to be better at learning what is a desired outcome and how to make it through code
it would have to be more than an advanced autocomplete that understands nothing about context and hallucinates when it's off the reservation
I've been programming for 30 odd years, I've yet to see an AI generate code that I'd find acceptable from an engineer even when the problem it's asked is so common you could google it faster than type in the problem.. - the whole thing is borderline a scam backed by VC's with a vested interest in people overestimating its abilities
No current AI is able to code properly. For extremely widely used languages they can give you code generated based on documentation / existing code but all of that is just copying/adapting existing stuff.
Even then it only works on simple concepts.
With small niche languages (such as SQF) your results are basically about as stable as asking a homeless man on drugs to code for you.
Asking (for example) ChatGPT to write a SIMPLE script in SQF he'll give you code utilizing commands/functions that do not exist.
yes indeed like an overpopular calculator
I put code generating AI's in the same category as self driving cars - "next 5 years" for the last 15 years - they may get there one day but it won't be LLM's that do - simply not a good fit for the problem
ah nice, I always wanted to make something that made the store clerks in the wasteland shit talk players lol
Like "Get that gun outta my face!"
how about the fix for the invoulentary Burpee the charcter does while running and reholstering any weapon lol
You will always just get garbage from an AI, or mediocre at best.
Because AIs will/are trained on other AI generated content as well as actual code. You get a feedback loop of worse and worse code
😉
Do toJSON and fromJSON commands support nested arrays?
TIAS, but yes it does
GET OUT is super buggy and I would recommend never using it.
Common thing is that they'll get out at a much earlier move waypoint for no apparent reason at all.
Yeah I tested few times, somes the SL will get out then rest of the unit other times a few units but not the SL
Yeah exactly wut happenned
Do u recommend an alternative way?
What seems to work fine is just giving the cargo units a move waypoint. Then they don't get out until the crew get the transport unload waypoint.
You can sync them, but it doesn't seem to matter.
They might still get out if under fire. You can avoid that using other mechanisms if needed.
my first thought is to change the behaviour to careless, both inf and veh
I am workibg on a pvp scenario where players are supposed to lead hordes of ai soldiers against each other and make this mlre lf a war of attrition type mission where players need to think how they use their troops to destroy opposition "cheaper" than opposition ddstroys them. Grinding miserable frontline warfare.
Well. Many lf the mechanics i have been playing around with seem to work great, but id like to visualize what is happwning and id like to make a frontline script that displays areas cobtrolled by both teams as large sectors and maybe leaves a gray zone between the areas where foghting is happening. I am nlw wondering is i should draw a area that for example is outlined by furthermost capture points?
Im looking for inspiration by asking how would you approach problem like this? What is your first thought about makkng something like this?
yeah i tried that, problem is that i want them to also return fire and BTR to cover them if they see the enemy during the disembark
in that case you can just change the behaviour of the driver
seems like it affects the entire group
try with this
https://community.bistudio.com/wiki/setCombatBehaviour
I have this script that Im trying to run for client side with some server side explosions. I get an error about a missing ; on line 17 but there is one there so Im confused. Could someone take a quick look?
params ["_target"];
// Dust cloud local particle
private _dust = "#particlesource" createVehicleLocal (getPos _target);
_dust setParticleParams [
["\A3\data_f\ParticleEffects\Universal\Universal.p3d",16,7,48],
"", "Billboard", 1, 10,
[0,0,0], [0,0,2], 1, 10, 7.9, 0.1, [3,8],
[[1,1,1,0.4],[1,1,1,0]], [0.5], 1, 0, "", "", _target
];
_dust setParticleRandom [3, [5,5,2], [0,0,0], 0.1, 0.5, [0,0,0,0], 0, 0];
_dust setDropInterval 0.01;
// Camera shake if player nearby
if (player distance _target < 200) then {
player setCamShake [10, 3, 20];
};
there is no setCamShake command
Gpt said there is 😃
Gpt is useless in most coding applications and with SQF it just halucinates whatever it needs
It doesnt know all but it gets you pretty damn close and breaks down what things are trying to do. It helped me make a script that randomizes building and other objects exploding having the rubble objects appear and smoke pillars, plus random fire in random distance from center of the blown up buildings. That would have taken days for me to try and do constantly asking questions here and since most of the information is on the forums that have been down for months, it was very f'n usefull.
Chatgpt is pretty good for making small functional parts those you can them glue together yourself
Without any of the knowledge you'd gain about sqf and/or general programming.
it gives me a break down of why code is being run the way it is and whats being called on which in turns gives me a better idea of how the coding works which here I barley get any idea of how something works. The forums used to give the explanations but in BI's wonderful wisdom, they seem to have killed the forums with years of information. With the amount of people trying to get info at the same time, everyones questions and answers are lost in the mix.. Now if chatGPT can get me closer to understanding, then I'll take it.
It gives me a break down of why code is being run the way it is and what's being called on
It gave you a command that didn't even exist
which here I [barely] get any idea of how something works.
Ask. That's all you'd need to do to get more information
Now if ChatGPT can get me closer to understanding, then I'll take it
It's not going to be giving you good advice, it's a collection of advice that's been mashed together into nonsense. The vast majority of code is going to be okay at best, you're not going to be getting good advice.
Hell there have been people here who've brought ChatGPT code that's along the lines of player = ... which makes no sense in the context of SQF.
100% agree 
I know some people have brought some other ChatGPT models that were trained on Arma / sqf, and it's still just giving you nonsense. Garbage in, garbage out.
Not to mention all the negative environmental effects
As I said above, it doesn't know all but it gets close. Yeah, out of the long script it help me make, it got ONE thing wrong and I didnt double check it. Was the rest of that code snippet right? Did it get me closer to my goal, yeah. Does it help me know what years of coding in school would give, fuck no. Again its a helpful tool that got me further in a couple hours then if I asked here which would of been days. You ask it the right questions and give it the right info and it helps. Are you around 24/7, hell no you guys are not.
thnx, i'll test out this with the driver
the issue is then "it doesn't work" and you will still need someone to understand what the AI did (or tried to) - and you cannot know if the AI does something wrong in the process or not, even if it seems to work. AI can help development, but you still have to know the basics and cannot expect the AI to do it all
(we have an old enough pinned message to address this very situation ^^)
Hello There! Not sure if this is the correct channel to ask this question, but this is the most fitting one I could find.
I was trying to figure out if it is possible to create an ACRE2 radio source, that is tied to a specific channel on the teamspeak server.
I was trying to do a scenario with radio stations that you can decipher to get some additional information.
I have the teamspeak client setup on the server to transmit the audio on specified channels, but I can't figure out the API as I am not really proficient in C++.
If anyone knows anything about the ACRE2 API, any help would be greatly appreciated.
Could try asking in the ace discord, there's an acre specific channel there
I see, thanks, I will try to ask there.
How would i write a script where the ai every 60 seconds will shoot an artillery shell?
I'm tired of going in and out of zeus to give them an artillery module
The command is doArtilleryFire
You can probably do it with other forced weapon fire commands, but with that one it'll aim properly.
Example:
private _artyTarget = getMarkerPos "arty_target";
while { true } do {
Arty1 doArtilleryFire [_artyTarget, (getArtilleryAmmo [Arty1] select 0), 1];
sleep 60;
Arty1 setVehicleAmmo 1;
};
this should work
wow thats cool @thin fox
so umm @thin fox could we make more markers and selectRandom
ofcorse it would have to be inside the while { true } do { loop im guessing
@spiral canyon when you get a erra it always at the line before the said line, like if it says line 60 then the erras at line 59
This addAction["Open Gate",{remoteExec[OB1 hideObject True];}];
I know I am likely using remoteExec wrong here, and I am having trouble figuring it out.
So basically what the line originally was supposed to do was simply make a wall disappear and allow players through, then a trigger would unhide the object.
What exactly am I doing wrong?
ummm im not sure m8
i would just delete the object
but i try doing things the simple way
but thats just me
Yeah.... I wish I could keep things relatively simple with my mission making.
yes simple is better imho
I have only tested the code on my pc, and have yet to test it on my server.
copy that
you can alway read the RPT file to see kinda whats going on
most times the RPT file can help you see things
but theres alot of info in the RPT file so its kinda hard to read
I've been using that mainly for when we get big error's, and I have learned how to do that over time.
if you do try to read the RPT file go right to the bottom line and go up from there
My main concern is that my script actually works on everyone's pc, rather than clientside.
nice
i really don't know that much i just try to help
i fail most times
oh good you know about the RPT file awsome
most times i help people by misstake lol but at least i try
It's all good.
cool thx m8
Hello,
Correct syntax to remoteExec is
[arg1 , arg2] remoteExec
[event, targets]
[OB1, true] remoteExec ["hideObject",0];
class Custom_MBT_02_cannon_F : O_MBT_02_cannon_F
{
side = 1;
scope = 2;
crew = "Custom_Uniform_TShirt";
faction = "Custom_Faction";
displayName = "Custom M-ATV MRAP";
hiddenSelections[] = {"Camo1","Camo2"};
hiddenSelectionsTextures[] = {"Noval_Texture\Data\MBT_02_body_co.paa","Noval_Texture\Data\MBT_02_turret_co.paa"};
};
Can someone help me with this script, I always get the error 'O_MBT_02_cannon_F'. Sorry I'm still a newbie in Arma 3 and still learning about Script.
you might have better luck in https://discord.com/channels/105462288051380224/122121444703338496
but it sounds O_MBT_02_cannon_F is not defined, just a guess
@foggy spear
here i collored it for you m8
class Custom_MBT_02_cannon_F : O_MBT_02_cannon_F
{
side = 1;
scope = 2;
crew = "Custom_Uniform_TShirt";
faction = "Custom_Faction";
displayName = "Custom M-ATV MRAP";
hiddenSelections[] = {"Camo1","Camo2"};
hiddenSelectionsTextures[] =
{
"Noval_Texture\Data\MBT_02_body_co.paa",
"Noval_Texture\Data\MBT_02_turret_co.paa"
};
};
yeah i always get errors not defined
now its easyer to read
Thanks, I will try it and hopefully the script will work.
you should probably put ```
class O_MBT_02_cannon_F;
yeah i dont know eather
Oke i will try it and hopefully the script will work.
or maybe this line should just be class Custom_MBT_02_cannon_F :
or may be just class Custom_MBT_02_cannon_F
i really dont know for sure
okay
Yes, of course, if it makes sense for your scenario. Make an array with markers outside and before the loop and then use selectRandom command inside the while loop
finally my script works completely, Thx Guys
I forgot to add O_MBT_02_cannon_F. At the beginning of the Script which makes it undefined
class LandVehicle;
class B_G_Offroad_01_F;
class B_G_Offroad_01_armed_F;
class B_MRAP_01_F;
class B_MRAP_01_HMG_F;
class B_Heli_Light_01_F;
class O_MBT_02_cannon_F;
Yeah, this is where I forgot
ahh ok cool
HI New to Arma 3 scripting stuff here, Not even sure if this even scripting but Is there a way to make certain fire support modules and make them execute multiple fire support instead of single fire support around its location?
yeah
Does anyone know how to make a vtol plane land?
i don't even know what a vtol plane is, hmmmm
Are we deadass
I’ll take any pointers.
what did u try already did u try waypoints or something like that
or did u try scripting ?
Well I tried waypoints In this order, move,move,land,transport unload, move,land.
really why
i don't know if its the same for plane's as it is for choppers but
this is what i use for choppers
waitUntil { sleep 3; (helo2 distance pad2LZ <=140) or !alive Helo2 or !canMove Helo2 or !alive Pilot2 };
helo2 land "land";
I don’t understand any of this
umm you do know this is the scripting channel right
maybe you should try https://discord.com/channels/105462288051380224/115333379133669382
thats funny i love scripting even tho im not so good at it
I don't know about vtol, but if it's an airfield (registered as one in the map), using land waypoint it should land, test with another plane
but what are you trying to achieve? land like in an airfield or just unload the troops?
On a unrelated note: what were
You trying to script.
@thin fox has the right idea
I want it to go in vtol mode and land to drop off infantry. Then I want it to go back to the airfield.
for the first one you can just use "transport unload", the "land" afaik only works for airfields
Oh
now i know what a vtol is 🙂
Scotty I’ll learn scripting just for you
cool thx m8 you will love it
I don't remember If this waypoint actually lands heli/vtol
What waypoint
It lands both
awsome
Soooooooo
I’ll record my findings.
it will land automatic, wait until all units get out, and then leave/hover
just think of it, i was able to turn some hate into love woohoo
with the help of others ofcorce
anyone succeeded with Prairie Fire radio support custom config ? Air support doesn't have ammo to execute the airstrike 😔
I used the provided config in decription.ext
its a DLC not a mod lol
well yeah
my bad
he keeps asking me to get the DLC all the time
he dont even play Arma any more
i cant beleive it tho
this is the best DLC thats why 🙂
yes i like Nam stuff
his voice is in some of the Air strike stuff he says he dont like hearing his own voice lol
and he says thats why he dont play Arma any more lol
probably he is Nam veteran and still have PTSD ... 😂
hard stuff if he realized who was the baddies in the story
yup
i remember seeing nam on tv when i was in school
im only 64
they let us watch the war on tv in school
but getting back to your point i guess i cant help you m8 sorry
actualy the reason he wants me to get Prairie Fire is cuz he gets money every time someome gets Prairie Fire DLC
witch is understantable
this didn't happen
1: the VTOL aircraft took off and left some infantry behind. 2: it circled the runway area a few times (probably to pick up the ai) 3: the VTOL aircraft then missed the "transport drop off" waypoint. 4: it crashed into a rock, taking president obama with it 😦
sad days
you know i found waypoints to be very freeky so that's the reason i learn some scripting
so i dont have any waypoints in any of my missions
i'll use scripting for paradrops and vtol landings.
whats a "script waypoint?"
just want it means you can script waypoints
oh cool.
how would you use script waypoints for paradrops?
ummm i did this in a mission let me look
tell you what ill do, friend me and ill send you my mission with that stuff in it you can do what ever you want with the mission play it or rip it apart and see how i did things ok m8
sent
rgr
I tested it out (vanilla one). It acted weird, he does a circle before landing, but it does land and drop off troops.
If the troops are outside of the aircraft and they need to get into, the aircraft will not wait the soldiers to move out, you need to sync waypoints for that
hes playing my mission atm i think we will see what he says after i think
he may be into a hole new thing after he plays my mission lol
hes been in there a long time he may be getting his ass shot up he he
wow he must be fighting his ass off he's been in my mission for a long time now
i have it set to only 10 respawns so it may not be much longer
awsome he must be having lots of fun hes still in there
Simple sqf binary command execution time in Intercept is ~10 microseconds.
like setPosASL and createVehicle
Hello guys! Im wanting to create a mission for my friends, and i want to use triggers to play music and other stuff.
The only issue i am currently facing is, that it works in local MP session, and also in SP, but if i put the mission on a dedicated server, the triggers wont do a thing.... i dont get any errors ingame or in the .rpt file - would anyone be able to help me here? :/
What command are you using to play music?
Well its a trigger and a mod which lets me play music on activation and i made it "server only"
But i also have other triggers with on activation - which will unhide units ect...
actually even better:
2016-01-11 20:22:50,998-{INFO }- SQF call create_vehicle: 37 microseconds
2016-01-11 20:22:50,998-{INFO }- SQF call set_pos_asl: 2 microseconds
2016-01-11 20:22:50,998-{INFO }- SQF call set_vector_dir: 1 microseconds
2016-01-11 20:22:50,998-{INFO }- SQF call set_velocity: 1 microseconds
untick the server only thing and try again