#arma3_scripting

1 messages · Page 187 of 1

tidal idol
#

Is there some way I can get a unit's SITREP via script? Like if you sent it via commands and the guy would call back "I need ammo", I want to tell if a unit needs ammo, but don't necessarily want to fall back on config-defined loadouts because loadouts may be edited.

tulip ridge
split scarab
#

Oh man I'm struggling with these damn dog "agents", is there no way to synchronize them between players?

warm hedge
#

Sync as in synchronizeObjectsAdd?

split scarab
#

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

warm hedge
#

So locality of Agent in dedi is the question? 🤔

split scarab
#

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;
};
warm hedge
#

And basically you want to follow a client's dog to the client player?

split scarab
#

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

granite sky
#

Do you need them to be agents?

split scarab
#

I suppose not, didn't know it was possible to spawn dogs any other way

granite sky
#

You can spawn them as units. It's what Antistasi does.

split scarab
#

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

granite sky
#

Agents don't get used much. They're probably even more busted than the rest of Arma.

split scarab
#

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

granite sky
#

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.

split scarab
#

Yeah Civ

granite sky
#

For whatever reason, creating a unit in a group doesn't change its side, but joining it into a group does.

split scarab
#

Hmm, _dog joinSilent _grp; didn't work

#

Ah wait, think I didn't save the changes

#

Nope didn't work

granite sky
#

Works for me. Did you join it to another group first?

split scarab
#

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

spiral canyon
#

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.

mint flame
#

@granite sky hi sir do u perhaps have scripr for artillery

granite sky
#

Then the enemy treats them as civilian.

spiral canyon
split scarab
spiral canyon
split scarab
granite sky
#

setCaptive doesn't have any effect on the captives.

spiral canyon
#

Oh ok. I thought it made them captive so they couldnt do anything

granite sky
#

There's an ACE thing where you handcuff people and they lose functionality, but setCaptive itself just makes them look civilian to everyone else.

split scarab
# spiral canyon cool, Ill give that a try. Thanks

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

spiral canyon
#

Your awesome, thanks!

spiral canyon
granite sky
#

Do you put that on AIs or just players?

drowsy geyser
#

can cursorObject also detect simpleObjects?

warm hedge
#

Should be

stable dune
potent aurora
#

Hey, i have a workshop mod that spams the chat with messages, can i check what mod causes that?

warm hedge
#

That is called "unload some Mods and see you hit the jackpot" process

tender fossil
pallid palm
#

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

proven charm
#

group should stay

pallid palm
#

so he will stay the leader @proven charm

proven charm
#

yeah

pallid palm
#

ok what about if the leader is a player and the rest of the group is Ai

proven charm
#

same thing

pallid palm
#

hmmm ok

#

i always make the leader the highest Rank also, so it should work i guess

proven charm
#

ranks dont matter, i know because i just tested in MP editor 😉

pallid palm
#

really ok cool thx m8 @proven charm

proven charm
#

np

#

but i assume its the same with dedi

pallid palm
#

yeah im not sure about that myself

proven charm
#

you can always test

pallid palm
#

thats a roger m8 @proven charm

proven charm
#

make quick mp mission for testing 🙂

pallid palm
#

yes sir will do

#

i have seen that after the leader dies and respawns for about 30 seconds another ai takes the lead

proven charm
#

oh

#

maybe it happens only after longer time such as 30

pallid palm
#

yes i think its the same like if any Ai dies it takes time for the game to see that the Ai is dead

proven charm
#

thats probably for the "effect" to give impression leader doesnt always know everything

pallid palm
#

right

proven charm
#

well 30 sec respawn was ok in editor

pallid palm
#

yes i saw after all my Ai were dead i still see the team marker is still on them for some time

proven charm
#

yup

pallid palm
#

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

proven charm
#

maybe AIs cant respawn. vehicles can though

pallid palm
#

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

drowsy geyser
# stable dune Yes it does

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>

pallid palm
#

why the 0 befor the spawn i never saw that befor

#

should it be [] spawn

faint burrow
#

It can be anything, for example, objNull spawn { ... };. I prefer array.

pallid palm
#

copy that

proven charm
mint flame
#

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

pallid palm
#

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

tidal idol
tulip ridge
thin fox
#

Did you test it with vanilla assets, no mods, etc?

split scarab
split scarab
#

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];
granite sky
#

