#arma3_scripting

1 messages · Page 569 of 1

fair lava
#

It was working pretty well, got it dial'd in nicely, but then i tried attaching the hemett

#

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

sonic slate
#

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

fair lava
#
_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

still forum
#

@sonic slate not scriptable

young current
#

@fair lava vehicles with weapons have extra on top due to the muzzle flash proxies

fair lava
#
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

young current
#

Yes. The proxy is a big triangle in the object and causes the increase in the bounds.

#

And probably no

#

Not possible

fair lava
#

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

young current
#

Lineintersect

still forum
#

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

young current
#

👆

sonic slate
#

@still forum unfortunate, thanks for the reply.

velvet merlin
#

when is addMissionEventHandler#Loaded needed?
i read to continue music, GUI with disableSerialization (when exactly? seems not always the case) - anything else?

modest temple
#

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

still forum
#

@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

velvet merlin
#

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

coral owl
#

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

https://pastebin.com/jWJFgJTX

But I cannot quite seem to "grab" onto the thrown grenade.. any help is appreciated!

young current
#

Would have to be tied to fired eventhandler .

coral owl
#

@young current I think my main problem was using Speed ... vectorMagnitude velocity _this select 6 (projectile) works!

young current
#

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

coral owl
#

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 🙂

young current
#

In buildings its possible the surrounding geometry sucks up the explosion effects

coral owl
#

true true

young current
#

although if it happens only for you in SP there might be some other underlying issue

coral owl
#

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

young current
#

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

coral owl
#

ah also that, could try in VR...

coral owl
cosmic lichen
#

looks clean

#

you might wanna use forEach instead for from to

coral owl
#

oh right! forEach, thanks for the tip!

cunning crown
#

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

dark temple
#

Is there a script to stop AI from opening doors?

coral owl
#

Thanks @cunning crown good call again! I will ditch that

austere granite
#

@dark temple { if !(isPlayer _x) then { _x setDamage 1 } } forEach allUnits

#

Pretty sure that'll work

oblique arrow
dark temple
#

It won’t stop me from opening them right?

austere granite
#

no no

#

pls dont take my joke serious 😦

dark temple
#

Wait what

austere granite
#

the script is.... killing every unit which isn't a player

dark temple
#

Dang

austere granite
#

so it'll stop them from opening doors

#

but also from being alive

coral owl
#

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 ...
coral owl
distant egret
#

Could you show the full error? @coral owl

coral owl
#

sure!

worn forge
#

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

coral owl
#

ah need to find how to screenshot lol

worn forge
#

Ie., after you've defined _projectile in your spawn
if !(_projectile in ["GrenadeHand", "HandGrenade", "mini_Grenade"]) exitWith {};

coral owl
#

good call @worn forge true, I guess the EH will keep running anyway next time I throw

#

does not need to be non-exiting

worn forge
#

It's an event handler, it'll run every time you shoot

coral owl
worn forge
#

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

coral owl
#

ah yes, there were some leftovers, I kinda got it now!

coral owl
#

I got it to work, stand by for the creme de la creme in coding (lol) 🚎

surreal peak
#

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

alpine ledge
#

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;
...
exotic flax
#

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)

alpine ledge
#

nop, still returns player4

young current
#

@surreal peak yes that would be possible

surreal peak
#

Excellent...

young current
#

I presume you will want it to drop grasscutter objects under it when you fire

surreal peak
#

either that or just execute a script which clears all grass infront of player

young current
#

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

alpine ledge
#

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 inSANEOIeafhwehnfbgtuoWBTGHWOUJ

#

leads me to believe it's maybe something to do with scopes, but i'm not knowledgable enough to say what FeelsThenkingMan

exotic flax
#

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

alpine ledge
#

nop, still player 4 GWvertiPeepoSadMan

#

it's just that function it seems, any other function is fine

exotic flax
#

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

alpine ledge
#

huzzah

#

changed it to _Rubberbabybuggiebumpers and it worked FeelsFunnyMan

#

okay, something screwy with the word unit then it seems

exotic flax
#

it's probably one of the most used variable names in Arma 😉

alpine ledge
#

thanks, never woulda thought of that GWvertiPeepoCheer

final storm
#

How would one getObjectTextures of a players vest?

exotic flax
#

probably something like:
getObjectTextures vestContainer player

final storm
#

ya i tried that but it gives me an empty array

exotic flax
#

or getObjectTextures vest player

final storm
#

nope

#

thanks for the help tho

young current
#

I recall you cant setObjectTexture on vests

final storm
#

That makes more sense now, Thanks

young current
#

only character and Backpack

velvet kernel
#

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

winter rose
#

@velvet kernel limitSpeed

alpine ledge
#

