#arma3_scripting
1 messages Ā· Page 62 of 1
Short of checking if it's alive every few frames or so, I imagine that'd start to chug the server with a few hundred bullets
And detecting ricochets is hard too
I'll take a look into the particle effect method. maybe CBA can do something
You could pray to the armadevs.
boundingCenter tells you whether the vehicle can cross bridges :P
armadevs should fix tracked vehicle physx first
I vaguely recall that (some?) building models don't autocentre, so it's important for that.
Some assets from Enoch doesnt do as apposed from Cup/A2 versions
VBS has everything
Just to taunt us
I might as well ask for it on the tracker... maybe we'll get it in 5 or 6 years
IncomingFire....
If only.... goddamn checking for bullet distances constantly for my suppression.. woohooo
I mean, surely AmmoExploded wouldn't be THAT hard to implement
JUST that one
Just tack it on to whatever function deletes the bullet
All of those are basically: OH IF I HAD THAT I COULD DO ALL THESE AMAZING THINGS IN A WAY THAT'S NOT COMPLETELY CRAZY!!!!
They are :(
... but I always try to NOT look at VBS because it just makes me sad :(((
https://www.youtube.com/watch?v=UoAw9W9iz7g i still want this as well
Ofcourse
Underground arma 6 confirmed
Maybe Codemasters will release a new Operation Flashpoint game that has it? :D
Was there a way to hide engine actions from scroll wheel menu?
@tough abyss you can find the available commands from the wiki here:
https://community.bistudio.com/wiki/Category:Arma_3:_Scripting_Commands
Thanks
there are various fog and time related commands in there
@meager granite Not directly. Specific actions can be blocked with specific methods.
There really should be a command for it because some of the methods are horrible
I know you can block actions with inGameUISetEventHandler, but action is still there in the scroll wheel cluttering it
Thought maybe something was added through the years
There's probably some deep engine hellcode that makes it impractical to change
Looking for a way to disable "Take UAV controls" action so you can only connect to gunner, apparently there is none
Only possible by forbidding selecting the action with inGameUISetEventHandler it seems
I wanted to ditch hardcoded UAV terminal system all together at this point, but remoteControl is bugged and super limited.
Nothing is easy in Arma 
Or rather seemingly trivial tasks require unreasonable feats
Aha, found a hack to stop UAV seats from being available
createAgent ["Logic", getPosWorld objNull, [], 0, ""] remoteControl driver uav;
yeah that's horrible :P
I was wondering about swapping out the driver for an AI of the wrong side, which is even worse.
I think you can also delete the driver, but that won't let you drive the UAV from gunner seat
Which is what I'm trying to have
Not MP friendly, Logic remains local to whoever created it and driving as gunner isn't working when driver remains remote, so it needs another routine to force change driver's locality to gunner's locality to work properly
š
Strangely, rotating works with a delay (until command reaches the AI or something), but you can't move forwards and backwards
Typical Arma
With CfgRoles, can one "class" (type of unit) have multiple loadouts assigned to it by CfgRespawnInventory?
Additionally, how do you tell the game what Role the player is?
I'm having fits trying to get the thing to actually respect the Default loadout.
@grizzled cliff What's been changed in ACRE for Zeus?
You can talk through the AI you control now.
I GM quite often and have had to mess with our setup to get multiple GMs going
If you're in zeus cam will you hear voices of units close to the camera?
That's something of a dream of mine :D
no š¦
one of the main drawbacks of vanilla
only thing i can think of is creating a dummy UAV somewhere and deleting the driver
then hijack the "connect to uav gunner" to connect to the correct uav
Hello guys ! Is there an alternative command to createVehicle where i can setDir before spawning an object ?
no
_vehicle = createVehicle [_type,_position];
// replace with
_vehicle = createVehicle [_type,[0,0,0]];
_vehicle setDir _dir;
_vehicle setPos _position;```
ok thanks
Is there a way to check if an AI unit has a line of sight of another AI unit?
not in the way you're asking... you'd have to do your own line of sight checks with "lineIntersectsSurfaces"
if its in combat you can check "targetKnowledge" for position accuracy
Understood, thank you.
On a different note, can someone tell me why the following script does not move the AI of the player's group to the location of the enemy in sight?
{
singletarget = player findNearestEnemy cursorTarget;
player reveal singletarget;
_x doFollow player;
doStop _x;
private _pos = getPosATL singletarget;
_x doMove _pos;
} forEach (units player - [player]);
My attempt at a BulletDelete eventhandler
http://i.imgur.com/wFTomSN.jpg
Using the particle effects method
http://feedback.arma3.com/view.php?id=26370 - Upvote for less hacky workarounds!
Also, how do you do that commy?
Added a particle effect to the bullet impact effects
with a beforeDestroyScript
returns the position in _this
Unfortunately not the projectile
So it would only work for "special weapons"
unfortunuate :(
Yeah
Also, partical effects aren't transmitted across the network I assume
The issue is that the beforeDestroyScript is a path to a sqf
It compiles and reads the file from hdd for every bullet
Could work for stuff like flashbangs or flares or something
But not for ALL projectiles
Particle effect scripts I needed a bit with for Molotov and let's say that the frame rate did not enjoy it
http://i.imgur.com/uRemP5n.jpg
player addEventHandler ["fired", {
params ["", "", "", "", "", "", "_projectile"];
[{
local _projectile = _this select 0 select 0;
if (!alive _projectile) exitWith {
systemChat str [_this select 0 select 1, _this select 0 select 2];
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
(_this select 0) set [2, getPosASL _projectile];
}, 0, [_projectile, typeOf _projectile, getPosASL _position]] call CBA_fnc_addPerFrameHandler;
}];
Best I can do.
I have a strange problem. Steps:
- Create a squad with a player + AI
- Aim as a player at an enemy
- Execute the script while you have the enemy in crosshair
==> If the AI squad is in AWARE or SAFE behaviour then nothing happens. If the squad is in COMBAT or STEALTH behaviour then it moves to the enemy and kills it. My question is, why is the script not working properly if the squad AI is in AWARE or SAFE behaviour? It seems that the doMove command does not work in this case?
Here is the script: https://sqfbin.com/zepikobeluhenaweteko
doMove certainly doesn't need combat or stealth behaviour.
Maybe add some logging and then you can tell where it's breaking down.
you are only intercepting stealth and turning them to combat
{
if (combatBehaviour _x == "STEALTH") then {break;};
_x setCombatBehaviour "COMBAT";
} forEach (units player - [player]);
combat is already combat
you are still missing 2 cases
instead of doing it like this, just straight up set the combat mode to combat for the group, not each unit. setting them to combatmode "blue" might be influencing this too.
and set the behaviors before doing the doFire btw
This only sets the units to Combat if they are in Aware or Safe because in those two behaviours the script is not working. If the units are in Stealth it keeps them in Stealth. Usually the step would be obsolete and the problem is not related to it.
out of interest, does it work if the units are in CARELESS?
careless ignore doMove iirc
Yea, that the strange thing. It even triggers the DoMove command. Shows "Move" below the units on screen. But they don't move.
It's possible that in SAFE or AWARE they're resistant to move towards an enemy.
but generally CARELESS is how you override that.
you can also try with low level commands to overrule behaviours
Same problem with Careless
That is my impression too. Safe and Aware block the move towards an enemy.
is it inconvenient for you to change the behaviour before firing?
if not, you can always force combat and then order them to fire ?
I put the guy in CARELESS on a test and he jogged off towards the target :P
likes to stop every 20m and aim a bit though.
hmm, let me try again. 1 sec
You are right, CARELESS works!
Thank you guys for having a look. Much appreciated.
There's probably some disableAI that'll stop them doing the 20m stop-to-aim thing.
Yes, here is the extended script which does that: https://sqfbin.com/dexurehopecoroyoviki
disableAI "AUTOTARGET" works, "WEAPONAIM" does nothing :P
Good to know. Thank you
(this is backwards from what the wiki suggests)
maybe it's a bug. Pretty sure the AI is riddled with them.
The issue is that the units move very slow in Careless
Not optimal
Would be better if we could use AWARE
Not sure if it is a bug or not
hmm. They were going pretty quick for me but it might be related to group speedMode.
I don't think there's any way of setting speed per-unit.
forceSpeed
How does that work? You use getSpeed to find a suitable speed for the unit and then chuck that in?
I guess you could set it some really big value 
I wouldn't have expected forceSpeed to work at all given the description.
but I guess if knows how to pick between animations...
imagine the unit walking menacingly at 15km/h
You can make units backpedal with
_x limitSpeed -(_x getSpeed "SLOW");
How can I setup a class system? ex;
gunClassStuff {
variable=1234;
cost=124673;
}
class gunClassStuff {
var = 1234;
};
But that only works in configs (.cpp, .ext)
SQF itself has no objects like these
Using ChatGPT to learn new scripts and explain basic game functions of Arma 3 is literally the biggest brain move I could ever make
What could be an equivalent for SQF?
good luck with that
Extremely bold of you to assume ChatGPT knows anything about the basic game functions of Arma 3
learning to read the wiki will get you better results; chatGPT is good at writing scripts that look like SQF but don't actually do what you want
creating a logic object with createVehiceLocal and then using setvariable I guess.
the very first prompt I gave it produced code that doesn't work at all
I understand it won't spill things correctly but it has given me some pretty great insight. I've corrected it, and now it doesn't make the same mistakes. The scripts for warlords that I learned from it work for me
Looking for a better way to find the position of the right-angle-vertex of a seat proxy than this:
params ["_vehicle", "_proxy"];
private _averagePoint = _vehicle selectionPosition [_proxy, "FireGeometry", "AveragePoint"];
private _boundingBox = _vehicle selectionPosition [_proxy, "FireGeometry", "BoundingBox"];
_boundingBox select 0 params ["_x0", "_y0", "_z0"];
_boundingBox select 1 params ["_x1", "_y1", "_z1"];
_boundingBox pushBack [_x0, _y0, _z1];
_boundingBox pushBack [_x0, _y1, _z0];
_boundingBox pushBack [_x0, _y1, _z1];
_boundingBox pushBack [_x1, _y0, _z0];
_boundingBox pushBack [_x1, _y0, _z1];
_boundingBox pushBack [_x1, _y1, _z0];
[_boundingBox, _averagePoint] call BIS_fnc_nearestPosition
The problem is that it's not actually dispensing understood knowledge. It's dispensing remixed Google results and you've been fortunate enough to receive some that are still in a functional form. There's no guarantee that'll happen every time, and the more obscure your question is the more likely it is that it will just make something up entirely (though this can happen even with easy questions).
right angle vertex is...?
proxies are selections with 3 vertexes: 1) at position; 2) 2m above; 3) 1m behind. those are in "seat" space, not vehicle space.
I know. ah that's what you mean by right angle
iirc the proxy pos is the "1m behind" one right?
if so you can try this:
oh? the right-angle is usually the ones right on the seats in vehicles
because sometimes the first vertex is the 2m above one, based on vertex order in the model.
well in that case just use the average point only
no need for BB
(also BB is calculated in model space not selection space)
that's what I"m doing currently, but for some smaller vehicles like quad bike they cause the position to be a significant portion of vehicle size above the seat, like 0.66 m, being the difference between looking down vs looking up.
private _averagePoint = _vehicle selectionPosition [_proxy, "FireGeometry", "AveragePoint"];
_vehicle selectionVectorDirAndUp [_proxy, "FireGeometry"] params ["_vy", "_vz"];
_proxyPosModel = _averagePoint vectorAdd (_vy vectorMultiply 1/3) vectorAdd (_vz vectorMultiply -2/3)
that's just based on the info you provided 
ok
(i.e. 2m above and 1m behind thing)
will try this approach! super cool =)
it's great n_n
Execution Time: 0.0129 ms // selectionVectorDirAndUp
Execution Time: 0.0972 ms
I guess if you replace "FireGeometry" with the lod res it'll be faster
iirc fire lod res was 7e15
Ah, another great tip.
LOD resolutions are listed here btw:
https://community.bistudio.com/wiki/LOD_resolutions
Hi, i have a question ? How i need to use the leaveVehicle command ? I'm a little bit confused because the wiki is saying "However, to make it more reliable, it is best to move unit out of the vehicle manually with moveOut and force unassign the vehicle with unassignVehicle." but i need to "LeaveVehicle" after "MoveOut" and after "Unassign Vehicle" ? or there is an other order ?
leaveVehicle is pretty reliable IME.
what mean IME ?
and i'm asking because i used
[_unit] remoteExecCall ["moveOut", 0];
[_unit] remoteExecCall ["unassignVehicle", 0];
But sadly the plane land directly after
In my experience
oh ok thank you but then is there a specific order ?
uh, you called moveOut on a plane and it "landed"?
yep, i moved out every cargo units and after the plane landed
That phrasing doesn't make any more sense.
why ?
If you call moveOut on units in an aircraft then they jump out immediately, right
yeah exactly, but after i think they want to come back to the plane and maybe it's why it landed
How did it land without crew? :P
Ah whatever. The order doesn't much matter because the AI decisions to re-board a vehicle are slow. If in doubt, leaveVehicle then moveOut.
you didn't read, i put "every cargo units" hopefully i didn't moved out the pilot š
ah ok thank you a lot, but i need to add "unassign vehicle" ?
No.
maybe not because you said it was reliable
leaveVehicle unassigns anyone in that group who's in that vehicle, IME. I haven't seen a case where it didn't.
ah yeah but in my system, i'm using unit and not a group
so it's not a problem if i do that on every units ?
leaveVehicle doesn't make sense on a unit.
There are two levels of vehicle assigning.
You assign a vehicle to a group (with addVehicle) and you assign a specific role in a vehicle to a unit (with assignAsXXX or moveInXXX).
If you unassign a unit, the group leader may reassign it if the vehicle's still group-assigned.
ok but then is it possible to get the assignedvehicle ? of a group
because i need to check for every units if their group has a vehicle
otherwise, can i use the "assignedvehicle" ? instead of the "assignedVehicles"
yeah but they are in the same vehicle
If you want them to definitely not get back in the vehicle then you need to remove assignments at both levels.
at both levels ? so i need to "unassign vehicle" too ?
Potentially? It's possible that the vehicle wasn't assigned to the group but the units were assigned to the vehicle.
ok so i will
leaveVehicle (group _unit);
unassignVehicle _unit;
moveOut _unit;
i think it's the best order (I hope)
Note that your crew and your cargo should not be in the same group.
yeah don't worry, they aren't in the same group.
Otherwise leaveVehicle will unassign the crew as well and then they'll try to get out.
the order is correct ? I want to have the best order if possible
leaveVehicle _group; { moveOut _x } forEach units _group; is sufficient.
yeah but you said at both levels so leaveVehicle already do this at both levels ?
leaveVehicle does both group and unit unassign.
ah ok thank you then š
You shouldn't use remoteExec target 0 for this stuff btw. Should only need to run where the group & units are local.
ah ok but is there a way to exec the code on the group side ?
because i tried to put the "group" instead of "0" but it's not working
yeah you can't put group there. leader _group is fine.
ah ok thank you
need some help getting this script to work in a trigger
hint "Repair, refuel, rearm and heal administered!";
thislist spawn {
{_x Setdamage 0} Foreach _this;
{_x Setfuel 1} Foreach _this;
{_x setVehicleAmmo 1} Foreach _this;
{_x call ace_medical_treatment_fnc_fullHealLocal} Foreach _this;
};
trying to figure out whats not working here
It's probably locality problems
btw you don't need to make a bunch of separate forEaches, you can just do one.
{
_x setDamage 0;
_x setFuel 1;
// etc...
} forEach _this;```
that's not the source of the problem but something to keep in mind
Also can't you just do:
hint "Repair, refuel, rearm and heal administered!";
{
_x Setdamage 0;
_x Setfuel 1;
_x setVehicleAmmo 1;
_x call ace_medical_treatment_fnc_fullHealLocal;
} Foreach thislist;
1 min too late
:p
although you removed the spawn, mb
make sure the trigger is made server-only, then:
{
_x setDamage 0;
[_x, 1] remoteExec ["setFuel", _x];
[_x, 1] remoteExec ["setVehicleAmmo", fullCrew _x select { _x select 3 isNotEqualTo [] } apply { _x select 0 }]; // a bit ugly but should work
[_x] remoteExec ["ace_medical_treatment_fnc_fullHealLocal", _x]; // check with ACE doc for locality
} forEach thislist;
does not seem to want to execute
Does it perchance give a specific error that might enlighten us on why?
I have a feeling it's because you can't have comments in Editor code fields, but reading the error message is step 1
yeah hang on
sorry i had to step away @hallow mortar
let me try removing the comments and re execute
removed them and it executed
let me see if it functions
new error
Got rid of the locality in the script and yet another error
Currently script reads as :
{
_x setDamage 0;
[_x, 1] remoteExec ["setFuel", _x];
[_x, 1] remoteExec ["setVehicleAmmo", fullCrew _x select { _x select 3 isNotEqualTo [] } apply { _x select 0 }];
[_x] remoteExec ["ace_medical_treatment_fnc_fullHeal", _x]; } forEach thislist;
use !code and ace_medical_treatment_fnc_fullHeal isnt the same fnc as ace_medical_treatment_fnc_fullHealLocal
!code
```sqf
// your code here
hint "good!";
```
ā
// your code here
hint "good!";
{
_x setDamage 0;
[_x, 1] remoteExec ["setFuel", _x];
[_x, 1] remoteExec ["setVehicleAmmo", fullCrew _x select { _x select 3 isNotEqualTo [] } apply { _x select 0 }];
[_x] remoteExec ["ace_medical_treatment_fnc_fullHealLocal", _x]; } forEach thislist;
hint "good!";
hmm....
The hint "good!"; is to demonstrate the code formatting, you don't need to keep it
ah okay, right
{
_x setDamage 0;
[_x, 1] remoteExec ["setFuel", _x];
[_x, 1] remoteExec ["setVehicleAmmo", fullCrew _x select { _x select 3 isNotEqualTo [] } apply { _x select 0 }];
[objNull,_x] remoteExec ["ace_medical_treatment_fnc_fullHealLocal", _x]; } forEach thislist;
ace_medical_treatment_fnc_fullHealLocal should be the right function to use, not the other one.
The error you got when using it appears to be internal ACE Medical stuff, not something you've directly caused. It seems like some part of ACE Medical was not initialised. I don't know why, there could be many reasons. Make sure whatever setup ACE needs to run properly in the mission is done correctly, I guess.
I havent changed any of the CBA/ace settings, but I'll import the ones I usually use and see what happens
imported the settings and still getting that same issue, ive never seen that before
You also have KAT Medical running. KAT Medical changes some ACE functions in order to work with them. The modified function attempts to reference a KAT variable which is not defined. Why the KAT variable is not defined is not something I can figure out for you.
thanks for the heads up, I have this function running as an addaction elsewhere and it works fine
but for some reason i cant get it to work on a trigger
Hi, I'm having some problems with unit traits. It seems that changing a trait in zeus isnt actually changing what "getUnitTrait" returns, it remains the same as whatever it was set to at mission start.... Is this a known issue?
which unit trait?
"ExplosiveSpecialist"
Hold on, let me double check if I have any zeus mods loaded
Ok, its probably zeus enhanced that adds that feature, likely something wrong with that then, thanks!
You can with achillies, maybe zeus enhanced too
1000 bullets.
My game would die even without any scripting with that amount of bullets
It certainly would have a negative effect on performance, but I doubt it's measurable.
Bullets don't die THAT frequently
Anyone ever delve into the attachto script with player memory points?
If I were implementing that i'd have a flag on the bullet
Which is set when the eh is added
when its destroyed it checks if the flag is true
if it is then it handles the eh
Which means the performance impact would be almost literally 0
a single execution if statement, not even in a loop, isn't worth considering
Also, for everyone who'd like to see that EH, can you please add a comment if you can think of any uses you'd put it to
Well I submitted this ticket a while ago about the memory points on player character's upper arms and it hasn't really had a response http://feedback.arma3.com/view.php?id=24589
I understand it isn't the most important issue, but I was wondering why the skeleton is like that for player characters
Yes, it is and no I am not
I think I will live, besides I am leaving next week forever.
Anyone have any input on the memory points?
hello everybody.
I am new here and in the arma mod community, and i am trying to make a Guitar model that i create to be an item in game, that the player can take it and use it. My intentions is to make appears in the inventory and then use like a weapon, not to shot or do damage, but to hold in the hand and then in the future, play a animation of the character playing.
I don't know how to make a script to make this.
All the help is appreciated.
Thank you.
How much have you actually have completed?
Christ what did I type
What all have you finished of your idea?
i created the script for the texture,material, physics
but i actually have no idea how to make the guitar a usable item
Did you set up a config to physically put the model in the game?
yes
Okay
it's already working in the editor
Huh, "Init" event handler gets called on assembled gun or vehicle each time you assemble it
Despite it simply being hidden when you disassemble it, entity doesn't actually respawn when you assemble it again
So you need to know how to put it in your inventory and use it, just so we are clear?
disassembled guns are the most fun thing in Arma
We once disassembled a MG while the gunner was still inside, he was then stuck inside the gunbag, and we could put him on our backs and carry them around with us
That happens to poor UAV AI units all the time, why not players too 
cause the intention is to the character to hold the guitar just like in real life
The best part about assembling something is when it jumps and dies from collision damage instantly after being assembled

Speaking about UAV AI units, is there a system in place to ensure that they don't get damaged from their vehicle getting damage? Are UAV seats just protected from inheriting the damage or there is something else going on?
Did few tests with vanilla assets, didn't see UAV AI units get damage at all š¤
Well I mean, you would also need an animation for that
Yeah, I get you, I don't even know half the shit that you are able to do
seems to be a lot of stuff to discover still
do you have any ideas how can i make this happen ?
You have to put it under a certain config so that it appears as a certain item
Actually, I just tested this, UAV units aren't hidden along with the Drone static gun, they're deleted and created each time into a new group and old empty group is NOT cleaned up
Certified Arma moment

GroupDeletedWhenEmpty flag is false too
So like if you wanted to add an item for example you would put it in classes like this
class cfgWeapons
{
class InventoryItem_Base_F;
class ItemCore;
And then you can add your own class for your specific item
Like
class Tsugoro_Guitar;
{
ALL YOUR PARAMETERS HERE
}
And there are quite a few parameters like the displayname, item picture, model, texture, etc.
That would be in your Config.bin, by the way
so the class cfgweapons would make the model collectable?
The class in cfgWeapons IS the item.
oh i see
the model is just a property of the item/weapon whatever
You could have 10 compeltely different weapons/items with the same model
That's just the hierarchy that it starts with and then you "define" it further with class ItemCore or however you want to explain it
I guess you could keep it in just cfgWeapons if you want, but that wouldn't be very productive
Where else?
what?
No, I mean just without any "sub-configs"
I don't know exactly what you want to do with the guitar, like make it a launcher or what
or just an item
Well like, if you want to hold it like a weapon, you might have to put it in as a launcher or pistol or where ever you decide
i would have to turn the model into a ''weapon''?
If I were doing it, but this is just me, I would put it in as an item and use the ACE menu to start an animation/sound
But I don't really play without ACE
It would be kind of interesting to put it in as a launcher so you can physically see it in your back
Sure
wow,didn't know that
You might want to get help from the model makers on that though, because I think there is a certain bone structure or something that you might need to have for a launcher, correct me if I am wrong
oh ok
Hey anyone knows for TFR mod, variables like TF_defaultWestBackpack should those not be available on the server too?
I really don't know the answer to that
but , you can help me with the script ?
@open tendon that sounds like a mission specific thing
kind guide me through it, cause i am to newbe at scripting
You can open up the config of any mod and check to see how they did their class
What is your config for getting the guitar in the game?
what do you mean?
@open tendon I define my TF settings in the Server Init and PV them.
it works, but not the only way probably
Good idea Anog, I see now on their github the variable is set in clientinit, that explains it
Example:
// No TFAR Backpacks on spawn. No!!
tf_no_auto_long_range_radio = true;
publicVariable "tf_no_auto_long_range_radio";
Anyone know a way to get an osprey to land. I've tried the invisible helipad thing. But they just won't land
@dense pine You said it works in the editor as an object?
Thanks, I think I'll work it out from here :)
what's the purpose of the landing?
To drop off troops
@snow monolith yes, but i just spawn it there in the editor
ok well for waypoint "TR UNLOAD" should work
Yea that doesn't also the troops have a get out waypoint
They the squad leader orders men out of the chopper. And it lands and drops off 3 or 4 guys
did you create the helo via script or editor?
So you have to have some kind of config set up to actually have it included in the game?
Just in the editor
ok then "TR UNLOAD" should work if you put that for the helo group
i know landings in arma isnt always easy but you can also try (vehicle this) land 'LAND';
On the init of unload?
wp activation maybe
K thanks
or from script
Something like this?
class CfgVehicles
{
class ThingX;
class murshun_armbands: ThingX
{
mapSize = 0.31;
_generalMacro = "murshun_armbands";
scope = 2;
scopeCurator = 2;
model = "\murshun_armbands\murshun_armbands.p3d";
icon = "iconObject_1x1";
vehicleClass = "Tents";
destrType = "DestructNo";
cost = 100;
};
};
In a config.bin folder with your mod?
Hi. We are using the attached script to spawn in 3 "hitboxes" for a character that is larger than the bounding box. The hitboxes are then attached to the character and used for routing damage into the player.
We are having issues when loading onto a MP server. If you choose a player slot into the character, it works as expected. It creates 3 boxes and attaches to the player. When you drop an AI down via zeus, it does the same but in addition also spawns 3 additional hitboxes but does not attach them to anything, he just leaves them behind (pictured). Again, only does this on AI characters dropped in via zeus, not player characters. Any ideas ?
mine is just like this
class CfgVehicles
{
class Items_Base_F;
class Guitar : Items_Base_F
{
scope = 2;
model = "\Guitar\Guitar.p3d";
displayName = "Guitar";
vehicleClass = "small_items";
};
};
on a config.cpp
Where are you putting this code?
when i spawn in the editor
It's in a mod. Specifically it's in a seperate addon which is then called up by config.cpp in the main addon directory
i can not interactive with it
like scroll and pick up item, and then in the inventory appears on your hand
class CfgWeapons
{
class Items_Base_F;
class Guitar : Items_Base_F
{
scope = 2;
model = "\Guitar\Guitar.p3d";
displayName = "Guitar";
vehicleClass = "small_items";
};
};
I think he means where is the code initialized in live game? is it in the units init eventhandler config or in say init field mission attributes of said unit in editor?
or something like that
That isn't fully right for CfgWeapons, but it would be in the CfgWeapons not CfgVehicles
ohh
Not quite sure how to answer that tbh.
This is in the config.cpp?
class Extended_InitPost_EventHandlers {
class BT_BME {
class BT_InitEventHandler {
onRespawn = true;
init ="_unit = _this select 0; if ((local _unit)) then {_unit execVM ""BT_Terminator_AceScripts\Scripts\fn_initHitbox.sqf""}; ";
};
};
};
so what's the difference between?
CfgVehicles would be just something like a building or sandbags or an actual vehicle
or soldiers
ye
I mean, you would still need additional scripting for the animation but I guess so
the animation to pick up the item from the inventory?
There is yes. I did try using the isServer and variants to stop it running on a headless but that didnāt fix it. Also tried it on a server with no headless and it still did it
no for actually using the guitar
so let see, if i change to cfgWeapons i will be able to pick up the guitar?
And you're not putting these AI into player groups?
or i still have to add some other commands?
Thinking locality switch here.
just putting a single unit down causes the issue
Hi, i have a question ? Is it possible to move out units from a plane without the plane land directly after ?
[] spawn {
private _ggroup = mygroup;
private _gveh = (vehicle (leader _ggroup));
_ggroup leaveVehicle _gveh;
{
moveOut _x;
sleep 1;
}forEach (units _ggroup);
};
When i'm using a "sleep", every thing i did, still order the plane to land. I don't know what to do so is there a way to do that without sending a land order to the plane ?
the "leaveVehicle" command probably send a get out order and obviously without parachute, the plane is landing.
the "moveOut" command, probably send a get in order when they are in the air and the plane want to land to allow units to get in.
publicVariable to clients, perhaps?
@faint oasis So what orders is your crew group on?
actually i moved them, using the zeus
i'm order them to get in, and directly after i moved them into the plane
so the get in order is completed
This is really poorly described :P
I mean, what are the crew group actually doing at the point when you run the script above?
ah then i didn't understand sorry, they are waiting in the plane that is flying
They're the crew? They're not waiting, they're flying the damned thing?
i order the plane to go where i want and when it is above where i need to drop the units then i run the code
no it's not the crew, the crew is a separate group so maybe someone is sit down on the wrong seat i don't know but i don't think
you send it to missionNamespace or keep the thing you are trying to do server sided.
That space is only avaiable to the server anyways, its even stated in the locality section for the command:
Nope. Just a single entry in the config. Single unit being dropped from zeus
so do you have an idea ?
Nowhere near that stage. Don't have enough information. Make a demonstration mission maybe.
ok i will try then
its the same as any other namespace, the only difference its that its just available to the server.
Missions that have persistency/security measures/scoring systems usually do stuff here
use orderGetIn and leaveVehicle immediately after moveOut (unscheduled)
Ok but i need to use the moveOut in unscheduled ? or you mean other commands ?
all of them must be unscheduled
isNil {
{ moveOut _x } forEach _units;
_units orderGetIn false;
_group leaveVehicle _veh;
}
if you have many units it'll probably get laggy tho
ah yeah ok but i tried in an unscheduled environment but the problem is i want to get a sleep between
but i think the real problem is coming from the sleep
then at least try the orderGetIn and moveOut unschd
isNil {
moveOut _x;
[_x] orderGetIn false;
};
sleep 1;
ok i will try then but i still need to use leaveVehicle ?
I guess so 
you need it eventually
you can try it first like you have now
or after all units are out
so it's like
[] spawn {
isNil {
moveOut _x;
[_x] orderGetIn false;
};
_x leaveVehicle _veh;
sleep 1;
};
I guess the second one is safer
wat? no
If this is the case, wouldn't it be best to focus on whenever anyone but the server can access and parse the variable to players?
That makes me wonder:
Is there a way to make variable read only without compiling them?
just replace moveOut with what I told you (the isNil thing)
but i already put the isNil thing
I mean remove the spawn
ah yeah but actually i can't, otherwise the "sleep" won't work
[] spawn {
private _ggroup = mygroup;
private _gveh = (vehicle (leader _ggroup));
{
isNil {
moveOut _x;
[_x] orderGetIn false;
};
sleep 1;
}forEach (units _ggroup);
_ggroup leaveVehicle _gveh;
}
ok i will try that then
Note that if you didn't addVehicle the group in the first place, you can skip the leaveVehicle and just unassign each unit individually.
oh right that too
I forgot unassignVehicle
isNil {
moveOut _x;
[_x] orderGetIn false;
unassignVehicle _x;
};
actually i order the group to get in and after i move them inside so i don't think a vehicle is assigned to the group. I checked "AssignedVehicles" but it return an empty array
this is ok as long as the updates to the variables are often enough to deter the change playerside I would say.
Have you taken a look to localNamespace? You cannot send data over network in there, both in or out so you add another layer of security in order to make the variable be completely secluded from changes
[localNamespace, _hashmap] remoteExec ["setVariable" ,-2];
```?
this is the code i will try when i can
[] spawn {
private _ggroup = mygroup;
private _gveh = (vehicle (leader _ggroup));
_ggroup leaveVehicle _gveh;
{
isNil {
moveOut _x;
[_x] orderGetIn false;
unassignVehicle _x;
};
sleep 1;
}forEach (units _ggroup);
};
would it be possible to add at this point in arma another namespace that would let only server write to it but have client be able to take from it?
Or is this something that must be done using compile and remoteExecution trickery?
depending on how often you need to update the variable on player side, you might not be required to actually store it?
Like, for example if you want to be able to totally avoid it being changed ever by anyone but the server, I could see a simple get/set system in which the player ask for the variable to the server, the server answer and hand the variable as an argument but not as an stored value for your function in order to completely avoid this issue, the player would then answer back and the server will only update on its side until required to pass the value again.
But at what point it becomes more of an issue the frequency of updated against the security of your system?
Im not well versed on networking sadly
so when you using attachTo for two objects that were created using createVehicleLocal is this still a GE ?
I think depending on what the 'effect' of a player having hacked their own variable value has could be useful information. For example if they have a variable thats controlled serverside, which the client then uses to dictate which type of squad members to create client-side (via Ui button), then there would be no good way to prevent a cheater from spawning whatever vehicle they wished.
If you made it so the client recieved the information so the Ui could display "Spawn a Grenadier", and upon clicking the button they send a remoteExec 'request' back to the server, where the server would confirm that the requested "soldier to spawn" was equal to the type the server intended - this could potentially address the problem.
serverSideVariableOFTRUTH = "B_soldier_F";
clientSideDisplayVariable = serverSideVariableOFTRUTH;
clientSideDisplayVariable -> send to the client. (through public var, remote exec, ect)
client recieves clientSideDisplayVariable and updates ctrlButton text = "Spawn a Rifleman!";
client can alter clientSideDisplayVariable to whatever it wants, and then clicks the button.
client sends spawn request to server.
server recieves request and compares serverSideVariableOFTRUTH == "The solider requested from the client"
Now you know whether or not the server should spawn the infantry based on if they match, or if the person is cheating.
E.G; just having all networked global variables as 'display variables' for the client, have them send back requests using those values, which you compare to the actual values used on the server side to detect cheaters. Only issue would be the additional cost of having to do certain things on the clients behalf (If they request a new soldier once a minute who cares), or if the client has to be in charge of executing the functionality the variable is tied to on the client side (setting view distance ect)
How do you call alpha 1-1 In a script?
Like in Eden? It doesn't like spaces or hyphens at all.
you don't
you give the object/group a variable name and use the variable
Oh shit. I'm just now realizing this!
Dude. I never even thought about that. I've been so wrong!!
If you put it in cfgWeapons you can put it in inventory (And interact with it)
Hi,
When I enable Editable object Zeus from Eden attributes.
Can I disable this from certain items or have I create those simple object or something else?
If you want to remove objects from zeus editable, you can use removeCuratorEditableObjects
Awesome. Thanks.
Is that only via script or is there config value for this ?
Config doesn't really come into this. scopeCurator affects whether something shows in the create tree.
how would i hard lock a multiplayer mission into first person?
Can't you just change the difficulty settings?
I'm looking for the path and .paa name for the Old Man sick wound textures (the infected skin on units with boils). I looked at these "sick" units in the config viewer, under wounds and could not find it. Also, would I need the object material RVMats for this also? I want to apply this infected texture to another object via setObjectTexture.
How do i make it where popup targets will actually pop up again on a scroll wheel option
Not just like that afaik. Really though it's more of a model/config question.
Try #arma3_model
oh ok thank you
im having issue with MP sync of empty/invisible marker. is this a known thing? placed in editor, in dedi MP moving its pos on server, but tge pos is not moving on client
setMarkerPos?
Very much doubt there are any special conditions for marker being invisible, maybe you mixed something up and markers are different on each client (different name?)
or you're storing its position somewhere and not updating
yeah setmarkerpos from server is not moving them on client
same code exec on client moves them
only difference is they are āemptyā type
other markers working fine :/
@still forum How does engine figure out distance check for "Assemble" action to be shown? I tried to pin down the number by checking distance between weapon holder and player with distance command and its far from being any round number of 2.57something. getNumber(configFile >> "CfgActions" >> "Assemble" >> "radius") isn't there either, so what does the engine do exactly?
I want to create my scripted "Assemble" action but it shouldn't show if there is engine one shown already, thus I need to know how to check for it.
hmm, "isEngineOn" returning true for this box? š
hmm isEngineOn actually returning true for lots of things :\
try again tomorrow
EngineOn for buildings returns !IsDestroyed
It returns true for alive buildings and false for dead ones 
Not sure who at BI needed to check engine of the building running š¤
Unless its used for targeting, like check if entity has engine running so it can be targeted?
what about for "thingx" or boxes/etc
So alive buildings can be targeted and dead ones can't
afaik it's just a virtual function and it returns something for any object type. They could just make it return false ofc.
This also seems to be different if you lay down or not 
Ground weapon holders have memoryPointSupply and supplyRadius, but I still can't figure out the formula no matter what I try
Gib BOOL = ENTITY canReachSupply ENTITY
Usage would be player canReachSupply _weapon_holder
Made a ticket: https://feedback.bistudio.com/T171270
You can do assemble action at any time 
Nice feature
Not when falling though
When swimming too
i mean people can do dumb things IRL in those situations too
Yeah, people spawn their drones in the wall in front of them all the time IRL š¤
That Assemble action always positions the vehicle in front of you so you can guess what happens there, it just dies inside the wall
What could be useful is disableGameAction command to just forbid certain actions from appearing in action menu
So engine-driven actions can be hidden and properly scripted one created
"Assemble" disableGameAction true;
Or inGameUIDisableAction to be in line with inGameUISetEventHandler
Transport boxes it returns !engineOff
As they don't have engines, their engineOff is probably never set
Or disableAction
"Assemble" disableAction true - disable Assemble completely
"Assemble" disableAction [_tripod_weapon_holder, true] - disable the action on a specific vehicle
How do i save data i calculate with scripts running in 3den so that it is still present when i run the mission/reload 3den?
Wouldn't that make the saved things profile dependent?
Yes it would
You can use it during development but then export your pre-calculated data manually into some script before release?
No
I'm making a mod that adds trenches, the placement and connecting of which uses scripts to know how they interact.
I don't want the users of the mod to have to go through an extra step when creating missions using them.
Not possible without using profile saving if you're not going to put a module or something in 3den with this info
how do modules work?
however you want to make them work
so i guess i can save gobal variables into a modules attributes?
You can save it into object attributes
Eden enhanced probably has examples for it.
TFAR does it https://github.com/michail-nikolaev/task-force-arma-3-radio/blob/master/addons/core/Cfg3DEN.hpp#L51
But that just stores a text field
You can access object attributes via script. so you could add a (invisible?) text field where you store the data.
Calculate inside 3den, and set attribute https://community.bistudio.com/wiki/set3DENAttribute
And give it a expression (in config) that runs at mission start that retrieves and handles that data
great
is there a way to save references to other objects that way without giving them global variable names?
I don't think so.
Every entity has a "id" in mission.sqm. Maybe you can get that via attribute but dunno how to get it ingame when mission actually runs
seems like you can't
i just realized i already have my own system of giving my objects unique "ranks".
i guess i can use that as a system for IDs aswell since i'm gonna save those as an attribute anyways
where can i find documentation of how to do custom attributes?
https://community.bistudio.com/wiki/Eden_Editor:_Cfg3DEN this isn't really helping much
nevermind found it now
guys, if I have an array with many uniforms that are the same, and then I do this: sqf _selected = selectRandom _uniformArray; _uniformArray deleteAt (_uniformArray find _selected);
Will that delete just the uniform once or will it delete all the uniforms in the array that are the same?
the first instance only
Perfect! Thanks!
_selected = _uniformArray deleteAt floor random count _uniformArray;
deleteAt returns the value it just deleted
that would have different effects tho
it could delete an item that is not the first instance of its kind
Doubt it matters here
https://community.bistudio.com/wiki/Initialization_Order am i understanding the footnote on that page correctly if i believe that the engine will not start simulation until postInit functions have finished executing?
postInit functions are scheduled/async
it will start simulation before they are done
is the note wrong then
wait, no yes partially
it's that the note does not apply to postInit function at all @quiet gazelle
so which is it now?
also is creating thousands of objects during init something i can do in multiplayer or will it just break due to network load or something?
the alternative would be to create all those objects as 3den objects and having them be part of the mission file that way
me no idea, Dedmen knows
https://community.bistudio.com/wiki?title=Initialization_Order&diff=next&oldid=95791
Freghar (?) added this note
ah
(clarify Scheduled env properties for postInit / init.sqf (SP only))
except that he didn't set that in the note itself -_-
Alright
no
No, because remoteExec causes the command to be executed somewhere else, and it's very unlikely the other machine could send back a return in time to be used the same way
it returns the JIP identifier and that's it - it's "send and don't care" ā
It can also be sent to multiple targets, so even if it could wait for a remote return, lord knows what you'd get back
If you're executing a custom function, you can use uhhh remoteExecOwner? to target the originating machine for a manual callback
private _playerNames = [{ name player }] remoteExec ["call"];
// waits for 10s
// _playerNames is now ["joe 1", "joe mama", "hello there", "general kenobi"];
```š
anyone got any ideas about this?
Do lots of logging to see what's going on
diag_log text format ["%1: MY SCRIPT JUST GOT EXECUTED", diag_frameno toFixed 0];
Check if its done on the same frame
@celest agate / @somber folio same person?
If not, maybe something else does the init again
on the same team
Also make sure its really the only place you call your function from
Change your EH to something like:
class Extended_InitPost_EventHandlers {
class BT_BME {
class BT_InitEventHandler {
onRespawn = true;
init ="_unit = _this select 0; if ((local _unit)) then {diag_log 'About to execVM the fn_initHitbox!'; _unit execVM ""BT_Terminator_AceScripts\Scripts\fn_initHitbox.sqf""}; ";
};
};
};
If your function is called from elsewhere, it will call it but there will be no log
Then you'll have to search where its calling from needlessly
Not sure how Extended EHs work, I don't use CBA, but you can at least filter out some of the possible causes
yeah will try this, thanks mate
Also this copy-pasted code pains me 
atleast is not gpt
Also you can make it JIP compatible by doing:
remoteExec ["spawn", 0, _BT_HITBOX_MID];
```(and each of your parts) it will execute code for newly joined players and JIP will get removed when entity gets deleted.
Postinit is started by initFunctions.sqf, pretty sure always scheduled
so even in SP, got it
time to fix past mistakes
Maybe the sp only was referring only to the init.sqf part
But that must be scheduled, people depend on jt
{systemChat str 123} remoteExec ["call", 0, player];
{systemChat str 321} remoteExec ["call", 0, player];
```will this queue 2 calls for JIP?
Augment to that, can use the callstack thing function to find where it's called from
I think it should
Wondering if supplying same entity for JIP will overwrite previous exec in queue š¤
Did
{diag_log str 123} remoteExec ["call", 0, player];
{diag_log str 321} remoteExec ["call", 0, player];
```RPT of connected client:
21:41:54 "123"
21:41:54 "321"
21:43:39 "321"
So yeah, having same entity in remoteExec JIP parameter overwrites it in queue
Not very mod-friendly to be honest
Can only be safely utilized on mission-level making sure you don't overwrite your own stuff
JIP ID is extra field after object right?
params remoteExec [order, targets, JIP]
Yeah, expected it to stack several execs, its only logical thing
You can do Array right? Maybe array with object at start
We ended up with a ton of custom IDs and removal mechanisms for different bits of Antistasi
Doesn't object as JIP have special meaning? Aka only JIP to that object or smth
well, it deletes the JIP entry when the object is deleted. Allegedly.
which is nice if you can get away with only having one of them.
I'm curious how it does the delete š¤
Does it check if JIP handle is in netid format and tried to convert it to object?
Hello, tell me how to find hiddenSelections[] if the 3d model is not available (abandoned)? Maybe there is some code like copy To Clipboard getText (configFile >> "CfgWeapons" >> "arifle_MX_F" >> "model");, only for hiddenSelections[] ?
Huh, I just did:
{diag_log "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"} remoteExec ["call", 0, "2:1563"]
```checked that it logs for JIP, then I deleted the vehicle and new joins didn't log anything
Bet engine does a regex check if JIP handle matches netid format or something
Read the docs š
Object, Group or netId - The persistent execution of the remoteExec statement is attached to the given object or group.
When the object / group is deleted, the remoteExec statement is automatically removed from the JIP queue
Yeah it doesn't seem to actually store the object in the queue, only its netid string
Thus the overwrite
Are you sure? Have you tried creating two remoteExecs with an object and its netId?
No Regex, simpler
Replace getText with getArray and "model" with "hiddenSelections"
Something something on object delete smth know JIP smth remove smth
Worst case, on every object delete it checks all JIPs to remove some
Looked at how that works.... 2 years ago
{diag_log "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"} remoteExec ["call", 0, "2:123"]
22:00:37 Trying to call remoteExec(Call) with a null-object as JIP ID ('2:123')
So yeah, JIP handles that looks like netid aren't allowed if they don't match some vehicle's netid
If everything had such good error checking š
Question is what JIP clients get if you do this:
{diag_log "123"} remoteExec ["call", 0, _object];
{diag_log "321"} remoteExec ["call", 0, netId _object];
right

lol wat
Restarted the game, now only
22:11:46 "DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"
WTF is going on 
Oh wait, I had another AAAAAAAAAAAA log from earlier experiments left
{diag_log "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"} remoteExec ["call", 0, "a2:156311"]
added a before the number and it treated it as valid JIP handle
So yeah, supplying entity into remoteExec is a mere shortcut from doing netid _object
Though it uses netid to check if object was deleted before executing queue item
So no, that was due to my mess up
Deleted messages with wrong results to not confuse anybody who sees\finds them later
ok.
So, summary of all tests:
{diag_log "123"} remoteExec ["call", 0, player];
``` is identical to
```sqf
{diag_log "123"} remoteExec ["call", 0, netid player];
```and will overwrite each other in the queue for JIP
errors:(
it might be useful to know what the error is
Using netid that starts with 0: works like any other handle:
{diag_log "AAA"} remoteExec ["call", 0, "0:123123"]
```If netid starts with `1:` it throws additional error:
```sqf
{diag_log "AAA"} remoteExec ["call", 0, "1:123123"]
22:26:01 Object id Veh-123122 is not static
22:26:01 Trying to call remoteExec(Call) with a null-object as JIP ID ('1:123123')
Well, the code should still be remoteExec'd, whatever it is.
client doesn't even get to see the JIP ID.
Seems to be realiable, attaches to map objects by their "1:X` netid and executes for JIP
I think clients get JIP IDs too and do the check themselves since it works with map objects
You mean with map object as target rather than JIP ID?
Yes
Using cursorTarget on some far away map building returned handle of "1:-1680485812", code executed for JIP (that part of the map wasn't streamed in for sure), and objectFromNetId returns correct building too.
Seems to be pretty reliable
Still sucks we can't stack multiple JIPs against same entity
Question does anybody know how to get texture or material of a malaria disease from old man scenario ?
the _sick variants i believe
use setface to set the units skin to be that
That is setting just a face what about arms and legs. So the malaria isnt just like a overlay texture or material ?
These perhaps?
\a3\characters_f_oldman\Heads\Data\hl_sick_black_mc.paa
\a3\characters_f_oldman\Heads\Data\hl_sick_mixed_mc.paa
\a3\characters_f_oldman\Heads\Data\hl_sick_white_mc.paa
\a3\characters_f_oldman\Heads\Data\m_sick_black_mc.paa
\a3\characters_f_oldman\Heads\Data\m_sick_mixed_mc.paa
\a3\characters_f_oldman\Heads\Data\m_sick_white_mc.paa
i believe arms and legs are set with setface aswell
^yup
Yea ty very mutch for these. Also @foggy stratus i beleve you needed these as well.
weren't you making an extension? if so you can just serialize your data manually to the mission folder.
Sorry, I have a basic question. How can I move a group of AI units to consecutive waypoints? Where a1, a2, a3 are different objects and I want to group to move form a1 to a2 and then to a3?
just addWaypoint
they will simply move in the addition order
_wpgroup = units group player -[player];
targetwp = _wpgroup addWaypoint [player, 0];
targetwp setWaypointType "MOVE";
But this gives me an error.
Not sure why?
player is just an example for an object
What is the error?
I suspect order of operations problems in the first line.
Also waypoints can only be given to actual groups, not just a list of units
addWaypoint: No syntax matches theses arguments . ARRAY addwaypoint ARRAY
you must add the waypoint to a group
not to an array of units
"group" in Arma is a specific entity type, not just the generic term for an arbitrary collection of units
{
group player addWaypoint [getPosASL _x, -1];
} forEach [a1, a2, a3];
alternatively you can run a loop that checks if the unit has reached his destination then add another one
I see. I wasn't aware that "group" is a specific entity. Thought I can create the group myself.
Well, you can createGroup and then join the units into it
if you do that you can't control those AI units anymore
Yea, makes sense
If you just want the AI to return to formation, you should use doMove instead of adding waypoint.
I want to keep the units in my group
this is the way then
So queue gets cleared on object deletion?
I wonder how complex that netid check is
the objects thingies things
As in, can we have it remove JIP queue items that start with netid instead of matching it?
so we can do ```sqf
_args remoteExec ["func", 0, format ["%1 my unique JIP name", netid player]];
true, i may just do that.
it would allow me to set the values in the preInit.
another way is saving your data to mission.sqm directly (but I don't recommend it)
hi, i'm trying to create a dialog using CT_EDIT but i all the things i try doesn't work, does someone know how it works or have an example?, i'm using the example the wiki use but it doesn't work
how would i do that?
there are several ways 
one way would be create a unit then put the data in his init field (you can do that using 3den commands)
another way is writing to mission.sqm directly (but I guess you can't unless it's unbinarized)
actually you can read the data using loadConfig even if it's binarized then you can save it unbinarized... oof nvm that's too messy 
https://sqfbin.com/ your config
Hello, tell me how to find hiddenSelections[] if the 3d model is not available (abandoned)? Maybe there is some code like copy To Clipboard getText (configFile >> "CfgWeapons" >> "arifle_MX_F" >> "model");, only for hiddenSelections[] ?š
{diag_log "000"} remoteExec ["call", 0, "2:123"];
{diag_log "111"} remoteExec ["call", 0, "2:123 stacked 1"];
{diag_log "222"} remoteExec ["call", 0, "2:123 stacked 2"];
{diag_log "333"} remoteExec ["call", 0, "2:123 stacked 3"];
```If queue got cleaned up by checking if string starts with netid instead of just exact match, we could've had stacked queue against single entity
copyToClipboard str getArray(configFile >> "CfgWeapons" >> "arifle_MX_F" >> "hiddenSelections")
getArray(configFile >> "CfgWeapons" >> "launch_RPG32_F" >> "hiddenSelections") => ["Camo_1","Camo_2"]
@still forum If I understood your something-something explanation, when vehicle deletes JIP queue gets checked against its netid and queue item gets removed if found? Does my suggestion makes sense? Not only remove exact netid matches but also handles that start with netid + space
Unless its done the other way, by going through all handles and converting netids to objects, then its a bit of a problem š¤
is there a way to create a super-simple object as a 3den object?
Sorry, still confused. How would I proceed from here to move the AI in player's group to the destination of the enemy?
singletarget = player findNearestEnemy cursorTarget;
group player addWaypoint [getposASL singletarget, -1];
AI is not moving.
you can make an ordinary object then put some code in its init field
waypoints tell the LEADER where to move
not the units in the group
that waypoint is telling you where to move
the AI just follow you along
you mean the config.cfg?
Your config with CT_EDIT
Your display class code
So there is no way to instruct the squad AI to move to the enemy via added waypoint if I do not create a seperate group for them?
like I said a couple of times you need to do this
doMove is not an option for me because it is part of a loop and doMove creates a stutter step. That's why I thought addwaypoint would be a solution.
I got itl. My problem is that I do not know how.
is there a way to add or edit a value in configs during a mission?
I want to generate a certain value for each group defined in my CfgGroups.hpp file at the start of the scenario and don't need to actual file to change
Or maybe I can use doMove in combination with moveToCompleted? And then give the unit a new target.
@meager granite https://sqfbin.com/deruqezunalixevuruvo
No, but if you parse your config into your own structure and use that, you can change variables in your structure however you want
So what doesn't work about it? Where do you have it, how is it used?
Thanks @fleet sand and @digital hollow! I now have a plague dog: https://i.postimg.cc/KjM5yhps/plague-Dog.jpg
thanks, I'll probably do something like that
btw your CT_EDIT covers entire screen 
Also there is #arma3_gui
when i put text on it, it doesn't appear and when i'm trying to write or copy or do something nothing happens, the dialog don't show anything more then the background if i put a color for it
Are you sure GUI_TEXT_SIZE_MEDIUM is defined?
Do you have #define GUI_TEXT_SIZE_MEDIUM somewhere above?
Where do you have your config anyway? Inside description.ext?
i have it define in another .hpp
Are you sure that another .hpp is included properly before your RscEdit config?
_unit1 setVariable ["my_waypoints", [ASLtoAGL getPosWorld obj1, ...]];
_unit2 setVariable ...
[[_unit1, _unit2, ...]] spawn {
params ["_units"];
_units apply {_x setVariable ["reachedDest", true]};
while {count _units > 0} do {
_done = [];
{
if (_x getVariable ["reachedDest", false]) then {
_wps = _x getVariable ["my_waypoints", []];
if (count _wps == 0) exitWith {_done pushBack _x};
_wp = _wps deleteAt 0;
_x doMove _wp;
_x setVariable ["destination", _wp];
_x setVariable ["reachedDest", false];
} else {
_pos = ASLToAGL getPosWorld _x;
_dest = _x getVariable ["destination", _pos];
if (_pos vectorDistance _dest < 5) then {
_x setVariable ["reachedDest", true];
};
}
} forEach _units;
_units = _units - _done;
sleep 1;
}
}
``` something like that
i'm going to try changing that to another thing to see if that works
Where do you have your dialog?
If its in description.ext, execute:
getNumber(missionConfigFile >> "MyDialog" >> "controls" >> "RscEdit" >> "sizeEx")
```in game to see what value you have actually in the config
i have two .hpp define in description.ext, one call define.hpp and another call dialog.hpp
Change MyDialog to your display's config name
getNumber(missionConfigFile >> "MyDialog" >> "controls" >> "RscEdit" >> "shadow")
```should return `2` to make sure you address your `RscEdit` correctly with that path
i'll try that
Replace your sizeEx to some fixed value to see if it helps
sizeEx = 0.1;
Also make sure you properly reload your mission so configs are reloaded
Not how this behaves in 3DEN
it return 0
this work, thanks
Means that path is wrong
MyDialog should be your display config name
whatever you defined in your dialog.hpp file
Means your GUI_TEXT_SIZE_MEDIUM define is not visible in your dialog file
how can i detect when a text of a dialog coincide with an array?
ā¦please explain
i'm trying to create a dialog that permit the player to write a text (a computer display) and detect when the player write a key word to trigger an event
so you want it to coincide with a string, no?
to detect if it coincide with a string, yes
_ctrlText this was the thing i didn't understad how to do it but now i have an idea how to do it, thanks
if you want to go petty, you can even use isEqualTo to check it being case sensitive, ideal for password systems if you ask me š
can i define a function as a variable, stream it and use it in a remote exec?
my_func = { //do local stuff };
publicvariable "my_func";
remoteexec ["my_func", 0];
I believe you need to compile it to be able to send it through remoteExec
nvm that, you can, check last example
we need a name to the "biki blindness"
a code {} is already compiled
also i always forgot, there is function that does the same as "server exec" in the console?
i mean that executes the code in the server, and send you the result back?
you can make it yourself
how you send the message back to the specific user?
remoteExecutedOwner
with an remote exec with an { response = _value } remoteexec [ "call", remoteExecutedOwner ] ? there is some way to send a value?
might be better to link him the function how you do it in advanced developer tools to read
[_values, "functionName"] remoteexec ["my_fnc_remoteExecCallback", remoteExecutedOwner]
iirc I use call 
I don't want to encourage it
ooooof lol
do what i say, not what i do lol
anyone off hand know the config value to search in order to find the model of a vehicle's dead/wreck state?
it was just a lazy thing I added back when I was making the exec stuff
I forgot to change it
it's a proxy
in CfgNonAIVehicles
ty
basically just do obj selectionNames wreckLodRes
get wreckLodRes from wiki (21e15)
this will give you the wreck proxy model (you need to parse it tho)
actually it might not necessarily be defined there
it actually returns the model path with the word proxy: in the string lol so I have to do some string manipulation
that + proxy index
it's proxy:path.00n
so you could do _proxy splitstring ":." param [1, ""]
- ".p3d"

well in my defense that's not something that user might execute many times in succession 
idk what you want to do so...better not do it with call in general
looks like you can't do createSimpleObject with (at least the one I'm doing) proxies.
I get a model object return, but nothing visible
you sure you're not putting it under ground?
also just to be safe use hideSelection to unhide it's selections
it might've hidden some of its parts
(shouldn't tho)
I'm just using [0,0,0] for now in testing
it might be under ground then
[0,0,0] for crSimpObj is ASL
if you're testing in VR that's below ground
yup, threw in a ATLtoASL and it shows up
how does selectionVectorDirAndUp work?
wdym how?
what does it return if i use it?
2 vectors: dir and up 
how is the direction of a selection defined?
well for some objects the selection is just a face
generally a right-angled triangle
so dir and up are just its right angle edges
dunno about others
probably the first face in selection or something 
example:
or maybe always [0,1,0][0,0,1] unless changed by animation
thanks
I have a piece of code in an .sqf and which I trigger from a custom menu. Now sometimes I excecute the script again before it finished which starts multiple instance of the code. This is causing conflicts. What is the best practice to ensure that I don't run the same code multiple times?
scriptDone
Thank you. I'll have a closer look how I can terminate the old script before starting the new one.
Would this work?
_scriptHandle = ["arguments"] execVM "\Scripts\AiAttackTarget.sqf";
_finished = scriptDone _scriptHandle;
if (!_finished) then {terminate execVM "\Scripts\AiAttackTarget.sqf"};
no
well first you launch a script. then immediately afterwards check if it's done, then terminate it...
wait no that's not what you do...
you launch another script then terminate that one immediately 
Yea, fair enough
Not sure how to do this
Can only have one instance of it runnig
you should save a global handle
first check if the old handle is done
if not terminate it
then start a new one
_oldHandle = missionNamespace getVariable ["my_scriptHandle", scriptNull];
if (!scriptDone _oldHandle) then {terminate _oldHandle};
my_scriptHandle = execVM...
the missionNamespace getVariable [... bit is in case you didn't define my_scriptHandle already
if you haven't it just uses a default value of scriptnull for it
ok, i see. so i have to run another sqf first to do the check and then execvm from there
no. you can just use it in the commanding menu code
_code = {
_oldHandle = missionNamespace getVariable ["my_scriptHandle", scriptNull];
if (!scriptDone _oldHandle) then {terminate _oldHandle};
my_scriptHandle = execVM...
};
...
["menu item",... [["expression", toString _code ]]...
Nice, I'll try to get this implemented. As always, thanks a lot for your help!
is there any way to stop this call BIS_fnc_attachToRelative via a trigger?
Do you mean to detach an object that has been attached with BIS_fnc_attachToRelative? If so, yes, it's just a wrapper for attachTo with some extra position calculations, so detach works fine as normal
ah sweet thanls
I ended up going with:
params ["_vehicle", "_proxy"];
private _firstPoint = _vehicle selectionPosition [_proxy, LOD_FIREGEO, "FirstPoint"];
private _averagePoint = _vehicle selectionPosition [_proxy, LOD_FIREGEO, "AveragePoint"];
if (_firstPoint distance _averagePoint > 0.85) then {
_firstPoint vectorAdd [0, 0,
(_averagePoint # 2 - _firstPoint # 2) * 2 / 1.333333
]
} else {
_firstPoint
}
Since selectionVectorDirAndUp does just return [[0,1,0],[0,0,1]] for side-facing proxies.
Also apparently some seat proxies are not full size?! see https://www.youtube.com/watch?v=T-5jYbaUQUo
Where if I offset by 2m it's too low, and I have to scale the offset to the distance between average and first points.
Sorry to come back on this again but I am struggling to iplement the piece of code into the menuitem. Below is the menuitem I am currently using and I am not sure how to add the toString _code to it?
["Attack Target", [2], "", -5, [["expression", "execVM ""\Scripts\AiAttackTarget.sqf"""]], "1", "IsLeader", ""],
why that? what was wrong with what I suggested?
define the _code before defining the menu
toString _code is obviously used instead of "execVM ""\Scripts\AiAttackTarget.sqf"""
just look at the pattern... 
I intentionally put "expression" for you
seats facing sideways had calculated positions offset to forward, since the selectionVectorDir doesn't face sideways.
then I guess the dir and up is not what I thought they are
I figured it's like this
may be only accounting for animations, like your other suggestion
idk what you mean. selVecDirUp does account for animations
yes, I mean it diesn't care what dir something is in model, only reports how it has been changed by an animation
usually not
oh right they can
but they can be animated too as part of moving parts
also this doesn't seem correct at all 
yeah it's assuming that it's mostly vertical and the "rear" vertex never gets returned as first.
well if you're going that route you can just do a comparison
you know where the average is always gonna be
now just compare it with the 3 possible diffs
i.e. avg is always [0, -1/3, 2/3]
diffs can be diff with [0,0,0] , [0,0,2], [0,-1,0]
they're all constant values
you just evaluate them once then based on which diff you match with find the correct point
actually you still need vecDirUp for that...
yeah, so if it is the top point, I'm only estimating a vertical offset.
if you wanted that you could just create a simple object of the model once
then cache the proxy pos
I got it working. Thanks Leopard!
rn I'm checking every use, but the only regular vehicles that might change seat positions would be tank turrets, and that's not really super meaningful. So you're probably right that I should be caching these on first use.
private "_time";
_time = _this select 0;
while {_time > 0} do {
_time = _time - 1;
hintSilent format["Time Left: \n %1", [((_time)/60)+.01,"HH:MM"] call BIS_fnc_timetostring];
sleep 1;
};
hey I'm running this on a trigger
how can I make it so that only people within a certain radius can see the hint?
if running that on the server only, you would do:
[format ["Time Left: \n %1", [((_time)/60)+.01,"HH:MM"] call BIS_fnc_timetostring]] remoteExec ["hintSilent", allPlayers select {_x distance thisTrigger <= myRadiusHere}]
so I put this in the trigger OnActivation?
it was to replace your line in what you posted. i don't know how you have that implimented
its just an sqf in the mission folder at the moment
and i'm guessing you are execVM that file when the trigger activates?
wasn't even sure about that since I don't know how to not activate it for everyone
so assume I have nothing at the moment
this seems like it would be best if you made the trigger server only. the remoteexec will do the rest
so I tick server only and put nul = [300] execVM "timer.sqf"; in the trigger?
I'm illiterate code wise so I don't want to take anything for obvious
the [300] is the timer time
[300, thisTrigger] execVM "timer.sqf"
and to clean up your code:
if !(isServer) exitWith {};
params ["_time", "_trigger"];
while {_time > 0} do {
_time = _time - 1;
private _txt = format ["Time Left: \n %1", [((_time)/60)+.01,"HH:MM"] call BIS_fnc_timetostring];
[_txt] remoteExec ["hintSilent", allPlayers select {_x distance _trigger <= 50}]; //or whatever radius you want as that number
sleep 1;
};
will thisTrigger recognize the trigger used or should I put something in its place?
I guess now it will recognize the trigger its fired from
last question
can multiple of these play at the same time in different areas?
if you have multiple triggers, yes
always servee only right?
yes
What's the name of the listbox with a scrollwheel in list? RscListbox doesn't seem to have one.
Or does it just require a ControlsGroup?
Not sure which one you mean, can you post a pic?
Scroll bar on right side allows you to see the additional options in the list, but mine doesn't have one. Thinking it's because I didn't create the listbox inside of a controlsGroup
Or if I'm just not using the correct RscListbox classname or w/e
that's just a normal listbox
make sure it's not disabled and it has a thickness
I think wholeHeight limits how big your visible list can be when open
Ahh okay, thanks š
If you're using the standard Bohemia Support system (support provider and requester modules) for fire support, do placed units synced to the Provider modules get magically topped up ammo, or would you need to use a script to give them more?
Quick question has anybody played with UI on Texture. Is there simple example of map ui added to object texture ?
_obj = createSimpleObject ["SignAd_Sponsor_ARMEX_F", getPosASL player];
_obj setObjectTexture [0, "#(rgb,1024,1024,1)ui('RscMap','aaatest')"];
Something like this?
Define display with a map, use display's name in procedural texture.
You can do it with empty displays and ctrlCreate but its messy
There is a repro in my ticket that does it: https://feedback.bistudio.com/T170754
Is there a way to get vehicle mass from config? I am modifying with "setMass", not sure if I need to save initial mass with a variable or something though
I do not think there is, actually a mass is a model side thing so without loading them... no
#rvenginesux
k
#not_having_scripting_commands_for_trivial_engine_stuff_sux
SQF grew on me very much over the years, if only it had proper set of scripting commands right away
I remember I wanted to script something back in OFP days in like 2003 but quickly realized you can't do seemingly trivial stuff because there are just not enough scripting commands and I abandoned it.
Like what? Let's slap Dedmen's cheek together
Having setHit but no getHit even in OA days was a shocker too when I looked into it all again
Well, that get mass thing Quiksilver mentioned, I assume you can still do it with getMass once object is first spawned
But having some command to explore original model\shape properties like this one will be useful
Yeah that would be sick
Is it possible to use the killed event handler to check if a unit has a local variable assigned? Im trying to make a mode similar to shacktacs āthe gameā and im assigning the variable _myQuarry in the initPlayerLocal.sqf on a random civ player.
Determining if that unit/player isnt alive works well, but ive run into a block where i cant figure out how to check if the player has killed someone who was n o t their quarry.
(in āthe gameā, killing a civ who wasnt your quarry punishes you with losing more health)
im assigning the variable _myQuarry in the initPlayerLocal.sqf on a random civ player
@old radish What does this part of the code look like?
My question is, I figured out how to play the audio for the object. But how do I make sure when I put the .pbo into the server it plays the audio for everyone?
Will a trigger only be activated once if the 'server only' setting is enabled, regardless of how many people walk into it? I'm mainly asking as I have a trigger in which multiple people will enter at the same time, but I need it to activate once as it has a remoteExec function.
From what I've heard, normally triggers are local, meaning the same trigger is created for everyone, and without the repeatable setting, it will also only trigger for everyone once. But server side triggers I'm not 100% certain of.
Server-only trigger means there is only one instance of the trigger, which is local to the server. If it is not set to Repeatable, it can only activate once.
Alright, just needed to make sure.
Anyone could help me?
Check wiki to see if command is global
Well I donāt know how to know if itās global, or if I when I put the .pbo into the server panel if it ports the audio over as well.
Depends on āputting the pbo will make a soundā mean. A pbo itself does nothing to with a script
I put a custom sound in a mp mission attached to a object with a script, Iām expecting to heard it as same as everyone else. But since itās not MY server Iām just porting the mission into a server panel, they wonāt have āsoundsā folder that the custom sound has been rooted to.
Not even sure how you port the mission into the server but it suggests that's not how to put the mission into the server properly?
Apparently a mission can have a custom sound using a sound file and a description.ext
Itās done properly because Iām putting extracting mission .Pbo file from MY mpmissions and putting it into the SERVER panels mpmissions folder.
Okay, then what does
they wonāt have āsoundsā folder that the custom sound has been rooted to
mean?
Because the sounds file is rooted in MY documents/arma3-other profiles/missions/mission name/sounds folder
Which they wonāt have
Well... the thing you might misunderstand is a pbo is basically similar to a zip file, everything the mission has will be packed into the pbo
The sound should be there and would be played, unless you put it into a wrong place or the description.ext is written wrongly
initPlayerLocal.sqf
sleep 5;
_competitors = allPlayers select {side _x == civilian && alive _x && _x != player};
_myQuarry = _competitors call BIS_fnc_selectRandom;
while {_myQuarry == player && count _competitors > 0} do {
_myQuarry = _competitors call BIS_fnc_selectRandom;
};
hint format ["Your quarry is %1.", name _myQuarry]; //NO CONDITION
_quarryMarker = createMarkerLocal ["_quarryMarker", getPos _myQuarry];
_quarryMarker setMarkerShapeLocal "ICON";
_quarryMarker setMarkerTypeLocal "mil_dot";
_quarryMarker setMarkerColorLocal "ColorRed";
_quarryMarker setMarkerSizeLocal [1, 1];
_quarryMarker setMarkerTextLocal "<-- Quarry: " + name _myQuarry;
while {count _competitors > 0} do
{
sleep 5;
_competitors = allPlayers select {side _x == civilian && alive _x && _x != player};
if (alive _myQuarry) then
{
"_quarryMarker" setMarkerPosLocal position _myQuarry;
};
if (!alive _myQuarry && count _competitors >= 0) then
{
deleteMarker "_quarryMarker";
_competitors = _competitors select {alive _x};
_myQuarry = _competitors call BIS_fnc_selectRandom;
while {_myQuarry == player && count _competitors > 0} do {
_myQuarry = _competitors call BIS_fnc_selectRandom;
};
hint format ["Your target has been killed. Your new quarry is %1.", name _myQuarry];
_quarryMarker = createMarkerLocal ["_quarryMarker", getPos _myQuarry];
_quarryMarker setMarkerShapeLocal "ICON";
_quarryMarker setMarkerTypeLocal "mil_dot";
_quarryMarker setMarkerColorLocal "ColorRed";
_quarryMarker setMarkerSizeLocal [1, 1];
_quarryMarker setMarkerTextLocal "<-- Quarry: " + name _myQuarry;
};
if (!alive player) exitWith {};
};
if (count _competitors == 0 && alive player) then {hint format ["%1 you have won The Game!", name player];};```
im not actually setting a variable am i? i suppose something like _myQuarry setVariable [āCurrentTargetā, āTargetedā] or something like that would work - but it needs to be something which will work if every player has their own quarry
using _obj setVariable by default is a local variable. Just change that true to false or omit it.
yes thats right, but it goes back to my original question too ^
placed in initPlayerLocal
player addEventHandler ["Killed",
{
params ["_killed","_killer","_instigator"];
_killed = if (isNull _killed) then {
_killed getVariable ["ace_medical_lastDamageSource", _instigator];
} else { _killed}; //Incase ACE goes ape mode and decides to mess with the killed eventhandler.
_instigator = if (isNull _instigator) then {
_killed getVariable ["ace_medical_lastDamageSource", _instigator];
} else { _instigator};
_killedSide = side _killed;
if (_killedSide == civilian && _killed != **variable here?**) then
{
"You killed an innocent bystander." remoteExec ["hint",_instigator]; //remoteexec may not be necessary if it runs locally
};
}];```
it gets even more complicated because another condition needs to be that the killed player wasnt also hunting you :/
Good day. Is there a way to determine if the vehicle contains its 'original' crew? Like the one you see when placing it in the editor.
Hi all. I've been doing some reading and just wanted a sanity check for something.
A couple months back I made a zeus mission which went alright, but a huge problem was that sound I set up to play via trigger was unbearably loud for the players. I had no idea why, but I think I know now.
In a file (dialogue.sqf), I had a playSound for the audio and a set of subtitles.
In a trigger, I had remote executed execVM for dialogue.sqf. I did this because I thought it wouldn't play on every player's machine without remoteExec.
I just read that triggers are global/executed globally. Does this mean that just execVM would have played it on every machine without the usage of remoteExec? Would the same apply to something like hideObject if ran from a trigger? Meaning, would it hide/unhide the object for every player?
I guess the source of my confusion is how local commands behave, in multiplayer, when used in a trigger's On Activation field
I'm trying to use the boundingBoxReal with the third syntax of boundingBoxReal [object, LOD], but it throws an error as it expects only an object not an array. I wanted to check a bounding box of a specific LOD, but I'm unable to do so.
That syntax is in 2.14, the next update
I see, then, how can I get the Height at witch tree object is offset from a ground?
getPosATL?