_unit isKindOf "CAManBase"

#

There's probably a more technically correct method but that's hours of fiddling with config.

split scarab
#

Nothing similar to how nearestObjects [player, ["house"], 200]; works? Like how you can give it "man" or "animal" but the other way around?

tulip ridge
faint burrow
tulip ridge
#

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
faint burrow
#

What about alt syntax?

tulip ridge
#

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
regal kraken
#

thanks for the help, its now working after removing those remote-execs, cheered when it worked lol

thanks for your patience

split ruin
#

how you make code look cool?

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```

// your code here
hint "good!";
split ruin
#
hint "thanks";
sly cape
#

Is there a way to lock something in place without disabling simulation.

winter rose
#

depends on what you want how

sly cape
#

I want a radar to not be able to move even if it's pushed or something.

winter rose
#

you can attachTo a GameLogic, it will be unmovable

sly cape
#

Thanks, I didn't think of that.

winter rose
#

(still be destroyable, unless you make it invincible ofc!)

sullen robin
#

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

proven charm
#

it should be simple as player setvariable ["MARTA_hide",(player getvariable ["MARTA_hide",[]]) + [_group]]; but no guarantees 🙂

thin fox
sullen robin
tough abyss
#

can someone help me install grad_replay cause i cant install A3RR (steam workshop aint working for me)

pale wagon
#

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?

pallid palm
#
// keep the markers and use this for selectRandom marker
_mrk = selectRandom ["poi_1","poi_2","poi_3","poi_4","poi_5","poi_6"];
pale wagon
#

Oh sick. I didn't think it would just read the x/y of the marker without some crazy scripting

pallid palm
#

rgr that m8

granite sky
#

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"

pallid palm
#
// 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

versed belfry
#

Is there a way to figure out the workshop ID of an addon in-game using configs?

pallid palm
#

man that's a tuff one i have no idea

digital hollow
#

getLoadedModsInfo

versed belfry
granite sky
#

If isOfficial is false then it should be a steam workshop ID (or 0)

versed belfry
#

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.

pallid palm
#

holy crap thats way beond my skill level

granite sky
#

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.

versed belfry
#

Not meant to be ran through gameplay

versed belfry
#
_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;
versed belfry
#

Damn it, gonna figure out where I went wrong tomorrow, I need sleep now, it's 6 AM already ;-;

granite sky
#

That won't work because it lacks the mod folder -> ID translation, but I'm not sure why it would crash.

versed belfry
#

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;
granite sky
#

I dunno, I don't think your last code paste is what you're using.

versed belfry
#

Yep, sent the one above as the latest one that works

granite sky
#

configSourceMod doesn't return an ID though. It returns a folder.

versed belfry
#

Oh wait... is it becasue I am running it through a hemtt launch...?

granite sky
#

I imagine it's because the mod's in a folder named with the workshop ID. Fairly common for servers.

versed belfry
#

Well I was running this locally, so wouldn't be a server issue

granite sky
#

If I run that line here I get "@Advanced Developer Tools", because that's where it is.

versed belfry
#

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

versed belfry
#

This is what I get when I launch the game normally

granite sky
#

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
versed belfry
jade abyss
#

Have you got a link for me?

#

currently made it with: get complete gear -> Get the mass of each single item -> blablabla

weary zodiac
#

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?

cosmic lichen
#

Pylons need to be set up per vehicle config. Nothing you can do about it without modding it.

pallid palm
#

hello all what is (Vcom) or em i texting that wrong

#

is it like Visual Studio ?

warm hedge
#

An AI Mod

pallid palm
#

oh ok isee thx m8

winter rose
#

we're faster than Google 😎

pallid palm
#

yes agree

#

way faster

#

and in less words also

#

but i get your point @winter rose lol

winter rose
#

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)

pallid palm
#

i got ya Lou, im ok with it all , lol

proven charm
#

customer service 😉

pallid palm
#

hell yeah

winter rose
#

let's not forget we are humans, after all :p

proven charm
#

lol, thx for reminding me (that we all are)

pallid palm
#

yup im for sure not a bot

pallid palm
#

lol thats funny lol

broken pivot
#

# 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?

pallid palm
#

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

broken pivot
#

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]

pallid palm
#

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

broken pivot
#

Im sending you everything with no limitation. Im not one of the copyright freaks hahaha

pallid palm
#

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

winter rose
#

it might simply be wrong script design - what is it that requires so much network?

pallid palm
#

hes useing Liberation

broken pivot
#

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

broken pivot
pallid palm
#

i'm failing to understand the need for 3 HC's

broken pivot
#

I thought that it brings in more performance then using 1 HC

pallid palm
#

hmmm yeah i wish i knew more about this

broken pivot
#

I would test this:


ImNotGoodAtRemoteExec remoteExec [{ if ((count units _x) == 0) then {deleteGroup _x;}; } forEach allGroups, 0, true];```
pallid palm
#

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