you also need to apply it to the driver of the vehicle if my memory serves me rightly

velvet kernel
#

@winter rose not working with limitspeed either

#

i will try applying to everything one sec

young current
#

where do you apply it?

velvet kernel
#
  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;
solar shore
velvet kernel
#

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;
    };
  };
alpine ledge
#

@solar shore configfile >> "CfgMods" >> "Expansion" >> "logoSmall" might be what you're after PeepoDetective

velvet kernel
#

but it wont work from sqf that gets compiled

alpine ledge
#

in this case it's "\A3\Data_F_Exp\Logos\arma3_exp_logo_small_ca.paa"

dark temple
#

Is there a script to stop AI from opening the doors?

#

Please dm me ASAP

#

I mean ping

visual lake
#

Hello everyone

#

I have some issues with this eventhandler if anyone has the time msg me or @ me, anyway thanks 🙂

exotic flax
#

if you share your problem here more people can help you

visual lake
#

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

exotic flax
#
 if (_selection == _ARMSX) then

perhaps?

visual lake
#

I think i tried that let me see

#

BTW i changed it to (in)

#

Nah it didn't work

exotic flax
#

in will simply check if the variable exists in the array

visual lake
#

yea

exotic flax
#

so what is the result you're expecting?

visual lake
#

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

exotic flax
#

btw... the HitPart EH will give an array with array's, because multiple parts can get hit at the same time

visual lake
#

So what would it return as?

#

Sorry what would my array need to look like?

exotic flax
#
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
    };
}];
visual lake
#

I will try ty 🙂

lost copper
#

You should parse _this array, every element of them

visual lake
#

Not working still oof

exotic flax
#

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

visual lake
#

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

fair lava
#

@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

fair lava
#
_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

fair lava
#
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

cedar canopy
#

hey is there any way to find the model path ingame ?? ,eg through the editor?

winter rose
#

In config yes @cedar canopy

fair lava
#

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

winter rose
fair lava
#

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

coral owl
#

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!

hollow thistle
#

try something like:

private _composed = parseText format ["<img align='center' size='%2' color='%3' image='%1'/>", _image, _size, _color];

hint _composed;
coral owl
#

Thanks @hollow thistle

dreamy kestrel
#

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.

winter rose
#

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

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.

winter rose
#

you can only "stretch" a texture by enhancing/reducing its size, not separately horizontally/vertically

hollow cairn
#

I download some scripts how exactly do I use them?

oblique arrow
#

depends on the script

#

usually the scripts come with some kind of readme that explains it

hollow cairn
#

These don't they are on a saved notepad

winter rose
#

we don't know.

young current
#

Need to understand how scripts work before trying to use random scripts

cunning crown
#

And where did you even get scripts with no explanation on how to use them

worn forge
#

I wonder if we could have some kind of channel awards for best starter questions?

winter rose
#

this one is 2nd to the car script 😄

ruby breach
#

Ahh, yes. the car script

worn forge
#

Who has the car script? Can they send it to me so I can use the car script?

drowsy axle
cunning crown
#

What is the car script, feel like I've missed something givePls

hollow thistle
#

It's a car script

winter rose
#

@cunning crown look up "the car script" in Discord history, I just did and it brought back good memories 😂

dreamy kestrel
#

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
#

@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 meownot )

dreamy kestrel
#

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.

solar shore
#

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
winter rose
#

yes…?

solar shore
#

Yeah, so I'm wondering how do I get the object from the classname

winter rose
#

through config

#

you will get a string though, not a DLC id

solar shore
#
configSourceMod (configFile >> "CfgWeapons" >> "U_B_CTRG_Soldier_3_F");

Would that work?

#

Seems to work

#

Ty

obsidian violet
#

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

ornate scroll
#

@obsidian violet

ACE3/addons/gestures/anim/ace_point.rtm
rustic plover
#

Guys, how I can get the displayName from config in another language?

solar shore
#
configSourceMod (configFile >> "CfgWeapons" >> "arifle_MXC_F");

Okay so when I do this right, it throws "enoch"?

rustic plover
#

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?

cunning crown
#

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

solar shore
#

Oh, because even with https://community.bistudio.com/wiki/configSourceModList it only throws ["enoch"]

cunning crown
#

Here it is, maybe not the best way, but works pretty good on vanilla so far

solar shore
#

Where arifle_AK12_F throws ["expansion","enoch"] so it picks "enoch" with configSourceMod

#

Ty, I'll have a look

solar shore
#

Now the icons are completely gone for me

cunning crown
#

It worked for me, but what is your use case (why do you need the original mod)?

solar shore
#

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

winter rose
#

DLC-introduced doesn't always mean that you need the DLC to use the item though ☝️

cunning crown
#

