#arma3_scripting

1 messages Β· Page 228 of 1

granite sky
#

Note that if you run createMarker with a marker name that already exists, it returns empty string and the rest of the commands do nothing.

spare idol
#

what's the correct way to write the ampersand without the code freaking out?
I just want to have it inside a displayname: "" and it cuts the text.
I've tried "&&", "&" and "\x26" as suggested by some AIs but I can't get it right. This shouldnt be so difficult...

warm hedge
#

Post your code

#

And don't rely on AI

lean dragon
#

IDK what I'm doing. I'm trying to stitch together some sort of script but I'm not a scripter. I use AI, but dont trust it.
Anyways,

Objective: To create a script that pushes a boat on a dedicated server that does not rely on boat size or if its in the water or not. You should be able to push it if its 1000m on a mountain or on sealevel. This is what AI has come up with.
I add these odd requirements because publicly available mods make dependent if its in the water or if its too heavy you cant push. None satisfy all of these requirements

fn_pushBoat.sqf

    Author: Community Script / Adapted for Dedicated
    Description: Pushes a boat in the direction the player is looking.
*/
params ["_boat", "_player"];

// Ensure this runs on the server
if (!isServer) exitWith {
    [_this, "fn_pushBoat.sqf"] remoteExec ["execVM", 2];
};

// --- Configuration ---
private _force = 10; // How hard to push
private _lift = 2;   // Slight upward lift to prevent getting stuck
// ---------------------

if (isNull _boat || !alive _boat) exitWith {};

// Calculate direction from player to boat
private _dir = [_player, _boat] call BIS_fnc_dirTo;

// Apply force
_boat setVelocity [
    (sin _dir) * _force,
    (cos _dir) * _force,
    _lift
];

// Optional: Say something
// _boat say3D "push_sound"; ```

initPlayerLocal.sqf
```// Add action to all boats for all players
if (hasInterface) then {
    player addAction [
        "<t color='#00FF00'>Push Boat</t>",
        {
            params ["_target", "_caller", "_actionId", "_arguments"];
            [_target, _caller] execVM "scripts\fn_pushBoat.sqf";
        },
        [],
        1.5,
        false,
        true,
        "",
        "objectParent _target == objNull && _target distance _caller < 5" // Only when close and not in boat
    ];
};```
proven charm
lean dragon
#

and I am too ignorant to troubleshoot this so I come to the experts

proven charm
#

its ai code?

lean dragon
#

yeah from ai. I dont know where it got the code. it didn't source anythign relevant

errant jasper
#

Many issues. The technically broken ones

  • The action is added to player. This is not inherently wrong, but nowhere is the boat captured, say via cursorObject or cursorTarget.
  • The action runs on the player, but the script only operates on server.
proven charm
#

ai codes typically dont work πŸ˜„

lean dragon
#

usually I look at the links the ai gets me to confirm if it interpreted correctly according to the original author but idk who i t is

lean dragon
errant jasper
#

Then you probably also want:

  • Ensure the boat is not occupied (at least in the "driver" seat) (if not you need locality-run it correctly), or already moving when pushing.
  • Maybe a push cooldown
lean dragon
#

well the one area I can isolate it to is initplayerlocal.sqf as the add action option doesn't even show up. Therefore idk if the rest of the script is trash

errant jasper
#

I think actions are also not preserved across respawn.

lean dragon
#

ouch

#

well I'm convinced someone somewhere has pushed a boat on a dedicated server

errant jasper
#

objectParent _target == objNull
^^ will never be true

#

that's why you don't see it.

lean dragon
#

oh should I modify this line or delete entirely?

mortal folio
#

but == objNull isnt the right way ofc, should be isNull

lean dragon
mortal folio
errant jasper
# lean dragon to confirm. I'm going to edit this line to: object _target isNull ?
if (hasInterface) then {
    player addAction [
        "<t color='#00FF00'>Push Boat</t>",
        {
            params ["_target", "_caller", "_actionId", "_arguments"];
            private _boat = cursorTarget;
            private _bump = vectorNormalized (getPos _boat vectorDiff getPos _target) vectorMultiply 10;
            _bump set [2, 2];
            [_boat, _bump] remoteExecCall ["setVelocity", _boat];
        },
        [],
        1.5,
        false,
        true,
        "",
        "_target distance cursorTarget < 5 && cursorTarget isKindOf 'Boat_F'" 
    ];
};

Should get you started.

lean dragon
#

dude how do you learn this code? Its proprietary

#

its not like they publishing books about it. I'm impressed with you all

mortal folio
#

so technically yes a book is published lol

lean dragon
#

lol I guess so. Like is it based on any other languages?

#

Python?

mortal folio
#

it's not really based on anything so it's technically Properietary in that sense, also it's a scripting language so cant really be compared to a complete programming language, tho that's also why it's much easier to learn, easier than python even, since all you gotta worry about is syntax and game commands

#

probably the only way sqf is comparable to python is in its performance (i havent measured but it probably peforms better than python tho πŸ˜‚ )

real tartan
#

how to disable EndMission respawn template? want to prevent end of mission when respawn tickets reach 0

#
respawnTemplates[] = { "MenuPosition", "Tickets", "Spectator" };
lean dragon
errant jasper
# lean dragon do you know how to fix it so it reappears on the respawn?
AddAction_PushBoat = {
   params ["_unit"];
   _unit addAction [
        "<t color='#00FF00'>Push Boat</t>",
        {
            params ["_target", "_caller", "_actionId", "_arguments"];
            private _boat = cursorTarget;
            private _bump = vectorNormalized (getPos _boat vectorDiff getPos _target) vectorMultiply 10;
            _bump set [2, 2];
            [_boat, _bump] remoteExecCall ["setVelocity", _boat];
        },
        [],
        1.5,
        false,
        true,
        "",
        "_target distance cursorTarget < 5 && cursorTarget isKindOf 'Boat_F'" 
    ];
};

if (hasInterface) then {
   // Add Now
   [player] call AddAction_PushBoat;
   // Add again on respawn.
   player addEventHandler ["Respawn", {
       params ["_unit"];
       [_unit] call AddAction_PushBoat;
   };
};
lean dragon
#

I want to again thank you all. Once I test muzzleflash's fix I think all issues will be good. I should publish this on the workshop and give you all credit. Thanks again

faint burrow
errant jasper
#

That is more proper. Though, I assume "complex scenarios" where it might not be known how and where boats will be spawned.

mortal folio
#

iirc that's how the "Unload incapacitated" action works (which might be from CBA but i cant recall)

faint burrow
exotic gyro
#

... For what it's worth, I'm like 90% sure Ace already has a push boat thing

mortal folio
#

that distance check would probably get more expensive with many many actions compared to just one check for whatever youre observing

faint burrow
#

Maybe.
Anyway, I think the game engine does it much faster and more efficiently than the scripted condition.

mortal folio
#

fair

spare idol
# warm hedge Post your code

I'm just trying to have a displayname = "K & H Assault Rifle"
However, since the & gets interpreted as a function or something, in-game it breaks and stops at K. How can I write the & without this happening?

warm hedge
#

I said post your code, not your summary

#

In what context is also important

spare idol
#

Its either on config or an sqf, it doesn't matter. Not at the PC right now give me a few

#

this is the important line, but I'll paste the whole code below too:

displayName = "AR-12 K&H assault rifle";

#

it gets cut on K

old owl
#

I could be totally mistaken since been a while since I've had the issue but maybe you just need to escape the & if you're localizing or something?

spare idol
#

You mean doing &&?

old owl
#

Should be &amp; if you're using structured text

spare idol
#

without the semicolon?

#

I have tried it with the semicolon and it just literally wrote &

old owl
#

With semi colon sorry

spare idol
#

would this be the correct way supposedly?
displayName = "AR-12 K&amp;H assault rifle";

#

it works

#

so, the problem was that before, I was checking on the arsenal

winter rose
#

it's better if you use a stringtable still

spare idol
#

apparently the arsenal and the in-game display behave differently

#

I was checking here

#

but it doesnt matter really

#

all I care is how it looks ingame after all

spare idol
old owl
#

If you intend to publish it in the workshop, stringtable is neat as you can localize the name to other languages :)

spare idol
#

yeah I dunno what that is, I literally know 0 coding haha

#

im managing how I can

winter rose
hallow mortar
# spare idol yeah I dunno what that is, I literally know 0 coding haha

A stringtable is a table...of strings...associated with a key, e.g. $MY_LOCALISATION_KEY. Instead of writing plain text in your config, you write the key. Then when the game is looking at the config, it finds the key, and looks it up in the stringtable. From there, it can pull out the string associated with that key and with the currently-selected language, and substitute in that string wherever the key is used.

#

You can use plain text if you're really not going to provide alternate languages, but if you do want to, then a stringtable is the way to do it.

spare idol
#

Ahhh okay. So it keeps the content of the text separately and easily modifiable or localizable

#

Would also help make my scripts look less bloated

old owl
#

We don't often use a string table in our mission since we require use of English to understand and abide by our rules, but if you plan to publish on workshop I'd recommend it. Kinda wish the gamemode we hosted was more inclusive in that way.

hallow mortar
#

* a side benefit is that if you're using the same text in multiple places, you can just use the same stringtable key, then if you want to change the text you only have to change it once

spare idol
#

I mean this is mostly a personal project I started doing purely for my own enjoyment. But this is good to know. I like the idea if only just to keep things more organized and flexible

#

Thanks for the help!

cyan dust
#

How can I find the path of the sound for playSound3D command? πŸ€”
Like, I have sound name that works with playSound but not with playSound3D

old owl
cyan dust
warm hedge
#

addonFiles is also your friend

versed ledge
#

Can vehicles be scripted to move in reverse between certain waypoints?

hushed turtle
#

By default AI reverses only if destination is close enough

split ruin
#

what move command is responsible for flying ? πŸ€” how jets fly actually ?
PS: I see ... vector array

hallow mortar
split ruin
#

obviously I want to manipulate flying vector πŸ™‚

cursive tundra
versed ledge
#

trying to work something out with the LCC inside the LPD. LCC fits much better with the bow in, as far as entering, getting out of, and loading, etc. but then I want to try and script it to work as a taxi or support delivery ship. I think I can figure out the scripting of the support stuff, but it seems like it needs to start with the LCC moving out of the well deck in reverse.

#

I just recently started trying to really learn scripting and it's awesome! so much better than using the editor imo.

versed ledge
hallow mortar
versed ledge
old owl
#

I've said it before but man- every time I read anything here related to AI, sounds like black magic

past wagon
#

I'm encountering a VERY strange and disturbing bug. If anyone can help me figure out what's going on I would be very appreciative.

I'm making a battle royale where players parachute out of a plane. The Blackfish (largest plane) can only hold 32 players, but the game must accommodate 70 or more. Since I dont want to use multiple planes, I'm giving each player a local plane, and all of these local planes follow the same path. I'm temporarily hiding the players from each other while they are in the plane so they don't see each other de-syncing through the sky.

Basically, I'm creating the illusion that all players are in one plane.

Here's the unexpected issue: when players are parachuting down, something weird happens. When they get close to the ground, or right before they touch the ground, or apparently sometimes right after they pull their parachute, they go FLYING IN A RANDOM DIRECTION AND DIE.

I have no idea why this is happening, but it started after I implemented the plane code, which is otherwise working perfectly. Heres a video of it happening: https://youtu.be/QaaOeklvZDU

old owl
past wagon
#

the script is remote executed from the server:

[_planeStartPos, _planeEndPos, _pathMarkers] remoteExec ["TRI_fnc_doLocalPlane", 0];
past wagon
old owl
#

I could be totally waffling as I am purely guessing- but have you checked to see if player action ["eject", _plane]; is being ran while the player is in the air and in their parachute causing unintended behavior?

past wagon
#

ahh

#

yeah maybe

old owl
#

Or maybe one of the deleteVehicle commands? Looks like you're doing that on the plane so I wouldn't expect those to be it but only thing I can really see off a glance atm

little raptor
#

I think it's related to creating a local plane and moving a global object into it

#

I think the server doesn't know about your plane when you do eject, so it will eject you from the parachute

past wagon
#

so this will likely fix it?

if (vehicle player == _plane) then {
    player action ["eject", _plane];
};
little raptor
#

no

winter rose
#

call all actions related to a local plane locally

little raptor
#

does it work correctly if the plane is global?

#

(I mean not created using createVehicleLocal)

past wagon
#

the systemchat fires the instant the player gets "ejected" from their parachute

past wagon
old owl
#

Oh wait

#

Lou was just here, sorry probably a unecessary ping