winter rose
#

or maybe that's it
that's the best civilisation has achieved
we can't go further

who knows

hallow mortar
winter rose
#

anyway, they are nowhere near the 288 groups limit nor should it crash a server

pallid palm
#

i was thinking it was 144 groups

hallow mortar
#

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.

pallid palm
#

ahh cool thx @winter rose

#

i guess the old Arma 2 days was going in my head

broken pivot
hallow mortar
#

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

broken pivot
#

Its not impossible

pallid palm
#

so @winter rose is this correct the group usually gets immediately auto-deleted ?

hallow mortar
broken pivot
#

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..

pallid palm
#

cool yes because some times i count the groups in a mission for win condition @winter rose

hallow mortar
# broken pivot **# Hey there ^^** Yesterday we had multiple unexplainable "crashes" on our ser...

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)
broken pivot
#

link to an good example

faint oasis
#

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

broken pivot
#

@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.

versed belfry
# granite sky Building the hashmap: ```sqf private _folderToID = createHashMap; { _x params ...

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;
winter rose
pallid palm
#

oh cool thx @winter rose

#

so that line counts all groups of all factions is that correct @winter rose

winter rose
#

it checks if said group has one unit

pallid palm
#

oh ok cool

broken pivot
#

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?

tulip ridge
#

Groups aren't specific to factions, do you mean the groups in each side?

pallid palm
#

yes @tulip ridge

#

oh cool ok thx m8 @tulip ridge

#

wow thats Awsome so simple and easy woohoo

granite sky
#

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.

little raptor
#

remoteExec ["true"] is kinda funny 😂

winter rose
#

no!

proven charm
#

i have always wondered, is true in arma a command or variable?

pallid palm
#

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

proven charm
#

perhaps no one knows... hmmyes

pallid palm
#

lol yeah they know

proven charm
#

there is a command that gives you the list of all commands but I forgot its name

proven charm
#

i dont mean the page 🙂

pallid palm
#

ok sorry lol

winter rose
winter rose
thin fox
oblique arrow
#

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?

granite sky
#

No.

tulip ridge
granite sky
#

The usual way of attaching information to items is to define ~1000 of them in config :/

oblique arrow
#

oki fair

lime rapids
#

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)

hushed turtle
warm hedge
#

"until an Arma 2 patch"

sly cape
shut flower
#

Hey, is there a possibility to increase the height of a listbox item? Or to make a new line space in a listbox?

little raptor
#

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

hushed turtle
#

Aha, I see now. Thanks for clarification. blobcloseenjoy

#

Sounds like something, which could happen

sudden yacht
#

Im trying to find it, if i recall there is an event handler for chat?

sudden yacht
#

ty

#

MY HERO! 🙂

winter rose
drifting badge
#

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!)

drifting badge
#

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.

sharp grotto
#

can just add addactions to the player or keybind etc to execute that

drifting badge
#

oh ok, thank you very much! will see if I can get that to work :)

stray kindle
jade abyss
#

!!!! @stray kindle THX ALOT!

drifting badge
#

thanks mate, we actually managed to cobble something together via addaction and a sqf script

jade abyss
#

No need to. Need it for something different 😉

drifting badge
#

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?

stray kindle
#

Rgr, good luck 😃

drifting badge
#

(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

versed trail
#

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

little raptor
versed trail
#

hm, ok. different issue then.

little raptor
#

regarding data seeming to be dropped, it could be a race condition, or sending large data, or...

versed trail
#

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)

little raptor
#

I mean you could be right, but first rule out other possibilities

jade abyss
#

meh... only works for players

#

Seems like, i have to leave it, like it is, hmpf.

dim elk
#

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;
};
tender fossil
hallow mortar
tender fossil
#

Had no idea that lazy eval requires that

