#arma3_scripting
1 messages · Page 569 of 1
Most vehicle's boxes are like, much taller than the actual vechs, like according to 0 boundingBoxReal _vech the slammer is 5m tall, but the hemett cargo box var is 4.4m tall
Does anyone know what causes grass to bend down when walking over it? Is it possible to access the command in a script? Have an idea for a mod
_bb = 0 boundingBoxReal _vech;
_offset = ((_bb select 0 select 0) + (_bb select 1 select 0)) * 0.5;
_vech attachTo [_pelican, [-_offset, -1-(_bb select 1 select 1), 2-(_bb select 1 select 2)]];
20 other vechs have near identical distances between the roof of the vech and the "lifting" vech
but all of the hemetts have different hitboxes
its like every other vehicle has an "extended" hitbox but the hemetts dont
@sonic slate not scriptable
@fair lava vehicles with weapons have extra on top due to the muzzle flash proxies
if((_veh animationPhase "frontgear") == 1) then
oh and i found this thanks horrible
oh really?
is there some way to get the hitbox excluding the muzzle flash proxies, i've tried different boundingBoxReal clipping options
Yes. The proxy is a big triangle in the object and causes the increase in the bounds.
And probably no
Not possible
this is gonna get ugly in a hurry
i'm pretty sure i can get the list of proxies
i could search to see if the vech has a muzzle flash proxy
and if it doesnt add some offset
is there a way
to fire a "trace"
like a raycast that i could use to measure the hitbox in engine
Lineintersect
just get bounding box of a LOD that doesn't have the muzzle flash
like geometry lod
You are using ClipVisual, so yes you will get visual elements too. If you don't want them, use Geometry
👆
@still forum unfortunate, thanks for the reply.
when is addMissionEventHandler#Loaded needed?
i read to continue music, GUI with disableSerialization (when exactly? seems not always the case) - anything else?
how would i make explosive suicide drones for players to control?
i tried attaching ace IEDs to them they explode instantly
vanila IEDs dont explode at all
@velvet merlin well anything you want to execute on savegame load. Like telling the player "You're savegame has been loaded" in a chat message or whatever
well yes
our issue is some scripted systems break by loading savegames
atm we are not quite sure why/where
it could be from inputAction/DEH
but as said we just started to look into it
Hello everyone!
While playing the single-player campaign I noticed that the hand grenades I throw are not as effective as I thought they should be. I might be wrong with this one but after throwing 3 grenades into a room and finding the AI still alive, I thought - just for the campaign in Vanilla - my hand grenades would need buffing.
I've asked around and it seems to be a known issue with player-thrown grenades in Vanilla campaign.. so I was thinking to create a script that would:
- Add Event Handler to wait for player to throw grenade
- Perform check and continue only if thrown grenade is a fragmentation one (=causes damage)
- Store variable object for that thrown grenade and keep following it
- Wait until grenade reaches speed 0 and/or explodes
- Determine whether there are units nearby based on area of effect of that grenade
- Add some damage depending on distance
- BONUS: Determine whether there is clear line of sight between grenade and unit and reduce damage in case of hard cover
I've reached a point where I am adding the Event Handler to the player and waiting for it to fire, but I am having issues with NearestObject to store the variable for the "captured" thrown grenade near the player..
But I cannot quite seem to "grab" onto the thrown grenade.. any help is appreciated!
Would have to be tied to fired eventhandler .
@young current I think my main problem was using Speed ... vectorMagnitude velocity _this select 6 (projectile) works!
I don't understand
Ah did not see the link.
Buuut yeah the fired event already returns the grenade
You don't need any nearest object shenanigans
exactly, thanks again for confirming
it works now, I make the script wait first for the nade to stop, then it gathers the number of entities around it in the Area of Effect, then waits until grenade is dead, applies damage to victims
it works, now I can refine it based on distance, type of grenade and line of sight between
I basically just want to make them lethal in obvious circumstances (e.g. on your feet nade in a room) in single player, that's it. Nades I get in my face are super deadly, mines are not tho 🙂
In buildings its possible the surrounding geometry sucks up the explosion effects
true true
although if it happens only for you in SP there might be some other underlying issue
It came up to me after a couple days of throwing grenades in buildings where campers were there (think of the "Elite Warriors" patrol mission) and both 40mm Rounds and hand grenades were way too unsuccessful to rule out coincidences as "it did bounce away from the room" "it got behind something" etc etc.. it's a piece of metal grenade not a gummy ball you get for 25c at a dispenser lol
It might be worthvile to test the grenade trajectory to see where it really lands
there is a script for that, or if you want to get the dev build the diag exe there has inbuild feature for that
ah also that, could try in VR...
I am here at the moment, not sure it works and definitely not clean yet - https://pastebin.com/gHMgzSRZ
oh right! forEach, thanks for the tip!
Also the private array is unnecessary, params and co already make all their variables privaye + the code in the EH cannot affect upper scopes as there isn't any afaik
Is there a script to stop AI from opening doors?
Thanks @cunning crown good call again! I will ditch that
So far I am here @cunning crown @young current - https://pastebin.com/4nU9TwFS
@dark temple { if !(isPlayer _x) then { _x setDamage 1 } } forEach allUnits
Pretty sure that'll work