The one I sent gives you the exact Mod/DLC you need to use the specific item

solar shore
#

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

cunning crown
#

Then want I sent should do what you want, it takes the "mod" that first created the class

solar shore
cunning crown
#

Is that L*ife Shop Config?

solar shore
#

That's the fn_weaponShopFilter.sqf

cunning crown
#

You forgot to change "CfgVehicles" to weapons

solar shore
#

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

cunning crown
#

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)

solar shore
#

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

violet gull
#

And is the below still necessary for JIP compatibility in scripts?
waitUntil{!isNull player}

bright flume
#

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.

winter rose
#

this is for the smaller entity. the mothership is one static prop you can move around with setPos*

bright flume
#

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.

winter rose
#

I am not sure; if you can place it in Arma (non-Contact), you can use it

bright flume
#

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.

winter rose
#

…wat

bright flume
#

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

queen cargo
#

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

velvet merlin
#

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

winter rose
#

unitReady could do, depending on what you do?

#

@velvet merlin ?

velvet merlin
#

ty. checking

#

good idea Lou but units in formation are also ready 😄

worn forge
#

@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

velvet merlin
#

it probably works for most, but the "in-formation" state i think isnt possible to determine reliably

lilac kernel
#

Is there a way to find out what IDC's are being used

winter rose
#

@velvet merlin isn't there a formationPosition command? This coupled with distance and unitReady might be the thing

bright flume
#

how does one make a empty group and link/hook the small alien to it? I still cant figure how how its being done.

winter rose
#

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?

bright flume
#

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

winter rose
#

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.

bright flume
#

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

winter rose
#

again, I don't think they are meant to use waypoints

cunning crown
bright flume
#

they do that example mish has 2 drones. one follows and moves to trigger/map location markers, the other follows the WP system

winter rose
#

use F4 > Waypoints on them directly

#

(or shift/right-click iirc)

bright flume
#

tried that dont work cuz they are ungrouped by default in editor

winter rose
#

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.

bright flume
#

what I mean that screenshot clearly shows them grouped and one of them is the 'group leader'

winter rose
#

so only one follows waypoints?

bright flume
#

yep other follows some map marker locations into trigger zones

winter rose
#

remove the markers or script call then

try in a blank mission

bright flume
#

I just cant remember if init is called in the editor (didnt think it was.)

worn forge
#

Does anyone know if there's a performance difference between
[] spawn { while {condition} do { sleep 1; }; };
and
waitUntil {sleep 1; condition};

?

winter rose
#

@worn forge the spawn would not halt code flow ^^ ?

cunning crown
#

If you don't do anything else, I would assume thag waitUntil is better

worn forge
#

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

cunning crown
#

Also doing a while loop to pause the code looks horrible, L*fe-tier horrible 😄

bright flume
#

waituntil suspends execution, god help ya put that in a non-suspendable task.

still forum
#

The while loop has more overhead

winter rose
#

how come though?

#

any while specifics?

still forum
#

more commands

winter rose
#

oh, while & do combination?

#
  • 2 code blocks vs only 1
bright flume
winter rose
bright flume
#

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

worn forge
#

I'm looking at that code optimizatin page but there's nothing specific to waitUntil vs while loop.

winter rose
#

@bright flume diag_tickTime

#

@worn forge we could do that (even though it's ugly to even think about it)

worn forge
#

Anywho. The particular example I'm optimizing will work with waitUntil just fine. Thanks folks.

still forum
#

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

winter rose
#

empty ones, for structure timing

bright flume
#

^

still forum
#

and how you wanna time waitUntil then?

winter rose
#

one false boolean

#

set to true later? hmm, yep that would be tricky. thonking

bright flume
#

think we picking at straws both do different things, scheduled vs unschedu... etc

cunning crown
#

while { false } do {}; vs waitUntil { true }; ?

winter rose
#

waitUntil { true } vs while { true } do {}
but that would only test instanciation, not waiting time

still forum
#

can't measure with true

#

it will never exit, you can never see the "after" time

bright flume
#

have a external loop that changes the waituntil bool?

worn forge
#

while { counter < 100 } do { counter = counter + 1; } vs waitUntil { counter = counter + 1; counter == 100 }; ? throw in some diag_ticks?

still forum
#

Then you are measuring the speed of your loop, not waitUntil

winter rose
#
wabbit = false;
waitUntil { if (!wabbit) { wabbit = true; false } else { true } }

vs

wabbit = false;
while { wabbit } do { wabbit = true };
still forum
#

No that won't work either. The while will run through immediately.
The waitUntil will need atleast one frame per iteration

bright flume
#

be measuring both, cuz you also looking at how long the scheduling takes (which Im betting is gonna be the worse of the two.)

winter rose
#

my wabbit version does one loop; should work?

still forum
#

the second one does 0 loops

#

And the first one will measure your fps/scheduler load, not the performance of waitUntil

winter rose
#

(also, missing then)

bright flume
#

and sup Ded. you got any idea on anything I was talking about for what Im dealing with?

still forum
#

don't know what you were talking about, and don't have time to click links 😄

bright flume
#

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.

winter rose
#

please write mission

still forum
#

Dunno ¯_(ツ)_/¯

bright flume
#

Im not on my IBM model M hate typing on small keyboards

ornate marsh
#

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];
still forum
#

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 want all the magazine types the player has in inventory?
_playerMagazines = magazines player arrayIntersect magazines player