granite sky
#

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.

hallow mortar
#

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)

granite sky
#

Either sideUnknown or nil would be logical. Otherwise it's some very weird type mixing.

left haven
#

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?

jaunty basin
#

hi guys is there any way that I can make my friend high command and add units to him AFTER we enter the scenario

granite sky
left haven
#

technically some of it was written from other projects i had tried admittedly

granite sky
left haven
#

Let me go and have a read; thank you!

granite sky
#

Mod PBOs have a prefix and you need to include that in the function path.

left haven
#

is this the $PBOPREFIX$?

granite sky
#

Yes and no.

#

Depends what you're using to build the mod.

left haven
#

ahh, ok ok; in terms of building - mikero's tools for packing the pbo and notepad++

granite sky
#

According to that page it's $PBOPREFIX$.txt for mikero, but maybe it works without the extension.

left haven
#

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!

granite sky
#

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.

tulip ridge
#

Thanks Discord for only loading messages after I hit enter

formal grail
#

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.

cyan thunder
#

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

formal grail
cyan thunder
#

@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

digital hollow
#

If you want to get a headache check if any is in the driver's compartment and have them movetodriver directly.

granite sky
cyan thunder
# digital hollow If you want to get a headache check if any is in the driver's compartment and ha...

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 😄

formal grail
granite sky
#

I don't know.

digital hollow
cyan thunder
digital hollow
#

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

cyan thunder
digital hollow
#

fullCrew positionName is not the compartment xD

cyan thunder
#

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

cyan thunder
#

that's already an improvement over "the driver is dead, lets all just sit here quietly and wait for the RPG"

digital hollow
#

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

cyan thunder
#

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 😉 )

digital hollow
#

Very cool. I put a replace gunner module into zen, but this is sorely needed too

cyan thunder
#

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

cyan thunder
#

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.. 🤷‍♂️

south swan
#

3 in "Arma 3" is because each and every piece of content is a combination of 3 unique edge cases :3

little raptor
cyan thunder
#

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

little raptor
south swan
#

(or because some init EH locks half the spots, or some other meme)

#

or maybe a UAV driver gets added silently

cyan thunder
# little raptor the game uses the config tho. if you get a different result it's because you int...

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

little raptor
#

well it's the function's fault then

south swan
#

yaaay, vanilla functions misbehaving?

little raptor
#

what is the class name of the vehicle? and from which mod?

cyan thunder
#

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

little raptor
#

btw did you try fullCrew on the vehicle too? to see what it returns? (it should return the correct number of seats)

cyan thunder
#

would have to use includeEmpty since I'm using that function above to figure out how many people I can put in crew/cargo - 👀

little raptor
#

yeah with empty

cyan thunder
#
    [<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
little raptor
#

why does it have so many commanders and gunners?!

#

I'm sure you can only have 1 of each

cyan thunder
#

Not the mod author but it's a spec ops variant of a normal vic - so it's kinda festooned with guns

little raptor
#

well they shouldn't be gunners tho (i.e primaryGunner). they should just be turrets

#

you are right that the vehicle is misconfigured

cyan thunder
#

🤷‍♂️ 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 😉

little raptor
#

the other guns seem useless right? only the top gun works?

cyan thunder
#

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)

south swan
#

well, i can still get into this thing after having 5 bots onboard

#

ultimate shenanigans

little raptor
#

maybe it was intentionally done to block non-players from using them blobdoggoshruggoogly

south swan
#

up to count crew vehicle player of 9 if i command some bots to enter 😓

cyan thunder
#

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

south swan
#

memes in - memes out

cyan thunder
south swan
#

having them in my squad, selecting all and clicking on the poor vehicle

cyan thunder
#

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)

south swan
#

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

cyan thunder
#

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)

south swan
#

for me that slot was left cargo (idx 1) blobdoggoshruggoogly

#

may be caused by units belonging to different squads (or not)

cyan thunder
#

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) 😄

silent cargo
#

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

granite sky
#

JIP certainly starts before initClient but I'm not sure if it waits for completion. Possible, I guess.