sharp grotto
#

better safe than sorry

past wagon
#

thanks, that was way simpler than I thought it would be

tardy osprey
#

Hey, I'm having an issue with setObjectScale on a dedicated server. The script works fine in locally hosted MP but fails on dedicated. I've tried remoteExec with 0 and 2, neither work on dedicated. Putting it in the object init field doesn't work either on dedicated. The script is called from init.sqf. Anyone know how to get it to work?

Script:

[atc, 0.50] remoteExec ["setObjectScale", 2];
little raptor
#

setObjectScale only works on attached and simple objects.

tardy osprey
little raptor
#

I mean attached using attachTo

tardy osprey
#

ah i see, yeah that makes sense. Alright lemme just quickly look into it then.

little raptor
#

also your remoteExec is wrong. it should be local arg not server:

tardy osprey
#

Okay that is a different ballpark entirely. Not quite sure what you mean by Local arg. I clicked the LA one, and tried to have a look, but it doesnt really make much sense.

little raptor
#

I mean it should be executed where the object is local: [atc, 0.50] remoteExec ["setObjectScale", atc];

old owl
granite sky
tardy osprey
tulip ridge
#

I'm not really sure how to phrase this question, but I'm making a toxic gas-esque smoke grenade. Here I found some code from a WIP ace feature that checks if a unit is in smoke, but I want to be able what kind of smoke / particle is in the player's face.

https://github.com/BrettMayson/ACE3/blob/370da581027009d2e65e9e9be2b064741d4ea9aa/addons/irritants/functions/fnc_isInSmoke.sqf

Is that kind of thing possible? I'd really like to be able to check the type of smoke directly rather than just "If within X meters of smoke grenade -> damage player"

warm hedge
#

Theoretically, this is entirely possible, as you can really get at least the scale, velocity, position of a dropped particle as an object. But definitely not ideally

#

If the toxic gas is made from one particular particlesource, I would drop multiple dummy particle drops and track the dropped particle to get where it did go

tulip ridge
#

Haven't really messed with particles all that much, so I'm not really sure what you mean. Currently I just have a smoke grenade with a custom CfgCloudlets class

warm hedge
#

Which I meant was like, scripted particles either with setParticleParams or drop, but for CfgCloudlets thingy, ain't really sure

old owl
#

Might be good info here- I had a similar thing of needing to know where my particles were ending #arma3_scripting message

tulip ridge
#

I'm not entirely against scripting the smoke effect and just giving the grenade a dummy effect if it means I can then check if the player is in it

ivory lake
#

I just did a similar thing the basic way by having a set radius

#

its not perfect but the particles I used werent affected much by wind

#

and tbh relying entirely on the particles might lead to some oddities

#

ie. the grenade being set off in a building affecting the floors above/below/through rooms etc

#

does kinda make me wish the 'fire' particle stuff could be opened up for scripting instead of just being completely engine driven damage

tulip ridge
#

Yeah I was trying to think of a way to hook into that maybe, but the ways I thought of would also mess with ace since I don't think there'd be a way to tell between them

ivory lake
#

you might be able to do some funky stuff like
use a set radius (but much larger than the 'expected' size of the cloud)

#

and checkvisbility to see if they're inside the cloud

#

but I dont think that'd be 100% accurate as other stuff might mess with the visibility

#

ah thats what the isInSmoke fnc does

#

I hadnt looked at it till now

warm hedge
#

My idea would be // psuedo code globalValue = []; private _dummy = drop []; // drop one along with your visible particle _dummy spawn { while {alive _this} do { globalValue pushBack [getPosWorld _this,getObjectScale _this]; sleep 1; }; };and refer globalValue as the effective range of the toxism

sage kettle
#

Looking for a script to prevent the AI from dismounting immobilized vehicles when the gun still works. Used to have one years ago but took break from the game and dont have it anymore

sage kettle
little raptor
#

I once wanted to add an object filter command with many parameters (side, type, etc.). maybe if I add that it can help thonk

tulip ridge
warm hedge
#

Ja. It wouldn't be so hard to do so, since there is a dedicated parameter to see how the wind (ultimately the air itself) can slow down/accelarate the drop

tulip ridge
#

Yeah, rubbing iirc
My main thing is that I'm going to be tweaking the visuals some more and it'd be kind of a pain to keep editing it in two spots

Could read it from config but kinda annoying to cache it

tulip ridge
warm hedge
#

!purgeban 934386452685529100 1d crypto scam spam

lyric schoonerBOT
young mist
#

Whats a script I can make or use to make sure a Vehicles waypoint only activates once a specific individual is placed in it? Like a Helicopter.

faint burrow
#
specificUnit in (objectParent this)
granite sky
#

There is any built-in way to constrain waypoints with arbitrary conditions. So normally you'd need a monitor script that created waypoints, or toggled lockWP.

hallow mortar
granite sky
#

oh huh, I forgot setWaypointStatements had a condition.

#

I only ever used the statement bit.

topaz lion
#

Has anyone ever come up with or come across a script for getting ai to swap or equip gear that is in their inventory?

I’m looking into it for undercover squads as well as scuba teams, so they could be wearing just plain clothes in the undercover case and wetsuits + rebreathers in the scuba case.

Then perhaps via a radio trigger or something I could get them to equip or swap their vest slot to swap rebreathers for plate carriers for example? Not sure if I’m explaining it very well.

hallow mortar
#

The way to do that would be:

  • save a list of everything that was stored in their vest
  • add the new vest (this deletes the old one and everything in it)
  • restore the contents of the vest from the saved list
    Commands to start off with: vestItems, addVest
#

Or another way would be to use getUnitLoadout, modify the resulting array, and then setUnitLoadout with the new loadout

modest kiln
#

im no great coder but can you guys find a way to make this better

{ unassignVehicle _x; _x action ["Eject", vehicle _x]; } forEach (assignedCargo vehicle this);

its basically supposed to eject passengers from a vehicle and it works to a extent but has issues

  • helicopter does some kind of wierd landing and takes off again while dropping off paratroopers
  • somewhat inconsistent
  • usually needs flat ground to work correctly
proven charm
granite sky
#

Generally if a unit wants to leave a helicopter then it'll force the crew to land.

proven charm
#

maybe [_man] allowGetin false; too

granite sky
#

moveOut does avoid that, I think.

#

Probably want to do moveOut before any unassigning, to avoid them requesting a landing.

proven charm
modest kiln
proven charm
#

and moveOut

modest kiln
#

so like

private _assignedCargo = assignedCargo _vehicle;
{ unassignVehicle _x } forEach _assignedCargo;
_assignedCargo moveout true;

proven charm
#

this is the function I use, use it if you wish ```sqf
manLeaveVehicle =
{
params ["_man"];

_man remoteExec ["unassignVehicle",_man];

[_man] allowGetin false;

moveOut _man;

};

sly cape
#

!sqf

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```
↓ turns into ↓

// your code here
hint "good!";
topaz lion
old owl
#

Hi friends! I was thinking about creating a Mod that would contain a UI with some tools. Before I start though, I've been wondering what's the best way of spawning that UI without causing a compatibility issue between other mods? Obviously plan to use my own variable prefixes and stuff but not sure really how to approach adding a control or key to open the menu without potentially causing conflict with another mod someone may download.

proven charm
#

so you can do { _x call manLeaveVehicle } foreach (assignedCargo _vehicle);

hallow mortar
# old owl Hi friends! I was thinking about creating a Mod that would contain a UI with som...

You can't outright prevent a possible clash of keybinds; there's only so many keys on the keyboard and some mod will be using just about any one of them by default.
What you can do is register your key as a proper keybind, so people can easily change it and will be warned about possible conflicts (at least if the other mod has also made proper keybinds...)
https://community.bistudio.com/wiki/Arma_3:_Modded_Keybinding

proven charm
#

@Milo its not too difficult just use unique dialog Ids and class name

old owl
hallow mortar
#

Yes

old owl
#

That's awesome and sounds like exactly what I'm looking for- thank you for the help!

modest kiln
#

im pretty sure im doing something wrong on my end though

proven charm
#

should work with any aircraft, the script just throws the men out

#

make sure your _vehicle or whatever is vehicle variable is correct

#

run the manLeaveVehicle function declaration code in init.sqf for example

grand stratus
modest kiln
#

buts its just a guess

proven charm
#

maybe too small waypoint radius? πŸ€”

hallow mortar
#

The AI don't really know how to fly VTOLs properly, but it shouldn't make any difference to moving units in/out

modest kiln
proven charm
modest kiln
unreal scroll
rose pike
#

do i have the wrong formatting or am i going about this wrong?
i have 3 tasks that once all are completed, a 4th task is supposed to show up
i have
taskCompleted task1 and taskCompleted task2 and taskCompleted task3;
on the final task trigger, but the 4th task is showing up at the start of the mission

jade acorn
#

&& rather than and

#

and ditch the ; at the end

hallow mortar
#

