#arma3_scripting
1 messages Β· Page 515 of 1
that would skip Zeus placed boxes, wouldn't it?
will do
got another question. :> is it possible to have a function that gets called automatically without me having to write it into my mission?
calling event handlers, etc
explain
if you're using it in the form of a PBO, yes
as pbo / addon, yes
basically the function works in every mission i play in, without me having to put it into mission scripts first
in config.cpp cpp class yourScript {postInit = 1;};
nice.
ok, but before i start working on it: it's not possible to have event handlers on item objects, no?
because that would also solve my problem
if you can reference them , ues
i dont understand the question
i have a new item (based on gps), and i want something to happen once the player picks it up
ooooh like that
you can add EH "Take"
in config?
like this? class EventHandlers: EventHandlers
{
Take = "hint 'taken!; ";
};
yeah for player not for item
you can add EH Deleted to the item if item gets deleted when you pick it up
But if your item is in weaponholder then you need Take EH for player
Take wont fire if item has a Rearm action and you press that instead of taking it
no it has to be added to the unit class like whatever class you are playing
B_soldier_something
it is player EH not item
ah, alright. so i actually do need the postinit stuff then
Try this in debug console player addeventhandler ["Take", {hint str _this}];
yes, this works, that's not a problem
my idea is to have a new item that i can just throw into any mission and then it will work
easier said than done
you can make a special weaponholder that holds only 1 item and when you pick up the item this weaponholder is deleted naturally, then you can add "Deleted" EH in config to the weaponholder
why do you need event when player picks up item?
i actually don't. if we break it down even further, i just have to check if the assignedItems == true
if ("testItem" in (assignedItems player) ) then ...
so i actually just have to use the inventory related EHs
now that i'm thinking about it..
and now that i'm thinking about it even more... is it possible to make a new item that is not the GPS but that can be placed into the GPS slot?
yeah, you just need to fake its type I think
better ask in #arma3_config
@west grove Yep it works, Deleted EH added to weaponholder
what about items in containers, etc? these aren't weaponholders?
Yeah you need Take
hmm got a new problem
can i remove a layer from allcutlayers?
with ""myStuff" cutRsc ["RscTitleDisplayEmpty", "PLAIN"];" i'm just overwriting it - makes sense.
but what about removing it completely?
ok, i just workarounded it with a variable for now. not as clean as i'd like to, but ok for now
Overwriting is deleting. You could fade it when it has opacity 0 it is removed, allCutLayers will still have reference to it because this is how it works
do extra brackets ()slow down SQF actually?
π€¦
SQF is compiled
Yes they slow down compile times, same as whitespace and linebreaks do
No but after it's compiled, what happens to the brackets?
Same as with anything else that's not useful
thrown away
The order of the compiled instructions is the order of execution
brackets make no sense there
you can calculate like.. one or two nanoseconds per bracket, at compiletime
Allright, so it figures out precedence at compilation, and throws brackets away
Thanks π
I found how to spawn a flare on command but how do you get it to launch into the air like flares normally do?
_flrObj = "F_40mm_yellow" createvehicle startingpos;
_flrObj setVelocity [0,0,10];
hey guys, how can i convert folders in pbo with cli (console)? which tool should i use?
I keep getting errors on this since adding in this parameter, and ideas?
//create array of all zone markers
_maxsize = paramsarray select 7
zoneMarkers = [];
{
if((_x select [0, 6] == "mrkAct") and ((getMarkerSize _x) <= _maxsize)) then {
zoneMarkers append [_x];};
x setMarkerAlpha 0;
} foreach allMapMarkers;
and the parameter is
class mapsize
{
title = "Arena max radius";
texts[] = {"Any","150","100","75"};
values[] = {1000,150,100,75};
default = 100;
};
whats the error?
_maxsize = paramsarray select 7
zoneMarkers = [];
{
if((_x select [0>
15:55:51 Error position: <zoneMarkers = [];
{
if((_x select [0>
15:55:51 Error Missing ;
15:55:51 File C:\Users\Owner\Documents\Arma 3 - Other Profiles\Axebeard\mpmissions\ACTION_Arma_CMedition(Altis).Altis\initServer.sqf, line 13
15:55:51 Error in expression <";
_maxsize = paramsarray select 7
zoneMarkers = [];
{
if((_x select [0>
15:55:51 Error position: <zoneMarkers = [];
{
if((_x select [0>
15:55:51 Error Missing ;```
_maxsize = paramsarray select 7 // <-- missing semicolon, like the error says
zoneMarkers = [];
also x setMarkerAlpha 0; missing _ for _x
weird, must have hit del randomly. thanks
(getMarkerSize _x) <= _maxsize wont work because getMarkerSize returns an array, not a number
Just about to ask that, I need the radius, so I guess getMarkerSize _x select 0'''?
I'd probably do (selectMax getMarkerSize _x) <= _maxsize
Longest side?
yea
getText(configFile >> "CfgWeapons" >> _weaponClassName >> "displayName")```
Will getText return a string?
yes
Ok, wasn't sure if "text" was different somehow (like it is in UE4)
Is there a way to pull a random Primary Weapon from all loaded mods?
Go through CfgWeapons I take it?
selectRandom(allUnits select {!isPlayer _x && primaryWeapon _x != ""} apply {primaryWeapon _x})
```?
eww thats not as good
wait 1
More importantly, how would you get a magazine for that weapon? I guess select the first one in the list?
more like this, dont know wtf i was thinking
primaryWeapon selectRandom(allUnits select {!isPlayer _x && primaryWeapon _x != ""})
any magazine or the one loaded?
No I meant pull a random weapon from the current modlist to give to the player, then give them ammo
i read mods as mobs π’
oh lol
yea cycle through cfgweapons but it isnt just primary weapons, pretty sure there is a way to filter out everythign else but i cant think of it rn
ehhh, I actually did want secondaries mixed in there too, just not particularly launchers
I'm not sure how'd you select from there anyway though, like _randWeapon = selectRandom (configFile >> "CfgWeapons" >>);
something like this perhaps
configname selectrandom("(configname _x call BIS_fnc_itemType)#1 in ['AssaultRifle','MachineGun','SniperRifle','Shotgun','Rifle','SubmachineGun','Handgun']" configClasses (configFile >> "CfgWeapons"))
well yea... you gotta do that urself.
the _randWeapon is supposed to be a string of the weapon's name
For giving out to players
I have it set up for predefined weapons already, the "get all possible random weapons" is the thing I'm having trouble with
yea that returns a weapon classname... what do u want, a list of all weapons?
What does the return look like exactly?
that snippet as is would return something like "arifle_weapon_class_whatever"
like "hgun_Pistol_heavy_02_F";?
if thats the random gun it lands on yes
Yeah, weird that it doesn't give me the weapon though... I must have missed something else then
send a snippet of how ur using it
_SelectedWeapon = (paramsArray select 3);
if (_SelectedWeapon == 0) then {
weaponToAdd = configname selectrandom("(configname _x call BIS_fnc_itemType)#1 in ['AssaultRifle','MachineGun','SniperRifle','Shotgun','Rifle','SubmachineGun','Handgun']" configClasses (configFile >> "CfgWeapons"));
//magazineToAdd = "hlc_10rnd_12g_buck_S12";
};
if (_SelectedWeapon == 1) then {
_SelectedWeapon = (floor(random 9)) + 2;};
diag_log format["%1 %2",__LINE__,__FILE__];
switch (_SelectedWeapon) do {
case 2: {
magazineToAdd = "16Rnd_9x21_Mag";
weaponToAdd = "hgun_P07_F";
};
case 3: {
magazineToAdd = "6Rnd_45ACP_Cylinder";
weaponToAdd = "hgun_Pistol_heavy_02_F";
};
};
weaponSelect = getText(configFile >> "CfgWeapons" >> weaponToAdd >> "displayName");
publicVariable "magazineToAdd";
publicVariable "weaponToAdd";
publicVariable "weaponSelect";
It show shows the display name just fine
Nothing showing up in the rpt either
log what the variable returns when u try to add it.
also, just reading that i feel like when _SelectedWeapon equals 1 there is a chance no weapon gets set?
I cut out all the other cases on SelectedWeapon
ohhhh, fair enough π
Yeah, I must have my paramater numbers messed up or something
Ohhhhh I know the problem
I have my script to assign loadouts set to waitUntil !isNil magazineToAdd, but I never added in the mags
Hey does anyone know what the locality is for a projectile fired by a unit on a dedicated server?
How do I just pull the first magazine that's compatible with the random weapon?
getArray(configfile >> "CfgWeapons" >> _weapon >> "magazines")#0```
ahhhhh I had just found something close to that on Reddit I was trying to parse out
@robust hollow That's fine for weapons that don't use magazine wells.
you mean internal mags?
@molten pulsar i think the projectile is a local object, not a network object. I'm not 100% sure though, havent really look into it before, just did a quick test.
// FiredMan EVH
9:49:03 "SERVER - 13: tracer_green.p3d"
9:49:03 "SERVER - local: true"
9:49:03 "SERVER - netid: 0:0"
9:49:03 "CLIENT - 21: tracer_green.p3d"
9:49:03 "CLIENT - local: true"
9:49:03 "CLIENT - netid: 0:0"
alright, so its essentially local everywhere then?
yea cause it would seem its a different object for each client
Thanks for the help man
@robust hollow testing in vanilla, this pulls a lot of mounted weapons that bug out. Any way to avoid those?
if (_SelectedWeapon == 0) then {
weaponToAdd = configname selectrandom("(configname _x call BIS_fnc_itemType)#1 in ['AssaultRifle','MachineGun','SniperRifle','Shotgun','Rifle','SubmachineGun','Handgun']" configClasses (configFile >> "CfgWeapons"));
magazineToAdd = getArray(configfile >> "CfgWeapons" >> weaponToAdd >> "magazines")#0;
};
Ditch the MGs?
swapped MachineGun for LightMachineGun seems to do the trick, I think MachineGun is for mounted
π€· i looked at arsenal to see how it sorted weapons
I checked the wiki, Machineguns weren't even listed just LMGs,. Makes senes (to Arma)
Any obvious reason this trigger doesn't work in multi?
0 = [] spawn {
_rad = triggerArea boundaryTrigger select 0;
damagePlayer = true;
for [ {_i=10} , {_i>=0} , {_i=_i-1} ] do {
_str = str (format ["WARNING: %1", _i]);
titleText [_str,"PLAIN"];
titleFadeOut 0.5;
sleep 1;
if (player distance boundaryTrigger < _rad) exitWith {damagePlayer=false};
};
if (damagePlayer) then {player setDamage 1;
[player] execVM "ACEdeath.sqf";
};
};
I wonder if boundaryTrigger needs to be public
wait no, this is the boundaryTrigger
Trying a different way but my exitWith is messing it up
_unit = _this select 0;
waitUntil {(_unit distance startingpos) > (zonesize select 0) + 10};
for [ {_i=10} , {_i>=0} , {_i=_i-1} ] do {
_str = str (format ["WARNING: %1", _i]);
titleText [_str,"PLAIN"];
titleFadeOut 0.5;
sleep 1;
if ((_unit distance startingpos) < (zonesize select 0)) then {exitWith {};};
};
if ((_unit distance startingpos) < (zonesize select 0)) then {exitWith {};};
else {
_unit setDamage 1;
[_unit] execVM "ACEdeath.sqf";
};
then {exitWith {};}; -> exitWith {};
so scratch the whole "then" part?
yea, but keep in mind you cant do exitWith {} else {}
Right, I want the countdown to stop if they get back into the zone
yea, so do
if ((_unit distance startingpos) < (zonesize select 0)) exitWith {};
_unit setDamage 1;
[_unit] execVM "ACEdeath.sqf";```
Oh I see what you're saying
Is there a way to restart the script inside of itself? Because if you leave the zone, come back before you're killed, and leave again, the script doesn't check to see if you're leaving the zone again
i thought u said it was in a trigger, wont it start a new thread for u?
It was in a trigger, but I couldn't get it to work on MP so I just made it a "check distance" script triggered by initPlayerLocal
you can either put it in a loop or if its in its own file/function, spawn it at the end of itself
can I put the entire code into a while player alive?
yea, as long as you do alive player not player alive
that didn't seem to work, I put the while encompassing the whole script and it's self contained
_unit = _this select 0;
while {alive _unit} do {
waitUntil {(_unit distance startingpos) > (zonesize select 0) + 10};
for [ {_i=10} , {_i>=0} , {_i=_i-1} ] do {
_str = str (format ["WARNING: %1", _i]);
titleText [_str,"PLAIN"];
titleFadeOut 0.5;
sleep 1;
if ((_unit distance startingpos) < (zonesize select 0)) exitWith {};
};
if ((_unit distance startingpos) < (zonesize select 0)) exitWith {};
_unit setDamage 1;
[_unit] execVM "ACEdeath.sqf";
};```
oh, well yea... you killed the unit/exited the loop
if ((_unit distance startingpos) >=(zonesize select 0)) then{
_unit setDamage 1;
[_unit] execVM "ACEdeath.sqf";
};
use that instead
though itl still exit the while loop so perhaps use a different condition or redefine _unit after the player respawns
they don't respawn, it's a one life mode
oh, well thats fine then
yea, if outside the zone, die
not triggering the countdown even
did u put it in the for loop or after it. it is meant to be after it
missed a bracket at the very least
alright, yeah that did the trick, seems to be good now
@hoary stratus the Arma 3 tools also work in console, mikeros tools too, and armake too.
@tough abyss Ok, wasn't sure if "text" was different somehow (like it is in UE4) It is. But getText returns string, not text. parseText for example returns text. You have to read the wiki to know such things ^^
@molten pulsar projectile is local to firer. So... Dedicated server. Atleast the bullet that causes actual damage is. I think players simulate their own bullets for impact effects.
You have to read the wiki to know such things You can lead a horse to water but you can't make him drink
Anyone have a recommendation where to start with a script thats low performance impact and replaces a projectile of a tank
creating a new file would be a start @spark turret
...
thanks x39 i dont know what a file is, anyone have a youtube video explaining it?
i am not sure what you expected when asking that question other than that @spark turret
a fully done script?
no lol ideas
and comments like "yeah i did that before its easy with this command:"
or "no its not possible it fucks up the ballistisc etc"
you have no conrete idea and just ask randomly "anybody knows how to do this? i do not"
for beginners:
- find out how to grab a projectile (you can create a proper question with this)
- find out how to manipulate some objects velocity (depending on complexity, either per frame or just once)
- find out how to pack all that into something that automatically attaches to everything
there you got three ideas
create questions with em and you will find your glory
for the first, there is an eventhandler you can use
the second, simple google of per frame eventhandler and setvelocity will guide you
for the third, cba extended event handlers
You want to replace the projectile?
You can use a Fired eventhandler to find out when a projectile was fired. Then you'll take the velocity and direction of the old projectile. and delete it using deleteVehicle. Then you'll spawn a new projectile (I think createVehicle command for that, not sure) then apply velocity and direction to the new projectile, and it will fly of.
That's what you wanna do right?
10:08:42 Error in expression <"_classname" ]; [ _classname , { [ ( _x select 0 ) ] call F_checkClass } ] call> 10:08:42 Error position: <select 0 ) ] call F_checkClass } ] call> 10:08:42 Error Generic error in expression
what causes that?
_x is probably not what you expect it to be
I am doing a KP liberation mission set in ww2. And everything is ready. but keep sending me this error, that make me not able to play
I am getting frustrated because I spend almost 30 hours (counting only the time in computer) working on it
and now that everything is ready I can't even play it. No "Grammar" errors. nothing just a expression error
https://github.com/KillahPotatoes/KP-Liberation/blob/8669ff08a1f03500b1ce83c6beb79411e2fc1443/Missionframework/scripts/shared/functions/F_filterMods.sqf#L2
That's the erroring code.
https://github.com/KillahPotatoes/KP-Liberation/blob/8669ff08a1f03500b1ce83c6beb79411e2fc1443/Missionframework/presets/init_presets.sqf#L101-L107 called from here. Did you edit any of these? infantry_units, light_vehicles and so on. There is probably an error in one of them
I think they come from the preset
How do I calculate the unload position of a cargo object?
@tough abyss https://community.bistudio.com/wiki/Arma_3_Vehicle_in_Vehicle_Transport
hm, tough one. What for?
My first guess would be to check in model config and "play" with the cargo's realBoundingBox too
na
i already solved it
with the attachTo
tool
easy to learn
I learned in like 10 minutes
out of curiosity, what was it for? π
I mean why did you need the cargo's unload position ^^
Attachto != VehicleInVehicle, if you ask question make sure you ask the correct one
?!
whatever, that thing's crazy
for me
Attachto wonβt behave in MP the same way
I want to determine which target an AI has fired at. I am thinking I can do this with the Fired event and then check its knowAbouts list and determine which is closest to its facing direction. Is there a better way to determine what an AI is aiming and shooting at?
Maybe assignedTarget would work?
Not sure that gets set unless something script wise sets it.
I can certainly try it in a fired event handler and log if there is anything in it to test it but I was confident that wasn't how it worked from the wiki.
It gets assigned but not sure how or even if it will match current target
postInit and preInit are function parameters, not category.
https://community.bistudio.com/wiki/Functions_Library_(Arma_3)
@prime horizon
Where did you see that you need to prefix sound with @?
You do it only for mission config sounds and only if you want to use sound file from addon.
Do you realise that you are making an addon?
Anyway wrong channel, you need #arma3_config @prime horizon
22:44:18 Warning Message: Addon 'A3_Air_F' requires addon 'A3_Characters_F'
where do i find this file
comes with arma 3
A3\addons\characters_f.pbo
ok but how do i get it back
verify game files in steam
what about for my server tho ?
verify game files in steam```
the server may not need it though, there is usually a a3_characters_f error when a dedicated server loads up
A different error. Not this
yea, just found the normal one.
hey fellas. quick question again. has anyone had any experience with [] call BIS_fnc_groupIndicator; ?
did you verify ur game files?
is it a slot based server you can run steam update on or do you only have ftp access?
i have full access but not sure how to do what ur saying
update the server with steam so it can redownload missing or damaged game files
theres no button to do it?
ok how do i upodate with steam tho ?
on slot based servers u usually just click a button but if you dont have one u will need to contact nitrado
last I used nitrado they didn't
but why cant i just download that one file
you can when you verify through steam π
but how !
apparently you cant verify without contacting nitrado, so contact nitrado
22:50:10 Cannot register unknown string STR_DIFF_SCENE_ONLY
22:50:10 Cannot register unknown string STR_DIFF_SCENE_AND_MAP
22:50:12 Item str_a3_to_c01_m02_036_ta_mechanized_briefing_SOLDIERC_0 listed twice
i also got these which i gotta fix
not sure where they are located
no you don't gotta fix them
yy
@west grove
I've made a function that checks if any (known to me) 3rd party group indicator exists and runs [] call BIS_fnc_groupIndicator if not.
Hi all. How to check is player hands free or with weapon?
currentWeapon player == ""; <-- not wielding a weapon
Thank you
I want to track how many shots each player fired, I figure the easiest way is to store the info in an array with each players ProfileName and the # of shots fired, or is there a more efficient/easier way?
Would it make more sense to store the info locally somehow, like in initPlayerLocal and then report it later? Is that even possible?
i would have thought something like this would do just fine
tag_shotCounter = 0;
player addEventHandler ["FiredMan", {
tag_shotCounter = tag_shotCounter + 1;
}];
My initServer has this
playerNames = [];
roundsFired = [];
{
_name = name player;
if !(playerNames in _name) then {
_newElement = (count playerNames) + 1;
playerNames set [_newElement,_name];
};
} forEach allPlayers;
publicVariable "playerName";
publicVariable "roundsFired";
and then I have this in initPlayerLocal
_unit = _this select 0;
_name = name _this;
//if player isn't in array, add them in
if !(playerNames in _name) then {
_newElement = (count playerNames) + 1;
playerNames set [_newElement,_name];
};
//get player's position in array, retrieve shots fired, add 1 to it
if (playerNames find _name != -1) then {
_element = playerNames find _name;
_roundsFired = roundsFired select _element;
_round_counter = _roundsFired + 1;
roundsFired set [_element, _round_counter];
};
_unit = _this select 0;
_name = name _this;
what
i assume that snippet is in a fired event?
i was more pointing out you do _name = name [_unit]
Ohh derp
doing it by name is a bad idea.
_name = name player; will be an empty string on a dedicated server.
what is the point of publicvariable arrays? you never rebroadcast them?
and if you did, that would be some bad network spam
The idea is to track the shots fired then report it at the end in the debrief or something
name player is supposed to return their ProfileName
yea, so what happens when two people use the same name?
They don't lol
what if they did
I don't know, what if?
why not use something that you know will be unique?
It would look like someone was blowing off a shitton of rounds
As far as we're concerned, names are unique, but what else is there?
player uid
UID?
how do I set a public variable in initServer from the players?
do I have to use missionNameSpace?
what?
if I declare a public variable in initServer, can any script just alter it?
yea but the change wont broadcast unless you tell it to
that's what I mean, how do I broadcast that?
publicVariable again, but if this is for the shots fired stat i would strongly advise against broadcasting on every shot
so what would be a non-retarded way to go about this?
record shots locally and then send the result to the server when the round ends
or, i think u can use FiredMan on anyunit from server, removing the need for any broadcasting
FiredMan doesn't look any different from Fired except it counts mounted weapons
So you're saying record the round count and just have it send the info over at the ending trigger
i did say that, but then decided you could probably do the whole thing serverside
And is this the right syntax, can't tell if it's doing anything ```sqf
this addEventHandler ["Fired", {[_this] execVM "roundTracker.sqf";}];
dont need to put _this in an array
starting over, so my event handler is still firing roundTracker, and this is roundTracker:
_unit = _this select 0;
_name = getPlayerUID player;
roundsFired = ;
_round_counter = roundsFired + 1;
roundsFired = _round_counter;
How do I define roundsFired though? Setting it to 0 of course resets it every time
if (isNil 'roundsFired') then {roundsFired = 0}; or define it elsewhere, perhaps before adding the event like in my example.
also you might as well do this in one line roundsFired = roundsFired + 1;. how you have it is unnecessary.
yeah I realized that
If I wanted to track the ammo types used (mainly just UGL grenades and regular magazines), would it be best to use arrays for those? My original plan was to make an array of the ammotype fired, then just track the amounts in a separate array
roundTypes = ["bullets", "grenades", "M203s"];
roundsFired = [x,y,z];
I'd probably do it in a single array like [["bullets",0],["grenades",....] but that works too
that's an array of arrays, no?
looks like it makes more sense though
Looking at the eventhandler, ```sqf
this addEventHandler ["Fired", {
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
}];
Do I need to pass the _ammo when firing the event? Like how do I pass the _ammo from the event to the script?
that does it for u just like that ^
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
// is the same as
private _unit = _this select 0;
private _weapon = _this select 1;
private _muzzle = _this select 2;
private _mode = _this select 3;
private _ammo = _this select 4;
private _magazine = _this select 5;
private _projectile = _this select 6;
private _gunner = _this select 7;
So it automatically passes that stuff into the script then?
yes
as long as you define _ammo, yes
Okkkkkay so I have to add _ammo = _this select 4;
yea
Ok cool
Is there a limit to how many FSMs that can run at one time?
I got a Zero Divisor error on the _ammo = _this select 4; do I need to pass that FROM the unit firing the script?
did you change ur execvm argument from [_this] to _this?
sqf this addEventHandler ["Fired", {[] execVM "roundTracker.sqf";}];
now I need to add _this?
change [] execVM to _this execVM
No errors, but doesn't seem to be working
_unit = _this select 0;
_playerID = getPlayerUID player;
_ammo = _this select 4;
playerName = name player;
roundTypes = [];
roundsFired = [];
if !(_ammo in roundTypes) then {
_newElement = count roundTypes + 1;
set roundTypes [_newElement, _ammo];
set roundsFired [_newElement, 0];
};
_element = roundTypes find _ammo;
set roundsFired [_element, _element + 1];
thats not how set works
https://community.bistudio.com/wiki/set
array set [index, value]
That I understand....
but you didnt do it?
_newElement is supposed to be the index, the value is _ammo
ok, and you do set roundTypes [_newElement, _ammo];
Yes
the syntax is array set [index, value] and youve done set array [index, value]
Ohhh shit
"you got it backwards" would've been a quicker way to say that lol
So it still isn't updating the arrays
cause u set the array empty every time the event fires?/
Hmmm
sqf if (isNil 'roundTypes') then {roundTypes = []};
Need one of those don't I
mmhm, or define the array before adding then event, then you dont need to check if it exists every time the event fires
I'm not sure where I would define the array beforehand, in initPlayerLocal?
where do u add the event?
I did it in the unit's init
i would move that to initPlayerLocal, where you would do ```sqf
roundTypes = [];
roundsFired = [];
player addEventhandler ...
Ohhh ok
It tracks the initial ammo fine but it's not picking up anything after that like pistol fire, UGLs, or launchres
_unit = _this select 0;
_ammo = _this select 4;
if !(_ammo in roundTypes) then {
_newElement = (count roundTypes) + 1;
roundTypes set [_newElement, _ammo];
roundsFired set [_newElement, 0];
};
_element = roundTypes find _ammo;
roundsFired set [_element, (roundsFired select _element) + 1];
aside from this
_newElement = (count roundTypes) + 1;
which should be
_newElement = count roundTypes;
it works for me
YEah I just realized it's skipping numbers because the array is 0 based
Oh sweet, it even counts grenades!
Now how would I get the arrays from each player? Since they're stored locally, would I need the roundTracker script to report back to another script, or can I do something like ```sqf
{
roundTypes = display round types....
roundsFired = display rounds fired....
} forEach AllPlayers;
@violet gull FSMs are added to scheduler just like execVM/spawn scripts so the limit depends on how powerful is your PC
4500 FSMs running that just looped generating random numbers between 0 and 100 caused my FPS to drop/average around 45 to 62 FPS. So yeah, good to know.
On the VR map
Nearly no impact around 200-600 running
Had about 142 FPS
At some point you are going to clog scheduler with high number of scripts added and no script will get simulated apart from unscheduled until you restart mission
Would I need to get like the Object Namespace or something to retrieve the arrays from each player?
How to cancel HandGunOn animation?
If i do HandGunOn with a playActionNow and before it's end call playActionNow for another animation or gesture, another action didn't execute.
First call of HandGunOn has override all next calls.
But if i use switchAction "amovpercmstpsnonwnondnon" it can to cancel HandGunOn in early state, but cant cancel on later stage...
@tough abyss FSMs are added to scheduler for when state condition change is calculated but completes activation expression of states like unscheduled, correct?
or can it suspend state expression just like a script?
Why donβt you test it with canSuspend and report back?
it doesnt report correctly for FSM i thought
I was under the impression that the process of checking the condition blocks is added to the scheduler, with the actual condition check being unscheduled, and if met the resulting state expression is ran in unscheduled... Having the state conditions be checked on a frame/tick balance is the whole point of the CBA statemachine right?
So I had some mess like this I was going to try, but I'm sure it's probably the worst way to do this, right? I'm trying to get arrays stored on players and make arrays of those arrays to print the data from
allPlayersNames = [];
allRoundTypeArrays = [];
allRoundsFiredArrays = [];
//store player's arrays in here
{
if !(_unitName in allPlayersNames) then {
_newElement = count roundTypes;
if (count allPlayersNames == 0) then {_newElement = 0};
allPlayersNames set [_newElement, _unitName];
allRoundTypeArrays set [_newElement, roundTypes];
allRoundsFiredArrays set [_newElement, roundsFired];
};
} forEach AllPlayers;
{
_name = allPlayersNames select _x;
{
{
hint format ["Hello %1",player ]
} forEach _x select _x;
} forEach allRoundTypeArrays select _x;
} forEach allPlayersNames;
Or is there some way to save the variables out as strings in a text file?
@slim oyster Are you asking me about CBA? I think you should ask @still forum as I am unfamiliar with CBA
Why does it seem like doArtilleryFire does not work?
@radiant needle give sample code and it might reveal errors
Arty1 doArtilleryFire [(position targ1), "32Rnd_155mm_Mo_shells", 1];
Arty1 and Targ1 are named in editor
Arty is NATO self-propelled
targ1 is game logic
Are you sure the type is correct?
is there a way to stop AI firing besides removing all magazine, or constant forgetTarget?
@tough abyss It already exists for a year in the tracker - https://feedback.bistudio.com/T127789
@velvet merlin setBehaviour "CARELESS", set CombatMode "BLUE" ?
"CARELESS" alone doesn't always work with vehicles iirc
@slim oyster afaik cba statemachine is fully unscheduled
Does anyone know a way to check if a classname is a vest item?
BIS_fnc_itemType
@tough abyss Assigned To None went unnoticed
Isn't that how it goes with all bugs and feature requests? The feature tracker has IMO just been a place to go to waste time raising something, nothing I have raised or participated in since release has been even been triaged let alone assigned and done. BI does what it wants and if your bug aligns with what they are doing then it'll get fixed, that is the only process I have any confidence is at work when it comes to the tracker
Ideally what I really want is a combination of an event handler and a command I can call. That way I can get told when an AI selects a target and run a background process to check that and do stuff and then once it becomes unassigned again I can stop that process. That is the most performant approach to what I want to do but the event system is a little anaemic given the amount of actual events that could happen in the game.
So I am thinking I can at least use the Fired event and treat that as a proxy for targeting, they ought to be fairly similar. But because I can't get the current target I either have to do something expensive (like work out the most likely target) or just keep using the Fired events and do some sort of fudge thing that isn't really what I want but will hopefully look quite similar.
bugs != feature requests. bugs get higher priority, game breaking bugs even more.
lol if only.
@tough abyss that you know of
How many game breaking bugs have been fixed without being mentioned in the SPOTreps, too
^ this
Which is the point, BI does what BI wants and the feedback tracker isn't of value. The bugs associated with AI are all in there, many of them are game breaking and pretty high priority for a lot of people and they are now years old, without triage. Just doesn't align with BI's schedule.
Feedback tracker is monitored because community is very good at breaking the game
Anyway I have zero confidence this engine available but not exposed command will get done so I am going to have to waste a bunch of CPU cycles and hope I can make it run well enough.
Bohemia Interactive is an independent game development studio, so BI does what BI wants
@winter rose as those are per group, its not viable in this case
<- setBehaviour "CARELESS", when BI talks about taking care of bugs in SPOTs, because I'm pretty sure 75% of bugs and other issues were "fixed" and spreaded to BI by people from community, like in this channel, forums whatever.
If they would care, things like CBA would probably never exist.
They do fix stuff, they quite clearly ask for details of crashing bugs or specific bugs. But no one looks at bugs put into the tracker, most of the stuff in there hasn't had the basic pass of "wont fix" or prioritised. There isn't a lot of point having a bug tracking system that they don't appear to actually use. The prior system they happily just turned it off and replaced it without migrating the data, that says a lot about how much their cared for its contents.
@velvet merlin it's a pain, but I believe you can "unjoin" them, apply the settings to the one unit then rejoin them to the group
_muzzles = getArray(configFile >> "cfgWeapons" >> _weapon >> "muzzles");
{
_done = _unit setWeaponReloadingTime [_gunner,_x,1];
} forEach _muzzles;
sleep _reloadTime;
if ((count _muzzles) > 1) then // 1 is AP
{
_unit selectWeapon (_muzzles select 1);
};```
this works
just need to handle out of ammo situations
(AP vs HE in main gun of tank)
hey fellas. quick question again: is it possible to detect explosions in an area?
i don't mean objects being damaged by explosions, but just... explosions
i know that i can filter for #explosions with allMissionObjects, but i just have to track a small area around the player
Explosion EH but needs to be added to Object
i want to check a radius of x - if an explosion happens within it, i want the position of that explosion
the thing is, the explosion might not damage anything and i can't add damage EHs to every object, as the radius is not fixed (travels with player)
so basically, if an explosion happens in x range of the player, i want to know where it happens so that i can spawn stuff there
the explosion can be from any grenade or rocket or whatever there is
Not 100% sure but I would say you cant detect explosions very easily like that
is this a generic thing or part of a specific situation?
a generic thing
i can workaround not having that, but if i could get this to work (with reasonable performance), that would be nice
is it some kind of an awareness system or what are you spawning?
I might help to understand what you need if you tell what you are trying to achieve
yeah, i guess it can be called an awareness system
mark the position of the explosion on the map
realtime or can it miss some?
I mean you could perhaps look for explosion related particles
whatever gives the best performance - so i guess it can miss some
can we detect particles with nearEntities or something?
mm true maybe not
I think you could test it by making a object/entity listener and start dropping artillery around the detection area
and see what if it spots anything
@west grove What is the source of explosion?
grenades primarily, missiles, etc.
if you mean that with source
hmm nearestObjects picks it up
allMissionObjects "#crater" detects an aftermath of explosion as an objects.
You can't handle the explosion itself as it is. Because you can't normally track projectiles death. You can do it only on the side of each of client with Fired* EVH.
Then you need to parse what is that, and was it explosive enough.
If indirectHit config value of CfgAmmo is >2 - that's usually an explosive ammo already, but depends on what size of explosive, because that might be just 40mm
yeah, but sounds like a big load of additional code that i have to run through
detecting the crater objects isn't too bad, actually.
Depends on application, if you wish to run some broadcast about i am explosive you can attach Fired* EVH like I said and use remoteExec towards your server with pre-defined functions. Not like a lot of code, but this might cause some broadcast spam in case players will use HMG's or similar.
it's for singleplayer, so no server involved
No issue then at all. Just use Fired* EVH
The most intensive action will be getNumber of indirectHit value.
but then i need to add EHs to every ai
and the player
or is it enough on player side?
probably not, i guess
Every unit that you want to fixate being firing explosive stuff.
That case will give you an ability to detect the power of explosion, radius etc.
Using #crater will tell you it was a boom and nothing else.
yeah, found out about that right now. sucks.
As I said, depends on your purpose.
@west grove fyi, there is an event handler for when a vehicle/unit is hit/damaged by an explosion
Hey, I've got a rather specific question about enableAI / disableAI on servers:
In my mission there are two "Praetorian 1C" units as air defense (that are classified as UAV's by the game), which are disabled by default with this disableAI "ALL"; in their init.
Then there is a radius trigger which triggers on enemy air units entering the radius, which in turn activates the units with {_x enableAI "ALL"} forEach defUnits;
When no enemy air unit is present anymore, the trigger deactivates with {_x disableAI "ALL"} forEach defUnits;
This is working fine in singleplayer and local MP, but as soon as I load the mission on my dedicated, the units activate for the first enemy air unit, then disable, then never activate again.
I've checked with hints if the trigger fires, which it indeed does. So, somehow the second enableAI command never activates the units.
The strange thing is - if I activate them manually via the remote debug console, they start working again.
What the hell am I doing wrong?
// Edit: the goal is to make them fire only at air targets. Maybe there is an easier way?
Do you use player command on dedicated?
I'm sorry, what exactly do you mean with that? If player can control the UAV's? If so, no, I disabled access to them
What is trigger condition
Type none, activation OPFOR, type present, repeatable, server only, condition this && {_x iskindof "Air"} count thislist > 0
And where the enemy unit spawned?
But as I said, the trigger works fine - I've set up chat commands for every trigger activation / deactivation and it works.
I've placed the enemy air units with Zeus to test this, in the normal workflow some scripts spawn them
There is obviously issue with locality, 99% of the time it is when you move to dedicated, so not really enough information to identify the problem
Well I do a check if isServer before I try to activate or deactivate the units and also before it writes the debug messages in chat. And somehow the very first execution works, the second one not, although the chat message says it activated
Thats why I'm a bit confused
Chat messages you see are they remote executed?
yep
And when you enable units manually from debug console do you use server exec?
Exactly
Anyone happen to know how I can stop mouseDown getting triggered in arma, when arma doesnt even have focus and my mouse is on other display? π
Like I put my mouse on arma, use alt+tab, move my mouse to another screen and click a couple times, when I then alt-tab back in, arma will report a mouseDown
Can you show your onactivation statement?
@austere granite yeah known issue unit fires on alt tab
it's for dialog stuff, no units involved so if I can do some hacky workaround that's good for me
trigger deactivation: [false] execVM "fn_basedefense_activate.sqf";
script: `#define THIS_FILE "fn_basedefense_activate.sqf"
params ["_active"];
if !(isServer) exitWith {};
if !(_active) then {
{_x disableAI "ALL"} forEach d_basedefense_units;
"DEBUG: DISABLED" remoteExec ["systemchat", -2];
};
sleep 2;`
And this works fine. Same code & script for activation, _active gets checked for true in another if. Both if's work on first activation and deactivation
Why sleep?
For debug purposes, this wasn't present in the first place
Either way, it somehow stops working
(with debug purposes I mean: cooldown condition, currently it locks itself after deactivation for 5 seconds before it can be triggered again. This is also in the trigger condition. Didn't make a difference)
Are you sure this disableAI works on init? Maybe it never disables AI for the first wave but trigger disables it after and it just fails to enable
Yeah good call, I'm currently changing that by putting the initial disable into the init.sqf, maybe thats the problem
Try it who knows AI implementation is a mystery
sadly there seems to be no way to let them fire only at air targets :/
helo
Does anybody know how do I make the night go faster than the day?
in mission only
setTimeMultiplier coupled with a sunOrMoon check
@tough abyss Keep it here, not in PMs. sqf private _daySpeedMultiplier = 1; // 1 IRL Hour = 1 In-Game Hour private _nightSpeedMultiplier = 2; // 1 IRL Hour = 2 In-Game Hours setTimeMultiplier ([_daySpeedMultiplier,_nightSpeedMultiplier] select (sunOrMoon < 1)); You'll need to run that periodically on the server for it to work. Pretty sure that's how the math behind setTimeMultiplier works, but @winter rose may know for sure.
Nah, you're good. Just better for it to be here in case someone capable of using search has a similar question later
does creating a sqf file solve something
?
named time.sqf
and then I place this on there
if (!isServer) exitWith {}; __startingdate = [2015, 04, 25, 3+floor (random 8), 00]; and 10am, 00 = minite setdate _startingdate; while {true} do { if (daytime >= 19 || daytime < 5) then { setTimeMultiplier 10 } else { setTimeMultiplier 5 }; uiSleep 120; };
but also
I think I need to change the params
or delete this starting date
I don't have the minimum idea of what am i doing
so i decided to copy a ready script and change all stuff
@tough abyss Just fyi, I fixed the issue. Strangest thing ever - to toggle the AI of those stationary "UAVs" , you have to do it to both the unit and the imaginary gunner inside and also you have to toggle them client AND serverside (else they'll shoot without moving). #JustArmaThings
Is there a way to stack a bunch of strings into a hint so it all displays at once?
//display rounds fired by type for each player
{
_name = name _x;
{
_type = format ["%1",_x select 0];
_number = format ["%1",_x select 1];
hint composeText [_name, lineBreak, _type, " x ", _number ];
} forEach magazinesAmmoFull _x;
} forEach AllPlayers;
Or is there a better way to display text, or save it out to a text file?
Trying something like this
{
_name = name _x;
_fullLine = format [];
{
_type = format ["%1",_x select 0];
_number = format ["%1",_x select 1];
_thisline = format [_name, lineBreak, _type, " x ", _number ];
_fullLine = format ["%1 %2", _fullLine,_thisLine];
} forEach magazinesAmmoFull _x;
hint composeText [ _fullLine ];
} forEach AllPlayers;
Disable/enable AI is local command I doubt non server does anything unless locality changes @tall dock
Yeah but when I don't execute it on clients, the turrets will shoot in the right direction, but their model won't move. As I said, really strange.
Seems like the turret movement is not synced
Well it wonβt hurt exec it everywhere
Having an issue with this. It keeps throwing an error that _thisType is a String and not a number (and it should be a string)
{
_name = name _x;
_fullLine = [];
_ammoTypesArray = [];
_magAmountArray = [];
{
//if mag type is not in array, add it
_ammoThisMag = (_x select 1);
_ammoTypeThisMag = (_x select 0);
if !(_ammoTypeThisMag in _ammoTypesArray) then {
_newElement = count _ammoTypesArray;
if (count _ammoTypesArray == 0) then {_newElement = 0};
_ammoTypesArray set [_newElement, _ammoTypeThisMag];
_magAmountArray set [_newElement, _ammoThisMag];
};
_element = _ammoTypesArray find (_x select 0);
_magAmountArray set [_element, (_magAmountArray select _element) + _ammoThisMag];
} forEach magazinesAmmoFull _x;
{
_element = _x;
_thisType = _ammoTypesArray select _element;
_thisAmount = _magAmountArray select _element;
_thisline = format ["%1 x %2",_thisType, _thisAmount];
_fullLine = formatText ["%1%2%3", _fullLine, lineBreak, _thisLine];
} forEach _ammoTypesArray;
hint formatText ["%1%2%3", _name, lineBreak, _fullLine ];
} forEach AllPlayers;
Would there be any decent way to restrict the range of SAMs?
Maybe... measure the distance between launched rocket and the launcher and blow it up...
If it's too far
Still will make pilots perform crazy maneuvers
Yeah that's the problem, it'll still lock it up, and still get missile fired warning
Is there a way to get AI to ignore certain targets?
Well there is a forgetTarget command
Maybe you can edit the configs of these SAMs to reduce the range of their sensors?
Config editing isn't an option for me
_ammoTypesArray select _x, expected number bool, got string?
{
_thisline = format ["%1 x %2", _ammoTypesArray select _x, _magAmountArray select _x];
_fullLine = formatText ["%1%2%3", _fullLine, lineBreak, _thisLine];
} forEach _ammoTypesArray;
How come it's not getting the index as _x?
Well you could certainly try to forgetTarget the target your SAM knowsAbout which are too far away. It's some time anyway before the launcher knows about a plane and it launches the rocket because it has to turn its launcher. So you don't have to poll it too often, maybe one second should be ok.
Yeah or maybe try this one, I think it's even better
If it works ofc, I don't know myself about how certain aspects of disableAI work
How dynamic is this thing? Is it a dynamic scenario or the launchers are placed in a static way?
They are static SAM launchers defending a border
Basically want them close enough to be able to fire near instantly if border is crossed
But not actually lock and shoot over the border
@tough abyss
inside forEach, _x is the element you are currently iterating through
_forEachIndex is the index of the element
you can forgettarget as sparker said but need to exec it repeatedly
I just figured it out, so can you nest _x?
yes
So I have my mag tracker working, it displays how much ammo everyone has left at the end of the mission or whatever, but I'm displaying it with Hint right now and it's too much info for it. Is there a better text format to use?
How destroy object only explode?
Sure, you can get deep into the magic world of arma UI and controls @tough abyss
How destroy object only explode? ???
@astral dawn easier way was to write it to the RPT
I thought you need to show it to actual players in the mission and it had to look nice, you didn't say that you need it for debug purposes
So, @last rain wanted to know, how to make a UAV only receive damage from placeable explosives, but not from grenades
are you a psychic?
Yes I used another means of communication (PM) π
You know the answer, HandleDamage
Yeah I guided him there
Maybe someone would like to expand the dammage handling further, IDK π€·
It requires like super advanced knowledge of Arma
Well sometimes it's not trivial to filter out certain damage types
Why doesn't it provide some damageType enum, would be so much better
like burning, drowning, bullet, explosion, collision, etc
because it doesn't care, only damage of selection matters, not with what it was damaged. If you need more advance damage info, HitPart is your friend, which is like super uber advanced
So, is ability to retrieve the name of selection, hit point, etc, an argument against having damage type? I still think a damage type enum would make sense for script writers.
I'm pulling random weapons from CFGWeapons, but is there a way to restrict it by mod? I'd like to have an option for "no vanilla weapons"
collect classnames from CfgPatches weapons entry
and skip all cfgpatches that start with A3_
Ok, I'll take a peek into that, thanks
Is there a way to make a trigger activate every time a unit enters it
if it's a trigger in the editor, just set it to Repeatable, there's a checkbox
Won't work if theres a unit already inside the trigger
Ah
something along the lines of if unit not thisList, not sure the actual syntax though
This is what I have for my random weapons, not sure how I'd work a CfgPatches check in there though
weaponToAdd = configname selectrandom("(configname _x call BIS_fnc_itemType)#1 in ['AssaultRifle','LightMachineGun','SniperRifle','MarksmanRifle','Shotgun','Rifle','SubmachineGun','Handgun']" configClasses (configFile >> "CfgWeapons"));
something like this perhaps
weaponToAdd = configname selectrandom("(configname _x call BIS_fnc_itemType)#1 in ['AssaultRifle','LightMachineGun','SniperRifle','MarksmanRifle','Shotgun','Rifle','SubmachineGun','Handgun'] && {((configSourceAddonList _x)#0 select [0,3]) != 'A3_'}" configClasses (configFile >> "CfgWeapons"));
16:09:37 Error position: <!= 'A3_'}>
16:09:37 Error !=: Type Array, expected Number,String,Not a Number,Object,Side,Group,Text,Config entry,Display (dialog),Control,Network Object,Team member,Task,Location
16:09:37 Error in expression <nfigSourceAddonList _x)#0 select [0,3]) != 'A3_'}>
16:09:37 Error position: <!= 'A3_'}>
16:09:37 Error Generic error in expression```
π€
what is select [0,3] selecting?
weaponToAdd = configname selectrandom("(configname _x call BIS_fnc_itemType)#1 in ['AssaultRifle','LightMachineGun','SniperRifle','MarksmanRifle','Shotgun','Rifle','SubmachineGun','Handgun'] && {((configSourceAddonList _x)param[0,'A3_'] select [0,3]) != 'A3_'}" configClasses (configFile >> "CfgWeapons"));
try this. a few of the base classes dont have a patch apparently.
select [0,3] first 3 characters of the patch
...you make my head hurt connor...
you may need to cycle through the entire array though, it may have multiple patches
whydis?
It's very untidy.
yea, i can agree with that
Seems to work, but for some reason (at least with the Unsung mod) the time of day keeps resetting to 3am. I have this in my description and it works with everything else (vanilla/RHS)
class Daytime
{
title = "Time";
texts[] = {"Random","0400","0500","1200","1800","1900", "Midnight"};
values[] = {99,4,5,12,18,19,0};
default = 99;
function = "BIS_fnc_paramDaytime";
isGlobal = 1; // (Optional) 1 to execute script / function locally for every player who joins, 0 to do it only on server
};
Is there a way to get the side of a captive, without making them no longer a captive?
dont think so, though i do believe you can get their actual side from their group instead (if thats the issue)
Must be something weird with Unsung, it messes up the time on the old working version of my script too
@robust hollow that works well, thanks
welp it was my fault, paramArray was wrong one
this keeps using the same value over and over between matches, any ideas?
class Daytime
{
title = "Time";
texts[] = {"Random","0400","0500","1200","1800","1900", "Midnight"};
values[] = {random 23,4,5,12,18,19,0};
default = random 23;
function = "BIS_fnc_paramDaytime";
isGlobal = 1; // (Optional) 1 to execute script / function locally for every player who joins, 0 to do it only on server
};
default = random 23; cant directly use sqf in a config like this, even if you did with __EVAL, the result would remain the same until you reload the mission.
So doing this in init should work then right>?
if (paramsArray select 0 == 99) then {random 23 call BIS_fnc_paramDaytime;};
assuming my random param is set to 99 of course
yea, though it should only need to run on the server
oh, BIS_fnc_paramDaytime handles that for you anyway
if I initialize and set a variable to a value, and then change the value of the variable. Is the variable when stored in memory the same or is it allocated as a different variable with a different value but same name?
I guess what I'm asking is that, if I change the value of a variable is more memory allocated now that I've changed it?
Trying to keep overhead to a minimum
What is the data type of the variable?
I guess what I'm asking is that, if I change the value of a variable is more memory allocated now that I've changed it? yes. Maybe. Probably. Most likely. It depends.
What does "change" mean?
are you assigning a different value to your variable? in that case no. Are you generating a new value? then yes.
What does Trying to keep overhead to a minimum in your case mean?
answering one question with a dozen more questions π
Because it is an XY Problem, Iβm sure
you are just taking a reference to a existing value
the value 100 is actually created when you compile the script
And you just say that _blah will now point to that value instead of the other value
but then the other 50 gets dereferenced and destroyed?
dereferenced yes
destroyed no
the compiled script still has a reference to it
it has to be there when the script get's called the next time
Ok. that makes a lot more sense now.
The compiled script? Do you mean the code-type variable? It has reference to 50 as if 50 is const float varname = 50;?
That's funny π
I ran into a problem with my Team Deathmatch on the one good Vietnam map tonight. I have a trigger that ends the match when there is nobody alive of either team, but a few times the map took so long to load that one team won before the other team could even log in. Any way to prevent that?
wait for there to be players in the game before checking if anyone is still alive?
if u have a pre-match countdown dont run the check until after that time.
I don't have a prematch countdown, but how do I put that in, or how would I check if they're in the game?
without a countdown, do a loop waiting for a player of each side to be in the game.
with a countdown, mark a time (eg: tag_markedTime = time + 30;) and then people cant leave a certain area until time > tag_markedTime.
i personally combine the two for one of my missions.
Ok yeah the loop makes sense, thanks as always
what's an easy line for seeing if there is at least one player on a side?
waitUntil {west countSide allPlayers > 0 && east countSide allPlayers > 0};
``` should do
that's what I was looking for, thanks
would I need a forEach to check multiple conditions on something? I have a list of weapons to blacklist that could be randomly pulled and I figure there's a way I can put them in an array to compare the if statement to right?
if weaponToAdd == [FakeWeapon, Rifle, HandgunBase]
I want to return True if any of those conditions are met, preferably without doing "if weapon == FakeWeapon or weapon == Rifle or weapon == HandgunBase"
if (weaponToAdd in [1,2,3,whatever])
Ahhhhhhhh
weapon in [wep1,wep2,a]...
That. You might need toLower because in is case sensitive
depends what exactly ur doing tho cause in would require an exact list of what u dont want
going off of this from earlier, but excluding fakeweapons:
weaponToAdd = configname selectrandom("(configname _x call BIS_fnc_itemType)#1 in ['AssaultRifle','LightMachineGun','','MarksmanRifle','Shotgun','Rifle','SubmachineGun','Handgun']" configClasses (configFile >> "CfgWeapons"));
};
which vanilla seems to have plenty of
or at least I've rolled em multiple times
What is the best event / event script which gets triggered when player spawns or respawns, both in MP and SP?
There are:
init.sqf - gets called per mission start, not at respawn
EntityRespawned mission EH
onPlayerRespawn.sqf - doesn't work in SP?
NVM actually onPlayerRespawn gets called if respawn is enabled
getting this error when I select a weapon class that I know has no weapons in it:
21:20:12 Error position: <weaponToAdd == nil) then {weaponToAdd = >
21:20:12 Error Undefined variable in expression: weapontoadd```
```sqf
_SelectedWeapon = (paramsArray select 3);
if (_SelectedWeapon == 0) then {
weaponToAdd = configname selectrandom("(configname _x call BIS_fnc_itemType)#1 in ['AssaultRifle','LightMachineGun','','MarksmanRifle','Shotgun','Rifle','SubmachineGun','Handgun']" configClasses (configFile >> "CfgWeapons"));
};
if (_SelectedWeapon == 1) then {
weaponToAdd = configname selectrandom("(configname _x call BIS_fnc_itemType)#1 in ['AssaultRifle','LightMachineGun','SniperRifle','MarksmanRifle','Shotgun','Rifle','SubmachineGun','Handgun'] && {((configSourceAddonList _x)param[0,'A3_'] select [0,3]) != 'A3_'}" configClasses (configFile >> "CfgWeapons"));
};
if (_SelectedWeapon == 4) then {
weaponToAdd = configname selectrandom("(configname _x call BIS_fnc_itemType)#1 in ['Shotgun']" configClasses (configFile >> "CfgWeapons"));
};
if (weaponToAdd == nil) then {weaponToAdd = srifle_DMR_01_F;};
//if (weaponToAdd in [FakeWeapon, Rifle, HandgunBase, nil]) then {weaponToAdd = srifle_DMR_01_F;};
magazineToAdd = getArray(configfile >> "CfgWeapons" >> weaponToAdd >> "magazines")#0;
Should it be something other than nil, like just a blank space or something?
isNil "weaponToAdd"
ay
Is there a way to reload a mission automatically after it's ended?
Though the mission or a server?
Preferably through the mission itself I guess? Not sure. On our server after a match (which takes like 2 minutes), we have to go through #missions, select the map, select the mission and reslot. Prefer to have it be there automatically if that's a possibility
Or maybe I should not end the mission and just restart it from within
If you add the mission file to your server's mission rotation it will automatically load that mission on server start.
to the role screen
I don't necessarily want to do that, especially since it's not my server haha
and we have a Training Mission we keep up for the new guys
I don't think its possible to restart a mission through itself.
That's all controlled by the server running the mission
That's what I thought.
Wonder how much a pain it would be to make it neverending looping rounds instead of a mission end then
You'll eventually run into issues with mission stability & performance
Oh?
It wouldn't be running for long periods, probably 30 minutes at a time at most
and each round is like 2-5 minutes
Something small will probably work
But having a 30 minute mission loop for 4 hours will eventually run into issues.
I get that. This is a simple team deathmatch in randomly selected zones with a random weapon each round
No AI, nothing fancy
I haven't messed with respawns before, I know how to spawn new units, but can I transfer a dead player into one of those units somehow?
Arma 3 has a built-in system for respawns
https://community.bistudio.com/wiki/Arma_3_Respawn
I know that, I wasn't sure if it was the way to go. I'd like the dead players to be in spectator mode until the round ends
If you want that then I would suggest that you have the mission restart at the end of the round.
Would make it a lot easier for you.
Okay. How do I make a mission restart though?
End the mission
I think we came up that idea 30 minutes ago
oi fellas. i'm back with my daily questioning: is there an easy way to detect if the player is "a camera"? i have a script that runs constantly and does something whenever the player is not actually the player. as example, the spectator mode, or the camera view in arsenal, or just a generic camera created via camcreate
Guys. How can I check the player in the presence of VAC ban?
Maybe there is a special dll?
@fleet hazel getPlayerUID gets you a player's steam id
@foggy moon I in sqf to vac ban a player?
no, you cannot vac ban players with SQF
that's stupid.
Plus, Battleye handles global bans with BI games
i think he wants to check if a player has a vac ban on their account π€·
How can I check the player in the presence of VAC ban?
I get that, but the follow up question raised my concern
I wanted to ban players with vac ban from accessing my server. Suddenly have him ban from the other game. Any ideas?
@robust hollow yes.
you will need an extension
@robust hollow eh(
if (true) exitwith {}; π
@robust hollow http://killzonekid.com/arma-extension-check_player-dll/
hm is it possible to force a resource layer ontop of every other? i have a graphic on my hud, but now i noticed that subtitles are shown behind it.
im pretty sure you need to make them in the order you want them shown (front layer last)
that's bad
dang it, i always want to use the subtitle function, but for some reason i always have to scrap it again at a later point
and go back to the normal sidechat
How can I get the name of currently played animation on the player character? I need to get in order to debug my mod that edits the transitions and such.
animationState player
derp
I completely misread what that one did
can you run a loop using the command console? I remember crashing arma when I tried
in debug? you can if you spawn it. debug executes in unscheduled.
cameraOn == player @west grove ?
returns always true
Even if you spectate other unit?
dont know, can't test that
but it is true when switching to camera mode in e.g. 3den, so it's not of use for me
Try PlayerViewChanged EH as well it has many params retuned when fired
Wait you want it to work in 3den?
i want it to work everywhere. 3den, arsenal, spectator, etc
You need 3den specific commands
right now i'm checking the namespace variables, but i was curious if i can simplify that
Dunno, it is unclear to me what youβre trying to do
i want to transform this https://pastebin.com/0WSqLwHe into "is player really the player right now?"
(the condition is not improved yet, i just slapped all the stuff together)
with this condition i'm checking that we are actually in the game, not in the main menu, not in arsenal view, not in spectator, not in a cutscene
i might have missed something, though.
and this morning i wondered if it's possible to shorten all of that above with simply detecting if a general camera mode is active or not. then i could scrap most of these lines.
Check that no displays are open except the usual ones with allDisplays
Question regarding get/set pos. I've created a system that allows players to spawn owned vehicles. I create a local vehicle preview for them to choose where it will spawn, and when they "commit" it, the position of the preview is grabbed, the preview deleted, and a new vehicle is spawned. It works as intended when they are on land, but when you try to spawn it on something like the carrier, the new vehicle spawns on the ocean floor. How should i get the vehicles position when it's hovering over sea?
Use setvehicleposition if boat will float
And what getpos should i use to get it from the preview vehicle?
SetPosASL could be better
Only problem is that with this system, they could be spawningthe vehicle over land or over sea. And i would have to figure out which at the time the commit
GetposASL
anyone got a suggestion why the doTarget command is not working and how i can get it to work?
been excessivly testing it and the unit does the doWatch but no the doTarget
i just need a way to make an AI point their weapon at coords or and object wihtout using the vanilla autotargeting
also doSuppressiveFire does not work
Where can i ask ACE3 related Questions?
Ace 3 slack
@tame lion is the documentation for it not sufficient https://community.bistudio.com/wiki/setVehiclePosition
What is your unit pointing at? What is the target? Did you reveal the target to the unit before making him doTarget the target?
@spark turret
I found that making doTarget on civilian targets is broken. As an alternative I use this:
target = "FireSectorTarget" createVehicle (getpos player);
target attachto [player, [0, 0, 0], "pelvis"];
target hideObject true;
sol1 reveal [target, 4];
sol1 doTarget target;
sol1 dofire target;
looking for advice on RemoteExec/RemoteExecCall
if I want a player to initiate a jump animation
how would I format; player SwitchMove "AovrPercMrunSrasWrflDf"; such that the animation runs on all clients but only for the initiating character object?
wiki examples suggest use of 'player' will be interpreted as all-players
i'm looking at;
// all clients will have their ammo set to 1 for their current weapon
{player setAmmo [primaryWeapon player, 1];} remoteExec ["bis_fnc_call", 0];
[player, "Aovrrrrfdgfsagrh4et43dgdg..."] remoteExec ["switchmove", 0]
which seems to suggest 'player' will mean each player
in that case you execute player locally on each player
so that will end up in player meaning all players
in my example you take the local player's object. And then tell all other players to switchmove on that object
right array rather than code?
ok, thanks
switchMove takes 2 arguments. So you pass array with 2 values. which are the two arguments
and 'player' will be transmitted as the callers object?
no
the result that the player command returns will be transmitted
that's stuff that people often get wrong. Order of execution
player command is executed first. Which returns an object.
Then that object will be put into the array, and that array passed to remoteExec
remoteExec has no clue where the object came from
right so the biki example is passing a code snippet (referencing 'player' when finally executed on each client) to bis_fnc_call
yeah
cheers
why are you looking for the example on remoteexec page when there is appropriate example on switchMove https://community.bistudio.com/wiki/switchMove
It has also a note in blue explaining the functioning of the command
Its like everything you asked is on that page
it's just attached to player so that AI will doTarget on this target, since they were not targeting captive players IIRC
but can also be used in other cases
I've done this before but man I just cant remember. I want to change my original group (s) to one that I have in a dl'd mod. I am trying to find out how to find the path to the new group I have placed. the original is...
[east,configFile >> "CfgGroups" >> "East" >> "OPF_F" >> "UInfantry" >> "OIA_GuardSentry"],
..and I want to change that to something new that I downloaded
Where or how ( in the config viewer?) do I find th eproper path?
@tough abyss Just updating an old script that previously used BIS_Fnc_MP, no particular reason to review the SwitchMove page.
So I need help getting attachTo working
_cwis1 = "CWIS1";
_destroyer = "Destroyer";
_cwis1 attachTo _destroyer;
i'm getting a generic error from that
@vast verge read the syntax for attachTo, it doesnt take strings like that.
https://community.bistudio.com/wiki/attachTo
I'm sorry, I've never been really good with this sort of stuff, could you elaborate a bit for me? kinda lost.
object1 attachTo [object2, offset, memPoint]
attachTo works by attaching one object to another object. Your snippet shows you trying to attach one string to another string, which simply isnt a thing.
ah, yeah what i read on the page gave me the idea that i had to make the string to do it in the first place.
Can we extend functionality of built in actions either via scripting or config? I want a script to run after flaps down/up action or key was pressed
@neon snow You could use animationPhase to check if the flaps are or down.
I want to run a script on every man character after it gets spawned/created and I want to pass the info to the script about the unit so I can use it the script. Would this work for triggering the script using CBA?
class Extended_InitPost_EventHandlers {
class Man {
class taro_set_AI_skill {
Init = "(_this select 0) execVM 'taro_set_AI_skill.sqf';";
};
};
};
@thorn saffron Looks good. I believe you can just use _this, as I don't think it has any more passed params than just the unit itself.
I'm having a very strange issue with respawn tickets in my mission.
If I end the mission while both west & east have > 0 tickets then it shows Blue vs Red on the debriefing screen.
If one of the sides has 0 tickets then it shows Blue vs Green on the debriefing screen.
Has anyone else experienced this issue or know a way to solve it?
Anyone know if you can point an .ext value to another .ext value?
something like
class maingun{
gun = missionConfigFile >> "cfgLoadouts" >> "Base" >> "Weapons" >> "Rifle" >> "gun";
}```
?
yes
that definitely does not look right
like that, it just stores it as a path.
I'm wondering if I can make it read the actual value
I highly doubt that
or would that need to be a macro?
Yeah you can __EVAL it
is it possible to check who remoteExec'd the function
Return Value: Number - id of the client, which initiated remote execution Mh.....
I'm not suuuuuure. But I thiiiiiiiiiiink it doesn't
Is there a way to get a weapons inventory weight/mass?
load
loadAbs
loadBackpack
loadUniform
loadVest
getContainerMaxLoad
Sorry should have been more specific, Wanted to get weight from classname
Looks like there's a mass defined in the config
Looks like you'd need to manually calculate a total for the weapon and any attachments, however
@grizzled spindle ```SQF
getNumber (configFile >> "CfgYourConfig" >> _yourclassname >> "mass");
`mass` value `\10` means lbs.
So 10 mass is 1lbs.
AFAIR.
Thank you very muxh
Hi guys, so i was wondering if i could get a little help on something "easy"(?)
Thing is i want that in a certain place on the map, when a certain unit with a variable name of : "oficial1" enters "COMBAT" mode, an alarm starts playing, i tried this code on a trigger but it doesn't work, any advice?
Condition:
behaviour oficial1 == "COMBAT";
On Act.:
nul = [thisTrigger] spawn {while {true} do {playSound3D ["A3\Sounds_f\sfx\alarm_BLUFOR", player]}; sleep 6;};
It does execute, problem is that the sound won't play, i can hear somewhat of "white noise" tho, i mean the other sounds (gunfire, engines, explosions) sound like there is a louder sound (i.e. the alarm) is playing.
Anyone here familiar with the altis life framework?
Does anyone know if there's a way to dynamically create radio protocol messages? For example., if I have an AI recon squad in an overwatch position, can I have that squad send a voiced radio message to the player's group, like "Enemy tank at 019224"? I found where all the radio protocol sound files and configs are located and I've looked into kbtell, but it looks like with that command I would have to use sentence classes that are pre-defined in some config
EDIT: I figured it out by looking at A3/systems/fn_spotter.sqf and fn_spotter.bikb. Basically it involves using the 3rd argument of kbTell to pass a dynamically generated string (for the message text) and an array of Words (defined in dubbing_radio_f/config.cpp, for the voice) to a sentence class you define in a bikb file
@dapper path yes, though depending on what you need you may want to try the altis life discord first.
Is it possible to add a sort of "text field" option to a parameter in lobby parameters. I am sure you could do this with a mod, and not a mission. But how would I go about this?
Hello, i'm struggling to find out how to return what has been damaged on a player while using ACE3. I've found the handleDamage fnc but that's for setting damage, not returning. Anyone got an idea?
Or do you want to find out exactly what kinda wounds exist?
That command returns what parts of the body are damaged, but not in what way
I more just need to know if the head was hit, or if the leg was hit
Yeah then that command should do it. It will still show damage though if the limb was bandaged and isn't bleeding anymore
on unconscious would make it easier
Oh right, so not very good say, 30 minutes into a firefight
Does ACE not have one at all?
I find it odd to believe
If you do personal aid kit full heal then the damage will be gone
But a bandaged non stitched wound will have damage even if not bleeding
can you describe exactly what you need?
Detect what was hit, then play one of the animations depending on what was hit, head, arm, chest, leg
currently they're just random
but would be nice to have them tie in with the damage
Gimme 10 minutes. Just found a memory leak in ace that I gotta fix first before I forget
Oof, okay no problem π
Well I found something that would do what you want.. But it's broken and doesn't work. π
Gonna find the next possible way to do that then π
ππ
getHitpointDamage might be best. Just choose the hitpoint with highest damage.
Alright π Cheers
@robust hollow the get damage script doesn't seem to be triggering for me
hello guys so guys im trying to make a GUI Weapon List there is some people says that i must to make weapon list config and its GUI like i spawn weapons its admin menu so can any one helps me or give me example's
skid menu david from two days ago, is that you? π€
some punctuation would have been good
@robust hollow
deja vu π
I kind of need a (in depth) complete tutorial that covers the full topic of creating your own functions in armed assault 3. I find only partial stuff or stuff thats so old that isnt even working anymore π¦
thanks @radiant egret - somehow that didnt even show up on my google search.
If i am correct, i use my function like this:
[] remoteExec ["nar_myfunction", target, isPers];
Correct? nar is the tag i am using.
If you want to remoteExec it that should work, yes. That'll "spawn" your function.
//local
[params] spawn nar_myFunction;
[params] call nar_myFunction;
//remote
[params] remoteExec ["nar_myFunction", target, jip];
[params] remoteExecCall ["nar_myFunction", target, jip];
i was just unsure with the "" and if its nar_function or fnc_nar_myfunction :3 thanksies @tough abyss
nar_fnc*
And it would be if you use CfgFunctions to declare it
That's missing the _fnc part
doartilleryfire needs to be broadcasted with remoteexec if the AI unit is local to the server and it's executed client side?
That depends on how you declare the function. In his example I assumed he did something like nar_myFunction = {}
So, i have this in my cfgFunctions.hpp
file = "path";
class myFunction {};
To add another one, do i have to open up new curly brackets or do i just add another
class myFunction2 {};
beneath the first function, please?
yes. Same as you wrote
another class below the first one. All the same just different name
ah. Because all examples show always only 1 thing :3 thank you @still forum
I do this:
_inidbi = ["new", "Vehicle Garage"] call OO_INIDBI;
_readVehicles = ["read", ["Vehicle Garage", "Merc Vehicles"]] call _inidbi;
theGarage = _readVehicles;
which has 3 vehicles in it. But "theGarage" is still completely empty. Another script works like a charm (weapons script) but the variable there is actually empty too but works.
its with inidbi
I use extended debug console but with 'watch:' the variable is empty. Its... extremely strange...
Thats in the inidbi databse:
MercVehicles="["I_C_Offroad_02_unarmed_F","I_C_Offroad_02_LMG_F","I_C_Heli_Light_01_civil_F"]"
(Yes mercvehicles and merc vehicles. We are testing a lot of things and working on the fly currently)
Is it possible to simulate a key press through an SQF script?
as in triggering a key press evh? no
Like make arma think that I am pushing the 'move left' button for some time?
via extension
Did someone already make such an extension? π
I saw something hold on
So what I want to achieve is this:
Make player operate vehicle in a bad way, like GTA drunk driving
Or make player operate turret like he's aiming with WASD keys instead of mouse
I think it's not possible to manipulate a turret like this, right?
http://killzonekid.com/arma-extension-ctrl_tab-dll/ but 2013 man
That's cool, thanks!
such could perhaps be achieveb by tampering with the vehicles movement velocity
//Recently been having issues with script. Seems to spawn the unit, but the rest of the script appears not to be working. Where did i go wrong?
_target = group player createUnit ["CUP_B_USMC_Soldier", position player, [], 0, "FORM"];
[_target] join _grp;
removeAllWeapons _target;
_myNearestEnemy = _target findNearestEnemy _target;
while {alive _target} do
{
if (_target distance _myNearestEnemy < 100) then
{
_myNearestEnemy = _target findNearestEnemy _target;
_target switchmove "Acts_GetAttention_End";
sleep 2;
_myNearestEnemy setDamage 1;
} else
{
};
sleep 5;
};```
Sure how do i do that?
```sqf
<ur code here>
```
π
thank you
gotta do 3 of these `before and after for a proper block
put one more ` in both ends
So um yeah hope someone van help.
so what do you want it to do?
if nearest enemy is within 100 and the unit is alive then setdamage 1 to nearest enemy
I have an issue with a mod I'm making for my unit. It currently just has a single function that is essentially just a wrapper for ace_arsenal_fnc_initBox. When I load the mod, it says in the RPT that the mod is included in the "List of Mods", but when I look in the "Loaded Add-ons" I cannot find its single addon core listed anywhere.
When I try and call the wrapper function, it just doesn't work. No error messages or RPT log made.
I currently don't have internet to upload the add-on else I would to show you what I mean.
Does anyone have previous experience with mods not being loaded properly? If so, what steps could I take to seek the solution?
I have an issue with a mod I'm making for my unit. It currently just has a single function that is essentially just a wrapper for ace_arsenal_fnc_initBox. When I load the mod, it says in the RPT that the mod is included in the "List of Mods", but when I look in the "Loaded Add-ons" I cannot find its single addon core listed anywhere.
When I try and call the wrapper function, it just doesn't work. No error messages or RPT log made.
I currently don't have internet to upload the add-on else I would to show you what I mean.
Does anyone have previous experience with mods not being loaded properly? If so, what steps could I take to seek the solution?
does ur mod have a CfgPatches entry?
@sudden yacht think you need to move the findNearestEnemy check before the distance check, otherwise you're using the previous enemy
having some troubles with something and was wondering if anyone had any ideas. Im trying to attach a cargo container to one of the Tanoa cranes using rope. The rope isn't actually being created, I tried spawning in a small physics object then attaching that to the container then attaching a rope from the crane to the little physics object but still no luck. No errors or anything, just doesn't create the rope. Here is a pic of the crane i'm talking about. https://imgur.com/a/LPE5Kxs
So a little update, i got it to sorta work. I attached a go kart to the crane, and then from the go kart to the container, the only problem now is that the ropes look VERY laggy. https://cdn.discordapp.com/attachments/283322734610743296/545096712897822749/2019-02-12_20-19-11.mp4
Can i ask a question here about a problem im running into with my mod?
@slate gull ask the question and people might answer it.
Well i am new to all this and have been practicing scripting and wrote my first mod. But i have no idea what else it needs to become a mod. Right now its just a .sqf and i watched a video about packing .pbo's but i tried and it gave me an error. "Build failed result code=1" I dont know what that means
All tutorials i see on Google are old and dont make sense or dont have enough detail
ok, so im missing config.cpp
And then define the scripts as functions as https://community.bistudio.com/wiki/Arma_3_Functions_Library
Yes
how do i write a config.cpp?
Make a text file and rename it
Sorry, if these questions seem a bit derivative but what goes in the text file?
Like i said im new, this is my first mod
First example from the first link
However this is more of a job for #arma3_config as these are config files.
@drowsy spruce attached object inherits simulation properties from object it was attached to
@robust hollow It does. Here's the entire config.cpp file:
class CfgPatches {
class bnb_f_core {
units[] = {};
weapons[] = {};
requiredVersion = 1.76;
requiredAddons[] = {
"ace_arsenal"
};
author[] = {
"Arend"
};
};
};
class CfgFunctions {
class bnb_f_core {
class functions {
file = "\x\bnb_f\addons\core\functions";
class arsenal {};
};
};
};
and then in fn_arsenal.sqf I have this:
[this,true] call ace_arsenal_fnc_initBox;
and in $PREFIX$ I have this:
x\bnb_f\addons\core
The structure of the mod is:
root
| addons
| | core
| | - $PREFIX$
| | - config.cpp
| | | functions
| | | - fn_arsenal.sqf
CfgFunctions: file = "\x\bnb\addons\core\functions";
Prefix: x\bnb_f\addons\core
?
It's supposed to be such a simple little mod xD
ur prefix is bnb_f while ur function looks in bnb
Yeah, my bad. I've renamed bnb to bnb_f, but I did double check to make sure I consistently did so. Just changed it whilst copy pasting into here.
spent 2 hours dedicated to making sure they're the same, and testing with and without the _. Is a _ allowed in a prefix?
yes
Because when it comes to calling the function, you'd have to then write bnb_f_core_fnc_arsenal
or am I wrong?
yea thats right. just tested ur config and it loaded fine, function too. i guess double check the addon is loaded in CfgPatches, maybe also check ur prefix is actually being applied to the pbo π€·
Alright. Well, at least I now know it's not that I completely fucked up the path format or anything
Thanks, I'll keep at it
What do you pack it with?
Not entirely sure where I might ask this, but does anyone know if there's a way to modify my OFPEC tag listing? The website I put down when I registered the tag no longer exists but I want to continue using the same tag.
Do I have to get in contact with the OFPEC site admins or something...?
Yep, already made my tag ages ago
I want to take the website out of the tag listing, as well as change the recently completed field
theres a login at the top left corner
I recall you can edit those yourself when youre logged in
Logged in but I can't find anything. The site's a bit old, might've missed the option somewhere
when youre registered and browse tags you get your tags list
hmm
but where was the edit button
Hmm...
I don't even see that, and I'm logged into the account I made the tag with
Ehh, I'll dig around on their forums and see if I can find something, thanks for the help though
I think their system got fubar'd at some point. I don't even see that, tried in chrome and firefox
Maybe somehow the tag got unlinked from my account in their db
possibly. I read some old forums post related to that and there it was said that some people have had similar trouble
I think best is to contact ofpec admins
Hello, so I tried to get the returned damage from a player while ACE3 is active using getAllHitPointsDamage which sort of worked during testing but in action it was a nightmare xD
I've attempted to look, but does ACE have any way of returning the damaged sections?