It won’t stop me from opening them right?
Wait what
the script is.... killing every unit which isn't a player
Dang
Weird I am getting "Undefined Variable in Expression" when calling
_visibility = [objNull, "IFIRE"] checkVisibility [getPosASL (_victims select _i), getPosASL _projectile];
_allVisible set [_i, _visibility];
};```
the _allvisible set ...
Can't for the life of me find out why I get an Undefined Variable in Expression
Could you show the full error? @coral owl
sure!
It would help if you define _finalDamage
-> undefined variable
Plus I would add an exitWith at the beginning if the projectile isn't in a list of grenade types, otherwise it'll waste time running this code on bullets
ah need to find how to screenshot lol
Ie., after you've defined _projectile in your spawn
if !(_projectile in ["GrenadeHand", "HandGrenade", "mini_Grenade"]) exitWith {};
good call @worn forge true, I guess the EH will keep running anyway next time I throw
does not need to be non-exiting
It's an event handler, it'll run every time you shoot
Thanks @worn forge - so far I am here.. still getting that weird error on the variable.. https://pastebin.com/N5N2NDWS
You need to define _finalDamage somewhere
line 57 is directing arma to systemChat with that, but you haven't defined it, thus you get the error
Something like
(_victims select _i) setDamage _finalDamage;
systemChat format ["Just gave this damage: %1", _finalDamage];```
Also if you are showing script errors, it will tell you exactly where the problem is
ah yes, there were some leftovers, I kinda got it now!
I got it to work, stand by for the creme de la creme in coding (lol) 🚎
This is gonna be a strange question, but im planning on making a lawnmower mod in which the lawn mower would be a holdable item (prob a secondary), is it possible for me to execute a script everytime the mower actives?
by "shooting"
preferably you wouldnt need to have a server side sqf for checking if it fired
having this issue again:
script is called via addAction
_unit returns B_player1 at first check (desired)
_unit returns B_player4 at second check (not desired)
when BIS_fnc_kbTell is executed with call, _unit changes
when BIS_fnc_kbTell is executed with spawn, _unit does not change
ideally i'd like BIS_fnc_kbTell to be called rather than spawned so i don't need to waitUntil scriptDone for every line of dialogue but i'm at a loss as to why _unit keeps changing when going through the function; am i doing something wrong here?
//Setup
_hitch = _this select 0;
_unit = _this select 1;
_unitShort = switch (_unit) do
{
case B_player1: {"D"};
case B_player2: {"K"};
case B_player3: {"R"};
case B_player4: {"J"};
};
//First check
systemChat str _unit;
//Intro dialogue
call compile format ["['cqc_course', '01TrainingDay', ['KB_CQC_%1_Begin_0', 'KB_CQC_%1_Begin_0'], 'DIRECT'] call BIS_fnc_kbTell", _unitShort];
_i = floor random 2;
call compile format ["['cqc_course', '01TrainingDay', ['KB_CQC_H_Begin_%1', 'KB_CQC_H_Begin_%1'], 'DIRECT'] call BIS_fnc_kbTell", _i];
//Second check
systemChat str _unit;
...
just a brainfart, but try using
params ["_hitch", "_unit"];
instead of the _this select 0
This will make the variables private and won't be overwritten by any other scripts (like in BIS_fn_kbTell)
nop, still returns player4
@surreal peak yes that would be possible
Excellent...
I presume you will want it to drop grasscutter objects under it when you fire
either that or just execute a script which clears all grass infront of player
there is no script commads to alter an area of clutter
grass cutter objects are the only way
mind you this will at some point bite you in the ankles when you use it to cut all the grass on the terrain an it plops down millions of small cutter objects
hmm, putting _unit = _this select 1; after the calls returns player1, which solves the problem i guess, but i'd rather just have it not change at all 
leads me to believe it's maybe something to do with scopes, but i'm not knowledgable enough to say what 
what happens if you change to
['cqc_course', '01TrainingDay', [format ['KB_CQC_%1_Begin_0', _unitShort], format ['KB_CQC_%1_Begin_0', _unitShort]], 'DIRECT'] call BIS_fnc_kbTell;
instead of the call compile format stuff
if it's a scope/namespace thing, than changing the variable _unit to something random (eg. _mySuperSpecialUnitVariable), than it should work
otherwise there's some magic going on with the unit names
huzzah
changed it to _Rubberbabybuggiebumpers and it worked 
okay, something screwy with the word unit then it seems
it's probably one of the most used variable names in Arma 😉
thanks, never woulda thought of that 
How would one getObjectTextures of a players vest?
probably something like:
getObjectTextures vestContainer player
ya i tried that but it gives me an empty array
or getObjectTextures vest player
I recall you cant setObjectTexture on vests
That makes more sense now, Thanks
only character and Backpack
how does forceSpeed work in arma 2? im trying to limit a helicopter ai to a certain speed but cant get it to work
i tried setting it on unit, group, vehicle
i know its m/s not km/h
it just has no effect
@velvet kernel limitSpeed
you also need to apply it to the driver of the vehicle if my memory serves me rightly
@winter rose not working with limitspeed either
i will try applying to everything one sec
where do you apply it?
local _vehicle = createVehicle [_this, _spawnPos, [], 0, "FLY"];
_vehicle engineOn true;
_vehicle flyInHeight flightHeight;
_vehicle forceSpeed 10;
_vehicle setSpeedMode "NORMAL";
local _group = createGroup west;
_group forceSpeed 10; // throws an error
local _pilot = _group createUnit ["US_Pilot_Light_EP1", [0, 0, 0], [], 0, "CAN_COLLIDE"];
_pilot moveInDriver _vehicle;
_pilot assignAsDriver _vehicle;
_pilot forceSpeed 10;
https://cdn.discordapp.com/attachments/534490848239288320/676542653772333083/unknown.png
Does anyone know where you can find the path to DLC icons?
so i got it to work by running this in debug console while being in the heli
vehicle player spawn {
while {canMove _this} do {
_this limitSpeed maxSpeed;
sleep 0.1;
};
};
@solar shore configfile >> "CfgMods" >> "Expansion" >> "logoSmall" might be what you're after 
but it wont work from sqf that gets compiled
in this case it's "\A3\Data_F_Exp\Logos\arma3_exp_logo_small_ca.paa"
Is there a script to stop AI from opening the doors?
Please dm me ASAP
I mean ping
Hello everyone
I have some issues with this eventhandler if anyone has the time msg me or @ me, anyway thanks 🙂
if you share your problem here more people can help you
Okay sec
player addEventHandler ["HitPart", {
params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect"];
_ARMSX = ["spine1","spine2","spine3","head","leftarm","leftarmroll","leftforearm","rightarm","rightarmroll","rightforearm","pelvis","leftupleg","leftuplegroll","leftlegroll","leftfoot","rightupleg","rightuplegroll","rightleg","rightlegroll","rightfoot"];
if (_selection in _ARMSX )then
{
hint "Your arm was hit";
sleep 1;
hint "Your arm was hit";
sleep 1;
hint "Your arm was hit";
sleep 1;
};
}];```
I understand that it will hint a msg that makes no sense because everything is in that array but i just want it to work
my bad
if (_selection == _ARMSX) then
perhaps?
in will simply check if the variable exists in the array
yea
so what is the result you're expecting?
IF _selection is an arm then i put some code to make the player drop weapon but it's not doing the first bit so
btw... the HitPart EH will give an array with array's, because multiple parts can get hit at the same time
player addEventHandler ["HitPart", {
params ["_hits"];
private _hitArm = false;
{
_x params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect"];
if (_selection in ["leftarm", "leftarmroll", "leftforearm", "rightarm", "rightarmroll", "rightforearm"]) then {
_hitArm = true;
};
} forEach _hits;
if (_hitArm) then {
// run your special sauce
};
}];
I will try ty 🙂
You should parse _this array, every element of them
Not working still oof
selection: Array - Array of Strings with named selection of the object that were hit.
so it should also loop over _selection, and then check if it was an arm(part) or not
Yea it makes no sense why it won't work
I have been at it for a while
I think i will just make it so if the damage is X then players weapon will drop
@still forum clipping the bounding box to geometry (2 boundingBoxReal _vech) still returns a much larger bounding box on vechs with guns, appears to still include the muzzle flash proxy
not sure if the clippings broke
or if maybe the proxy is in all lods?
I've tried all the clipping options listed on the wiki, 0 1 2 and 3, and they all return the same "oversized" hitbox on armed vechs
either i'm doing this clipping wrong, the clipping doesn't work, or the muzzleflash proxy is in all the lods
_ply = player;
_vech = vehicle _ply;
_bb0 = 0 boundingBoxReal _vech;
_bb1 = 1 boundingBoxReal _vech;
_bb2 = 2 boundingBoxReal _vech;
_bb3 = 3 boundingBoxReal _vech;
_z0 = abs ((_bb0 select 0 select 2) - (_bb0 select 1 select 2));
_z1 = abs ((_bb1 select 0 select 2) - (_bb1 select 1 select 2));
_z2 = abs ((_bb2 select 0 select 2) - (_bb2 select 1 select 2));
_z3 = abs ((_bb3 select 0 select 2) - (_bb3 select 1 select 2));
hint format ["ClipVisual = %1\nClipShadow = %2\nClipGeometry = %3\nClipGeneral = %4",_z0,_z1,_z2,_z3];
this prints 2 for all 4 clip types on the marshal
unless there is something wrong with my logic, either you can't clip out the muzzle flash proxy, or clipping doesn't work
detach vehicle player;
_ply = player;
_pelican = _this;
_vech = vehicle _ply;
_bb0 = (0 boundingBox _vech);
_bb1 = (1 boundingBox _vech);
_bb2 = (2 boundingBox _vech);
_bb3 = (3 boundingBox _vech);
_z0 = abs ((_bb0 select 0 select 2) - (_bb0 select 1 select 2));
_z1 = abs ((_bb1 select 0 select 2) - (_bb1 select 1 select 2));
_z2 = abs ((_bb2 select 0 select 2) - (_bb2 select 1 select 2));
_z3 = abs ((_bb3 select 0 select 2) - (_bb3 select 1 select 2));
hint format ["ClipVisual = %1\nClipShadow = %2\nClipGeometry = %3\nClipGeneral = %4",_bb0,_bb1,_bb2,_bb3];
Am I passing the "what clip to use" to the function incorrectly? the numbers returned are identical
on both bounding box and bounding box real
hey is there any way to find the model path ingame ?? ,eg through the editor?
In config yes @cedar canopy
I'm pretty new to SQF, so i'm pretty confident this isn't an issue in arma, but i can't see what i'm doing wrong
i'd expect these clipping modes to return different numbers
but they dont
@fair lava try https://community.bistudio.com/wiki/boundingBoxReal ?
tried, same effect
nothing appears to be able to ignore (what i can only assume is) the muzzle flash proxy
which makes something like accurately attaching an object near impossible :/
I'm beginning to think this is an engine limitation, which is why Vehicle in Vehicle has an "ignore height" option
but i dont know how to model so i dont really understand how stuff like model proxys / lods work in the arma engine
I am trying to display an image in a hint, the PAA gets displayed but it is very small... I am using
_image = "image.paa"
and then
_composed = composeText [image _image]; .. hint _composed;
Any way to make the size bigger? Thanks!
try something like:
private _composed = parseText format ["<img align='center' size='%2' color='%3' image='%1'/>", _image, _size, _color];
hint _composed;
Thanks @hollow thistle
Hello, looking for a little Particle Effects advice. I have snowfall "working" more or less, but I wonder if I am approaching it correctly. I am treating each texture map mask as a "snow flake", which in a couple of cases may be appropriate. But I wonder how that works in the case of, say, rain, right? Is it taking a single texture map mask, stretching it, and "falling" it at such a rate that it "looks like" rain? Slow it down, change the color, etc, for snow, or more blizzard like conditions?
Seems to me that would also optimize the number of objects in play at a given moment. How I clued into that was the "shapes" array I am using accidentally included some of the "fire" masks, which got me to thinking.
I would say the in-game rain is done by some kind of "no damage bullets"; I don't think a particle is adapted to create a rain effect (unless for water splashes).
also, you would have in-building rain by doing so @dreamy kestrel
hmm, interesting. yes, of course, re: in building, notwithstanding player "exposure" comprehension, whether for particles to have bounce effects, etc. still I might like to experiment; is it possible to "stretch" a "particle" in this way? combined with other aspects, like rotation, velocities, etc, I wonder if that is a better way, reduce the particle objects, etc.
you can only "stretch" a texture by enhancing/reducing its size, not separately horizontally/vertically
I download some scripts how exactly do I use them?
depends on the script
usually the scripts come with some kind of readme that explains it
These don't they are on a saved notepad
we don't know.
@hollow cairn see execVM, call or spawn on the wiki:
https://community.bistudio.com/wiki/execVM
https://community.bistudio.com/wiki/call
https://community.bistudio.com/wiki/spawn
Need to understand how scripts work before trying to use random scripts
And where did you even get scripts with no explanation on how to use them
I wonder if we could have some kind of channel awards for best starter questions?
this one is 2nd to the car script 😄
Ahh, yes. the car script
Who has the car script? Can they send it to me so I can use the car script?

What is the car script, feel like I've missed something 
It's a car script
@cunning crown look up "the car script" in Discord history, I just did and it brought back good memories 😂
Q: are there any constraints on the length (duration) that a playSound3D can be? Shorter ones, say <20s, seem to be running fine, but I have a longer one, >45s, that does not seem to be playing at all.
@cunning crown look up "the car script" in Discord history, I just did and it brought back good memories 😂
@winter rose Yeah just did it but I don't think I was much active at that time (or I was in the dark side of Arma)
never mind, I figured it out. was a max audible range issue in my parameters. I doubled that accounting for the other triangulation I was doing in the algo leading up to that point.
Okay so I know this exists https://community.bistudio.com/wiki/getObjectDLC
So there's this clothing shop, and per item I'm trying to get the _appID
Then I tried
private _appID = getObjectDLC _className;
Where _className is the classname of the clothing item, although this does not work, because
23:25:40 Error in expression <details select 2);
};
private _appID = getObjectDLC _className;
if ([_x] call >
23:25:40 Error position: <getObjectDLC _className;
if ([_x] call >
23:25:40 Error getobjectdlc: Type String, expected Object
yes…?
@solar shore
https://community.bistudio.com/wiki/getObjectDLC
Parameters: obj: Object
Yeah, so I'm wondering how do I get the object from the classname
through config
https://community.bistudio.com/wiki/configSourceModList
and with your class path
you will get a string though, not a DLC id
configSourceMod (configFile >> "CfgWeapons" >> "U_B_CTRG_Soldier_3_F");
Would that work?
Seems to work
Ty
does anyone here know where I can find the ACE Pointing animation? 🙂 (Not sure where to put the question, but since its for a script I put this here for now.)
@obsidian violet
ACE3/addons/gestures/anim/ace_point.rtm
Guys, how I can get the displayName from config in another language?
configSourceMod (configFile >> "CfgWeapons" >> "arifle_MXC_F");
Okay so when I do this right, it throws "enoch"?
Guys, how I can get the displayName from config in another language?
Can I get original version of displayName, but not translated for my language?
Okay so when I do this right, it throws "enoch"?
Yeah it happens, there is a way to get the "true" mod, cant remmember how tho
Oh, because even with https://community.bistudio.com/wiki/configSourceModList it only throws ["enoch"]
Where arifle_AK12_F throws ["expansion","enoch"] so it picks "enoch" with configSourceMod
Ty, I'll have a look
Now the icons are completely gone for me
It worked for me, but what is your use case (why do you need the original mod)?
You know how the virtual arsenal has the icons on the right of the items
I basically need to know which DLC a clothing item or weapon uses so I can display that to the right of it in a listbox
1:10:30 ModParams - Undefined or empty mod directory
That's what I'm getting
The one I sent gives you the exact Mod/DLC you need to use the specific item
I just want to know what DLC the item is from, my last implementation worked but just gave the wrong icon for the MXC
I know you can still use the weapons/clothing it just has an annoying watermark
Then want I sent should do what you want, it takes the "mod" that first created the class
https://sqfbin.com/eriwusoqemulotiqopir
That's what I have now
Is that L*ife Shop Config?
https://sqfbin.com/dodilenepedisuqigeyi
That's what I had before, which kinda worked just with some weapons being weird
That's the fn_weaponShopFilter.sqf
You forgot to change "CfgVehicles" to weapons
Ahh, I should catch some sleep probs, ty.
It works, thank you!
1:35:25 ModParams - Undefined or empty mod directory
It's doing that for any weapon which doesn't have a dlc though
So it's kind of spamming the rpt
Should be easy to fix, just skip the whole thing if _mod is empty (just diag_log it and see what value causes an error)
Yeah _mod is "" when it errors
private _picture = "";
private _addons = configSourceAddonList (configFile >> "CfgWeapons" >> "arifle_MXC_F");
private _addon = if (_addons isEqualTo []) then { "" } else { _addons#0 };
private _mod = configSourceMod (configFile >> "CfgPatches" >> _addon);
if !(_mod isEqualTo "") then {
_params = modParams [ _mod, ["logoSmall"] ];
_picture = if (_params isEqualTo []) then { "" } else { _params#0 };
};
_picture;
from my tests this seems to work
Yeah works
Ty
And is the below still necessary for JIP compatibility in scripts?
waitUntil{!isNull player}
Is the Alien Mothership_01_F like a UAV drone or something? trying to determine how to get it to fly/move around the map possibly.
@bright flume see https://community.bistudio.com/wiki/Arma_3_Alien_Entity_Behavior
this is for the smaller entity. the mothership is one static prop you can move around with setPos*
yeah I was hoping that was not the case... I dont wanna make some looping movement was hoping it had some physics to it since it seems to be a vehic. last question Required DLC... is this 'Contact' or 'Contact (platform)' talking the main SP addon not the global usable one.
I am not sure; if you can place it in Arma (non-Contact), you can use it
well that def wont happen you gotta have contact running to get these guys far as I could tell mish wouldnt load when I didnt load it via running the contact DLC from the launcher.
…wat
1 sec I'll show lemme get a steam screenie nix that PM'd ya the tiny clip of the screen. couldnt here didnt wanna post it here
have you tried setVelocity?
never actually used that one on something static but .. it might work 🤷
otherwise, try using attachTo and some fancy "magic" unit that just walks around the area it is located. You then can remove it once the movement is done
is there a way to detect AI "waiting" status if you are group leader - like when you order them to get into a vehicle
currentCommand returns "" - same as when in formation
@violet gull i believe init and initplayerlocal are both run on client join. But there is no synchronization, so if server changes those values over time and a new client joins, they init the default value. You could keep jip updated with
publicVariableClient
it probably works for most, but the "in-formation" state i think isnt possible to determine reliably
Is there a way to find out what IDC's are being used
@velvet merlin isn't there a formationPosition command? This coupled with distance and unitReady might be the thing
how does one make a empty group and link/hook the small alien to it? I still cant figure how how its being done.
Im following https://community.bistudio.com/wiki?title=Arma_3_Alien_Entity_Behavior and the example mission used for it but in the editor there is a indie group that is empty and the 2 alien UAV drones are grouped to it but making that in eden somehow is impossible cant group them guys so im stumped now..
from this page:
Drone is only able to move in a generated grid.
or are you talking about small pods surrounding the small Alien entity?
no the small drones lemme load the example mish.
the UAV one, I'll get a screenie what I see in the editor but I cant replicate/create
thats from inside https://steamcommunity.com/sharedfiles/filedetails/?id=1819778427 which is the mission example for that wiki page
yeah, so the small Alien Entity.
Mothership > Alien Entity > small pods
you apparently can't have this one to follow a group as a normal unit.
well not the pods around it. thats two of the center 'small drones' not the micro ones around it
oh I can mess with them IF they grouped problems is right click 'group to' instantly cancels so Im at a loss how to do that so I can give them a WP system to go patrol about
again, I don't think they are meant to use waypoints
https://community.bistudio.com/wiki/allControls
Then you can get every used IDC
Is there a way to find out what IDC's are being used
@lilac kernel
they do that example mish has 2 drones. one follows and moves to trigger/map location markers, the other follows the WP system
tried that dont work cuz they are ungrouped by default in editor
there may be a reason
can't Ctrl(or Alt)+drag group them?
anyway, from what I understand you want two drones grouped and follow waypoints
I don't know/think that drones can be grouped.
what I mean that screenshot clearly shows them grouped and one of them is the 'group leader'
so only one follows waypoints?
yep other follows some map marker locations into trigger zones
remove the markers or script call then
try in a blank mission
I just cant remember if init is called in the editor (didnt think it was.)
https://hastebin.com/nobubunuto.cs << init.sqf not really much there pretty straight forward
Does anyone know if there's a performance difference between
[] spawn { while {condition} do { sleep 1; }; };
and
waitUntil {sleep 1; condition};
?
@worn forge the spawn would not halt code flow ^^ ?
If you don't do anything else, I would assume thag waitUntil is better
forget the spawn part, just trying to make it make sense as an example... really just thinking about the implications between a while ... do loop and a waitUntil
Also doing a while loop to pause the code looks horrible, L*fe-tier horrible 😄
waituntil suspends execution, god help ya put that in a non-suspendable task.
The while loop has more overhead
more commands
https://community.bistudio.com/wiki/Code_Optimisation there plent of examples showing execution time. not sure how it was done but Im guessing you can just test it out.
https://community.bistudio.com/wiki/Code_Optimisation#Code_optimisation
Tests and benchmarks were done with the latest Arma 3 version at the time
Benchmark result in milliseconds (ms) is an average for 10000 iterations.
yeah guessing they did a looping of the codie just didnt think arma had any 'time' methods that would be fine enough to show miliseconds
I'm looking at that code optimizatin page but there's nothing specific to waitUntil vs while loop.
@bright flume diag_tickTime
@worn forge we could do that (even though it's ugly to even think about it)
Anywho. The particular example I'm optimizing will work with waitUntil just fine. Thanks folks.
but Im guessing you can just test it out.
no you can't
Its a script that sleeps
how do you wanna test that?
Right. You can't
empty ones, for structure timing
^
and how you wanna time waitUntil then?
think we picking at straws both do different things, scheduled vs unschedu... etc
while { false } do {}; vs waitUntil { true }; ?
waitUntil { true } vs while { true } do {}
but that would only test instanciation, not waiting time
have a external loop that changes the waituntil bool?
while { counter < 100 } do { counter = counter + 1; } vs waitUntil { counter = counter + 1; counter == 100 }; ? throw in some diag_ticks?
Then you are measuring the speed of your loop, not waitUntil
wabbit = false;
waitUntil { if (!wabbit) { wabbit = true; false } else { true } }
vs
wabbit = false;
while { wabbit } do { wabbit = true };
No that won't work either. The while will run through immediately.
The waitUntil will need atleast one frame per iteration
be measuring both, cuz you also looking at how long the scheduling takes (which Im betting is gonna be the worse of the two.)
my wabbit version does one loop; should work?
the second one does 0 loops
And the first one will measure your fps/scheduler load, not the performance of waitUntil
(also, missing then)
and sup Ded. you got any idea on anything I was talking about for what Im dealing with?
don't know what you were talking about, and don't have time to click links 😄
Im trying to get contact aliens in a mish, but I cant group them even though the example mish has them grouped together as a team.
please write mission
Dunno ¯_(ツ)_/¯
Im not on my IBM model M hate typing on small keyboards
looking for a solution for this problem. Wanting to check all the players currently loaded mags, and add 5 mags each of both weapons magazines. Here's what i have so far. Not working though.
playSound "power_up_grab";
sleep 1;
playSound "maxammo";
surv1mags = magazines surv1;
surv1first = surv1mags select 0;
surv1duplicates = [];
{
_check = if (_x == surv1first) then {
surv1duplicates pushBack _x;
};
} forEach surv1mags;
surv1mags = surv1mags - surv1duplicates;
surv1mags = surv1mags pushBack surv1duplicates select 0;
surv1 addMagazines [surv1mags select 0,5];
and add 5 mags each of both weapons magazines
don't understand.
add one pistol and one weapon magazine?
what if player has no magazine in weapon currently
what if player has no magazines at all in inventory?
what if player has magazines that don't fit his weapon?
You can get the magazine of primary/secondary weapon directly
https://community.bistudio.com/wiki/primaryWeaponMagazine
no need to try to weirdly iterate through magazines and do some duplicates thing
You want all the magazine types the player has in inventory?
_playerMagazines = magazines player arrayIntersect magazines player
i can do the primary weapon, im struggling with secondary and launchers
Well use the wiki page I linked
check Additional Info, shows you how to get secondary(handgun) + launchers
oh yea, sorry, didnt see that, my mistake
@winter rose doesnt work unfortunately. as said the issues is to differentiate units in formation (default group behavior) and units that completed a command
what if "fall back" is the command then 😋
but how to check?
can't really?
I would check the unit's distance with formationPosition (if > 5, etc) coupled with unitReady
if unitReady AND near its formation position, then the unit is in formation
https://community.bistudio.com/wiki/formationPosition
https://community.bistudio.com/wiki/unitReady
currentCommand sure is an interesting lead… if it worked :-\
okay guess it dont matter that they ungrouped. just basically used the scripts and they moving and doing what I want in terms of moveto markers. I asked the mission creator on steam how they grouped them to let the 2nd one do drone WP styled tasking.
meh engine cant detect BACKSPACE+key modifier at the same time
I think there is still a way to detect that, each key will trigger the EH at the same time iirc so you can go with that
well its def not scripting issue.. odd. the one alien I got marker locations working totally fine, but the one that supposed to be a group leader and follow waypoints just ends up crashing in the ground and blowing up... (but now I know I need a script to delete them guys cuz they dont seem to have a timeout on death effects lol)
Hello
I'm trying to understand script which is moving object smoothly
But I can't really understand how to set destination to which object should move
here's script
TAG_fnc_moveObject = {
_object = param[ 0, objNull, [ objNull ] ];
if ( isNull _object ) exitWith {
"Invalid Object supplied" call BIS_fnc_error;
};
_this select [ 1, count _this ] params [
[ "_to", [0,0,0], [ [] ], [ 3 ] ],
[ "_duration", 10 ],
[ "_from", getPosATL _object, [ [] ], [ 3 ] ]
];
if ( _to isEqualTo [0,0,0] ) exitWith {
"Invalid TO position given" call BIS_fnc_error;
};
_from params[ "_fromX", "_fromY", "_fromZ" ];
_to params[ "_toX", "_toY", "_toZ" ];
_startTime = time;
_endTime = time + _duration;
while { time < _endTime } do {
_x = linearConversion[ _startTime, _endTime, time, _fromX, _toX ];
_y = linearConversion[ _startTime, _endTime, time, _fromY, _toY ];
_z = linearConversion[ _startTime, _endTime, time, _fromZ, _toZ ];
_object setPosATL [ _x, _y, _z ];
};
_object setPosATL _to;
};
[ bigDoor, screenToWorld[ 0.5, 0.5 ], 10 ] spawn TAG_fnc_moveObject;
What a strange way to use params...
from what I can see, it's [object, destination, duration, origin] spawn TAG_fnc_moveObject.
But it's probably explained in a README attached to the script
Sorry for the randomness but, is there a good consolidated location of scrips and mods ? For example, xm8 apps ?
The steam workshop has almost every mod that exists and for scripts, they usually come in a mod but you can always check on GitHub + BI Forum
Awesome I’ll take a look. I’ve been picking through the work shop but not as much as I could I suppose. I appreciate the help!
@cunning crown When it comes to that destination what else can use ?
What do you mean?
Well, I want to move it up. What should I use then?
You just need to use any position in the AGL (Above Ground Level) format. If you want to move up, then you can do (getPosATL _obj) vectorAdd [_x, _y, _z] where _z is the height you want to go up
private _obj = player; // or any objet
private _pos = (getPosATL _obj) vectorAdd [0, 0, 10]; // move 0m north/south, 0m west/east, +10m up/down
[_obj, _pos, 10] spawn TAG_fnc_moveObject;
👍
prepare rocks
[ bigDoor, (getPosATL bigDoor) vectorAdd [0, 0, 5]] spawn TAG_fnc_moveObject;
works to, but it's usually better (for readability) to separate "operations" into variables
those params xDD
Yeah, totally the right way to use that command 😄
how to make the enemy show in the radar like this?
https://dev.arma3.com/assets/img/post/images/SPAAG.jpg
reveal maybe?
hi. i'm trying to add my custom textures to the graffiti assets in paa, unfortunately i dont know how to resize or set the scale because they are apperaring cropped.
your custom textures would have to cover the same area as the part of the texture you are replacing
Alrighty, I'm stumped. How do I reload a player's current weapon? reload command reloads all weapons.
which size are the graffitis?
You need to unpack their textures to see that
because billboards doesent gime trouble
ok
last que3stion
how to unpack the textures?
thnaks
Billboarss are twice as wide as the height, always it format power of 2
@worn forge addPrimaryWeaponItem maybe?
@cunning crown and the graffitis?
¯\_(ツ)_/¯
thnaks
@alpine ledge that does work, it doesn't trigger the reload animation though. Anyway, sufficient for my needs. Thanks.
land_graffiti_02_F texture
i know this command exists as i've seen it before but can't remember that it is: how do i disable the briefing that appears on startup
found it: briefing = 0 in the description.ext
google just shows me the other kind of briefing 🙄
@worn forge for reload animation, check the reload action
@winter rose there ain't one. You'd think there would be
Pardon me. There is.
I thought you were specifying the action command, not playAction
Good evening everyone! Is there a guide or wiki page you would recommend for creating a UI menu that a player can show via a key shortcut to change some parameters within a mod? - Thanks as usual for the help
There is a loadMagazine action, but it doesn't have an effect in this case (probably for vehicle turrets)
What is the whole purpose of the reload? Usually player is the one who does the reloading by hitting the reload key.
It's the tail end of a magazine repacking function. I'm tempted to leave it to the player to reload, but if I don't someone's probably gonna not notice that their gun isn't loaded at the end of it.
That should teach them then 😄
That's my thinking 🙂
If you have advanced features like magazine repacking I would not expect you to hold players hand to make sure they put the magazine in
Eh, it's a convenient thing.
"Loads a weapon with magazine with known id and fires that weapon" last part is probably not what I'm after 🙂
could use playMove or switchMove to pretend you're reloading the weapon, bit of a dirty way about it but 
Yup. That's why I'm leaning to just let the player do it themselves.
Also it'd have to be playMove with the "gesture..." moves, as playGesture is indicated as not working (arma1 command)
that's what i wroted 
writtened*
Somebody knows how to resize the User Texture ? i only got 3 sizes: 1m, 1x2m and 10x10m
what do you do when you need a custom size
i'm struggling just to place a custom texture. but 10m is way bigger and 1m is too small
you could resize your texture so that it would fit onto the 10m one perfectly, but make the area around it transparent 
i havent tought that. maybe can work. jsut to try and error. thanks. is the only way? does the game editor have a proper way to do this whitout external fixes?
not that i'm aware of
and how the devs make this kind of work. lol, its not user friendly btw
nevermind, thank you
this can work fine for me now
@jaunty shadow You are on the right track. I made custom graffiti and posters by creating .png files with an alpha layer (the transparent part), then converting that to .paa format using the Arma 3 tools. It's pretty tedious, but you can control the shape/aspect ratio of your image that way.
"user texture" is not really used in vanilla content I think.
for custom sized stuff they just have custom sized objects
@olive cairn HorribleGoat has a point. You could probably use https://community.bistudio.com/wiki/setObjectTextureGlobal on all the Poster, Leaflet objects
is it possible to have the cutText black out effect persist when switching between units? currently the way i'm doing it is to just switch the color correction to full black for the duration of the switch, but wondering if there's a smarter way to do it
@alpine ledge Errr, what exactly do you mean with "switching between units"? If it's respawn, I would create the effect in an event script for respawn : https://community.bistudio.com/wiki/Event_Scripts
team switch / selectPlayer kind of switching
@alpine ledge Wait, so you got it to trigger when switching units already? Why not use titleCut? Eg:
titleCut [" ", "BLACK IN", 10];
tried that, but what that does is fade to black on the one unit, but immediately remove the effect upon switching to the other unit
so what i'd like is for the screen to fade to black, switch to the other unit while the screen is still black, then fade in
Maybe I am misunderstanding you. But I just tested my titleCut script with my unit walking through series of triggers.
What happens to me, is that (even when the previous titleCut isn't finished yet) when entering the next trigger, the effect is reset (screen starts completely black again).
Do you not want it to reset (completely black) again, is that it?
weird, in all my testing it has gone like this:
player is unit a
trigger activates, fade to black
sleep to allow screen to fully fade
screen is now black
selectPlayer unit b
player is now unit b, but screen is no longer black
Claro! But, how are you activating this? What condition/eventhandler? Are you sure that is working?
event handler when unit a is killed that calls an inline function, all other elements of it work
the screen just doesn't stay black on switching 
even when stripped back to a super-basic version of it, same result
[] spawn
{
man1 setDamage 1; //To emulate unit1 killed EH
cutText ["","BLACK OUT", 1];
sleep 2;
selectPlayer man2;
cutText ["","BLACK IN", 1];
};
i suspect it's probably the game's own fading taking priority whenever the player dies 
i wonder if it's possible to make it so that when the player "dies", they're not really dead as far as the game is concerned...
23:21:03 Error in expression <end param [0,"end",[""]];
_endID = _end param [1,1,[0]];
_end = _endName + "_" +>
23:21:03 Error position: <param [1,1,[0]];
_end = _endName + "_" +>
23:21:03 Error Type Bool, expected Number
23:21:03 File A3\functions_f\Misc\fn_endMission.sqf [BIS_fnc_endMission]..., line 55
getting the above error when using the below script:
"mx_game_over" remoteExec ["playSound"];
sleep 0.7;
[["game_over_win",true,true,false]] remoteExecCall ["BIS_fnc_endMission",0];
was getting a similar error when using BIS_fnc_endMissionServer as well
@echo yew There's no built-in function, you'll have to parse allMapMarkers... something like
allMapMarkers select {getMarkerPos _x distance yourVehicle < theDistance};
how do you use setAmmo on a UAV? ive used every variation of this script i can think of and nothing seems to work
AirSupportUAV1 setAmmo ["PylonRack_3Rnd_LG_scalpel", 3];
and the bistudio wiki is broken right now (is there a reason it goes down for several hours every single day?) so i cant find anything else
Is there a slick and reliable way to detect when group leadership has changed? E.g. from someone dying or leaving the game
There's a BI forum thread where this was discussed but :S
@ornate marsh You are passing an ARRAY with an ARRAY to BIS_fnc_endMission. If you do that the function expects it to be an ARRAY in format ["endingName","endingID"]
What you wanna do is sqf ["game_over_win",true,true,false] remoteExecCall ["BIS_fnc_endMission",0];
@echo yew like I said, there is no function that does what you want. So I supplied you with a solution.
@vital cave you want setPylonLoadout
@uncut sphinx I don't think there is an event handler that will track group membership. The best you can do is track the relevant events and code from there, ie, the Killed or MPKilled handlers, and the PlayerDisconnected mission event handler
hmm, that's what I was hoping to avoid
I was also thinking to have a loop that compares the leader at time t with the leader at t-1 but maybe that's not so elegant
So the wiki seems to be going down a lot lately. Can anyone give me an example of how to use params with default values and accepted data types?
See #community_wiki, you still can get it served from eg. google cache 😉
it just ain't that fancy anymore then 😄
thanks, i was unaware of that trick
I think the cached version looks better 😉
lol
question, if an array is passed that doesn't have enough elements, do the defaults get put in place? Ex i'm expecting 2 elements but the user only passes 1 element. Will the second element get put in incase its not there?
nevermind, found out on my own
if you have set a default and the expected data type is not set or set to "any" (so []), than yes
Anyone know of an example of arguments being passed into CBA_fnc_progressBar. Having an issue getting player vehicle within the onSuccess
ah maybe its _this#0
Already read through it a few times. Its fairly vague in its example.
in _onSuccess you can use
params ["_arguments", "_success", "_elapsedTime", "_totalTime", "_failureCode"];
_arguments params ["_whatever"];
Where the _arguments array is the same as the one you gave into CBA_fnc_progressBar
Ah, I see what I was doing wrong. Thanks for that.
overwriting CfgFunctions from description.ext is not allowed I assume?
I'm trying to modify the animated briefing functions so they use the local commands for markers instead of global
since the wiki still down I believe can someone post a example of simpleObject?, createSimpleObject? (ie. spawn simple object)
nvm cached page was just being a pain. got it
if you use spawn simple object via a script what is its default orientation? need to change the objects alignment could be its defaulting to sea not terrain but if both are off need to know its orientation so I can apply a rotation adjustment (if possible)
well if you want it to match terrain you need (object) setVectorUp surfaceNormal (pos)
afaik
no thats fine whatever is needed Im gonna try I finally figured how to make the Contact crater via a script 🙂 so Im tweaking placement now. lemme just see if that solves it quick.
DONE.
rotation fixed it
Long as this script is in the init of the hideterrainobject module I dont have to worry about join in progress stuff?
if it's in the init of the module, it'll execute for every client and every time there's a jip so you probably don't want that
awesome then its done, now I gotta ask BI if its even legal to share what I figured out.. 🙄
Pretty sure it is legal to do so, I don't think there's any reason to put your creation down
I'm thinking about a potential script bug, but I'm not really sure it is really a bug so I'm asking here to confirm, it's related to DLCs.
Is unit action ["GetInDriver",car]; (while unit is an AI, and car is an empty vehicle) works for you if the car is from a DLC and you don't own the DLC?
I've just tested in Argo, and it didn't worked for a DLC vehicle that don't own, and worked for a DLC vehicle that I own.
yeah Im not sure its not publicly usable in the editor but you gotta have contact loaded to even edit/load the mish so likely Im gonna say its yes I could. but to cover my @$$ Im asking first before dropping it to the public.
I asked on the BI forums if I dont come up with the conclusion I cant. then I'll drop the script here next Friday. actually I'll put it in #arma3_scenario
You don't need to load contact which I mean Arma 3 Contact to use Land_Sinkhole_01_F
well given its in the contact 'encrypted' pbo and it wont load without the dlc. dunno what you talking about
unless ya got the DLC loaded what Im doing dont work. so anyone who dont own the dlc aint gonna be even able to join. but lemme verify this hole is def in the contact epo's
I didn't load contact but I'm able to use it
derp well then it dont matter I sworn when I found the p3d full path name while in the SP mission it was pointing me into the contact folder not A3 so...
Drop this in the edit terrain object module's init script. (flipping discord apparently _ in codeblock is not liked at all.. fixed it with just a \ and dropped the CBMD
_sinkHoleObject setPosASL [7346.51,2645.9,117.023];
_sinkHoleObjectDir = getDir _sinkHoleObject;
_sinkHoleObject setDir _sinkHoleObjectDir + 180.0;```
Just use ```
https://imgur.com/a/6tObV2m
Making some fun stuffs with Spectrum device
I'll be doing some of that also trying to make a alive based MP campaign that continues behind the scenes in Contact from around episode 2 or 3
one thing I would like to figure out is how they did the training gun effects from Ep.1 at the very beginning.
Remove bullet when fired with EH
not sure think it has a impact cuz you only get the hit 'bwonk' when you actually hit
no death they prob just make you temp invincible.
I cant think of the name of the military electronic training simulator gear America's Army has it and the sound is almost perfectly the same.
it was a laser system with a vest if you got shot it would make that sound you hear, and record it was used alot in MOUNT training like 10+ years ago now they use non-lethal paint shots I think.
okay might be silly question but is there a init field for the Eden editor possibly? wondering if there a way I can get these couple objects always spawn if I load a specific mission in the editor.
Miles you saying?
yep thats exactly it thanks its been so long since I even played AA 2.5
There seems to be a way to enable the Passenger seats (and FFV) through a script
there is an animation source 'Enable_cargo' with animationPeriod of 0.0002.
How should I enable this then?
I tried a setvariable and animate
animateSource
I have put this in the Init:
this enableVehicleCargo true; this animateSource ["Enable_Cargo",0]
seems to have no effect
also set the "Enable_Cargo" to 1.
Made no difference
OK fixed it
this lockCargo false;
Is there a simple code or way to check if the player can shoot the gun or not?
I'm making a spectrum device code and using mouse up down EH to find if player pressed mouse 0 button.
But its triggering even on inventory, map, etc.
It should be triggered in same condition when player can shoot the gun.
Expecting some code like "userInputDisabled" but works as "userCanFire"
canFire is not appropriate at this time since it returns true even in map, inventory.
Does it need to happen before the user fires? Because if not you could use the fired EH
A different solution would be to check what weapon he has and the animation the character is in.
No, I'm not intending to fire. I'm making spectrum device to transmit when player press mouse 0.
Only way is to setVariable #EM_Progress. Since there is no mouse 0 holding EH, I had to use mouse up, down EH to convert bool variable.
And increase or reset EM_Progress value in another loop.
but the problem is Mouse up down EH fires even in map, inventory, esc menu etc.
Normally, If this is gun, you don't expect to fire in map. My Spectrum device should not fire in such context too.
But how do I tell, If it was gun, you would fire it or not?
Would scanning all displays to check if there's no other display be solution?
It already behaves like a gun; where it triggers the "Fired" EH when pressing LMB, and only when it can be fired.
But "Fired" EH Doesn't trigger if your hand is empty or holding weapon withou mag?
It "always" triggers when you fire a weapon. So empty hands, or no ammunition, won't trigger it because it doesn't actually fire the weapon.
But some items (like spectrum device) are triggering the fired EH because it "has a mag"
since we don't have access to the configs/scripts of Enoch I can't tell... But in the campaign it is firing 😉
but I'm not in-game right now...
aside from using selectPlayer the moment the mission starts, is there a way to not allow a mission to start while you're in the lobby if noone is playing as a certain unit?
Question: is there a way to get a list of currently set missionEventHandlers?
Or, event handlers of any stripe?
you can add new ones, if the id is not 1, then there are probably others
either 0 or 1
@still forum Is there a simple way to tell if main game screen is focused hence it will fire gun if he had a loaded gun?
¯_(ツ)_/¯
😭
no
how would one try to implement dynamically changing particle effects that works in multiplayer in arma 2
namely im trying to implement smoke on helicopters that changes based on damage
i have a variable attached to the heli, that holds the current intensity
i also know how to create the particle effects
i just wonder how i could implement it, so everyone can see it, even players that join the mission late
@winter rose No.. thats not what i need... thanks though
maaaybe a onClick Display event?
@oblique lagoon You can use the dialog command to check for dialogs
I need to check mouse 0 hold
@cunning crown Does that check map, inventory etc BI made dialogs too?
It says it detects user dialog
I'll just try it now
It should check every dialogs, the game has (almost) no way to know if the dialog is really BI's or not
Nice! its working
Only it doens't detect map screen
But maybe i'll do it with isMapOpen
@cunning crown Thank you!
@patent estuary
would something like this be it?
{enableSimulation true;} forEach _x;```
the !isPlayer excludes putting players in _x
if they are already in an AI group and stored as a variable you could just use the second line and replace _x with your variable I guess.
have a play around with it.
yeah tried with {enableSimulation true;} forEach unit group [variable name of the group];
but it didn't seem to work
group command not needed
enableSimulation has syntax error
and I hope you didn't actually put the group into an array
@smoky verge correct answer:```sqf
{
_x enableSimulation true;
} forEach units player; // or forEach group player
wouldn't affect only the player?
forEach units group player if you want the full group
oh and instead of player I can use the variable name of the group leader
(I'm trying to use this on a group of AI)
forEach units group playerif you want the full group
no. As I said above, group is not needed
wouldn't affect only the player?
no it wouldn't
units aGuy
// is equal to
units group aGuy
https://community.bistudio.com/wiki/units
^ can take a unit or a group.
But but but units unit makes no useful sense
it makes "English" sense in the case of ```sqf
units theGroupLeader
Oh I see, in that case unit is short hand for group unit
yep.
no
But does that only work if (in that case) unit = leader group unit?
(I mean I suppose I could just test it and see)
leader also takes unit as argument btw
(I mean I suppose I could just test it and see)
Or you could just believe me, or read the wiki
But reading's for literate people!
Or you could just believe me
DON'T
Ou can check the distance between each marker of your array
No, too hard on mobile ^^
markers = ["mkr1","mkr2"];
{
_en = (markerPos _x) nearEntities["Car",100];
/* blah */
} forEach markers;
Good start, but he specified "his array of markers"
markers = ["mkr1","mkr2"];
heh. how did I miss that. works
I'm trying to make a script where people are assigned to one another and if one of them dies, they both die.
I want to make sure it doesn't break if someone disconnects or crashes, so does anyone know how Arma treats the order of a player disconnecting vs. that character dying? I want to stop the script from running if the death was caused by DCing or Crashing.
Thanks. Makes a lot of sense tbh
np
@winter rose works like a charm, thanks a lot
the code I posted too 😋
Hey, how to disable arma 3 system chat messages like % is connecting\disconnecting
Doesn't work
how so?
if u admin it will still show
disableChannels[] = {2}; in description.ext will disable system chat for all but admin
disableChannels[]={{0,1,1},{1,1,1},{2,1,1},{3,1,1},{4,1,1},{5,1,1},{6,1,1}};
its disabled
shouldnt it be disableChannels[]={{0,true,true}};
disableChannels[] = {
{
0, // channel ID
false, // disable text chat
true // disable voice chat
},
{ 3, true, true }
};
1 = true
just try it anyway
I dont have enableDebugConsole or admin settings
if you host, you are the server admin
Hah, okay, but can I hook any systemChat and block it
launch another instance of arma and join localHost in direct connect
see what happens
Also does 1 = True? That doesnt sound right
cause surely disableChannels[] is looking for {int,bool,bool}?
I don't think disabling channels has worked in description.ext for some time now
I think there is a bug where it doesn't disable channels on deco/reconnection
I do it via script... see if I can find it
as for the systemChat you're seeing when players connect and disconnect, I think you can disable that with configure -> game -> general -> stream friendly UI
Its local disabling, no ?
local yes, would have to be run in e.g init.sqf
But I want to disable any systemChat messages to make them like dialog message info
Try the stream friendly UI, but that's also a client preference
Frankly, you don't want to disable systemChat
Put this in init.sqf: ```sqf
/*
https://feedback.bistudio.com/T117205 - disableChannels settings cease to work when leaving/rejoining mission
Universal workaround for usage in a preInit function. - AgentRev
Remove if Bohemia actually fixes the issue.
*/
{
_x params [["_chan",-1,[0]], ["_noText","false",[""]], ["_noVoice","false",[""]]];
_noText = [false,true] select ((["false","true"] find toLower _noText) max 0);
_noVoice = [false,true] select ((["false","true"] find toLower _noVoice) max 0);
_chan enableChannel [!_noText, !_noVoice];
} forEach getArray (missionConfigFile >> "disableChannels");
how does fogDecay work exactly? or fogBase for that matter. are we talking like a gradient of fo density? how aggressively, or opposite, does it respond depending on -1..1, or -5000..5000 respectively?
fogValue: how dense is the fog at the base
fogDecay: how much does the density increase/decrease when going higher/lower (negative number = denser when higher than base, positive number = denser when lower than base)
fogBase: altitude (ASL) where fogValue is set
kind of makes sense, but at what rate(s) does decay occur /- from the base?
0.0049333 = density halves every 500m ... 💡
0.5 = loses 50% density in 1m, iirc
Although that would technically mean that 0 setFog [1, 1, 50]; would start the fog a 50m ASL with full density, and be at 200% below it and 0% above it...
So I guess there's a bit more math behind it, although Lou (and michael) are right.
range 0..100% though
How can i do for this :
if !(_itemsplayer == "telephone") exitWith
telephone is a virtualitem
@tawny trail you are probably looking for isKindOf
https://community.bistudio.com/wiki/isKindOf
@exotic flax Like this ?
if !(_itemsplayer isKindOf "telephone") exitWith
_itemsplayer = items player;
yes, it will now do the following:
check if _itemsplayer is of type (aka class) "telephone"; if not, exit script
ahh... you want to check if a player does not have a telephone in his inventory?
virtual inventory? as in "does the player not have the item available in Arsenal"?
It's for altis life server, in the menu Y you have your inventory, and there i have a phone
Do you understand ? :/
Not available in Arsenal
ahh.... L*fe stuff... in that case I don't know how that works (script wise), since they have their own inventory system.
Ok :/
you probably can get more help at the L*fe discord channels
Life Discord Channels ? Where
depends on the framework you use; some of them have a support Discord
Ok i go check, thank for your help
Sorry that was to a old post and winbloz not refreshing... ☠️
@bright flume you can use enableChannel (locally, so needs to be in mod or mission) to set which channels are available and which have VoN
or check this script: https://discordapp.com/channels/105462288051380224/105462984087728128/677639026681053234
And that is bypassable
unless someone is hacking on a non-BE enabled server, not
Far as I've ever seen nothing but Voip off stops me from talking just by double tapping my tab key/ptt lock
Now removing channels dont count either... cuz there always one channel that being 'group'.
that script in the link, when implemented correctly, allows you to tell exactly which channels are available for text and/or voice.
and that can't be bypassed...
if so, than it's a bug and should be reported on the feedback tracker
shrug I gave up on reporting it
It you hit ptt talk then release you dont xmit but if you exec your locking on ptt you break thru every server I ever played on has this issue again short on those who turn off voip completely
God dunno how much I hear Gtfo command chan.. 🤣
There any way to change the stretch the texture of a specific face on a object other then creating a new object?
none I know
meh was hoping to give that sinkhole and the cobblestone pad they use a tweak the texture is too compressed on both axes the size of the blocks dont match up to liv's ground texture plus color off was hoping maybe to CC it also.. hmmm maybe custom item time.
Does setMarkerXXXXLocal has effect againist editor placed markers?
I want to build a script which find nearest transmitter tower near editor placed marker. And change the marker shape and position at the exact tower position.
If setMarkerXXXXLocal have effect againist it, Then JIP would be no ploblem but if not, script won't work at all...
A maker placed in the editor is basically a mission marker, so setMarker commands will work.
But markers in the editor are global, so using a local command doesn't make much sense in your case.
Then what would be good try...
Create the markers while the mission is running, when and where you need themö.
Then you can create them locally and edit them locally for each client.
But it will require wide map scan
even its once
maybe hardcoding would be better solution?
Getting all transmitter towers in the map shouldn't be an issue performance wise
it takes few seconds.
However, if you know what map it will be and it never changes, then get them before and store them in a variable
scanning 20km from center of altis
yes that would be best solution i guess
thanks
Oh one more thing
@cosmic lichen Will deleteMarker on editor marker will remove JIP player's marker too?
Yeah I think so.
Hey guys, so i have a problem, I am wanting to create respawn with custom loadouts which i have done, however on the respawn screen one loadout is separate and the rest are all collapsed under default, Now while anyone can select any loadout which is what i want, I want each loadout to be separate, I have tried adding more classes under CfgRoles but when i do this i get an error on line 12, and i cannot figure out what is causing this, Can anyone help me? https://drive.google.com/open?id=1aMbQvuNq0e2W0odIcs83RU5tu8GnyxyI < download link for the mission file with Init and Description files aswell.
the "role" attribute has to be defined in CfgRoles
role = "UAV Operator"; @visual quarry
This doesn't look right.
It should be the classname.
Also, small tip, use a consistent style in scripts/configs when it comes to your brackets { }. Makes it easier to read.
Well, Just making previous marker alpha 0 and making new local marker would be my solution. thanks for your hint
_line3hr = parseText format ["<t size='1.5' font='PuristaMedium' color='#99D778'>0%1</t>", _currHr];
``` strings  how do i get the structured text stuff to work with format
That should work, where is _line3hr being displayed and does it support structured text
BIS_fnc_dynamicText - the value shows up, it's just not formatted
yes, it does, since lines 1 and 2 are static and work fine
text has to be unformatted. it gets formatted in the function itself
BIS_fnc_dynamicText takes string, not formatted text
i'm not sure why that means that lines 1 and 2 are formatted then
(i.e, just get rid of parseText from the above)
doesn't work; i end up with the "<t size='1.5' font='PuristaMedium' color='#99D778'> showing up ingame
_line1 = parseText "<t size='1.5' font='PuristaMedium' color='#99D778'>2035</t>";
_line2 = parseText "<t size='1.5' font='PuristaMedium' color='#99D778'>March 3rd</t>";
_line3hr = parseText format ["<t size='1.5' font='PuristaMedium' color='#99D778'>0%1</t>", _currHr];
_line3min = parseText format ["<t size='1.5' font='PuristaMedium' color='#99D778'>%1</t>", _currMin];
[composeText [_line1, lineBreak, _line2, lineBreak, [_line3hr, _line3min] joinString ":"], 0, -1, 2.5, 0, 0, 1] spawn BIS_fnc_dynamicText;
``` is the full thing: lines 1 and 2 are formatted, line 3 shows the right values, just not formatted 
private _myText = format ["<t size='1.5' font='PuristaMedium' color='#99D778'>2035<br/>March 3rd<br/>0%1:%2</t>", _currHr, _currMin];
[_myText, 0, -1, 2.5, 0, 0, 1] spawn BIS_fnc_dynamicText;```
works as intended
@cosmic lichen So if i am understanding you corrent, I need to add this under my class CfgRoles?
`class UAV Operator
{
displayName = "UAV Operator"; // Name shown in game under roles tab
icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa"; // Icon shown next to display name
};`
I'm sorry if this is wrong last time i have done somthing this complex was back in arma 2 and then ended up leaving the game for the past like 5 years
ah that's super, thanks! 
{
displayName = "UAV Operator"; // Name shown in game under roles tab
icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa"; // Icon shown next to display name
};
class WEST3
{
displayName = "Combat Life Saver"; // Name that shows in Respawn Menu
icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa";
role = "UAVOperator";
/* .... */
};``` @visual quarry
UAVOperator is a CfgRole
oh got you so the West 1/2/3/4 is the class name but the display name is what it appears in the UI?
Right
okay thanks
Here is a full example https://community.bistudio.com/wiki/Arma_3_Respawn
Scroll down.
is there way how to turn out stamina white screen visual effect when stamina gets low?
somewhere inside CfgMovesFatigue possibly?
in Arma 2, is there a way to get all subClasses from one config entry, e.g CfgVehicles?
hmm, I might use select
Is there any script command to check if a player has fully loaded in yet?
Found BIS_fnc_isLoading, not sure if it covers loading into game though.
Interesting, doesn't seem to cover my use case though which is between "BRIEFING READ" and "GAME FINISHED"
Is there some improved drop in replacement for cursorObject that allows settings cone width, so you don't have to look precisely at the center of a man to get a hit?
cursorTarget is not as exact
hmm okay i will try it thanks
yes seems good thanks
i guess nearestObjects + cone check is an option as well
Cone check for anyone who is interested:
(nearestObjects [position player, ["Man"], 5]) apply { [_x, vectorNormalized (position player vectorFromTo position _x) vectorCos getCameraViewDirection player] } select { _x#1 > 0.9 } select 0
cursorTarget takes a few seconds before you can use it due to the time it takes to identify target
After player is killed in SP how can I switch them to a new unit with copying name? Can't seem to get this to work:
// Create a unit and give player control of it.
private _newGroup = createGroup (side group _oldUnit);
private _newUnit = _newGroup createUnit [typeOf _oldUnit, [0,0,0], [], 0, "NONE"];
selectPlayer _newUnit;
_newUnit setName name _oldUnit;
deleteGroup group _oldUnit;
tried profileName instead of name _oldUnit as well
and different order of selectPlayer and setName
setName doesn't work on players
its literally one of the wiki examples tho :/
In Arma 3 this can be used to set name of a person but only in single player.
which is exactly what i want
but it doesn't :/
however when i do name player it still gives the correct result, but on map shows the name of the units identity
Had to do this:
// Create a unit and give player control of it.
private _newGroup = createGroup (side group _oldUnit);
private _newUnit = _newGroup createUnit [typeOf _oldUnit, [0,0,0], [], 0, "NONE"];
selectPlayer _newUnit;
deleteGroup group _oldUnit;
_newUnit spawn {
waitUntil {
player setName profileName;
name _this != profileName
};
};
because it won't allow you to change name immediately after creation :/
oh bug
well i guess it works tho 😄
put a little "sleep" in the waitUntil
yeah also get the condition boolean correct way around 😄
true
but really could just make this spawn global and replace _this with player, run it every few seconds
could do waitUntil player != _this
conceptual question: is it better to use execVM or call/spawn compile preProcessFileLineNumbers on what would essentially be an "init" script for a system in a mission?
could do waitUntil player != _this
no, not really
execVM is just short for the second one. see the execVM BIKI
@tame lion execVM is equal to spawn compile preprocessFile
Yeah i know they are equal, which is why I was asking if one was better over the other
if you just execute something once, all of them are equally bad.
Just scheduled vs unscheduled
well if they are equal, the one with less script commands is faster
copy that, makes sense. I remember reading somewhere that one was essentially better than the other but couldn't remember which one.
Q: not really sure what this qualifies as, makers wise... looking for a bit of guidance as to how/what should be packaged in an A3 mod? i.e. from config.cpp, description.ext, to folders, keys, etc. As a specially named .zip I assume? Along these lines. Thanks! Cheers.
just gonna slide into this chat because this isn't a tfar question (atm):
XEH_preInit.sqf
[
"tfar_dialog_selector",
"LIST",
"TFAR Dialog",
"TFAR Dialog Selector",
[
["rt1523g_radio_dialog", "mr6000l_radio_dialog"],
["RT1523G Dialog", "MR6000L Dialog"],
0
],
2,
{
params ["_value"];
tfar_core_WeaponConfigCacheNamespace setVariable ["tf_rt1523gtf_dialog", _value];
systemChat str _value;
},
1
] call CBA_fnc_addSetting;
Config.cpp
class cfgPatches
{
class tfar_dialog_selector
{
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {"task_force_radio"};
};
};
class Extended_PreInit_EventHandlers {
class tfar_dialog_setter_pre_init_event {
init = "call compile preprocessFileLineNumbers 'XEH_preInit.sqf'";
};
};
My option isn't appearing in the addon options list, and i have no idea why
I didn't think the CBA Settings wiki page looked very complicated, so I'm really not sure whats wrong
CBA_settings_fnc_init is what you need to call (at least that works for me)
@fair lava ^^
@exotic flax thanks, i've tried that and it didn't work either, but i've figure out the issue
the cba wiki page assumes you have a PBOPREFIX file
its the path to the file thats not working
I never use the PBOPREFIX file since it's obsolete
although it can help to add "cba_xeh" to requiredAddons
although that should already be the case through TFAR
yeah the problem seems to be 'XEH_preInit.sqf', i'm trying 'tfar_dialog_selector\XEHpreInit.sqf' now
okay, awesome, thats working
its now printing in chat and it shows up in addons... not actually setting the interface but baby steps
@dreamy kestrel when unsure #arma3_questions is the place to start. Anyhow, to answer your question Mikeros PboProject would likely be the most useful tool for you. you can find guide on how to set up Arma3 Tools and P Drive with Mikeros toolset on PMC wiki
GVAR(VehicleConfigCacheNamespace) = false call CBA_fnc_createNamespace;
i'm pretty sure the issue here is the namespace is not global so i cant put my own data into it
but i have no idea how to fix that
I have a question I’m trying to put together a team balance script but it doesn’t seem to work. Anyone have one that does?
Quick question, how would i make a condition that activates once a player has planted a mine?
and can i modify it to only activate once a specific mine has been placed? or any type of mine?
How does one make the APR show when worn? I see it in eden but IG it disappears there a deploy method for it or something?
@tough abyss In the trigger condition: ```sqf
_e = thisTrigger nearObjects ["APERSBoundingMine_Range_Ammo", selectMax triggerArea thisTrigger];
count _e > 0
or whatever ammo type your mine uses
thank you
getPos not needed
changed
thonk
allMines findIf {_x inArea thisTrigger} > -1
even easier
for any shape of the trigger but less performant when there are many mines in the mission present
and for any type of mine
how do you invert the logic for a if clause? specifically (player in thisList)? double bracket with a !?
Is there any particular reason that addMagazine is much slower than addItem?
Example 1:
Result:
0.0633 ms
Cycles:
10000/10000
Code:
player addMagazine "30Rnd_65x39_caseless_black_mag";
player removeMagazine "30Rnd_65x39_caseless_black_mag";
Example 2:
Result:
0.0049 ms
Cycles:
10000/10000
Code:
player addItem "30Rnd_65x39_caseless_black_mag";
player removeItem "30Rnd_65x39_caseless_black_mag";
@bright flume if !(player in thisList) then
Freddo Im betting thats on the fact addMagazine has to look at and calculate the players inventory as it only gives you as much as the player can hold with the current inventory.
They both do that
I'm thinking it might have to do with alternative syntaxes for addMagazine, but can it really make such a big difference?
Even weirder when you look at addMagazines
Result:
0.0297 ms
Cycles:
10000/10000
Code:
player addMagazines ["30Rnd_65x39_caseless_black_mag", 1];
player removeMagazine "30Rnd_65x39_caseless_black_mag";
no
addMagazine checks the vehicles main gunner turret, to add the magazine too it potentially.
addItem just puts it into inventory
So when working with men addItem is flat out better for all intents and purposes?
Other than if you want a specific bullet count in a magazine
if you want to add into inventory, then yes
Guys, a question about attachto.. Did i read recently that attachto'ing objects changes their simulation? For example, if I attach a trafficcone to a building, does the traffic cone take on the simulation, and presumably other properties, of the building it's attachto'd?
ye
thought so, thanks D
I'm trying to sense missiles and rockets hitting buildings (and other significant objects such as railway engines) and am finding many of them just eignore damage
so I'm experimenting with added sensor objects that DO take damage to them
it takes the simulation of the object you attached it to
but the sensor objects do annoying things like fall off, or get sheilded from damage by geometry
and it kinda losses collision and stuff
yeah
i can hideobject these sensor objects which is useful, but they don't stay where i put them, on bridges for example, they often fall to the ground below
perhaps I should use big sensor objects that I know take damage and hideobject them
wind turbines for example
I wrote a 'destroy infrastructure object' mission that chose things like transformers, turbines, railway assets, fuel tanks, geodesic domes and bridges and fater testing at the time, it all worked lovely. Played the mission last week, the geodesic domes at Telos were taking hits but not going down
Isn't dialog and visibleMap compatible with displayAddEventHandler's MouseButtonDownEvent? It seems those code always return false in EH context.
My code is like below and it always return false in map, inventory.
(findDisplay 46) displayAddEventHandler ["MouseeButtonDown", {
params["_displayorcontrol", "_button", "_xPos", "_yPos", "_shift", "_ctrl", "_alt"];
if (_button == 0 && !(dialog || visibleMap)) then {
systemChat str [dialog, visibleMap, !(dialog || visibleMap)];
//Always return "false, false, true"
};
}];```
Isn't dialog and visibleMap compatible with displayAddEventHandler's MouseButtonDownEvent?
thats wrong.
but. maybe the dialog/map are on a different display
so your EH doesn't fire then
dialog and visibleMap commands don't know where they were called from
do they need to know whree they were called?
no
They don't know it, if they would need to don't you think they would?
maybe it has to do with the frame stage, try logging dialog/visibleMap in EachFrame/Draw3D handlers
I'll try
Draw3D knows if dialog is opened.
but doesn't know if map is open.
EachFrame tells both.
Oh, Draw3D doesn't fire in map screen.
I guess i have to use global variable then
thanks
@dreamy kestrel when unsure #arma3_questions is the place to start. Anyhow, to answer your question Mikeros PboProject would likely be the most useful tool for you. you can find guide on how to set up Arma3 Tools and P Drive with Mikeros toolset on PMC wiki
@young current to be clear, these are a paid subscription, am I correct in understanding that? Probably a non starter.
There is free version too @dreamy kestrel
Does pushBack have global effect if used on a public variable?
no
namespace setVariable ["example", [], true];
(namespace getVariable "example") pushBack "text";
namespace getVariable "example"
the variable isn't really "public", when you call publicVariable, the value of that variable is just transmitted over the network once, and it never updates again after, its up to the local client to change it, unless you PVAR again.
set/getVariable needs to be set every time you change it, so the above example won't work.
This should:
namespace setVariable ["example", [], true];
namespace setVariable ["example", ((namespace getVariable "example") pushBack "text"), true];
namespace getVariable "example"
Would that work seeing as pushBack returns the index?
in that case; put the result in a temp value, pushback on that and set the temp array
@exotic flax pushBack returns <???> ? 👼
so yep, setVariable with true or publicVariable
or use the ugly array + ["text"]
given an .ogg sound file, path, resource, etc, is it possible to gauge how long it is in seconds? or must it be opened in a waveform editor?
quick question, I've got a super simple script to lock and unlock doors here
...
if (doorlocked == 0) then {
hint "was unlocked, now locking.."; // debug to show me what's happening, not expected behaviour
realaction = player addAction ["lock door", enemybase setVariable [door,1,true]];
} else {
hint "was locked, now unlocking..";
realaction = player addAction ["unlock door", enemybase setVariable [door,0,true]];
};
player setVariable ["dooractionindex", realaction];
...
that's set on a trigger. I'd expect that to just give me a new action, but it actually runs the action right away, which means the action in the menu isn't correct anymore. how do I stop it from running right away?
You should be wrapping your code in brackets {} inside the addAction
doorlocked == 0
sounds like what you really wanted here was a boolean
that was it @finite jackal , thanks!
@still forum yeah, but I don't know if arma evaluates 0 and 1 to false and true, and this has the same effect so I didn't bother
ah. alright. well the variable I'm checking doesn't return one, so I can't compare it to one, right?
I'm using player execVM "myscript.sqf"; to try and return a value, how would I go about storing that in a variable as _myVariable = player execVM "myscript.sqf"; doesn't work. I understand why it doesn't work, just unsure what the correct syntax is.
@dreamy kestrel do you need to know from ingame?
I saved the value inside the script @nimble yew with player setVariable ["name",value];
@nimble yew execVM returns the script handle and not the last returned value. try using ```sqf
player call compile preprocessfilelinenumbers "myscript.sqf";
This will work if the script you are calling it from is in scheduled environement
or you dont have any sleep/uisleep/waituntil in your myscript.sqf
Thank you!
How do I reposition the map during the briefing segment of a mission? Default view position is the player's location. Preferably I'd like it to move without player input (to a different position).
I assume you've looked at this? might have something relevant in it @worn forge
Looked at what now?
So, the example in ctrlMapAnimAdd is:
_map ctrlMapAnimAdd [1, 0.1, [0,0]];
ctrlMapAnimCommit _map;```
Where _map is a control. I'm perhaps a bit confused as the display for the map is findDisplay 12, what is its control?
Or perhaps I should be using https://community.bistudio.com/wiki/mapAnimAdd
Which doesn't work in the briefing, but does work post briefing, in-game
Oh derp forgot to paste the link
So for greater clarity, looking to move the map default position during the briefing phase
Depending on what you wanna do exactly, you could use https://community.bistudio.com/wiki/Arma_3_Animated_Briefing
Looks like a great resource. Thanks R3vo
BIS_fnc_zoomLock might be what you are looking for.
I had fun with this one. The setUnitPos command requests the unit be in particular stance and takes one of the following "UP","MIDDLE","DOWN". The stance command returns the units current stance and returns "STAND", "CROUCH" or "PRONE". The unitPos command returns what was original requested with setUnitPos and returns "Up", "Middle", "Down". 3 commands, 3 different ways of saying the same thing.
stance is the very exact current stance;
the others are what the AI should use
Well yes, but the commands use different strings to define the same thing, the fact that setUnitPos and unitPos are not symmetrical is really bad. Although it could also just be a wiki issue and the command accepts any capitalisation at all for set and its wrongly documented in unitPos that it uses the same values and they are all caps.
Stance shouldn't have differing values to setUnitPos and setUnitPos shouldn't accept different values than unitPos returns.
Is there a way of giving the USS liberty model the physics model of the trawler? As far as I know there isnt and I cant really find anything on the internet
im passing a reference to a vehicle from server to client and am getting Client: Object 2:33 (type Type_70) not found.
Perry I don't think the one is necessarily related to the other. What code are you using to pass the reference?
If you don't paste some code we won't know how to help you
its not how i call it, my question is can a reference to a vehicle from the server be used on a client?
Well the client is going to reference it differently than if it was local to the client, but if the server has a variable assigned to it, you can publicVariable (or publicVariableClient) the variable to the client, and yes, it will reference it just fine
Ie., server calls the helicopter heli1, then you publicVariable "heli1", now all clients have that variable referring to the same helicopter
@bitter spire negative, it is a static object. What you could do is place a zodiac boat, toy with it with setMass maybe, and attach the USS parts to it (PhysX not guaranteed)
hmm i have something pretty weird right now
_var = { if (_x select 0 == _heliUID) exitWith {_x select 1}; } forEach _smokes;
diag_log format ["var is %1", _var];
if (isNull _var) then {
diag_log "running inner function";
};
logs only show
"var is <null>"
what is the content of _smokes, is _heliUID defined?
_smokes is an empty array
so... how do you expect iterating a empty array to return anything?
its usually filled with tupes in form [uid, smoke]
but either way _var ends up being null
which should trigger the inner function anyways
its not
if it would be nil
then checking isNull on it should throw an error
which it doesnt
and undefined is not null. Undefined is undefined(nil).
In unscheduled that won't error.
because in unscheduled undefined variables don't throw errors. Thats just how it is
i know what undefined is
why are you trying to use isNull on that then? isNull doesn't work on undefined variables
because i was handling the empty array case before seperately
this was only searching for uid
not found == null
not found == null
no
you can do
_display2 = addMissionEventHandler ['Draw3D', format [...] ];
as _drawPosUP and _drawPosDOWN seem to return an array of 0 entries
tried adding logging?
to see if that is ACTUALLY what happens?
omg you are right
format doesn't have anything to do with draw3d
you pass it into addMissionEventHandler
which doesn't know where the string come from
a script command that takes a string HAS TO support format, it doesn't know where the string came from, it can't know whether it went through format at some point in time
so it cannot not support it
have you already tried adding the logging?
adding multiple lines via different Z-heights is weird and looks stacked up when close
)