ornate marsh
#

i can do the primary weapon, im struggling with secondary and launchers

still forum
#

Well use the wiki page I linked

#

check Additional Info, shows you how to get secondary(handgun) + launchers

ornate marsh
#

oh yea, sorry, didnt see that, my mistake

velvet merlin
#

@winter rose doesnt work unfortunately. as said the issues is to differentiate units in formation (default group behavior) and units that completed a command

winter rose
#

what if "fall back" is the command then 😋

velvet merlin
#

but how to check?

winter rose
#

currentCommand sure is an interesting lead… if it worked :-\

bright flume
#

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.

velvet merlin
#

meh engine cant detect BACKSPACE+key modifier at the same time

cunning crown
#

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

bright flume
#

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)

noble sentinel
#

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;
cunning crown
#

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

noble sentinel
#

@cunning crown There is no readme tho

#

that's is the problem

soft niche
#

Sorry for the randomness but, is there a good consolidated location of scrips and mods ? For example, xm8 apps ?

cunning crown
#

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

soft niche
#

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!

noble sentinel
#

@cunning crown When it comes to that destination what else can use ?

cunning crown
#

What do you mean?

noble sentinel
#

Well, I want to move it up. What should I use then?

cunning crown
#

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

noble sentinel
#

and I should put into the last line of it?

#

ohfuckitisworking

cunning crown
#
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;
noble sentinel
#

cheers mate

#

I did something ugly meantime :P

cunning crown
#

👍

noble sentinel
#

prepare rocks

[ bigDoor, (getPosATL bigDoor) vectorAdd [0, 0, 5]] spawn TAG_fnc_moveObject;
cunning crown
#

works to, but it's usually better (for readability) to separate "operations" into variables

noble sentinel
#

yea

#

where should I apply it?

#

in function or after it?

copper raven
#

those params xDD

cunning crown
#

Yeah, totally the right way to use that command 😄

astral tendon
winter rose
#

reveal maybe?

olive cairn
#

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.

young current
#

your custom textures would have to cover the same area as the part of the texture you are replacing

worn forge
#

Alrighty, I'm stumped. How do I reload a player's current weapon? reload command reloads all weapons.

olive cairn
#

which size are the graffitis?

young current
#

You need to unpack their textures to see that

olive cairn
#

because billboards doesent gime trouble

#

ok

#

last que3stion

#

how to unpack the textures?

#

thnaks

cunning crown
#

Billboarss are twice as wide as the height, always it format power of 2

alpine ledge
#

@worn forge addPrimaryWeaponItem maybe?

olive cairn
#

@cunning crown and the graffitis?

cunning crown
#

¯\_(ツ)_/¯

olive cairn
#

thnaks

worn forge
#

@alpine ledge that does work, it doesn't trigger the reload animation though. Anyway, sufficient for my needs. Thanks.

olive cairn
#

land_graffiti_02_F texture

alpine ledge
#

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 🙄

winter rose
#

@worn forge for reload animation, check the reload action

worn forge
#

@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

coral owl
#

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

worn forge
#

There is a loadMagazine action, but it doesn't have an effect in this case (probably for vehicle turrets)

young current
#

What is the whole purpose of the reload? Usually player is the one who does the reloading by hitting the reload key.

worn forge
#

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.

young current
#

That should teach them then 😄

worn forge
#

That's my thinking 🙂

young current
#

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

worn forge
#

Eh, it's a convenient thing.

young current
#

possibly this could do it

worn forge
#

"Loads a weapon with magazine with known id and fires that weapon" last part is probably not what I'm after 🙂

alpine ledge
#

could use playMove or switchMove to pretend you're reloading the weapon, bit of a dirty way about it but GWcmeisterPeepoShrug

worn forge
#

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)

alpine ledge
#

that's what i wroted peepoEZ

winter rose
#

writtened*

olive cairn
#

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

alpine ledge
#

you could resize your texture so that it would fit onto the 10m one perfectly, but make the area around it transparent GWseremePeepoThink

olive cairn
#

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?

alpine ledge
#

not that i'm aware of