thin fox
untold copper
#

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;
hallow mortar
#

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};
};```
untold copper
#

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!

little raptor
#

by doing +1 you skip one guy

hallow mortar
#

Are you sure? Doesn't that mean selecting the _divPoint index in both selects?

little raptor
#

no. the second item is count not index
selecting from 0 up to divPoint count returns up to index divPoint-1

hallow mortar
#

I know the floor rounding for dealing with odd numbers is probably not exactly correct

little raptor
#

it's fine tho

#

it won't be exactly half but it's ok

versed belfry
#

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%.

little raptor
#

no

versed belfry
#

Damn

#

Was worth asking

vital siren
#

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;
                        };```
regal kraken
#

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

stable dune
regal kraken
#

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?

vital siren
little raptor
#

by hpp file you mean a file you've included in description.ext?

#

if so yes upload it on pastebin

silent cargo
granite sky
#

Well, preinit?

#

I don't know what you mean by "mission functions".

silent cargo
#

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

granite sky
#

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.

silent cargo
#

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

granite sky
#

Nah, most mods don't generate any.

silent cargo
#

Well it loads quickly without mods

granite sky
#

A handful will generate a lot.

#

Sometimes vastly too much.

silent cargo
#

If I dont have mods loaded, the mission doesnt take this long to load

granite sky
#

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.

silent cargo
#

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

silent cargo
#

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

warped hornet
#

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

granite sky
#

hmm. What's in the meta.cpp?

warped hornet
#

ah a publishedid of 0 for some reason

candid narwhal
#

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 Variable isSurrendered (BOOL).
thin fox
candid narwhal
candid narwhal
#

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

hallow mortar
tulip ridge
#

Also use side group _unit

#

And prefix your global variables

hallow mortar
# tulip ridge Also use side group _unit

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.

candid narwhal
hallow mortar
candid narwhal
granite sky
#

There is a weaponChanged event handler, for what it's worth.

#

Running that code every half a second is a pretty minor overhead though.

hallow mortar
hallow mortar
candid narwhal
#

I´ll run it in a ~5 second interval. Feels most Intuitive for this

candid narwhal
hallow mortar
#
(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.

candid narwhal
#

Thank you for that Explanation

#

Just tested it, works wonders thus far <3

granite sky
#

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.

rocky sequoia
#

quick question for MP, is it possible to make it day time for some and night time for others with remoteExec?

granite sky
#

I don't think so. skipTime syncs with the server.

#

Maybe if you spam it on the right frame timing.

rocky sequoia
#

setDate doesn't

granite sky
#

Clients' local date is automatically and periodically synchronised with the server date.

#

Wiki can be wrong. I haven't tried it.

vital siren
regal kraken
#

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?

little raptor
tulip ridge
regal kraken
tulip ridge
#

That would save the server doing stuff with it

vital siren
# little raptor what are you trying to edit? and what do you want to make? a mod? or a mission?

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.

little raptor
still forum
proven charm
#

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?

hushed turtle
#

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

proven charm
#

if they would add lazy eval to && it would probably break scripts

hushed turtle
#

In what situations? It's just avoiding evaluating something you don't need to evaluate

proven charm
#

cant think of a good example but it sounds dangerous. its possible for condition code/function to also set variables etc

warm hedge
#

Not sure why {} is not good for your usage

proven charm
#

that's because your code may become: ```sqf
if(bool && { bool && { bool && { bool && { bool && { bool }}}}})

#

its ugly. and hard to read/modify

vital siren
hushed turtle
#

Why && wasn't lazy eval from the beginning I wonder.

#

I guess this opens up opportunity for lazy eval operator &&&

still forum
#

SQF syntax is the answer

winter rose
#

and "no" is the answer to "can we have it?" 😄

formal grail
#

A &&& or &&? syntax would be nice. Alternatively, a precompiler macro flag maybe?

winter rose
warm hedge
#

AKA "if we nag Dedmen enough"

formal grail
#

:((

winter rose
formal grail
#

Actually yeah I wonder if there is a way to do this with preprocessor macros.

#

Replace a && b with a && {b}

hallow mortar
#

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.

formal grail
#

You would have to parse the RHS as if it's a Code type.

hallow mortar
#

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)

proven charm
#

the eerie silence from the devs when asking a new feature 😁

hushed turtle
#

I would much rather see bug which makes DUI Squad Radar look like eclipse fixed than any new command added

ivory lake
#

dont mess with your fov

#

it breaks a whole lot more than just GUI rotation

proven charm
#

can the particles visibility distance be set via script or is it only affected by visual settings?

pallid palm
#

for some reason i don't like using lazy eval it just sounds to lazy and eval for me 🙂

formal grail
#

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.)

pallid palm
#

@proven charm i know nothing about particles i wish i could help you m8

tender fossil
#

It would be also nice to know why it works that way

winter rose
formal grail
pallid palm
#

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

formal grail
#

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.

still forum
formal grail
#

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.

cyan thunder
thin fox
cyan thunder
#

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) 🤔