and is valid (it's exactly the same as &&) and the end ; won't break it

jade acorn
#

thought triggers specifically need ampersands rather than a word

hallow mortar
#

No. It's just a command. Triggers don't do commands any differently than any other part of the game.

radiant lark
#

how much is dedmen's backlog? shall I ping? πŸ˜…

past wagon
#

is there a way to prevent the command menu from coming up when players press a key like F3?

#

(the command scroll menu that pops up in the upper left)

old owl
molten yacht
#

I was browsing the wiki today and I noticed that there are event scripts, onFlare.sqs and init3DEN.sqf

I understand what they do, the documentation is clear, but I wonder if anyone has any interesting examples of how they can be used? I also wonder if onFlare works with ACE3/mod flares

old owl
# past wagon is there a way to prevent the command menu from coming up when players press a k...

Ah okay back on my PC now- this may be what you're looking for:

(findDisplay 46) displayAddEventHandler ["KeyDown",{
    params ["_displayOrControl", "_key", "_shift", "_ctrl", "_alt"];

    if (_key in (
        actionKeys "CommandingMenu1"
        + actionKeys "CommandingMenu2"
        + actionKeys "CommandingMenu3"
        + actionKeys "CommandingMenu4"
        + actionKeys "CommandingMenu5"
        + actionKeys "CommandingMenu6"
        + actionKeys "CommandingMenu7"
        + actionKeys "CommandingMenu8"
        + actionKeys "CommandingMenu9"
        + actionKeys "NavigateMenu"
    )) exitWith {true};
    
    false
}];
past wagon
# old owl Ah okay back on my PC now- this may be what you're looking for: ```sqf (findDisp...

this is what I already have, which isnt working

    if (_key == 61) exitWith {
        private _playerItems = missionNamespace getVariable ["playerItems", createHashmap];
        private _uid = getPlayerUID player;
        private _items = _playerItems getOrDefault [_uid, [0, 0, 0, 0, 0], true];

        private _redgullAmount = _items select 0;
        if (_redgullAmount == 0) exitWith { true };

        _items set [0, _redgullAmount - 1];

        [[-1, 0, 0, 0, 0]] remoteExec ["TRI_fnc_updateItem", player];
        [player, getPlayerUID player, 0, 180] call TRI_fnc_handleBuffs;

        true
    };
old owl
dusk gust
# old owl Ah okay back on my PC now- this may be what you're looking for: ```sqf (findDisp...

Keep in mind, if they rebind any of the commanding menus to say a double key, or mouse buttons, this will NOT work for it.

I've found that just using something similar to showCommandingMenu "" with an onEachFrame event is the only way to ensure that it never opens, or if it does, it will close immediately.

I believe a new-ish command can do something that you're wanting though, which is
https://community.bistudio.com/wiki/actionKeysEx

jagged mica
#

technically speaking

#

could the procedural textures, which come from the UI rendering, be used in rvmats in other maps?

winter rose
#

new-ish
2022-08-23 :p (I know, it's quite recent in Arma time :D)

jagged mica
#

as in, I want to have a dynamic normal map in my model,and while I am able to put it on the object as a texture no problem, the rvmat is refusing to render it

#

oh nevermind, it worked

warm hedge
#

Yeah it should, oh nevermind, you figured

jagged mica
#

just need to find how to use different shaders

#

I wanted to take a look at the refract shader, any idea how that's built and what the rvmat params are for it?

warm hedge
#

Clarify, why you need to? A shader itself is never meant to modify

jagged mica
# warm hedge Clarify, why you need to? A shader itself is never meant to modify

so Im trying to make a glass material with some refraction on it, I made an rvmat with pixel & vertex refract shaders and passed my nohq map to it but my first problem is that it's animated, and it seems to be splitting the r & g channels, I was curious if there's a way to control this behaviour with a parameter/texture

#

also side fun fact, this sort of glass is possible if you write your rvmat wrong enough

#

here's the refract shader in question without any normal map passed to it

jagged mica
#

Unless someone knows if there's a way I can find an rvmat using this shader without having to go through each basegame pbo

warm hedge
#

"P:\a3\data_f\ParticleEffects\Universal\Refract.p3d" uses it. Probably that's not the shader you wished for though

proven charm
jagged mica
#

Otherwise im gonna have to stick to a transparent super shader with a normal map for some illusion

delicate tangle
#

How can I get a trigger that is synced to a sector via a script? The sector is synced to an area logic which is then synced to a trigger. For instance: Sectorβ€”>Areaβ€”>Trigger.

radiant lark
#

And I wanted to make a cool glassy HUD

jagged mica
#

well I found this

#

there are more stages and it's explained what they are, although little info on how to actually work with them

#

i see that changing the refraction depth (Stage 11 in the shader) makes a lot of difference to how it works

delicate tangle
jagged mica
#

one value gives blue and yellow, another gives a water shader, not sure what's the limit here tho

hallow mortar
delicate tangle
jagged mica
#

this feels more like a question to the BI devs if they could peek under the hood and check what's even going there and how we're supposed to set it up

jagged mica
graceful kelp
#

I need some assistance, not sure if im being stupid, I was under the impression config lookup was expensive, no matter what way i test it a config look up is quicker on its own, than to have a system which on first instance sticks it in a variable then calls the variable every time, has config lookup been optimised

faint burrow
#

Post your code.

topaz lion
#

Would anyone know of a script for getting the turret number of a vehicle? Trying to block off certain seats in a chinook but there’s so many seats I’m having trouble actually finding what number turret it corresponds too to stop ai from loading into that position, figured there would be a way get the position if I’m in said position

errant jasper
#

Who told you it was expensive? Though still surprised a variable isn't faster. Something does sound wrong.

graceful kelp
#
params ["_heli","_configPathArray", "_type"];

//Test variable for enviroment
_heli = vehicle player;
_configPathArray = ["CfgVehicles", "fza_ah64d_b1", "components", "SensorsManagerComponent", "Components", "ActiveRadarSensorComponent", "AirTarget", "maxRange"];
_type = "number";

private _configHash = _heli getVariable ["fza_ah64_configHash", createHashMap];
private _cacheKey = str _configPathArray;
private _configValue = _configHash get _cacheKey;
_configValue;

if (isNil "_configValue") then {
    private _entry = configFile;
    { _entry = _entry >> _x; } forEach _configPathArray;

    _configValue = switch (toLower _type) do {
        case "number": { getNumber _entry };
        case "string": { getText _entry };
        case "array":  { getArray _entry };
        default        { nil };
    };

    if (!isNil "_configValue") then {
        _configHash set [_cacheKey, _configValue];
        _heli setVariable ["fza_ah64_configHash", _configHash];
    };
};

if (isNil "_configValue") exitWith {-1};
_configValue;
#

the get variable on its own is quicker, however the moment I add more code to build the system around it, it ends up slower and the difference from a getvariable to a configfile is 0.0004 vs 0.0008, its so negligeble, its almost not worth thinking about

errant jasper
#

This looks really over engineered.

graceful kelp
#

im accounting for any config path as an input, checking if its in the hash first then getting it and setting the hash

digital hollow
errant jasper
# graceful kelp the get variable on its own is quicker, however the moment I add more code to bu...

Well how often do you need to look up the values that the difference matters? Compared to read-only config data, stringifying arrays and hashtable lookups is not really free either.

So the caller knows the entire config path and the desired result type. I don't see why it would not be simpler and more performant for the caller to do:

private _heliConfig = configFile >> "CfgVehicles" >> "fza_ah64d_b1";
private _activeRadar = _heliConfig >> "components" >> "SensorsManagerComponent" >> "Components" >> "ActiveRadarSensorComponent";
// get actual values
private _maxRange = getNumber (_activeRadar >> "AirTarget" >> "maxRange");
private _minRange = getNumber (_activeRadar >> "AirTarget" >> "minRange");
// etc...

Compared to:

[_someHeli, ["CfgVehicles", "fza_ah64d_b1", "components", "SensorsManagerComponent", "Components", "ActiveRadarSensorComponent", "AirTarget", "maxRange"], "number"] call WhateverYourFunctionIsNamed;

And why store it on the helicopter. You just means multiple helicopters each pay the "cost" (that is not really that expensive) that you are trying to avoid in the first place.

graceful kelp
#

there is a fair amount of varying config lookup through the mod, I was attempting to build a universal call function that would check the requested path and store it for better future lookups

#

however if the config lookup is only 2-3x the performance hit of a getvariable, it may be a moot point, I was under the impression it was significanty more expensive to perform

errant jasper
#

Always measure first. And as my example demonstrate you can store intermediate config nodes in variables (or other things).

graceful kelp
#

Unless im mistaken I having looked into it believe config lookups were made more performant by dedmen last year

old owl
#

From my understanding config has always been expensive. Caching config data in a hashmap should about always result in faster look up time.

#

I believe hashmaps were made significantly quicker though in recent years.

errant jasper
#

Comparing these two on my machine:

private _heliConfig = configFile >> "CfgVehicles" >> "B_Heli_Attack_01_dynamicLoadout_F"; 
private _activeRadar = _heliConfig >> "components" >> "SensorsManagerComponent" >> "Components" >> "ActiveRadarSensorComponent"; 
private _maxRange = getNumber (_activeRadar >> "AirTarget" >> "maxRange"); 

Takes 0.00174 vs:

private _arg = ["CfgVehicles", "B_Heli_Attack_01_dynamicLoadout_F", "components", "SensorsManagerComponent", "Components", "ActiveRadarSensorComponent", "AirTarget", "maxRange"]; 
private _key = str _arg; 
private _result = cacheConfig get _key;

Which only takes 0.00141, but without handling the actual lookup part, only the happy pre-cached path.

old owl
#

The reproduction above was done utilizing configs we had in our missionConfigFile so it's renamed but I've always found that there is a significant performance advantage

errant jasper
#

Doing the raw config (without even getNumber) takes 0.00160s (which you have to at least once for the caching case too) of that 0.00174s

errant jasper
old owl
#

In the example that I had, that's what I was doing. It was really just for the sake of messing around and testing config performance. The majority of our configs though we will cache individual data in hashmaps based off of a key. For example:

someMap getOrDefault ["className", ""]
#

Which for the sake of on frame code or event handlers that we intend to run quick, I've found storing config data in a hashmap is always worth it

errant jasper
#

I guess I live in a different world. I can't imagine why I would run config lookups per frame.

old owl
#

Well I mean we don't so we are probably living in the same one πŸ™ƒ

graceful kelp
#

A config lookup is costing me 0.0008 vs a getvariable of 0.0004, not including all the other code to sort the input, output, hash

#

a config lookup is looking cheaper, from the looks of it dedmen has hashed config on the latter end of last year

old owl
#

Not a super common occurrence we have to even use hashmap look ups in our on frame event handlers, but for drawIcon3D we do have some stuff that makes it sorta necessary.

#

My results I had here #arma3_scripting message were produced December of last year, but no idea if I was on perf or stable at the time. Wish I'd written that down. Maybe there has been some changes since then.

errant jasper
#

Seem to cost about 0.000166875 per >> for me.

graceful kelp
#

considering the tests are running x 10k, I cant see why I wouldn't stick with a config lookup now, unless I am seriously misunderstanding something here

errant jasper
#

Lol / is like tiny bit slower than >>.

old owl
old owl
errant jasper
#

Guessing it is something about the overload of / for division

old owl
#

Wouldn't have thought about that, but you're probably right

#

Probably similar to why # is faster than select, less syntax and usage elsewhere

errant jasper
#

To be clear I am not saying suggesting caching is always dumb. Just have to be wary of how it is done. If it takes work to construct the key you are already chance of losing:
Like:

private _arg = ["CfgVehicles", "B_Heli_Attack_01_dynamicLoadout_F", "components", "SensorsManagerComponent", "Components", "ActiveRadarSensorComponent", "AirTarget", "maxRange"]; 
private _key = str _arg; 

Takes 0.00104 out of the 0.00140 to finalize the lookup:

private _result = cacheConfig get _key;

And thus we can also reason that a get "b" get "c" get "d" is not "free" either e.g. 0.00040 which is about 2.5 >> ops.

graceful kelp
errant jasper
#

So just be mindful that being 3 times as fast in your lookup doesn't help if the caller ends up taking 5 times as long to make the key.

graceful kelp
#

my whole script ended up being slower than straight config lookup

#

config was 1.12X faster than my script function to check a hash first

old owl
#

Especially in the case of frequent look-ups, makes the trade-off worth it for us. You guys seem to be producing different results from what I had from December and before though, so perhaps something has changed too.

errant jasper
#

No, you are not wrong, the raw hash map lookups are fast, even for nested hash maps (Disclaimer: at least when they are small, these only have a single entry):

cacheConfig get "a" get "b" get "c"

only takes 0.00048s.
Just have to compared against entry construction (which matters litte for you at startup), and actual computing the keys themselves.

broken pivot
#

Gooood morning Arma nerds πŸ˜„
Im currently writing a vehicle load function. Really not a big deal, but somehow Im not able to write it
to the end.
The plan is to call

[_this] remoteExec ["EBER_fnc_loadChinhook", 2]

via the EventHandler. My problem is that tthe first addAction gets correctly crreated, but not the sesconnd.
Code:
https://pastebin.com/rdRcw9zY

broken pivot
#

To get a little easier into this:
I expect the issue to be somewhere in the params of the inner addAction (green line)
Can someone analyse my screenshot and tell me if its even possible, what I try there
I never saw something similar before

warm hedge
#

I'm not saying it's not broken, or it is, but why you can tell something is wrong? What do you expect and what you got?

broken pivot
#

Good questions! Ill annwser them all

harsh vine
#

_selectloadingtarget params ["_selectloadingtarget "]; detach _selectloadingtarget

broken pivot
# warm hedge I'm not saying it's not broken, or it is, but why you can tell something is wron...

The script is ment to run on chinook helicopters to create a while clock that checks
if selcted vehicles are in range. If so, the player should become able to load one vehicle
into the helicopter via attach to,
I expect the outer addAction to remove itself on activation. The outer addAction should create
the inner addAction .
The inner one should contain the unload interaction and the ability to rerun the script on the helicopter
so the scanner runs again and the player stays able to load up the vehicle

broken pivot
warm hedge
broken pivot
broken pivot
warm hedge
#

So you saying the outer is done its job right, then you can select inner, but it's not doing its job?

broken pivot
#

80% correct understood
The car gets loaded in -> LoadIn action removes -> No unload action shows off

#

Thats the matching stringtable.xml in cases anything is wrong with the title

<?xml version="1.0" encoding="UTF-8"?>
<Project name="AttachTo">
    <Package name="AttachTo">        
        <Key ID="STR_LOADINTOCHINHOOK">
            <English>
            Load %1 into Chinhook
            </English>
            <German>
            Lade %1 in den Chinhook
            </German>
        </Key>
        <KEY ID="STR_UNLOADINTOCHINHOOK">
            <English>
            Unload %1 from Chinhook
            </English>
            <German>
            Entlade %1 aus dem Chinhook
            </German>
        </KEY>    
    </Package>
</Project>
warm hedge
#

So it is about inner addAction doesn't show it?

broken pivot
warm hedge
#

Who is trying to activate the action? From where?

broken pivot
#

Im currenntly runninng the funnctionn inn the innit of the helicopter (_ttarget)

warm hedge
#

And where is the player to activate it?

#

Is it in the car? Or heli? Or somewhere else?

broken pivot
#

Im currenntly runninng the funnctionn inn the innit of the helicopter (_ttarget)

#

I also checked if its onn a diffrennt car or at the loaded vehic, cant find it

#

(Definitly not at a wrong vehicle)

warm hedge
#

Then you might want to assign the inner action to the car not the heli

broken pivot
#

Thats a good thing I actually just noticed atm.
The unload interaction needs to lay at the Chinook helicopter same as the driver and the pilot

But one by one. Why isnt it currently available for people who look at the helicopter?

TThats tthe updated sscript that is currently ussed. If you would like tto research the scripts logics
https://pastebin.com/xbzQUK7p
The screenshot is taken from line 78 and below

#

I also had a theory that the script ends before it launches tthe inner addAction.
That would be a simple scheduling issue. Is that possible if you think about?

warm hedge
#

A code will not terminate itself without an order to do so

broken pivot
#

Okay, so we can throw my theorry
What else is a possible issue?

warm hedge
#

I already told one, you are assigning the action to the heli, not the car, and you might not actually looking at the heli engine assumes so

broken pivot
warm hedge
#

Then you want to make sure that the action is actually added or not. Check the actionID of the inner one

broken pivot
#

That is my current main expectionn that doesent happen

broken pivot
harsh vine
#

why _this params ["_target", "_caller", "_actionId", "_selectloadingtarget "]; and not params ["_target", "_caller", "_actionId", "_selectloadingtarget "]; i dont knw if _this will work

warm hedge
#

It will

broken pivot
#

So I need to modify my code into "select 2" somewhere in the inner addAction scope

warm hedge
#

Then chances are your text is invisible or you are simply not seeing the action

broken pivot
#

Is it because the removeAction is (maybe) synchrone with the addAction? Im also confused that the _actionID == 2
Its also odd because _this should contain the current actionID inside its scope...

I gues its time to look around to mayybe find somethinng else what could the causer

#

|| No hint... ||

#

KEY != Key

#

I puke

#

Piece in my soul.

#

Now I can continue. The next steps will be some logic polishishing. I already saw something else
but at first the more important thing:
A huge thanks to @warm hedge who investigated in and looked about the scheduling, wich always takes time& ennergy ❀️
And also probs to @harsh vine who showed me the alternate syntax and faced me with my scope problems I always have haha

Thats a win:
https://youtu.be/rev-I4L16g8
(Ive pasted the script in the video description its fully OpenSource)

opal bloom
split ruin
eternal ingot
#

if anybody has time and some experience with BIS_fnc_showSubtitle; I Would like to know how to get voice lines to work with it, I do know about the subtitles but not the voice lines

hallow mortar
#

BIS_fnc_showSubtitle doesn't have the ability to play sounds. It only does subtitles. If you want to play sounds while the subtitles are on screen, you'll have to do that yourself, using e.g. playSound, say3D, etc.

eternal ingot
#

ya i actually tried that but couldnt get that to work

#

would it be something like this? ```// 1. Play the sound globally (everyone hears it)
[player, "MyVoiceLine"] remoteExec ["say3D"];

// 2. Show the subtitle
["Unit Name", "This is the subtitle text that matches the voice line."] spawn BIS_fnc_showSubtitle;```

#

ya i got it, That code did work, But thanks for the help bro

old owl
#

This is just one part (and currently really only part) of an addon I am making to make complex command arguments easier. When I'm done I'll probably toss it up as a repo open source. Not sure if anyone is interested but just a little hobby project I started I figuerd I'd share FWIW :)

crimson lion
#

Oh that is absolutely fantastic, please do release that when you're wrapped up lol

cyan hill
#

trying to create a tp script and it keeps giving me a error this addAction ["Teleport to Helipads", {player setPosASL (getPosASL Pads)}];

tulip ridge
tulip ridge
#

Well, did you read the error?
There's no object called helipad1

cyan hill
tulip ridge
#

Use a game logic if you need a truly dummy object

tulip ridge
#

And also that'd give a different error, since getPosASL doesn't accept a string

cyan hill
#

so how do i fix the get posasl thing?

tulip ridge
#

Place a game Logic object where you want to teleport the player to and give it the name helipad1
You'll also need to remove the variable name from the marker you have

cyan hill
#

ok thank you

warm hedge
#

Alternatively getMarkerPos "YourMarker" if you prefer marker

old owl
#

Okay here is feature number 2.

If I am being quite honest, as much as it works well, I am honestly not too proud of how it is written behind the scenes. I used AI in the production of the UI (which I don't really have shame for) since having made large UIs, it's a tedious sucky process I'd rather avoid and AI actually does it pretty well.

What I am not proud of is that I've been using it to write the SQF. Although it's been effective in completing the tasks I've been giving it, I've had to do a ton of refactoring. Even then there are just fundamental icks with how it made it (excessive uiNamespace variables, gross returns from files which could've been avoided, etc).

Anyway, wanted to be transparent about that, as I'll probably still plan to release it as I do see people finding it super enjoyable and helpful. Just not very happy with myself for the way I did it.

cosmic lichen
#

That left part of the UI could perfectly fit into Display3DENEditAttributes.

#

On another note. Give the colour sliders the actual colour e.g. Red, green, blue

#

The marker type drop-down should show the marker icon

old owl
cosmic lichen
#

The drop down list for marker shape can also be triangle etc. Fyi

old owl
#

Not quite sure what I was doing wrong there, but I have a feeling it was with the way I was creating the actual buttons.

#

Either way totally a great idea I'll plan to give another go before I merge that feature into my main branch πŸ™‚

fleet sand
old owl
errant jasper
#

Presumably you can just draw the map to one side, or draw it on top of the browser.

coarse needle
#

Why does this show Generic error in expression? I'm new to scripting:

publicVariable "RCP_CACHES_PLACED";
if (side Player == west) then {
    deleteMarkerLocal "cache0marker";
    deleteMarkerLocal "cache1marker";
    deleteMarkerLocal "cache2marker";
    deleteMarkerLocal "cache3marker";
    deleteMarkerLocal "cache4marker";
};```
jade abyss
#

Remove "= true"

#

OR "== true"

coarse needle
#

It doesn't need to check if RCP_CACHES_PLACED returns true?

#

I'll try that thanks

jade abyss
#

a = true;
waitUntil{ a };
-> Instant go

#

a = false;
[] spawn {sleep 5; a = true;};
waitUntil{ a };
-> 5s pause -> Then go

#

I hope you get it πŸ˜ƒ

coarse needle
#

so first I make a _cacheplaced = RCP_CACHES_PLACED = true;

then I use that _cacheplaced to check if the condition is true?

#

Oh no

#

That won't work

#

πŸ˜„

proven charm
#

has it ever happen to anyone that player is not player (isPlayer) in initPlayerServer.sqf?

#

could be null maybe?

cosmic lichen
#

No

little eagle
#

single = is to set the value of a variable. You can't logically have more than one of those in a single statement.

#

double == is used to compare two values. It's a command that returns a boolean. You can not compare two booleans though, because they hate us.

proven charm
#

must be those one in a million glitches then, or me just breaking stuff which is more common πŸ˜„

#

does anyone know how to make vehicle stay in formation? im pretty sure this is possible but i forgot how

#

now the vehicles just takeoff leaving infantry behind

little eagle
#

If RCP_CACHES_PLACED is a boolean, then you can simply write waitUntil {RCP_CACHES_PLACED}, because the return value of the script (what is inside the curl brackets) is expected to be a boolean.

coarse needle
#

oh, ok!

little eagle
#

If RCP_CACHES_PLACED is not guaranteed to be defined you write: waitUntil {missionNamespace getVariable ["RCP_CACHES_PLACED", false]};

#

Note the quote marks

round scroll
#

does ropeCreate only work for vehicles? I tried to create one on a building (Nimitz), but the ropeCreate does return nothing.

little eagle
#

@coarse needle You should probably change the variable name of "RCP_CACHES_PLACED" to lower or camel case, because all caps is usually used for static values or macros.

#

I think the first object of ropeCreate has to be a helicopter (including quadrocopter drones), while the second one has to be movable

still forum
#

But adding a ?? would be a language feature, not a command feature.
And if modifying the language already, anything could be done.

#

It would not be. ?? doesn't take code block, it wouldn't execute it

coarse needle
#

Thank you @little eagle and @jade abyss ! I got it working now!

#

Been trying to cut down a tree with a hammer here for the past day. Don't have any experience in actually creating code, so I'm just hacking away at code somebody else made and trying to understand how things work.-

still forum
radiant lark
#

Aight aight

#

Lmk

#

Not used to people having such blacklogs

still forum
still forum
still forum
# errant jasper Lol `/` is like tiny bit slower than `>>`.

That is because / is multiple commands.
It needs to decide which to call based on the types you pass to it. Number or config/string.
It basically has a internal loop over all variants, with type checks for each to find the first matching one
I made type checks much faster though

still forum
hallow mortar
# still forum But adding a ?? would be a language feature, not a command feature. And if modif...

Just to be clear, the ?? idea I was responding to there was "an equivalent to && that can do lazy evaluation without needing {}". My point was that {} isn't needed because someone arbitrarily decided the && command should do that, it's because that's the only way to tell the game not to evaluate that code right now. Changing the way the game processes code so that {} wouldn't be needed is on a fundamentally different level to just adding a new command, and while it may be technically possible, I have to assume it's such a massive logistical issue (not to mention back compat) that it's not worth considering.

still forum
#

{} is because && is a command-level feature, not a language-level feature.

Changing the way the game processes code so that {} wouldn't be needed is on a fundamentally different level
That is the level I was talking about though.
String interpolation and hashmap syntax are also language level features

hallow mortar
#

I can't tell [genuine] whether this is a semantic thing about the difference between the terms "command-level" and "language-level", or whether you're saying it actually wouldn't be that hard to make {} not needed for lazy eval

errant jasper
#

Without language level changes you cannot make {} not needed. Lazy eval is done by inside && command itself. In fact you can argue it is not even lazy, but eager, since I guess the reference to the code object itself is actually resolved even when the code is not run in a && {..}.

#

I'm guessing even if-then works like that then (pun).

still forum
#

We'd need a jump instruction to jump over the code in case it should not be evaluated.
Which I already implemented in SimpleVM. That actually inlines the code, and jumps over it. Getting rid of the "call" between

old owl
still forum
#

Yeah still, it wouldn't execute the code block if you give it one, that'd be a syntax error because it needs to get a boolean

old owl
#

Ah okay. My thought was a syntax like GenCoder was suggesting would be possible and that the evaluated code would return the bool required. I imagine there's some sort of order of precedence issue that I must not be understanding of why it wouldn't be possible

errant jasper
#

I wouldn't be sad if only && was changed to return right hand side if left side is false or nil (or perhaps even isNull).

#

E.g.:

nil && 42   -> 42
nil && {42} -> 42
true && {42} -> true
11 && 42     -> 11
nil && nil && 11 -> 11

// if is null-handling also
player && SomeObj    -> player (on non-dedicated), SomeObj (on isDedicated)
player && {SomeObj}  -> player (on non-dedicated), SomeObj (on isDedicated)

Instead of only being bool-compatible.

old owl
#

I think I kinda misunderstood the syntax initially, that's what I thought it'd be and why I said it would be great for select earlier on. Which tbf thinking about more now, at that point why not use param I guess for the example I gave.

old owl
proven charm
#

only "weird" thing ive encounter is player being null in mission start on client, maybe this was similar

old owl
#

Now I think of it the instance above I mentioned probably wouldn't be a cause since isPlayer probably checks to see if the object is being controlled by a player; not the object they are? meowsweats

proven charm
#

isPlayer could return false on objNull as well

tulip ridge
round scroll
#

thanks, commy2

wet shadow
#

Hey people, is there a scripting command to execute some existing input action? E.g. in this case I'd like to fire script that among other things would use the gunElevAuto input action to automatically lase range to current target.

proven charm
#

try finding out the input script name and call that

#

maybe there is file you can run or function to call

digital hollow
wet shadow
digital hollow
#

I mean getting the range is doable

wet shadow
#

Can you elaborate?

digital hollow
#

You can lineIntersectsSurfaces down the center of the screen to the first thing and then calculate the distance

wet shadow
wet shadow
proven charm
radiant lark
#

Do you guys think the bug of vehicles flying and glitching due to desync and other factors (including, probably, physx) can be fixed? why hasn't it been fixed? I tested some Leopard20 mods but multiplayer still sends vehicles flying

proven charm
#

usually vehicles fly when they are spawned inside other objects such as rocks

hallow mortar
#

It's not one specific bug. There's lots of different factors that can cause physics problems - network lag, server performance, bad frame rate, ...

granite sky
#

It's fairly fundamental to physX. Large overlap => unstable behaviour. A3 running vehicle sim at multiple localities is not really suited to it.

radiant lark
#

What I wonder is, if a vehicle is inside another object / vehicle "colision" zone, isn't it clear that it's really a bug? In which scenario would a vehicle go through another object's collision or a vehicle?

granite sky
#

Oh also Arma's pre-spawn collision checking is absolute garbage.

radiant lark
#

Seems pretty doable to me that the vehicle could be pushed outwards, from an engine perspective, to do the proper calculations. I do not know if that's the most important factor though, I just got told the game thinks vehicle is inside something and it sends it flying

granite sky
#

PhysX only acts sensibly when there's a small overlap.

proven charm
granite sky
#

Arma generates large overlaps.

#

Yeah I wrote an alternative to findEmptyPosition that's much less suicidal, but you don't have great tools in SQF for it.

radiant lark
hushed turtle
granite sky
#

Still doesn't handle the case where a building has columns.

radiant lark
#

I'm just talking about driving a vehicle and flying to space due to a collision. I cannot think of ANY possible way that a vehicle should go thru another vehicle or building like it were some noclip

granite sky
#

That one's typically caused by vehicles being simulated at different localities the network prediction being off.

#

So it's pretty hard to replicate on localhost but very easy with a couple of players in different vehicles.

radiant lark
#

Damn

granite sky
#

Each player's client is authoritative about where the driver's vehicle really is in Arma. Everywhere else is guesswork.

digital hollow
#

could limit max force generated from collisions? stuff would deform or disintegrate instead

hushed turtle
radiant lark
granite sky
hushed turtle
#

There needs to be a lot of intersects though. Some hut in SOG stands on some little sticks

#

Hard to hit them

granite sky
#

It only knows they've overlapped because PhysX says so, and PhysX is what generates the crazy velocities.

#

I don't know if A3's implementation of PhysX would allow them to intercede between the detection & response.

radiant lark
#

I remember seeing in wiki some mention of vehicles being like simple objects

#

There was smth that said that on collision you had to set teture manually and all of that, idk where but I remember

granite sky
#

But you can still do waaaay better than findEmptyPos without it being too expensive.

hushed turtle
#

Most fun thing about findEmptyPos is, that it can find empty position inside of other object, like in rock lol

radiant lark
granite sky
#

Example of findEmptyPosition doing its work:

hushed turtle
#

That's not even enough space

radiant lark
granite sky
#

I'm fairly sure it's actually bugged :P

#

Like there's "find an empty position badly" and then there's whatever the fuck findEmptyPosition is doing.

#

It doesn't seem to be taking too much notice of the bounding box of the object, which is odd given that you pass in the classname.

#

Like it finds a position that a unit could fit in, regardless of what you pass.

hushed turtle
#

Is there a way to get size of object based on class?

radiant lark
granite sky
#

The code probably has //TODO: get actual bounding radius

hushed turtle
#

Maybe it just uses papercar

digital hollow
#

How do I tell if a connected uav feed is from the driver or the gunner?

past wagon
#

I'm having an issue with my onKeyDown EH returning true to override the default action. All SystemChats are firing correctly, but the command scroll menu still comes up when I press F3. Same with the escape menu.

(findDisplay 46) displayAddEventHandler ["KeyDown", {
    params ["", "_key", "_shift"];

    if (inputAction "ingamePause" > 0 && player getVariable "processing") exitWith {
        player setVariable ["processing", false];
        SystemChat "RETURNING TRUE"; //FIRES
        true
    };

    if (_key == 61) exitWith {
        private _playerItems = missionNamespace getVariable ["playerItems", createHashmap];
        private _uid = getPlayerUID player;
        private _items = _playerItems getOrDefault [_uid, [0, 0, 0, 0, 0], true];

        private _redgullAmount = _items select 0;
        if (_redgullAmount == 0) exitWith {
            SystemChat "RETURNING TRUE"; //FIRES
            true
        };

        _items set [0, _redgullAmount - 1];

        [[-1, 0, 0, 0, 0]] remoteExec ["TRI_fnc_updateItem", player];
        [player, getPlayerUID player, 0, 180] call TRI_fnc_handleBuffs;

        SystemChat "RETURNING TRUE"; //FIRES
        true
    };
}];
past wagon
# old owl I would try what I tossed above, that should work

sorry for the late reply. this code isnt working for me either. here is what I tried:

(findDisplay 46) displayAddEventHandler ["KeyDown", {
    params ["", "_key", "_shift"];

    SystemChat "EH FIRED"; //FIRES

    if (_key in (
        actionKeys "CommandingMenu1"
        + actionKeys "CommandingMenu2"
        + actionKeys "CommandingMenu3"
        + actionKeys "CommandingMenu4"
        + actionKeys "CommandingMenu5"
        + actionKeys "CommandingMenu6"
        + actionKeys "CommandingMenu7"
        + actionKeys "CommandingMenu8"
        + actionKeys "CommandingMenu9"
        + actionKeys "NavigateMenu"
    )) exitWith {
        SystemChat "RETURNING TRUE"; //DOES NOT FIRE
        true
    };
    
    false
}];

The first SystemChat is firing correctly, but the boolean seems to be false for keys F3, F4, F5, etc

hushed turtle
#

F keys are for unit selection. They don't do anything to command menu

#

Maybe besides opening it when first unit get selected

past wagon
#

maybe my controls are weird... I guess I shouldnt be disabling this with the F keys, but instead with the actionKeys

hushed turtle
#

And that gets operated by mumbers. The line of line numbers bellow F keys

past wagon
#

hmm

old owl
past wagon
#

ah

#

I guess I'll just do what he said, showCommandingMenu ""

#

but im still having the same problem with the escape menu. can i prevent it from coming up when a player presses ESC?

    if (inputAction "ingamePause" > 0 && player getVariable "processing") exitWith {
        player setVariable ["processing", false];
        SystemChat "RETURNING TRUE"; //FIRES
        true
    };
old owl
#

You could potentially disableUserInput if they aren't supposed to be doing anything during that period but that's a little dangerous. Could also probably just have something on frame to close the escape display too and that would probably be better, but I don't have a solution at the current moment since on my phone. I know a wiki page with default idds exist though

past wagon
#

ok

#

thatll work for me, thanks

little raptor
digital hollow
sly cape
digital hollow
#

Right, for now I'm assuming if there is no gunner then it must be driver.

digital hollow
restive leaf
#

Threatening Leopard20 with a good time I see πŸ˜›

little raptor
digital hollow
#

I included in the screenshot that the non-unit returns the uav vehicle when just connected and not taking control

little raptor
#

ah right I see now. but what about UAVControl?

digital hollow
#

Can check in a few :)

little raptor
#

nvm I think I got my answer based on this example:

radiant lark
#

Leopard wow you work at arma

#

Why would you make a mod to fix the flying glitch instead of fixing it from engine itself?

tulip ridge
#

They didn't work at bohemia then

zealous solstice
past wagon
#

oh

#

kk thx

jade abyss
#

At least, he is trying πŸ˜„

edgy dune
#

with missiles is it possible to have a submunition when deployed be locked onto watever the initial parent munition was?

radiant lark
#

Leopard you have a chance to do something great here!!

#

I used their mod for the flying fix

#

And you can use a car to β€œpush” other which is great

#

Really really great

#

But only works on local

tender fossil
#

Interesting. My friend made a complete, fully working and non-trivial feature with three prompts with Claude Code. He instructed the AI to use only BIKI as the source of information/reference which probably contributed to the successful end result quite a lot. The actual code is a bit verbose and just a tiny bit confusing in some places (to me at least), but it's definitely readable still

radiant lark
#

He could add RAG to Claude

#

Claude + RAG will read from a documents folder where you can have the whole wiki scraped / a lot of code / your codebase

#

Claude is too expensive tho, if friend uses a lot of credits monthly, tell him to consider using openlimits.app which is Claude but without ratelimits and unlimited credits

tender fossil
tender fossil
#

NOTE: Arma 2: CO! I'm having issues with canMove command. It doesn't detect disabled tracks on tanks or disabled tyres on wheeled vehicles. The vehicle must be close to being completely destroyed before it returns false. Is there alternative for it or am I doing something wrong?

little raptor
tender fossil
#

Tested with several tracked and wheeled vehicles

winter rose
#

that's… definitely weird. Maybe you can get hit point values then?

tender fossil
#

The lovely legacy πŸ˜„

ivory lake
tender fossil
ivory lake
#

kolo

tender fossil
ivory lake
#

at least what ive seen in selection names kolo is more common

tender fossil
#

Alright, I'll test πŸ‘ Thanks!

tender fossil
#
while {alive _tracked && !(isNull _tracked)} do {

  sleep _refreshRate;

  _markerName setMarkerPosLocal (getPos _tracked);

  _tracksDisabled = false;
  _wheelsDisabled = false;

  if (_tracked isKindOf "Tank") then {
    _tracksDisabled = if (((_tracked getHit "pasL") > 0.3) || ((_tracked getHit "pasP") > 0.3)) then {true} else {false};
  };

  if (_tracked isKindOf "Car") then {
    _wheelsDisabled = if (((_tracked getHit "kolo") > 0.3) || ((_tracked getHit "podkoloL") > 0.3) || ((_tracked getHit "podkoloP") > 0.3)) then {true} else {false};
  };

  if ((_wheelsDisabled || _tracksDisabled) && alive _tracked) then { // Line 49
    _markerName setMarkerTextLocal "   X";
  } else {
    _markerName setMarkerTextLocal _markerText;
  };
};
``` Next question: Why on earth I get the following error of undefined variable πŸ˜‚:
```if ((_wheelsDisabled || _tracksDisabled) && a>
  Error position: <_wheelsDisabled || _tracksDisabled) && a>
  Error Undefined variable in expression: _wheelsdisabled
File mpmissions\__CUR_MP.chernarus\Common\Common_MarkerUpdate.sqf, line 49
Error in expression <.3)) then {true} else {false};
};
#

I think I figured it out actually: getHit returns Nothing when there's an invalid selection

hushed turtle
#

That could cause if to return nothing, sounds legit

#

Btw, you don't need if, when you just want to return true or false. You can just use whatever condition returns directly: _bool = condition. There is no need for entireif condition...

tender fossil
#

Yeah, I added them when trying to figure out why the variable was nil. Will do πŸ‘

tender fossil
#
diag_log (_tracked getHit "pasL");
diag_log (_tracked getHit "pasP");

diag_log (_tracked getHit "podkoloL");
diag_log (_tracked getHit "podkoloP");
diag_log (_tracked getHit "kolo");
``` prints nothing ![KEKSad](https://cdn.discordapp.com/emojis/837266099321569291.webp?size=128 "KEKSad")
still forum
still forum
# digital hollow

You could grab the UI and read the text in the control, does it not display different text at top for driver vs gunner view?

still forum
tender fossil
still forum
#

Ah possible

winter rose
#

(or HandleDamage, or Dammaged(sic))

hushed turtle
#

I was about to suggest getAllHitPointsDamage, but that's new in Arma 3 apparently πŸ˜„

tender fossil
ivory lake
#

other suggestion would be to do a config dump and look at class hitpoints

digital hollow
radiant lark
granite sky
#

Oh right, apparently I didn't read findEmptyPosition's description for four years and it used to say that the first parameter was the minimum search radius.

still forum
radiant lark
#

Because I was wondering whether the vehicle overlap and all that could be fixed on the engine and why it hadn't been done yet

hallow mortar
#

Did you know that you can choose to turn off the ping when you reply to someone

flat kayak
radiant lark
tulip ridge
#

Hold shift when you reply and it doesn't ping

fair drum
#

do we have a way to set a created ammo/shell a side? so that AI will react to it? maybe add a separate createAmmo instead of using createVehicle? or maybe an additional arguement to triggerAmmo to determine the side?

topaz lion
#

Is there a script that would force off all lights for an aircraft? There’s a bug with the dev version of simplex that lots of aircraft get their collision lights forced on which obviously isn’t great when a helo or plane are doing a strafing run with blinking red and green lights.

I’ve tired β€œ_vehicle setCollisionLight false;” which has worked for some aircraft but not all of them so was curious if there’s a blanket solution? Or if I need to find out if modded aircraft have extra light settings or something that wouldnt then be covered by setcollisionlight

hallow mortar
indigo coral
#

Hi folks. Was wondering if anyone had some suggestions for settings to use with setAperture for a night op? I've got a group of folks I'm running a D-Day parajump op for and the default Arma darkness is too much for them to function in without night vision.

errant jasper
#

"Default arma darkness"???

IME, unless map config broken or something, night visibility is governed by moon phase, from pitch black to NVG nice, but mostly unnecessary unless attacking from wrong direction in hilly terrain.

#

And varies by cloud cover of course

#

D-Day was done at full moon

indigo coral
fair drum
#

most of us probably just change the date time to match a more full moon kind of night

indigo coral
#

Right on. My group was insistent that the aperture should be adjusted so I figured πŸ€·β€β™‚οΈ

fair drum
#

unless you are doing some building intersection checks, you're gonna toast everyone's eyes when they enter a lighted building with setAperature

indigo coral
#

That's kinda what I figured

#

I appreciate the guidance!

fading gorge
#

@lone glade VS Code is absolutely great apart from this one big problem - http://i.imgur.com/CiG8ZCd.png - the highlight on closing brackets is barely visible and i can't figure out how to change it

#

can import textmate themes and hack seemingly the whole UI of VS Code just using html/css/js but change the highlight of closing brackets? nope

royal quartz
#

https://community.bistudio.com/wiki/enableVehicleSensor

This command is GA LE, being LE... does that mean this needs to be remoteExec 2 for it to take effect for all people?

If its run just on the computer where the vehicle is local could other people still see it as active and be locked by that vehicle? haha

granite sky
#

I don't think it makes sense for it to actually be LE?

#

Unless I'm misunderstanding the relation between sensors and radar. Which I probably am.

royal quartz
granite sky
#

Maybe sensors are just for UI logic and AI spotting checks and therefore they could be local, while active radar state is separate and global.

royal quartz
fair drum
#

So what's the scam on this? Clicking the picture?

exotic mesa
bleak valley
#

hi
just to be sure, the script

[myObject, true] remoteExec ["hideObjectGlobal", 2];

will show myObject ?

#

my bad, after re-reading it, the "true" at the start means it will hide it

#

I was confused by the "2"

hallow mortar
#

2 is the locality target. It's part of remoteExec, not hideObjectGlobal. It means the command will be sent only to the machine with that network ID; 2 is always the server. That's correct for use with hideObjectGlobal because it only works when executed on the server.

proven charm
#

and if you run the hideObjectGlobal on server you dont need remoteExec

bleak valley
#

I run it in a trigger

#

I had bad situations in the past

split ruin
#

any scripted way to add external target camera to object ? πŸ€“

faint burrow
split ruin
#

what is the "20Rnd_12Gauge_AA40_Pellets_Snake_lxWS" mag round classname ? πŸ€”

hushed turtle
#

Look for the magazine in config

warm hedge
#

getText (configFile >> "CfgMagazines" >> "20Rnd_12Gauge_AA40_Pellets_Snake_lxWS" >> "ammo")

split ruin
#

@hushed turtle nice idea, found it -> "B_12gauge_Pellets_Cartridge_lxWS"

split ruin
#

I am trying to make "antidrone" rounds for AK-12 but no luck for now, any suggestions? frogthinking

player addEventHandler ["Fired", {
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
    deleteVehicle _projectile;
    private _newProjectile = createVehicle ["B_12gauge_Pellets_Cartridge_lxWS", getPos _projectile, [], 0, "CAN_COLLIDE"];
    _newProjectile setVelocity (velocity _projectile);
    _newProjectile setPos (getPos _projectile);
}];

I just want to shoot AA12 rounds, because I don't want to avoid using a mod that enables two primary weapons
I have the feeling it just adds one pellet lol

hallow mortar
#

Well you're deleting _projectile and then trying to do getPos etc. on it. You might consider doing it in the opposite order.

#

Also, use getPosASL/setPosASL or getPosATL/setPosATL instead of getPos/setPos. It's faster and more reliable.

split ruin
#

@hallow mortar I tried wihtout deleting it, its the same story, just the old round is flying (or the normal round plus one pellet )

hallow mortar
#

I didn't say "without deleting it", I said delete it after you get its position and velocity instead of before

split ruin
#

I tried

player addEventHandler ["Fired", {
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
    private _newProjectile = createVehicle ["B_12gauge_Pellets_Cartridge_lxWS", getPosATL _projectile, [], 0, "CAN_COLLIDE"];
    _newProjectile setVelocity (velocity _projectile);
    _newProjectile setPos (getPosATL _projectile);
    deleteVehicle _projectile;
}];

but no joy, the only thing is it deletes the old projectile, or pellet is too small to see it ...

hallow mortar
#

Use setPosATL instead of setPos

split ruin
#

I swear it worked for the first round then nothing ...

player addEventHandler ["Fired", {
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
    private _newProjectile = createVehicle ["B_12gauge_Pellets_Cartridge_lxWS", getPosATL _projectile, [], 0, "CAN_COLLIDE"];
    _newProjectile setVelocity (velocity _projectile);
    _newProjectile setPosATL (getPosATL _projectile);
    deleteVehicle _projectile;
}];

I am shooting blancs ...

#

πŸ˜”

faint burrow
#

Adapt this script:

player addEventHandler [
    "Fired",
    {
        params ["_unit", "", "", "", "_ammo"];

        if (!(_ammo isKindOf ["BulletBase", configFile >> "CfgAmmo"])) exitWith { };

        _bullet = nearestObject [_unit, _ammo];

        _bulletPosition = getPosVisual _bullet;
        _bulletVectorDirection = vectorDir _bullet;
        _bulletVectorUp = vectorUp _bullet;
        _bulletVelocity = velocity _bullet;

        deleteVehicle _bullet;

        _rocket = "R_PG7_F" createVehicle _bulletPosition;

        _rocket setVectorDirAndUp [_bulletVectorDirection, _bulletVectorUp];
        _rocket setVelocity _bulletVelocity;
    }
];
hallow mortar
#

It seems to be because of that ammo specifically, I tried with a .50 round and it works fine

#

Probably because of how it works with submunitions I guess

hushed turtle
#

Maybe it needs triggerAmmo?

hallow mortar
hallow mortar
split ruin
#

@faint burrow holy moly its working ! πŸ₯³ thanks to all

hallow mortar
#

πŸ€”

split ruin
#

here it is the working version if somebody want to have some chance against drones

player addEventHandler 
[ 
 "Fired", 
 { 
  params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"]; 
 
  if (!(_ammo isKindOf ["BulletBase", configFile >> "CfgAmmo"])) exitWith {}; 
  _bullet = nearestObject [_unit, _ammo]; 
  _bulletPosition = getPosVisual _bullet; 
  _bulletVectorDirection = vectorDir _bullet; 
  _bulletVectorUp = vectorUp _bullet; 
  _bulletVelocity = velocity _bullet; 
  deleteVehicle _bullet; 
  _pellet = "B_12gauge_Pellets_Cartridge_lxWS" createVehicle _bulletPosition; 
  _pellet setVectorDirAndUp [_bulletVectorDirection, _bulletVectorUp]; 
  _pellet setVelocity _bulletVelocity; 
 } 
];
hallow mortar
hallow mortar
# exotic gyro ... Just use submunitions?

Presumably because they are trying to do this without a mod.
*with a mod you wouldn't even have to use submunitions beyond what the shotgun round already does, just let the gun fire the shotgun rounds

exotic gyro
#

that'll do it

exotic gyro
#

hit = 0.01

hallow mortar
#

I still want to figure out what the hell is different between these two methods.
With the original method, a normal .50 bullet is created and correctly replaces the original round, but a shotgun shell does nothing.
With Schatten's method, a shotgun shell works. What causes this difference? The difference in positioning logic shouldn't matter; it was working out fine for the .50 round. Is it the other createVehicle syntax?

#

It's the setVectorDirAndUp

#

Normally direction doesn't matter for bullets, but for this one it does because of course that's used for submunitions

#
_bullet = nearestObject [_unit, _ammo]; ```
This part is still pointless though. Just use `_projectile`, it's provided by the EH so it's faster than doing `nearestObject`.
hushed turtle
#

There is a chance you could catch differnet projectile with nearestObject πŸ˜†

split ruin
#

yeah, if players fires RPG with this evenhandler on
but this prevent it, right ?

if (!(_ammo isKindOf ["BulletBase", configFile >> "CfgAmmo"])) exitWith {};
#

but i can easily filter it with "_weapon" param anyway

#

this will make it work with only one type of magazine

if ((typeOf _weapon != "arifle_AK12_GL_lush_F")) exitWith {};
if ((typeOf _magazine != "30rnd_762x39_AK12_Lush_Mag_Tracer_F")) exitWith {};

etc ...

hallow mortar
#

typeOf is not needed, _weapon and _magazine are already classname strings

hallow mortar
# split ruin yeah, if players fires RPG with this evenhandler on but this prevent it, right ?...

That isKindOf is used to check whether the projectile being fired is a bullet. The point of that is to exclude other types of weapons like rocket launchers, hand grenades, etc. If you have a more specific check against the weapon or magazine, you don't need it.
That isKindOf does not prevent against possible misidentification with nearestObject. In theory (though it's a pretty small chance), another projectile of the same type could be passing closer to the player than the fired ammo is, which would cause nearestObject to target that other projectile instead of the one you just fired.

#

That's part of why you should just use the provided _projectile reference instead of doing the whole nearestObject thing.

split ruin
#

@hallow mortar actually the chance is very big because all team members will use AK-12 and they will be shooting close to each other

player addEventHandler
[
    "Fired",
{
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
    if (_magazine != "75rnd_762x39_AK12_Lush_Mag_F") exitWith {}; //makes this mag "antidrone mag" :)
    
    _bulletPosition = getPosVisual _projectile;
    _bulletVectorDirection = vectorDir _projectile;
    _bulletVectorUp = vectorUp _projectile;
    _bulletVelocity = velocity _projectile;
    deleteVehicle _projectile;
    _pellet = "B_12gauge_Pellets_Cartridge_lxWS" createVehicle _bulletPosition;
    _pellet setVectorDirAndUp [_bulletVectorDirection, _bulletVectorUp];
    _pellet setVelocity _bulletVelocity;
}
];

sript is working fine with "_projectile" param as you suggested πŸ‘Œ

hallow mortar
split ruin
#

@hallow mortar just added it πŸ™‚

hallow mortar
#

If you have a specific magazine check, you don't need the isKindOf bulletBase check, because you know that magazine only contains bullets

warped thicket
#

seems like a theme issue

queen cargo
#

vs code is a piece of shit when it comes to defining your own lang
its even more PITA then arma dialogs

digital hollow
#

Is there a way to set the zoom of turrets with continuous zoom optics (as oppose to discrete optics modes) like the rcws ugv?

old owl
fading gorge
#

no matter what language or theme, the closing bracket highlight is barely visible on my machine. i know it's off-topic but if anyone knows a solution i'm all ears

royal quartz
royal quartz
proven charm
#

is flyInHeight broken because i can make heli go down to 40m but not below. the wiki says 20m is the min

cosmic lichen
#

Did you try the alt syntax?

proven charm
#

yes

cosmic lichen
#

and getPosATL returns > 20?

proven charm
#

yeah

cosmic lichen
#

Idk then

zealous heath
#

Trying to have a hint display after a countdown, but I am getting an invalid number error. Any help greatly appreciated:

with uiNamespace do {
    [
        [
            ["TESTING...", "align = 'left' shadow = '1' size = '0.7' font='PuristaBold'"]
        ],
        0.256
    ] spawn BIS_fnc_typeText2;

    playSound ["zoomIn", true];
    uiSleep 0.3;
    playSound ["assemble_target", true];
    uiSleep 0.5;
    playSound ["surrender_fall", true];

    [10] call BIS_fnc_countdown;
    call BIS_fnc_showMissionStatus;
    waitUntil {
        (missionNamespace getVariable ["BIS_fnc_countdown_time", 1]) <= 0
    };
    hint "Done";
    sleep 5;
    hintSilent "";
};
proven charm
#

is 0.256 valid there? pls post the error msg

zealous heath
#

tried only having hint "Done";, which works, but the hint won't display after the countdown

#

Is there maybe a better way to have code be initialized after a countdown?

hushed turtle
#

What is initialisation of code why after countdown?

zealous heath
zealous heath
faint burrow
#
waitUntil { !([true] call BIS_fnc_countdown) };
zealous heath
little raptor
#

ah wait 20m. right. yeah between 10 and 20m doesn't work. lower than 10 does work. idk why

proven charm
#

just verified that. weird

proven charm
#

flyInHeight command needs fixing scotty

#

the command it self is buggy

#

in game

#

see our convo above with leo

versed belfry
#

Heyo, quick question.

Is sending large hasmaps over network a bad thing?

Context:
I am storing values on the server from each client once per second.
Then I am sending those values to the Zeus client(s)

If there are 30 players, that's 30 messages from the server to a Zeus (because the values are stored on the player object).

So I'm wondering if instead using a hashmap containing player objects and their values being sent once per second to the Zeus is better than 30 messages per second of singular values.

mortal folio
versed belfry
mortal folio
#

I see. Well, i dont know the exact use case but it boils down to only sending them when theyre needed or updated instead of per second, or measuring locally instead of through server (if possible) - other than that if you need the data then you need the data, just gotta find ways to make it optimized, tho honestly given the example its not a big deal

versed belfry
mortal folio
#

Gotcha - youre fine then, far as im aware numbers are cheapest besides bools in network anyway, plus youd be surprised how much data mods send over network that is at larger scale than this and you dont notice a thing

versed belfry
#

Makes sense

#

Thanks

mortal folio
# versed belfry Makes sense

the only thing i'd optimize in your case then is avoid sending if the fps monitor is turned off - and maybe add margin of error (i.e if fps is within 3 frames of the previous networked framerate you discard it, etc)

errant jasper
#

Why bother with a hashmap?
Why not just setVariable ["CalculatedMeanFPS", _fps, true] locally on each player machine and let the zeus clients read it ?

granite sky
#

Because that's worse? :P

mortal folio
errant jasper
#

The intended goal is to debug performance issues for clients? The entire cost is dominated by how data is analyzed and emitted not how often it is sent.

mortal folio
#

well his question was explicitly about network traffic

granite sky
#

Before 2.20 I'd have said the vast majority of the cost there would be the network traffic. Even from a server CPU perspective.

mortal folio
#

the hashmap method would in theory be less network traffic so it's ideal to go for that (i could very well be wrong based on my assumptions but 🀷)

errant jasper
#

How are hashmap's less traffic by nature of being hashmap?`
Surely the benefit here is you only forward from server to zeus clients.

mortal folio
#

and heck even CPU time - calling setVariable once per player is gonna take longer than sending one single variable in mission namespace that contains a hashmap with all players

granite sky
#

It's not. It's because it's N times fewer packets sent.

errant jasper
#

Are you saying arma does not compact messages into fewer packets?

granite sky
#

It does, but it's not very good at doing that very quickly.

#

Consider that it's also N times as many JIP queue entries to handle.

#

And that one used to be the limiting factor.

mortal folio
#

tbf ideally you wouldnt use the JIP queue anyway and should just send directly to the zeus client ID instead

granite sky
#

setVariable true is JIP

errant jasper
#

^ yeah true.

granite sky
#

With the bulk array/hashmap then you could skip JIP entirely (and you should).

errant jasper
#

True JIP affect was stupid of me. But JIP issue is completely orthogonal here and has nothing do with hashmap.

granite sky
#

Hashmap or array is irrelevant, but there isn't any other way to send bulk data that I can think of.

#

Oh, I guess you can make it into a string.

#

Might actually be cheaper but whatever :P

errant jasper
#

Anyway, without knowing the intended usage of the data, I still suspect it does no way require 1s resolution.
Would be nice if we had way to send unreliable communication in Arma.

mortal folio
#

but no worky

errant jasper
#

That never "existed" in customer version as the note says.
And of course requires proper network setup for both, but especially receiver, port forwarding etc.

mortal folio
#

yeah, but i imagine it means the game at least has the sqf integration for it and whatever underlying system is needed

#

or at least parts of it 🀷

mortal folio
errant jasper
#

Already surprised data extraction/ransom attacks haven't happened already in certain arma communities

mortal folio
errant jasper
mortal folio
#

fair

fair drum
mortal folio
#

a popup with a dont ask me again but then at least the users would be warned

versed belfry
errant jasper
#

So if there is a heavy 15s drop, but no zeus was around to see, did it matter or not ?

mortal folio
#

i'd imagine it's intended to be used with zeus only lol

errant jasper
#

If there is a 2s heavy drop, the zeus saw, but it went away did it matter.

mortal folio
#

there's always a zeus in some groups

versed belfry
granite sky
#

Nah, depends on the data.

errant jasper
#

I mean don't get me wrong. Your Arma will probably work fine almost all the time without issue if 100 players, send each second to 4 zeus.
But that one guy with bad connection is gonna slow down other traffic(message processing) when his "reliable" messages drop and must be resent

versed belfry
mortal folio
#

tbf that's a risk that exists even without that mod, setvariables over network are everywhere in arma, but also are we sure arma doesn't work around that? i've never had a slow-network client impact other clients

versed belfry
#

I mean in all honesty? The original mod who I've heard people complain about its code never caused issues for me

mortal folio
versed belfry
#

and for ~30 players it sends near 1000 network messages between them overall, (each player receives ~30, and sends ~30.

errant jasper
versed belfry
#

Yea but I've had people complain about the number of messages sent, mainly on the theory it is bad, but in practice I've used the mod without any noticeable impact with heavy performance scenarios.

#

None the less I'm trying to spend the time to improve it where I can

#

Which is why my original question came up

#

Does anyone here have a resource about network trafic in Arma 3? Or is it a black box?

mortal folio
errant jasper
#

Sturgeon's law et cetera

mortal folio
#

true

granite sky
#

That's the thing. You can get away with one mod doing lazy shit with one variable, but it adds up.

errant jasper
#

I am impressed with the things people "get away" with network wise in Arma 3, but that might be shaded by my old Arma 2 experience of how wrong it can go.

mortal folio
#

well also people today have generally good enough internet to brute force through it

#

which isnt ideal, but its true πŸ˜„

granite sky
#

Acre sending 16MB lumps on init was pretty funny

versed belfry
#

Another kind of related question, is there any benefit of just sending an array of arrays instead of a hashmap?

errant jasper
errant jasper
versed belfry
versed belfry
errant jasper
#

Unless you have a lot of constant keys I don't think the difference will matter. Since you pretty much only has one I doubt you measure any difference.

granite sky
#

Best you could maybe do is maintain an ordered list of players separately, because that would change much less frequently than the frame rates.

#

probably not worth it though, assuming that you're only sending to zeuses.

versed belfry
#

Yea, chances are hashmaps will be just fine, hopefully

granite sky
#

It's a lot of extra complexity for not a lot of saving.

errant jasper
#

I would just do more collation on client side. Like gather 10s of data into min fps, max, median, average, 95 percentike, 25% percentile and send only every 10s instead.

#

And zeus clients could keep the data, so visualize data for a player over longer periods.

#

Though you can do that with per-second fps too of course.

versed belfry
#

What I can also do if I got the time is make it so instead of just a hardcoded every 1 second, make it a CBA setting, that each server can set.

errant jasper
mortal folio
#

having used an fps monitor before, partly yes it's about knowing whether the thing or things you just spawned are causing issues, but also generally just gauging performance - if your players are at 20 fps and nobody is saying anything, but they're stil suffering, you'll be more inclined to start deleting things or disabling stuff etc

versed belfry
old owl
errant jasper
#

Sure, but how is it a problem with 10s old data?

mortal folio
#

in theory it isnt, 10s should be fine, but you can apply that same logic to a lot of things - 1s is already optimized enough, you're sending like... a couple hundred bytes if you're at like 20-30 players per second?

errant jasper
#

Not about bandwidth, but packet reliability

versed belfry
#

The issue with sending a packet every 10 seconds of the last 10 seconds of data is that I need to rewrite that part of code to do it

mortal folio
versed belfry
#

Put plainly, I am only willing to put so much time and effort to solve a problem that in my experience does not exist.

I am more or less doing it so others stop complaining about it because the code looks bad.

#

Like Kharos said, chances are other mods do A LOT more than this mod does, but ey what can you do,.

#

I can fix and improve systems. I can't fix people.

mortal folio
#

that's why i recommended something like an fps error margin (<5 fps difference since last networked message is ignored), and not sending data if zeus doesnt have the monitor active, etc

versed belfry
#

Yep that is actually a real neat idea

versed belfry
mortal folio
versed belfry
#

Could even make it a CBA setting as well, so that people can configure the mod to their liking

mortal folio
errant jasper
versed belfry
#

Welp, thank you all for the help so far

mortal folio
versed belfry
#

This cleared up a lot, and helped solidify my understandings a bit more so I can do it.

old owl
#

We've done a lot of network optimizations over the years, the largest thing that was hurting us was JIP queue. Although we also had tens of thousands of messages.

If you're broadcasting data on a regular interval, and you're only broadcasting it to server; I don't think you'll really have any network issues. Packet loss would be more your concern as Muzzle Flash mentioned but obviously there's ways you can case for that.

My advice would be not to set the data public though and instead just send to server.

mortal folio
#

nothing is being public-ed to all clients

#

granted you could optimize further by sending directly from each client to zeus (yes the game does send traffic through server anyway but it's technically one less step) - just public the current zeus' client ID and have the sending happen that way

versed belfry
mortal folio
#

Oh no

versed belfry
#

So it's each client updating the variables for EVERY OTHER client

errant jasper
#

Ignoring the collection details and visualization, this is basically how I would do it:

// Player side Send every X second (_toTime - _fromTime) basically.
private _data = [player, [_avgFps, _maxFps, _minFps, _medianFps, _fromTime, _toTime]];
_data remoteExecCall ["FPS_Monitor_Ingest", G_ZeusClients];

// Zeus side: Receive (FPS_Monitor_Ingest):
params ["_owner", "_data"];
_owner setVariable ["FPS_Monitor_Latest", _data];
// Add to like 30 minute history buffer that Zeus could also access. Maybe a graph in GUI?
[_owner, _data] call FPS_Monitor_AddData;
mortal folio
versed belfry
#

That'd be a down the line thing though but it's a real nice idea to visualize things as well

mortal folio
#

Requires working with arma gui notlikemeow

#

I have nightmares

errant jasper
#

That was just optional. The data over time part is more important. Then you could even compare if a drop short while ago happened for all or just some.

mortal folio
#

Jokes aside yeah its good MP diagnostics to measure through a mission lifetime, never thought of that

old owl
#

I think also one thing that wouldn't hurt if not discussed already is only having it listen if a Zeuse client is actually awaiting results. No point in sending updates unless the Zeuse client toggles the feature maybe

#

Also having control over which clients the Zeuse client wants to monitor, then it doesn't have to inherently be everyone if diagnostics is only needed for one person

#

Kinda just thinking about if I was going to do it, ultimately constraints of how you wanna make the project is up to you; but FWIW :)

errant jasper
#

If still want history, one could do hybrid by coalescing, say 10 updates, when not actively monitored to ensure history is transmitted around (so it would not have to be done in one large bulk later), but upon active monitoring set the update rate back to the default.

versed belfry
versed belfry
#

and remove him whenever it is closed

#

Technically doable so no updates are being sent unless also the UI for the mod is activated

#

But that's a can of worms I don't wanna get into sincce it is not my mod

digital hollow
versed belfry
digital hollow
#

No network* resources though ;)

mortal folio
versed belfry
hallow mortar
#

setName syntax 2 allows you to set a first and last name for a unit, as well as the "all-in-one" name set by syntax 1.
What command allows you to get the first and last name?

hallow mortar
restive leaf
#

Hmm, name does return the name, like Nicolai Dvostok or something though. So that, split returned string for first and last. I use a roaming AI script that does a name on the leader of an AI group and it sends a radio message with that AI's name...

hallow mortar
#

name returns the "all-in-one" name, which for default names probably includes both first and last names. But if you've done setName syntax 2 with some different name, it does not return the separate first and last names.

restive leaf
#

Oh, Sounds like a job for feedback tracker...

hallow mortar
#

Source: did _unit setName ["test", "aaa", "bbb"] and name _unit returned "test"

restive leaf
#

Is that because it would be expecting sqf player setName ["Ben Kerry","Ben","Kerry"];like in the third example and yours should be sqf player setName ["aaa bbb","aaa","bbb"];?

#

Though I have no idea what the addition of the last two parameters is used by...🀷

hallow mortar
restive leaf
#

Thus my last comment 🀣 Maybe it was used... but doesn't really make sense since that syntax was added in ARMA 3 1.02?

hallow mortar
#

The game has some kind of capacity to distinguish because it makes the distinction in e.g the commanding HUD

restive leaf
#

Maybe the last name to clearly identify it for this: Only last name will appear in command bar i.e. this setName _myNameArray will display _myNameArray select 2. If setName is used with a string e.g this setName "blah", nothing occurs in the command bar and the default randomized name is displayed? But just guessing

#

Like if you had a character named John W Ick?

hallow mortar
#

It could be more useful if there was a way to actually get it :U

restive leaf
#

Hopefully Dedmen will pop in...

real tartan
#

is there a way to limit max free camera distance from player for BIS_fnc_EGSpectator (vanilla spectator)

#

*zoom

hushed turtle
#

I don't think that answers the question.

mortal folio
#

He was looking for max free camera distance, not being locked into one view

#

Yeah but its not free camera anymore

#

Anyway the way to do it would be to take the spectator camera object, define max distance, and then perframe compare the distance from player to that camera object and when its exceeded you clamp the camera position using the _cameraPosition vectorFromTo _playerPosition to get the "backward" direction, vector multiplied by absolute of _currentDistance - _maxDistance, and set the new camera position based on that returned vector being vectorAdded to current position

(pseudo-mathing this, busy currently but that's the idea i can think of)

#

that'd be in the free camera

#

i guess? i dont use spectator often, all i know is he wants to limit how far the camera can go

#

all you need for that is to have the camera object and the anchor object

hallow mortar
#

Why do you think this isn't about EGSpectator?

hallow mortar
#

Free camera just means a camera that can be moved freely rather than being attached to something. Zeus has a free camera, the old spectator has a free camera, and the Endgame spectator system (EGSpectator) has a free camera.

mortal folio
#

is there any way to get whether the player is aiming down sights or not?

faint burrow
mortal folio
#

hm.... can probably make that work, thanks

#

(thats if it remains empty if not aiming down sights 🀷)

hallow mortar
#

cameraView will return "GUNNER" when ADS

mortal folio
#

Oh, great!

jade acorn
#

i'm trying to figure out a checker to detect if player is moving. animationState works for mostly everything but I can't find anything that would let me check if the player is "freelooking" around. Any ideas?

#

inputMouse is only for pressing buttons, I'd need something to detect mouse movement I guess

split ruin
#

I removed the annoying marker dot from AH-9 with

heli setObjectTextureGlobal [1,""];

but I wonder can I load some other targeting dot? are there any texture like this in the game already - dot, crosshair, etc ? meowawww
Update: I ended making one pixel red dot as reticle, it does the job but it could be much better looking ...

mortal folio
#

Gives you a number, based on what exact metric im not sure, but not 0 will be movement input

jade acorn
prisma kraken
#

Is there anywhere to find how the vanilla Arma 3 rearm functions behave in terms of scripting it?

Trying to make it so AI vehicles can rearm like players can when near an ammo sources through some scripts or a mod.

prisma kraken
#

thank you

stark spade
#

is that only me who is facing this problem while searching on forum ? or search feature is turned off by website itself

restive leaf
#

It's pretty well indexed by google at this point, could do a site specific search for what you want there

versed belfry
#

Hello :D

Quick question, what's the easiest to detect when Zeus was opened / entered into Zeus mod?

versed belfry
#

Uhhhh if it works do pass it please

#

I am mainly looking for something like an eventHandler rather than a constant check with a waitUntil

hallow mortar
versed belfry
#

The only reliable way I've found so far is using a waitUntil but I'm not fan of a constant check that'd run until a Zeus interface is open

hallow mortar
#

Unfortunately BI doesn't really offer a lot of EHs for Zeus

#

In theory you could insert an EH into the Zeus interface UI somewhere. Might need a mod for that though, not sure if mission description.ext UI stuff can modify existing UI like that

#

I'm a little surprised CBA doesn't seem to offer any Zeus UI events

versed belfry
#

Honestly the waitUntil and findDisplay combo might be the most reliable here whether I like it or not

tulip ridge
#

It does, but only through a displayLoad eh
It has some "feature camera" stuff to catch special uis like arsenal, zeus, eden, splendid camera, etc. but needs some extra logic since if you go from not in zeus -> editing a unit you get three values. "" -> "zeus" (might be curator) -> "arsenal". Then exiting arsenal gives "zeus"

What I've done is hook into it and then just check if zeus display exists

tulip ridge
#

Yes

#
["featureCamera", {
    private _inZeus = !isNull findDisplay 312;
    // ...
}] call CBA_fnc_addPlayerEventHandler;
versed belfry
#
["featureCamera", {
    private _inZeus = !isNull findDisplay 312;
    if (_inZeus) then {systemChat "something happened!"};
    if (!_inZeus) then {systemChat "something ELSE happened!"};
    }] call CBA_fnc_addPlayerEventHandler;
#

Just a quick example, I think this works perfectly

tulip ridge
#

Can just use if/else but yeah

versed belfry
#

Lack of sleep moment

#

Thanks again!

#

Yea this should work for now :D

#

Thanks though

broken pivot
#

Yoo, what a nice day to ask a question :D
Im trying to paint my systemChat that I load in with localize "STR_STRINGTABLE" inside of an addAction scope...
I feel like beeing close to a solution but also dont know if its really possible

Thats my execute:

    _SPrice_Normal = 10;
    _APrice_Normal = 10;








//StandartFleck
_mausradBundeswehrStandartFleck addAction 
    [
        format [localize "STR_MR_BW_TRUPPFUEHRER_FLECK", _SPrice_Normal, _APrice_Normal],
        {
            execVM "EBER\MausradLoadouts\Bundeswehr\StandartFleck\Truppfuehrer.sqf";
            if ((!isNil "KP_liberation_supplies") && (!isNil "KP_liberation_ammo")
            ) then
            {
                _Price_Text = format [localize "STR_MR_COST_INFO", (_this select 3 select 0), (_this select 3 select 1)];
                [_Price_Text] remoteExec ["systemChat", _this select 1];
                KP_liberation_supplies = KP_liberation_supplies - (_this select 3 select 0);
                publicVariable "KP_liberation_supplies";
                KP_liberation_ammo = KP_liberation_ammo - (_this select 3 select 1);
                publicVariable "KP_liberation_ammo";
            };
            
        },
        [_SPrice_Normal, _APrice_Normal],
        1.5,
        true,
        true,
        "",
        "true",
        3,
        false,
        "",
        ""
    ];

Thats my stringtable.xml snippit

        <Key ID="STR_MR_COST_INFO">
            <Original>Your loadout outlay &lt;t size='0.8' color='#BD0000'&gt; Supplies: %1 &lt;t size='0.8' color='#00BD06'&gt; Ammunition%2</Original>
            <German>Deine AusrΓΌstung kostete dich &lt;t size='0.8' color='#BD0000'&gt; Nachschub: %1 &lt;t size='0.8' color='#00BD06'&gt; Munition%2</German>
        </Key>
#

The problem appears in the chat. The message fires a little to direct and doesent get structured.
Does anyone know how to do it, because I could bet its possible..
I read about structuredText but doesent know if the enviroment fits

old owl
broken pivot
#

Yeah Im not sure if thee KP supplies are lowered right, Im writing a function for that to get rid of that

faint burrow
broken pivot
wet shadow
#

So uh, anybody know whats up with SQF in -1 * 0 returning -0. Rather bizarre to have that popping up in the UI for a return.πŸ˜΅β€πŸ’«

faint burrow
#

abs -1 * 0 😎

wet shadow
#

Well yeah, but annoying to have to change the formula to account for it since I want negatives otherwise. What a weird notation.

winter rose
#

isn't -0 == 0 ?

wet shadow
#

Yeah, checks true. This is just an UI annoyance for me.

errant jasper
#

It is not an SQF specific thing. That is just how floating point numbers are in the almost universal spec IEEE 754, so you get the same in Python, JS, et cetera.

charred monolith
#

Hi ! I've been looking at playSound3D to play a voice line on a AI, but the weird thing is when I set the distance I need to set it to like 100 to be able to hear it. If I set it to 10 or 5, I don't here the audio file. Even if I breath down the neck of the AI.

hallow mortar
#

The distance is the absolute maximum range. The volume will fade out until it reaches zero at that distance, and because of the shape of the volume:distance curve, it can be pretty quiet in the outer half of the radius.

#

Consider how quiet someone would have to be talking in order to be completely inaudible past 10 metres.

#

You can try increasing the volume of the sound, either with the parameter in playSound3D or in the file itself, but 5-10 metres is still going to be a very close limit. It's not very far in real life and it's less than you think in Arma.

charred monolith
#

Ok thank you very much ^^

grand moss
#

Whats the script for importing an object?

sly cape
grand moss
#

Trying to get an object from Blender to arma 3

tulip ridge
#

There isn't one

crimson lion
#

It's a whole process. In a nutshell, you have to export your model to a .p3d with LODs (Arma Toolbox for Blender is good for this), then make a config.cpp for the mod, and then pack that mod into a .pbo to be loaded into arma.

tulip ridge
#

There's Clock's Tools to export as a p3d, but there's no script to export it

grand moss
#

I've gotten to the export part but don't know how to import

crimson lion
#

You're gonna need to make it into a mod in order to be able to see/use it in-game basically. Now that you have your .p3d model file, you need to make a config.cpp and define that model in a way Arma 3 knows what to do with it.

grand moss
#

How would i do that?

mortal folio
#

Asking for each step here would take ages

#

Also wrong channel

cobalt path
#

Not sure whwre to ask this, but its kinda scriot related.
Advanced Repelling mod gets kinda broken by WMO (walkable moving objects) mod. Because I assume WMO recognises ropes as objects u can walk on.
WMO has CBA option to blacklist some objects from being walkable.

Does anyone know "rope" objects item class names for this purpose?

mortal folio
#

it's literally just Rope πŸ˜„

#

that's the base class that ideally the rope used by that mod should be inheriting from

twilit scarab
#

When I try to use the command to force vehicles to stay on road they get really jittery is that normal?

restive leaf
#

Anyone know offhand of a reliable and performative method to get the class of house that a player/ai is located in? Would it just be an insideBuilding and lineIntersects combo?

restive leaf
real tartan
restive leaf
#

Though for my particular usage case (cooking in houses at stoves and fireplaces generating smoke from the chimney) it might be okay... (only problem could be barracks next to sheds)

#

(Also wish all Enoch houses had the fireplace output memory point rather than just some of them, sad sigh)

mortal folio
#

Just intersect from aglToAsl unitAimPosition downwards to the posASL - 0.1 on Z

real tartan
#

nearestObjects also works, ordered by proximity

restive leaf
mortal folio
granite sky
#

If you're looking for "completely reliable" then I'd say no.

#

With a few rays you could probably get 99.9999% though :P

mortal folio
#

there's also the boundingbox method that would require vector math and may or may not be cheaper/more expensive than line intersects (never tested myself) - just check if bounds of unit intersect/are inside the bounds of the building using vector math magic πŸ˜„

#

but also unreliable with unevenly shaped buildings

granite sky
#

Bounding box extends outside the building so I'm not sure how useful it is.

mortal folio
#

yeah

#

unless

#

you do bounding box checks against each individual component (geo or fire geo) in which case you'd have more reliablity, but im 90% sure that'd be more expensive than a single line intersect

#

unless you do it in C as part of an extension or something

#

scope creep

granite sky
#

Other issue with ground raycasts is that sometimes the terrain sticks through the floor.

mortal folio
#

eh terrain returns objNull so you can just filter objNulls from the intersection and extend it downwards a bit for safety

#

since im pretty sure the line will still go under terrain if you ask it to

granite sky
#

ah, if you let it do multiple hits, yeah

restive leaf
#

Yeah, looks like a downward lineIntersects is probably gonna be the best (avoids most furniture). The position of the stoves/fireplaces should avoid terrain intersect problems. But also will modify per last couple of messages. Ah, the joys of implementing a proper cooking system with visual clues for other players πŸ˜‰

mortal folio
#

man i really wish we had an optimized way of detecting collision or "nearest collidable face"

#

plenty of ways around it ofc as we just discussed, still πŸ˜‚

restive leaf
#

Would be nice if insideBuilding had an alternative syntax that returned the building type

mortal folio
#

that'd help here yeah, eliminates the need for any other checks

errant jasper
#

If the building must have a chimney do the intersection towards the chimney positions

real tartan
#

can somebody share a function, that will find random empty position for spawning unit ( soldier or vehicle ) that I can use multiple times for n-numbers of units to spawn, and avoiding spawning units in rocks or positions already with spawned units ( e.g. not spawning vehicles on vehicles )
findEmptyPosition, BIS_fnc_findSafePos

errant jasper
#

Do you want to spawn them together, or spread out?

#

Easier if together, just find one larger area, and manually spawn inside.

real tartan
#

spread out, my usecase is to spawn multiple units/groups in marker, goal is to spread them out, avoiding spawning them on one place, or spawning vehicles on vehicles

#

or spawning vehicles on already spawned units

errant jasper
#

In that case, I don't think there is much better solution than findEmptyPosition with extra check after to see if actually clear.

#

You could try selectBestPlaces, but I don't recall the filtering being suitable for this.

restive leaf
digital hollow
restive leaf
digital hollow
#

Yeah true. I'm thinking like "look at stove and action to start cooking" >
"That's not a stove you donut" or
"Now cooking at this stove"

restive leaf
#

Basically that's sort of how it's gonna work. Wood stoves, Land_dkamna_uhlis are placed automagically as appropriate and I have another small "wood pile" object (not the vanilla one) in fireplaces... For the smoke I use the fireplace output memory point if it exists in the model, and a config that has the offset for the smoke point per building model if not