olive cairn
#

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

acoustic abyss
#

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

young current
#

"user texture" is not really used in vanilla content I think.

#

for custom sized stuff they just have custom sized objects

acoustic abyss
alpine ledge
#

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

acoustic abyss
alpine ledge
#

team switch / selectPlayer kind of switching

acoustic abyss
#

@alpine ledge Wait, so you got it to trigger when switching units already? Why not use titleCut? Eg:
titleCut [" ", "BLACK IN", 10];

alpine ledge
#

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

acoustic abyss
#

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?

alpine ledge
#

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

acoustic abyss
#

Claro! But, how are you activating this? What condition/eventhandler? Are you sure that is working?

alpine ledge
#

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 GWvertiPeepoSadMan

#

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 peepoSadManSulk

#

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

ornate marsh
#
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

worn forge
#

@echo yew There's no built-in function, you'll have to parse allMapMarkers... something like

allMapMarkers select {getMarkerPos _x distance yourVehicle < theDistance};
vital cave
#

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

uncut sphinx
#

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

cosmic lichen
#

@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];

worn forge
#

@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

uncut sphinx
#

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

tame lion
#

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?

queen cargo
#

it just ain't that fancy anymore then 😄

tame lion
#

thanks, i was unaware of that trick

restive leaf
#

I think the cached version looks better 😉

ornate scroll
#

lol

tame lion
#

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

exotic flax
#

if you have set a default and the expected data type is not set or set to "any" (so []), than yes

ornate scroll
#

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

ornate scroll
#

Already read through it a few times. Its fairly vague in its example.

exotic flax
#

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

ornate scroll
#

Ah, I see what I was doing wrong. Thanks for that.

uncut sphinx
#

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

bright flume
#

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

bright flume
#

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)

uncut sphinx
#

well if you want it to match terrain you need (object) setVectorUp surfaceNormal (pos)

#

afaik

bright flume
#

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

bright flume
#

Long as this script is in the init of the hideterrainobject module I dont have to worry about join in progress stuff?

uncut sphinx
#

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

bright flume
#

awesome then its done, now I gotta ask BI if its even legal to share what I figured out.. 🙄

warm hedge
#

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.

bright flume
#

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

warm hedge
#

You don't need to load contact which I mean Arma 3 Contact to use Land_Sinkhole_01_F

bright flume
#

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

warm hedge
#

I didn't load contact but I'm able to use it

bright flume
#

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

Just use ```

oblique lagoon
bright flume
#

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.

oblique lagoon
#

Remove bullet when fired with EH

bright flume
#

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.

oblique lagoon
#

Miles you saying?

bright flume
#

yep thats exactly it thanks its been so long since I even played AA 2.5

umbral nimbus
#

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

winter rose
#

animateSource

umbral nimbus
#

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;

oblique lagoon
#

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.

cosmic lichen
#

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.

oblique lagoon
#

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?

exotic flax
#

It already behaves like a gun; where it triggers the "Fired" EH when pressing LMB, and only when it can be fired.

oblique lagoon
#

But "Fired" EH Doesn't trigger if your hand is empty or holding weapon withou mag?

exotic flax
#

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"

oblique lagoon
#

Tring

#

Nop

#

Spectrum device doesn't have mag and not triggering "fired" EH.

exotic flax
#

since we don't have access to the configs/scripts of Enoch I can't tell... But in the campaign it is firing 😉

still forum
#

you have access to the configs and scripts

#

config viewer, function viewer

exotic flax
#

but I'm not in-game right now...

alpine ledge
#

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?

worn forge
#

Question: is there a way to get a list of currently set missionEventHandlers?

#

Or, event handlers of any stripe?

still forum
#

you can add new ones, if the id is not 1, then there are probably others

worn forge
#

Yup. Thanks.

#

(Technically first set missionEventHandler would be #0?)

still forum
#

either 0 or 1

oblique lagoon
#

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

still forum
#

¯_(ツ)_/¯

oblique lagoon
#

😭

winter rose
#

@oblique lagoon

#

@still forum

still forum
#

no

velvet kernel
#

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

oblique lagoon
#

@winter rose No.. thats not what i need... thanks though

winter rose
#

maaaybe a onClick Display event?

cunning crown
#

@oblique lagoon You can use the dialog command to check for dialogs

oblique lagoon
#

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

cunning crown
#

It should check every dialogs, the game has (almost) no way to know if the dialog is really BI's or not

oblique lagoon
#

Nice! its working

#

Only it doens't detect map screen

#

But maybe i'll do it with isMapOpen

#

@cunning crown Thank you!

smoky verge
#

@patent estuary
would something like this be it?

{enableSimulation true;} forEach _x;```
patent estuary
#

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.

smoky verge
#