exotic gyro
tulip ridge
exotic gyro
winter rose
#

what if you json json

gusty quartz
#

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

cyan thunder
gusty quartz
#

doesn't work, after that you also need to do either forceWeatherChange or skipTime

gusty quartz
cyan thunder
#

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 😄

gusty quartz
#

ok I'll give this a go. Thanks!

tough geode
#

Maybe im just stupid atm. but was the easiest way to check if a point is inside a triangle? ^^

cyan thunder
cyan thunder
#

ah it does, TIL 🙂

#

I mean it should do, assume you tried it?

tough geode
#

Will try it now ^^

#

Yeah does thx. Was searching for triangles or something and didn't thought about polygon atm.

cyan thunder
#

🙂

#

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)

tough geode
#

😄

granite sky
#

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

spiral canyon
#

Im running trigger that blows up multiple things. Is there a way to delay between the explosions? sleep doesnt seem to work.

granite sky
#

spawn then sleep.

#

Sleep is ignored in unscheduled code.

royal quartz
#

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.

spiral canyon
# granite sky spawn then sleep.

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);
granite sky
#

That's kinda bad but should work fine spawned. No dependent vars.

spiral canyon
granite sky
#

It's not spawned.

#

Wrap the whole thing like this:

0 spawn {
  // your code here
};
spiral canyon
#

oh, ok

royal quartz
granite sky
#

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."

royal quartz
viral hinge
#

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.

hallow mortar
#

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"];```
viral hinge
#

Alright, thank you very much. I will keep this in mind for the future.

royal quartz
sterile lava
#

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?

cyan thunder
#
[
    // 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
hallow mortar
cyan thunder
# hallow mortar It heavily depends on what you want to do. `playSound3D` is global effect, _but_...

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] 😈

royal quartz
knotty ridge
#

hello im have problem with create server to play with my friends

knotty ridge
#

thanks

proven charm
#

maybe not possible without video settings but I didnt notice distance setting in there either

regal kraken
#

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?

tulip ridge
regal kraken
#

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

little raptor
little raptor
proven charm
#