yeah tried with {enableSimulation true;} forEach unit group [variable name of the group];
but it didn't seem to work

still forum
#

group command not needed

#

enableSimulation has syntax error

#

and I hope you didn't actually put the group into an array

winter rose
#

@smoky verge correct answer:```sqf
{
_x enableSimulation true;
} forEach units player; // or forEach group player

smoky verge
#

wouldn't affect only the player?

alpine ledge
#

forEach units group player if you want the full group

smoky verge
#

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)

still forum
#

forEach units group player if you want the full group
no. As I said above, group is not needed
wouldn't affect only the player?
no it wouldn't

winter rose
#
units aGuy
// is equal to
units group aGuy
worn forge
#

But but but units unit makes no useful sense

still forum
#

why not?

#

all units that belong to the unit

winter rose
#

it makes "English" sense in the case of ```sqf
units theGroupLeader

worn forge
#

Oh I see, in that case unit is short hand for group unit

winter rose
#

yep.

high marsh
#

No.

#

Group unit?

still forum
#

no

worn forge
#

But does that only work if (in that case) unit = leader group unit?

still forum
#

the units command just takes a unit as argument too

#

no

worn forge
#

(I mean I suppose I could just test it and see)

still forum
#

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

worn forge
#

But reading's for literate people!

winter rose
#

Or you could just believe me
DON'T

cunning crown
#

Ou can check the distance between each marker of your array

#

No, too hard on mobile ^^

high marsh
#
markers = ["mkr1","mkr2"];
{
    _en = (markerPos _x) nearEntities["Car",100];
    /* blah */
} forEach markers;
worn forge
#

Good start, but he specified "his array of markers"

high marsh
#

markers = ["mkr1","mkr2"];

worn forge
#

heh. how did I miss that. works

noble storm
#

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.

noble storm
#

Thanks. Makes a lot of sense tbh

surreal peak
#

np

smoky verge
#

@winter rose works like a charm, thanks a lot

winter rose
#

the code I posted too 😋

copper plinth
#

Hey, how to disable arma 3 system chat messages like % is connecting\disconnecting

copper plinth
#

Doesn't work

surreal peak
#

how so?

#

if u admin it will still show

#

disableChannels[] = {2}; in description.ext will disable system chat for all but admin

copper plinth
#

disableChannels[]={{0,1,1},{1,1,1},{2,1,1},{3,1,1},{4,1,1},{5,1,1},{6,1,1}};

#

its disabled

surreal peak
#

shouldnt it be disableChannels[]={{0,true,true}};

#
disableChannels[] = {
    {
        0,        // channel ID
        false,    // disable text chat
        true    // disable voice chat
    },
    { 3, true, true }
};
copper plinth
#

1 = true

surreal peak
#

just try it anyway

surreal peak
#

if u are self hosting I believe u would be admin

#

try adding another connection

copper plinth
#

I dont have enableDebugConsole or admin settings

winter rose
#

if you host, you are the server admin

copper plinth
#

Hah, okay, but can I hook any systemChat and block it

surreal peak
#

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

copper plinth
#

but blocking all channels works

#

group voice, side etc

worn forge
#

I don't think disabling channels has worked in description.ext for some time now

winter rose
#

I think there is a bug where it doesn't disable channels on deco/reconnection

worn forge
#

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

copper plinth
#

Its local disabling, no ?

winter rose
#

local yes, would have to be run in e.g init.sqf

copper plinth
#

But I want to disable any systemChat messages to make them like dialog message info

worn forge
#

Try the stream friendly UI, but that's also a client preference

#

Frankly, you don't want to disable systemChat

ruby breach
#

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");

dreamy kestrel
#

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?

cunning crown
exotic flax
#

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

dreamy kestrel
#

kind of makes sense, but at what rate(s) does decay occur /- from the base?

#

0.0049333 = density halves every 500m ... 💡

winter rose
#

0.5 = loses 50% density in 1m, iirc

exotic flax
#

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.

winter rose
#

range 0..100% though

tawny trail
#

How can i do for this :
if !(_itemsplayer == "telephone") exitWith
telephone is a virtualitem

exotic flax
tawny trail
#

@exotic flax Like this ?
if !(_itemsplayer isKindOf "telephone") exitWith

#

_itemsplayer = items player;

exotic flax
#

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?

tawny trail
#

Yes

#

In his virtual inventory

exotic flax
#

virtual inventory? as in "does the player not have the item available in Arsenal"?

tawny trail
#

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

exotic flax
#

ahh.... L*fe stuff... in that case I don't know how that works (script wise), since they have their own inventory system.

tawny trail
#

Ok :/

exotic flax
#

you probably can get more help at the L*fe discord channels

tawny trail
#

Life Discord Channels ? Where

exotic flax
#

depends on the framework you use; some of them have a support Discord

tawny trail
#

Ok i go check, thank for your help

bright flume
#

Sorry that was to a old post and winbloz not refreshing... ☠️

exotic flax
#

@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

bright flume
#

And that is bypassable

exotic flax
#

unless someone is hacking on a non-BE enabled server, not

bright flume
#

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

exotic flax
#

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

bright flume
#

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

bright flume
#

There any way to change the stretch the texture of a specific face on a object other then creating a new object?

winter rose
#

none I know

bright flume
#

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.

oblique lagoon
#

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

cosmic lichen
#

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.

oblique lagoon
#

Then what would be good try...

cosmic lichen
#

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.

oblique lagoon
#

But it will require wide map scan

#

even its once

#

maybe hardcoding would be better solution?

cosmic lichen
#

Getting all transmitter towers in the map shouldn't be an issue performance wise

oblique lagoon
#

it takes few seconds.

cosmic lichen
#

However, if you know what map it will be and it never changes, then get them before and store them in a variable

oblique lagoon
#

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?

cosmic lichen
#

Yeah I think so.

visual quarry
#

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.

distant oyster
#

the "role" attribute has to be defined in CfgRoles

cosmic lichen
#

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.

oblique lagoon
#

Well, Just making previous marker alpha 0 and making new local marker would be my solution. thanks for your hint

alpine ledge
#
_line3hr = parseText format ["<t size='1.5' font='PuristaMedium' color='#99D778'>0%1</t>", _currHr];
``` strings ![PeepoPains](https://cdn.discordapp.com/emojis/651141788941287487.webp?size=128 "PeepoPains") how do i get the structured text stuff to work with format
finite jackal
#

That should work, where is _line3hr being displayed and does it support structured text

alpine ledge
#

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

distant oyster
#

text has to be unformatted. it gets formatted in the function itself

ruby breach
#

BIS_fnc_dynamicText takes string, not formatted text

alpine ledge
#

GWseremePeepoThink i'm not sure why that means that lines 1 and 2 are formatted then

ruby breach
#

(i.e, just get rid of parseText from the above)

alpine ledge
#

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 ![PeepoPains](https://cdn.discordapp.com/emojis/651141788941287487.webp?size=128 "PeepoPains")
finite jackal
#
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
visual quarry
#

@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

alpine ledge
#

ah that's super, thanks! peepoHappy

cosmic lichen
#
{
    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

visual quarry
#

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?

cosmic lichen
#

Right

visual quarry
#

okay thanks

cosmic lichen
#

Scroll down.

lucid junco
#

is there way how to turn out stamina white screen visual effect when stamina gets low?

bright flume
#

somewhere inside CfgMovesFatigue possibly?

winter rose
#

in Arma 2, is there a way to get all subClasses from one config entry, e.g CfgVehicles?

#

hmm, I might use select

random loom
#

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.

cunning crown
random loom
#

Interesting, doesn't seem to cover my use case though which is between "BRIEFING READ" and "GAME FINISHED"

ebon ridge
#

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?

still forum
#

cursorTarget is not as exact

ebon ridge
#

hmm okay i will try it thanks

ebon ridge
#

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

ebon ridge
#

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

still forum
#

setName doesn't work on players

ebon ridge
#

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

ebon ridge
#

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 😄

winter rose
#

put a little "sleep" in the waitUntil

ebon ridge
#

yeah also get the condition boolean correct way around 😄

winter rose
#

true

ebon ridge
#

but really could just make this spawn global and replace _this with player, run it every few seconds

alpine ledge
#

could do waitUntil player != _this

tame lion
#

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?

still forum
#

could do waitUntil player != _this
no, not really

distant oyster
#

execVM is just short for the second one. see the execVM BIKI

still forum
#

@tame lion execVM is equal to spawn compile preprocessFile

tame lion
#

Yeah i know they are equal, which is why I was asking if one was better over the other

still forum
#

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

tame lion
#

copy that, makes sense. I remember reading somewhere that one was essentially better than the other but couldn't remember which one.

dreamy kestrel
#

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.

fair lava
#

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

exotic flax
#

CBA_settings_fnc_init is what you need to call (at least that works for me)

#

@fair lava ^^

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

exotic flax
#

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

fair lava
#

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

young current
#

@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

fair lava
#

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

broken snow
#

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?

tough abyss
#

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?

bright flume
#

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?

distant oyster
#

@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

tough abyss
#

thank you

still forum
#

getPos not needed

distant oyster
#

changed

tough abyss
#

thonk

distant oyster
#
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

bright flume
#

how do you invert the logic for a if clause? specifically (player in thisList)? double bracket with a !?

random loom
#

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";
still forum
#

@bright flume if !(player in thisList) then

bright flume
#

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.

random loom
#

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";
still forum
#

no

#

addMagazine checks the vehicles main gunner turret, to add the magazine too it potentially.
addItem just puts it into inventory

random loom
#

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

still forum
#

if you want to add into inventory, then yes

finite sail
#

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?

still forum
#

ye

finite sail
#

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

still forum
#

it takes the simulation of the object you attached it to

finite sail
#

but the sensor objects do annoying things like fall off, or get sheilded from damage by geometry

still forum
#

and it kinda losses collision and stuff

finite sail
#

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

oblique lagoon
#

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"
  };
}];```
still forum
#

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