i verified using this: ```sqf
_idx = currentWaypoint testgr;

[testgr,_idx] setWaypointStatements ["true", "hint format ['arrived']; diag_log 'ARRIVED'; "];

granite sky
#

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.

regal kraken
#

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

regal kraken
#

well not work but resolve the issue

granite sky
#

I don't know what your issue is.

regal kraken
#

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?

granite sky
#

Yes.

regal kraken
#

Okay great

granite sky
#

It's pretty rare that you want setWaypointStatements to exec anything globally.

cyan thunder
# regal kraken Okay great

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

regal kraken
#

Okay great, thanks guys I really appreicate your time!

cyan thunder
#

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)

regal kraken
#

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

pallid palm
#

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

hallow mortar
#

Ctrl+F from:Scotty

pallid palm
#

cool

#

thx m8

hallow mortar
#

If it's so far back you can't find it, you probably don't need to delete it :U

pallid palm
#

copy that thx m8

#

wow thats realy cool man thx @hallow mortar

cyan thunder
#

@pallid palm you can also do has: image and has: video - for when you know you posted a dank meme somewhere 😉

tepid trail
#

i might make a war of the worlds mod with this

#

it has alot of detail on it

#

but idk where to start

pallid palm
#

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

lime rapids
tepid trail
#

Walking

#

And more

#

Firing animation

#

It's a mech

#

A giant robot machine three legs that walks around

pallid palm
#

oh lol ok i see lol

#

sorry that was not for me lol sorry

tepid trail
#

Your good

west portal
#

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;
        };
}];
warm hedge
#

Do you mean a vanilla blur/death screen?

west portal
warm hedge
#

Have you done overwriting onPlayerKilled.sqf?

west portal
#

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

meager granite
#

You probably could play with some BIS bools

#

Check a3\functions_f\Feedback\fn_feedbackMain.fsm

formal stirrup
#

Is there a way to script a player to be incapacitated? actions and everything?

#

Only thing I see is setUnconsion but that just ragdolls

meager granite
#

Vanilla revive system?

pallid palm
#

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

proven charm
#

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

warm hedge
#

How do we know it's correct or not is the answer

analog mulch
#

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

warm hedge
#

What mess, what reaction

analog mulch
#

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

warm hedge
#
  • Use allowFleeing to make them more patience to getting shot
  • Use some condition (maybe crew) to check if all passengers left the BMP
  • disableAI and or doStop to make BMP patient
#

Some thoughts

analog mulch
#

do u have an example for the 2nd one please

warm hedge
#

count crew == count units this
in BMP's WP's condition

analog mulch
#

ty

pallid palm
#

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:

bronze tulip
#

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

pallid palm
#

every weapon is already in the arsenal @bronze tulip

bronze tulip
#

Does that mean if I add a crate etc then every weapon will be in it automaticaly

pallid palm
#

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"];
bronze tulip
#

oh thank you that really helps

pallid palm
#

awsome m8 rgr that

bronze tulip
#

I'm an exoperator and just found arma and want to make missions based around stuff I used to do lol

pallid palm
#

operator as in CNC operator ?

#

i was CNC Machinst for 25 years it was awsome i loved it

#

G and M code

bronze tulip
#

lol I do do a bit of CNC and CAD CAM but no I was a military person

pallid palm
#

nice nice yes awsome

#

i was also military Air Force

#

oh now i see what you ment by exoperator

split ruin
pallid palm
#

@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

bronze tulip
#

cool thanks

pallid palm
#

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

mint flame
#

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

pallid palm
#
//@superman
[_this,"AsianHead_A3_02","male03CHI"] call BIS_fnc_setIdentity;
mint flame
#

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

pallid palm
#

oh welll umm ok

mint flame
#

ho do i make sure the face is set to whjat i want, cause when i do face = , it doesnt work

pallid palm
#

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

mint flame
#

ok

pallid palm
#

but i tryed lol

mint flame
#

np

pallid palm
#

thx for understanding my brother

tough abyss
#

Hi There everyone I'm super new here, anyone know how to make a test server?

sharp grotto
tough abyss
#

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

tough abyss
#

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

tulip ridge
#

🤣

proven charm
#

AI cant code that well

warm hedge
#

It is easy to realize ChatGPT doesn't run Arma 3

tough abyss
#

ya I wondered how it would do lol

proven charm
#

people sometimes come here with AI generated scripts and they dont work 🙂

tough abyss
#

ah

cyan thunder
cyan thunder
tough abyss
#

ya it would have to be better at learning what is a desired outcome and how to make it through code

cyan thunder
#

it would have to be more than an advanced autocomplete that understands nothing about context and hallucinates when it's off the reservation

tough abyss
#

evolution its like Atari RN

#

Lol

cyan thunder
#

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

icy ridge
#

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.

tough abyss
cyan thunder
#

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

tough abyss
#

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

tulip ridge
#

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

tough abyss
#

😉

tender fossil
#

Do toJSON and fromJSON commands support nested arrays?

tulip ridge
#

TIAS, but yes it does

granite sky
#

Common thing is that they'll get out at a much earlier move waypoint for no apparent reason at all.

analog mulch
#

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

analog mulch
granite sky
#

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.

thin fox
#

my first thought is to change the behaviour to careless, both inf and veh

chrome hinge
#

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?

analog mulch
thin fox
#

seems like it affects the entire group

spiral canyon
#

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];
};
proven charm
#

there is no setCamShake command

stable dune
#

Gpt said there is 😃

stable dune
icy ridge
#

Gpt is useless in most coding applications and with SQF it just halucinates whatever it needs

spiral canyon
#

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.

chrome hinge
#

Chatgpt is pretty good for making small functional parts those you can them glue together yourself

tulip ridge
spiral canyon
#

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.

tulip ridge
#

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.

tulip ridge
#

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

spiral canyon
#

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.

analog mulch
winter rose
#

(we have an old enough pinned message to address this very situation ^^)

acoustic jungle
#

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.

tulip ridge
acoustic jungle
tulip ridge
winter field
#

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

granite sky
#

The command is doArtilleryFire

#

You can probably do it with other forced weapon fire commands, but with that one it'll aim properly.

thin fox
pallid palm
#

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

viral hinge
#

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?

pallid palm
#

ummm im not sure m8

#

i would just delete the object

#

but i try doing things the simple way

#

but thats just me

viral hinge
#

Yeah.... I wish I could keep things relatively simple with my mission making.

pallid palm
#

yes simple is better imho

viral hinge
#

I have only tested the code on my pc, and have yet to test it on my server.

pallid palm
#

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

viral hinge
#

I've been using that mainly for when we get big error's, and I have learned how to do that over time.

pallid palm
#

if you do try to read the RPT file go right to the bottom line and go up from there

viral hinge
#

My main concern is that my script actually works on everyone's pc, rather than clientside.

pallid palm
#

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

viral hinge
#

It's all good.

pallid palm
#

cool thx m8

stable dune
foggy spear
#

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.

proven charm
#

but it sounds O_MBT_02_cannon_F is not defined, just a guess

pallid palm
#

@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"
    };
}; 
foggy spear
pallid palm
#

now its easyer to read

foggy spear
pallid palm
#

no no i did not change anything

#

i just collored it

#

so its easyer to read

proven charm
#

you should probably put ```
class O_MBT_02_cannon_F;