oblique lagoon
#

no EH fires. but those always return false.

#

EH fires in game, inventory, map.

still forum
#

dialog and visibleMap commands don't know where they were called from

oblique lagoon
#

do they need to know whree they were called?

still forum
#

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

oblique lagoon
#

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
#

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

young current
#

There is free version too @dreamy kestrel

random loom
#

Does pushBack have global effect if used on a public variable?

copper raven
#

no

random loom
#
namespace setVariable ["example", [], true];
(namespace getVariable "example") pushBack "text";
namespace getVariable "example"
copper raven
#

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.

exotic flax
#

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"
random loom
#

Would that work seeing as pushBack returns the index?

exotic flax
#

in that case; put the result in a temp value, pushback on that and set the temp array

winter rose
#

@exotic flax pushBack returns <???> ? 👼

#

so yep, setVariable with true or publicVariable

#

or use the ugly array + ["text"]

dreamy kestrel
#

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?

steady terrace
#

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?

finite jackal
#

You should be wrapping your code in brackets {} inside the addAction

still forum
#

doorlocked == 0
sounds like what you really wanted here was a boolean

steady terrace
#

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

still forum
#

it doesn't

#

there is a real boolean type

steady terrace
#

ah. alright. well the variable I'm checking doesn't return one, so I can't compare it to one, right?

nimble yew
#

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.

distant oyster
#

@dreamy kestrel do you need to know from ingame?

steady terrace
#

I saved the value inside the script @nimble yew with player setVariable ["name",value];

distant oyster
#

@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

nimble yew
#

Thank you!

worn forge
#

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

oblique arrow
#

I assume you've looked at this? might have something relevant in it @worn forge

worn forge
#

Looked at what now?

worn forge
#

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?

#

Which doesn't work in the briefing, but does work post briefing, in-game

oblique arrow
#

Oh derp forgot to paste the link

worn forge
#

So for greater clarity, looking to move the map default position during the briefing phase

cosmic lichen
worn forge
#

Looks like a great resource. Thanks R3vo

cosmic lichen
#

BIS_fnc_zoomLock might be what you are looking for.

tough abyss
#

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.

winter rose
#

stance is the very exact current stance;
the others are what the AI should use

tough abyss
#

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.

bitter spire
#

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

velvet kernel
#

im passing a reference to a vehicle from server to client and am getting Client: Object 2:33 (type Type_70) not found.

worn forge
#

Perry I don't think the one is necessarily related to the other. What code are you using to pass the reference?

velvet kernel
#

my functions that runs something globally

#

its not that tho, that is working

worn forge
#

If you don't paste some code we won't know how to help you

velvet kernel
#

its not how i call it, my question is can a reference to a vehicle from the server be used on a client?

worn forge
#

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

winter rose
#

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

velvet kernel
#

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

still forum
#

what is the content of _smokes, is _heliUID defined?

velvet kernel
#

_smokes is an empty array

#

_heliUID is an int

still forum
#

_smokes is an empty array
so... how do you expect iterating a empty array to return anything?

velvet kernel
#

its usually filled with tupes in form [uid, smoke]

#

but either way _var ends up being null

#

which should trigger the inner function anyways

still forum
#

no

#

var is nil

#

not null

#

you want

velvet kernel
#

its not

still forum
#

yes it is

#

If you know better, why do you come here and ask for help? ^^

velvet kernel
#

if it would be nil

#

then checking isNull on it should throw an error

#

which it doesnt

still forum
#

No

#

That's not how that works

velvet kernel
#

why would that not error

#

im checking if something undefined is null

still forum
#

and undefined is not null. Undefined is undefined(nil).
In unscheduled that won't error.

velvet kernel
#

i know what undefined is

#

why only in unscheduled

still forum
#

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

velvet kernel
#

because i was handling the empty array case before seperately

#

this was only searching for uid

#

not found == null

still forum
#

not found == null
no

still forum
#

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?

coral owl
#

omg you are right

still forum
#

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?

coral owl
#

adding multiple lines via different Z-heights is weird and looks stacked up when close