pallid palm
#

yeah i dont know eather

foggy spear
pallid palm
#

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

foggy spear
#

okay

thin fox
foggy spear
#

finally my script works completely, Thx Guys

pallid palm
#

oh cool Awsome @foggy spear

#

what did you change can you tell us

foggy spear
# pallid palm what did you change can you tell us

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

pallid palm
#

ahh ok cool

abstract magnet
#

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?

tough adder
#

Does anyone know how to make a vtol plane land?

pallid palm
#

i don't even know what a vtol plane is, hmmmm

tough adder
#

Are we deadass

tough adder
pallid palm
#

what did u try already did u try waypoints or something like that

#

or did u try scripting ?

tough adder
#

Well I tried waypoints In this order, move,move,land,transport unload, move,land.

tough adder
#

I hate scripting

pallid palm
#

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";
tough adder
pallid palm
#

umm you do know this is the scripting channel right

#

thats funny i love scripting even tho im not so good at it

thin fox
#

but what are you trying to achieve? land like in an airfield or just unload the troops?

tough adder
pallid palm
#

@thin fox has the right idea

tough adder
thin fox
pallid palm
#

now i know what a vtol is 🙂

tough adder
pallid palm
#

cool thx m8 you will love it

thin fox
#

I don't remember If this waypoint actually lands heli/vtol

tough adder
#

What waypoint

thin fox
#

land

#

test with a helicopter

tough adder
#

It lands both

pallid palm
#

awsome

thin fox
#

okay

#

so for dropping troops just use transport unload

tough adder
thin fox
#

it will land automatic, wait until all units get out, and then leave/hover

pallid palm
#

just think of it, i was able to turn some hate into love woohoo

#

with the help of others ofcorce

split ruin
#

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

pallid palm
#

i play guitar with 1 of the makers of Prairie Fire

#

but i dont have the mod

split ruin
#

its a DLC not a mod lol

pallid palm
#

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

split ruin
#

this is the best DLC thats why 🙂

pallid palm
#

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

split ruin
#

probably he is Nam veteran and still have PTSD ... 😂

pallid palm
#

no but his dad was

#

his dad was a sog guy

split ruin
#

hard stuff if he realized who was the baddies in the story

pallid palm
#

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

tough adder
#

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

pallid palm
#

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

tough adder
#

i'll use scripting for paradrops and vtol landings.

pallid palm
#

cool

#

btw you can script waypoints if you want

tough adder
#

whats a "script waypoint?"

pallid palm
#

just want it means you can script waypoints

tough adder
#

oh cool.

tough adder
#

how would you use script waypoints for paradrops?

pallid palm
#

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

tough adder
#

sent

pallid palm
#

rgr

thin fox
# tough adder this didn't happen

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

pallid palm
#

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

pallid palm
#

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

grizzled cliff
#

Simple sqf binary command execution time in Intercept is ~10 microseconds.

#

like setPosASL and createVehicle

polar vault
#

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? :/

granite sky
#

What command are you using to play music?

polar vault
#

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...

grizzled cliff
#

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
thin fox
grizzled cliff
#

1 microsecond for common set sqf commands

#

that is pretty fucking nice imo