#arma3_scripting

1 messages Ā· Page 62 of 1

tough abyss
#

Yeah, you can't really. You'd have to track all bullets

sullen marsh
#

Short of checking if it's alive every few frames or so, I imagine that'd start to chug the server with a few hundred bullets

tough abyss
#

And detecting ricochets is hard too

#

I'll take a look into the particle effect method. maybe CBA can do something

nocturne bluff
#

You could pray to the armadevs.

granite sky
#

boundingCenter tells you whether the vehicle can cross bridges :P

tough abyss
#

armadevs should fix tracked vehicle physx first

granite sky
#

I vaguely recall that (some?) building models don't autocentre, so it's important for that.

sullen marsh
#

WELP THAT'D WORK HEAD

#

D:

#

Of course VBS has it ;_;

kindred zephyr
#

Some assets from Enoch doesnt do as apposed from Cup/A2 versions

nocturne bluff
#

VBS has everything

tough abyss
#

Just to taunt us

sullen marsh
#

I might as well ask for it on the tracker... maybe we'll get it in 5 or 6 years

austere granite
#

IncomingFire....

If only.... goddamn checking for bullet distances constantly for my suppression.. woohooo

sullen marsh
#

I mean, surely AmmoExploded wouldn't be THAT hard to implement

#

JUST that one

#

Just tack it on to whatever function deletes the bullet

austere granite
#

All of those are basically: OH IF I HAD THAT I COULD DO ALL THESE AMAZING THINGS IN A WAY THAT'S NOT COMPLETELY CRAZY!!!!

sullen marsh
#

They are :(

austere granite
#

... but I always try to NOT look at VBS because it just makes me sad :(((

nocturne bluff
#

I KNEW IT WAS UNDERGROUND

#

xD

austere granite
#

Ofcourse

sullen marsh
#

Underground arma 6 confirmed

austere granite
#

Maybe Codemasters will release a new Operation Flashpoint game that has it? :D

meager granite
#

Was there a way to hide engine actions from scroll wheel menu?

young current
young current
#

there are various fog and time related commands in there

granite sky
#

@meager granite Not directly. Specific actions can be blocked with specific methods.

#

There really should be a command for it because some of the methods are horrible

meager granite
#

I know you can block actions with inGameUISetEventHandler, but action is still there in the scroll wheel cluttering it

#

Thought maybe something was added through the years

hallow mortar
#

There's probably some deep engine hellcode that makes it impractical to change

meager granite
#

Looking for a way to disable "Take UAV controls" action so you can only connect to gunner, apparently there is none

#

Only possible by forbidding selecting the action with inGameUISetEventHandler it seems

#

I wanted to ditch hardcoded UAV terminal system all together at this point, but remoteControl is bugged and super limited.

#

Nothing is easy in Arma notlikemeow

#

Or rather seemingly trivial tasks require unreasonable feats

#

Aha, found a hack to stop UAV seats from being available

#
createAgent ["Logic", getPosWorld objNull, [], 0, ""] remoteControl driver uav;
granite sky
#

yeah that's horrible :P

#

I was wondering about swapping out the driver for an AI of the wrong side, which is even worse.

meager granite
#

I think you can also delete the driver, but that won't let you drive the UAV from gunner seat

#

Which is what I'm trying to have

meager granite
meager granite
#

Typical Arma

molten yacht
#

With CfgRoles, can one "class" (type of unit) have multiple loadouts assigned to it by CfgRespawnInventory?

#

Additionally, how do you tell the game what Role the player is?

#

I'm having fits trying to get the thing to actually respect the Default loadout.

tranquil nymph
#

@grizzled cliff What's been changed in ACRE for Zeus?

grizzled cliff
#

You can talk through the AI you control now.

tranquil nymph
#

I GM quite often and have had to mess with our setup to get multiple GMs going

#

If you're in zeus cam will you hear voices of units close to the camera?

#

That's something of a dream of mine :D

pulsar bluff
#

one of the main drawbacks of vanilla

#

only thing i can think of is creating a dummy UAV somewhere and deleting the driver

#

then hijack the "connect to uav gunner" to connect to the correct uav

runic edge
#

Hello guys ! Is there an alternative command to createVehicle where i can setDir before spawning an object ?

pulsar bluff
#

no

#
_vehicle = createVehicle [_type,_position];

// replace with

_vehicle = createVehicle [_type,[0,0,0]];
_vehicle setDir _dir;
_vehicle setPos _position;```
runic edge
#

ok thanks

modern meteor
#

Is there a way to check if an AI unit has a line of sight of another AI unit?

pulsar bluff
#

not in the way you're asking... you'd have to do your own line of sight checks with "lineIntersectsSurfaces"

#

if its in combat you can check "targetKnowledge" for position accuracy

modern meteor
#

Understood, thank you.

#

On a different note, can someone tell me why the following script does not move the AI of the player's group to the location of the enemy in sight?

{
singletarget = player findNearestEnemy cursorTarget;
player reveal singletarget;
_x doFollow player;
doStop _x;
private _pos = getPosATL singletarget;
_x doMove _pos;
} forEach (units player - [player]);
tough abyss
#

Using the particle effects method

sullen marsh
#

Also, how do you do that commy?

tough abyss
#

Added a particle effect to the bullet impact effects

#

with a beforeDestroyScript

#

returns the position in _this

#

Unfortunately not the projectile

#

So it would only work for "special weapons"

sullen marsh
#

unfortunuate :(

tough abyss
#

Yeah

sullen marsh
#

Also, partical effects aren't transmitted across the network I assume

tough abyss
#

The issue is that the beforeDestroyScript is a path to a sqf

#

It compiles and reads the file from hdd for every bullet

sullen marsh
#

Oh ouch

#

That's.......................... special

tough abyss
#

Could work for stuff like flashbangs or flares or something

#

But not for ALL projectiles

austere granite
#

Particle effect scripts I needed a bit with for Molotov and let's say that the frame rate did not enjoy it

tough abyss
#

http://i.imgur.com/uRemP5n.jpg

player addEventHandler ["fired", {
    params ["", "", "", "", "", "", "_projectile"];

    [{
        local _projectile = _this select 0 select 0;

        if (!alive _projectile) exitWith {
            systemChat str [_this select 0 select 1, _this select 0 select 2];
            [_this select 1] call CBA_fnc_removePerFrameHandler;
        };

        (_this select 0) set [2, getPosASL _projectile];
    }, 0, [_projectile, typeOf _projectile, getPosASL _position]] call CBA_fnc_addPerFrameHandler;
}];

Best I can do.

modern meteor
#

I have a strange problem. Steps:

  1. Create a squad with a player + AI
  2. Aim as a player at an enemy
  3. Execute the script while you have the enemy in crosshair

==> If the AI squad is in AWARE or SAFE behaviour then nothing happens. If the squad is in COMBAT or STEALTH behaviour then it moves to the enemy and kills it. My question is, why is the script not working properly if the squad AI is in AWARE or SAFE behaviour? It seems that the doMove command does not work in this case?

Here is the script: https://sqfbin.com/zepikobeluhenaweteko

granite sky
#

doMove certainly doesn't need combat or stealth behaviour.

#

Maybe add some logging and then you can tell where it's breaking down.

kindred zephyr
#

you are only intercepting stealth and turning them to combat

#
{
if (combatBehaviour _x == "STEALTH") then {break;};
_x setCombatBehaviour "COMBAT";
} forEach (units player - [player]);
#

combat is already combat

#

you are still missing 2 cases

#

instead of doing it like this, just straight up set the combat mode to combat for the group, not each unit. setting them to combatmode "blue" might be influencing this too.

#

and set the behaviors before doing the doFire btw

modern meteor
granite sky
#

out of interest, does it work if the units are in CARELESS?

kindred zephyr
modern meteor
granite sky
#

It's possible that in SAFE or AWARE they're resistant to move towards an enemy.

#

but generally CARELESS is how you override that.

kindred zephyr
#

you can also try with low level commands to overrule behaviours

modern meteor
modern meteor
kindred zephyr
#

is it inconvenient for you to change the behaviour before firing?

#

if not, you can always force combat and then order them to fire ?

granite sky
#

I put the guy in CARELESS on a test and he jogged off towards the target :P

#

likes to stop every 20m and aim a bit though.

modern meteor
#

You are right, CARELESS works!

#

Thank you guys for having a look. Much appreciated.

granite sky
#

There's probably some disableAI that'll stop them doing the 20m stop-to-aim thing.

modern meteor
granite sky
#

disableAI "AUTOTARGET" works, "WEAPONAIM" does nothing :P

modern meteor
#

Good to know. Thank you

granite sky
#

(this is backwards from what the wiki suggests)

#

maybe it's a bug. Pretty sure the AI is riddled with them.

modern meteor
#

The issue is that the units move very slow in Careless

#

Not optimal

#

Would be better if we could use AWARE

#

Not sure if it is a bug or not

granite sky
#

hmm. They were going pretty quick for me but it might be related to group speedMode.

#

I don't think there's any way of setting speed per-unit.

little raptor
granite sky
#

How does that work? You use getSpeed to find a suitable speed for the unit and then chuck that in?

little raptor
#

I guess you could set it some really big value blobdoggoshruggoogly

granite sky
#

I wouldn't have expected forceSpeed to work at all given the description.

#

but I guess if knows how to pick between animations...

kindred zephyr
#

imagine the unit walking menacingly at 15km/h

digital hollow
#

You can make units backpedal with

_x limitSpeed -(_x getSpeed "SLOW");
tiny wadi
#

How can I setup a class system? ex;

gunClassStuff {
variable=1234;
cost=124673;
}

tough abyss
#

class gunClassStuff {
var = 1234;
};

#

But that only works in configs (.cpp, .ext)

#

SQF itself has no objects like these

patent abyss
#

Using ChatGPT to learn new scripts and explain basic game functions of Arma 3 is literally the biggest brain move I could ever make

tiny wadi
#

What could be an equivalent for SQF?

hallow mortar
#

Extremely bold of you to assume ChatGPT knows anything about the basic game functions of Arma 3

open fractal
#

learning to read the wiki will get you better results; chatGPT is good at writing scripts that look like SQF but don't actually do what you want

tough abyss
#

creating a logic object with createVehiceLocal and then using setvariable I guess.

open fractal
#

the very first prompt I gave it produced code that doesn't work at all

tough abyss
#

No inheritance though.

#

It simply doesn't exist

patent abyss
#

I understand it won't spill things correctly but it has given me some pretty great insight. I've corrected it, and now it doesn't make the same mistakes. The scripts for warlords that I learned from it work for me

digital hollow
#

Looking for a better way to find the position of the right-angle-vertex of a seat proxy than this:

params ["_vehicle", "_proxy"];

private _averagePoint = _vehicle selectionPosition [_proxy, "FireGeometry", "AveragePoint"];
private _boundingBox = _vehicle selectionPosition [_proxy, "FireGeometry", "BoundingBox"];

_boundingBox select 0 params ["_x0", "_y0", "_z0"];
_boundingBox select 1 params ["_x1", "_y1", "_z1"];

_boundingBox pushBack [_x0, _y0, _z1];
_boundingBox pushBack [_x0, _y1, _z0];
_boundingBox pushBack [_x0, _y1, _z1];
_boundingBox pushBack [_x1, _y0, _z0];
_boundingBox pushBack [_x1, _y0, _z1];
_boundingBox pushBack [_x1, _y1, _z0];

[_boundingBox, _averagePoint] call BIS_fnc_nearestPosition
hallow mortar
# patent abyss I understand it won't spill things correctly but it has given me some pretty gre...

The problem is that it's not actually dispensing understood knowledge. It's dispensing remixed Google results and you've been fortunate enough to receive some that are still in a functional form. There's no guarantee that'll happen every time, and the more obscure your question is the more likely it is that it will just make something up entirely (though this can happen even with easy questions).

digital hollow
#

proxies are selections with 3 vertexes: 1) at position; 2) 2m above; 3) 1m behind. those are in "seat" space, not vehicle space.

little raptor
#

I know. ah that's what you mean by right angle

#

iirc the proxy pos is the "1m behind" one right?

#

if so you can try this:

digital hollow
#

oh? the right-angle is usually the ones right on the seats in vehicles

little raptor
#

then why not use selectionPosition itself?

#

do vertices shift?

digital hollow
#

because sometimes the first vertex is the 2m above one, based on vertex order in the model.

little raptor
#

well in that case just use the average point only

#

no need for BB

#

(also BB is calculated in model space not selection space)

digital hollow
#

that's what I"m doing currently, but for some smaller vehicles like quad bike they cause the position to be a significant portion of vehicle size above the seat, like 0.66 m, being the difference between looking down vs looking up.

little raptor
#
private _averagePoint = _vehicle selectionPosition [_proxy, "FireGeometry", "AveragePoint"];
_vehicle selectionVectorDirAndUp [_proxy, "FireGeometry"] params ["_vy", "_vz"];
_proxyPosModel = _averagePoint vectorAdd (_vy vectorMultiply 1/3) vectorAdd (_vz vectorMultiply -2/3)
#

that's just based on the info you provided blobdoggoshruggoogly

tiny wadi
#

ok

little raptor
#

(i.e. 2m above and 1m behind thing)

digital hollow
#

will try this approach! super cool =)
it's great n_n

Execution Time: 0.0129 ms // selectionVectorDirAndUp
Execution Time: 0.0972 ms
little raptor
#

iirc fire lod res was 7e15

digital hollow
#

Ah, another great tip.

little raptor
faint oasis
#

Hi, i have a question ? How i need to use the leaveVehicle command ? I'm a little bit confused because the wiki is saying "However, to make it more reliable, it is best to move unit out of the vehicle manually with moveOut and force unassign the vehicle with unassignVehicle." but i need to "LeaveVehicle" after "MoveOut" and after "Unassign Vehicle" ? or there is an other order ?

granite sky
#

leaveVehicle is pretty reliable IME.

faint oasis
#

what mean IME ?

#

and i'm asking because i used

[_unit] remoteExecCall ["moveOut", 0];
[_unit] remoteExecCall ["unassignVehicle", 0];

But sadly the plane land directly after

granite sky
#

In my experience

faint oasis
granite sky
#

uh, you called moveOut on a plane and it "landed"?

faint oasis
granite sky
#

That phrasing doesn't make any more sense.

faint oasis
granite sky
#

If you call moveOut on units in an aircraft then they jump out immediately, right

faint oasis
granite sky
#

How did it land without crew? :P

#

Ah whatever. The order doesn't much matter because the AI decisions to re-board a vehicle are slow. If in doubt, leaveVehicle then moveOut.

faint oasis
faint oasis
granite sky
#

No.

faint oasis
#

maybe not because you said it was reliable

granite sky
#

leaveVehicle unassigns anyone in that group who's in that vehicle, IME. I haven't seen a case where it didn't.

faint oasis
#

so it's not a problem if i do that on every units ?

granite sky
#

leaveVehicle doesn't make sense on a unit.

#

There are two levels of vehicle assigning.

#

You assign a vehicle to a group (with addVehicle) and you assign a specific role in a vehicle to a unit (with assignAsXXX or moveInXXX).

#

If you unassign a unit, the group leader may reassign it if the vehicle's still group-assigned.

faint oasis
#

ok but then is it possible to get the assignedvehicle ? of a group

granite sky
#

I think it is in 2.12

#

assignedVehicles

faint oasis
#

because i need to check for every units if their group has a vehicle

#

otherwise, can i use the "assignedvehicle" ? instead of the "assignedVehicles"

granite sky
#

assignedVehicle is just for unit assignments.

#

Different data.

faint oasis
#

yeah but they are in the same vehicle

granite sky
#

If you want them to definitely not get back in the vehicle then you need to remove assignments at both levels.

faint oasis
#

at both levels ? so i need to "unassign vehicle" too ?

granite sky
#

Potentially? It's possible that the vehicle wasn't assigned to the group but the units were assigned to the vehicle.

faint oasis
#

ok so i will

leaveVehicle (group _unit);
unassignVehicle _unit;
moveOut _unit;
faint oasis
granite sky
#

Note that your crew and your cargo should not be in the same group.

faint oasis
granite sky
#

Otherwise leaveVehicle will unassign the crew as well and then they'll try to get out.

faint oasis
granite sky
#

leaveVehicle _group; { moveOut _x } forEach units _group; is sufficient.

faint oasis
#

yeah but you said at both levels so leaveVehicle already do this at both levels ?

granite sky
#

leaveVehicle does both group and unit unassign.

faint oasis
#

ah ok thank you then šŸ˜„

granite sky
#

You shouldn't use remoteExec target 0 for this stuff btw. Should only need to run where the group & units are local.

faint oasis
#

because i tried to put the "group" instead of "0" but it's not working

granite sky
#

yeah you can't put group there. leader _group is fine.

faint oasis
velvet knoll
#

need some help getting this script to work in a trigger

#

hint "Repair, refuel, rearm and heal administered!";
thislist spawn {
{_x Setdamage 0} Foreach _this;
{_x Setfuel 1} Foreach _this;
{_x setVehicleAmmo 1} Foreach _this;
{_x call ace_medical_treatment_fnc_fullHealLocal} Foreach _this;
};

#

trying to figure out whats not working here

hallow mortar
#

It's probably locality problems

#

btw you don't need to make a bunch of separate forEaches, you can just do one.

{
  _x setDamage 0;
  _x setFuel 1;
  // etc...
} forEach _this;```
that's not the source of the problem but something to keep in mind
fleet sand
#

Also can't you just do:

hint "Repair, refuel, rearm and heal administered!";
{
_x Setdamage 0;
_x Setfuel 1;
_x setVehicleAmmo 1;
_x call ace_medical_treatment_fnc_fullHealLocal;
} Foreach thislist;
winter rose
#

although you removed the spawn, mb

winter rose
velvet knoll
hallow mortar
#

Does it perchance give a specific error that might enlighten us on why?

#

I have a feeling it's because you can't have comments in Editor code fields, but reading the error message is step 1

velvet knoll
#

yeah hang on

#

sorry i had to step away @hallow mortar

#

let me try removing the comments and re execute

#

removed them and it executed

#

let me see if it functions

#

new error

#

Got rid of the locality in the script and yet another error

#

Currently script reads as :

{
_x setDamage 0;
[_x, 1] remoteExec ["setFuel", _x];
[_x, 1] remoteExec ["setVehicleAmmo", fullCrew _x select { _x select 3 isNotEqualTo [] } apply { _x select 0 }];
[_x] remoteExec ["ace_medical_treatment_fnc_fullHeal", _x]; } forEach thislist;

fleet sand
#

use !code and ace_medical_treatment_fnc_fullHeal isnt the same fnc as ace_medical_treatment_fnc_fullHealLocal

#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

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

// your code here
hint "good!";
velvet knoll
#
{ 
  _x setDamage 0; 
  [_x, 1] remoteExec ["setFuel", _x]; 
  [_x, 1] remoteExec ["setVehicleAmmo", fullCrew _x select { _x select 3 isNotEqualTo [] } apply { _x select 0 }]; 
[_x] remoteExec ["ace_medical_treatment_fnc_fullHealLocal", _x]; } forEach thislist;
hint "good!";
#

hmm....

hallow mortar
#

The hint "good!"; is to demonstrate the code formatting, you don't need to keep it

velvet knoll
#

ah okay, right

#
{ 
  _x setDamage 0; 
  [_x, 1] remoteExec ["setFuel", _x]; 
  [_x, 1] remoteExec ["setVehicleAmmo", fullCrew _x select { _x select 3 isNotEqualTo [] } apply { _x select 0 }]; 
[objNull,_x] remoteExec ["ace_medical_treatment_fnc_fullHealLocal", _x]; } forEach thislist;
hallow mortar
#

ace_medical_treatment_fnc_fullHealLocal should be the right function to use, not the other one.
The error you got when using it appears to be internal ACE Medical stuff, not something you've directly caused. It seems like some part of ACE Medical was not initialised. I don't know why, there could be many reasons. Make sure whatever setup ACE needs to run properly in the mission is done correctly, I guess.

velvet knoll
#

I havent changed any of the CBA/ace settings, but I'll import the ones I usually use and see what happens

#

imported the settings and still getting that same issue, ive never seen that before

hallow mortar
#

You also have KAT Medical running. KAT Medical changes some ACE functions in order to work with them. The modified function attempts to reference a KAT variable which is not defined. Why the KAT variable is not defined is not something I can figure out for you.

velvet knoll
#

thanks for the heads up, I have this function running as an addaction elsewhere and it works fine

#

but for some reason i cant get it to work on a trigger

opal zephyr
#

Hi, I'm having some problems with unit traits. It seems that changing a trait in zeus isnt actually changing what "getUnitTrait" returns, it remains the same as whatever it was set to at mission start.... Is this a known issue?

little raptor
#

which unit trait?

opal zephyr
#

"ExplosiveSpecialist"

little raptor
#

can you even change unit traits via Zeus?

#

I don't remember ever seeing it

opal zephyr
#

Hold on, let me double check if I have any zeus mods loaded

#

Ok, its probably zeus enhanced that adds that feature, likely something wrong with that then, thanks!

manic kettle
#

You can with achillies, maybe zeus enhanced too

tough abyss
#

1000 bullets.
My game would die even without any scripting with that amount of bullets

#

It certainly would have a negative effect on performance, but I doubt it's measurable.

#

Bullets don't die THAT frequently

snow monolith
#

Anyone ever delve into the attachto script with player memory points?

sullen marsh
#

If I were implementing that i'd have a flag on the bullet

#

Which is set when the eh is added

#

when its destroyed it checks if the flag is true

#

if it is then it handles the eh

#

Which means the performance impact would be almost literally 0

#

a single execution if statement, not even in a loop, isn't worth considering

#

Also, for everyone who'd like to see that EH, can you please add a comment if you can think of any uses you'd put it to

snow monolith
#

hello?

#

hi

sullen marsh
#

Hi

#

I know Nou did stuff with attachto on memory points at one point

snow monolith
tough abyss
snow monolith
#

I understand it isn't the most important issue, but I was wondering why the skeleton is like that for player characters

#

Yes, it is and no I am not

#

I think I will live, besides I am leaving next week forever.

#

Anyone have any input on the memory points?

dense pine
#

hello everybody.

I am new here and in the arma mod community, and i am trying to make a Guitar model that i create to be an item in game, that the player can take it and use it. My intentions is to make appears in the inventory and then use like a weapon, not to shot or do damage, but to hold in the hand and then in the future, play a animation of the character playing.
I don't know how to make a script to make this.
All the help is appreciated.
Thank you.

snow monolith
#

How much have you actually have completed?

#

Christ what did I type

#

What all have you finished of your idea?

dense pine
#

i created the script for the texture,material, physics

#

but i actually have no idea how to make the guitar a usable item

snow monolith
#

Did you set up a config to physically put the model in the game?

dense pine
#

yes

snow monolith
#

Okay

dense pine
#

it's already working in the editor

meager granite
#

Huh, "Init" event handler gets called on assembled gun or vehicle each time you assemble it

#

Despite it simply being hidden when you disassemble it, entity doesn't actually respawn when you assemble it again

snow monolith
#

So you need to know how to put it in your inventory and use it, just so we are clear?

dense pine
#

yes

#

almost like a weapon

still forum
#

disassembled guns are the most fun thing in Arma

#

We once disassembled a MG while the gunner was still inside, he was then stuck inside the gunbag, and we could put him on our backs and carry them around with us

meager granite
dense pine
#

cause the intention is to the character to hold the guitar just like in real life

meager granite
#

The best part about assembling something is when it jumps and dies from collision damage instantly after being assembled

#

Speaking about UAV AI units, is there a system in place to ensure that they don't get damaged from their vehicle getting damage? Are UAV seats just protected from inheriting the damage or there is something else going on?

#

Did few tests with vanilla assets, didn't see UAV AI units get damage at all šŸ¤”

snow monolith
#

Well I mean, you would also need an animation for that

dense pine
#

yeah

#

but i am trying to discover things little by little haha

snow monolith
#

Yeah, I get you, I don't even know half the shit that you are able to do

dense pine
#

seems to be a lot of stuff to discover still

#

do you have any ideas how can i make this happen ?

snow monolith
#

You have to put it under a certain config so that it appears as a certain item

meager granite
#

Certified Arma moment

#

GroupDeletedWhenEmpty flag is false too

snow monolith
#

So like if you wanted to add an item for example you would put it in classes like this

#

class cfgWeapons
{
class InventoryItem_Base_F;
class ItemCore;

winter rose
snow monolith
#

And then you can add your own class for your specific item

#

Like

#

class Tsugoro_Guitar;

#

{

#

ALL YOUR PARAMETERS HERE

#

}

#

And there are quite a few parameters like the displayname, item picture, model, texture, etc.

#

That would be in your Config.bin, by the way

dense pine
#

so the class cfgweapons would make the model collectable?

tough abyss
#

The class in cfgWeapons IS the item.

dense pine
#

oh i see

tough abyss
#

the model is just a property of the item/weapon whatever

#

You could have 10 compeltely different weapons/items with the same model

snow monolith
#

That's just the hierarchy that it starts with and then you "define" it further with class ItemCore or however you want to explain it

#

I guess you could keep it in just cfgWeapons if you want, but that wouldn't be very productive

tough abyss
#

Where else?

snow monolith
#

what?

#

No, I mean just without any "sub-configs"

#

I don't know exactly what you want to do with the guitar, like make it a launcher or what

#

or just an item

dense pine
#

just an item to be hold it

#

then further on an animation

snow monolith
#

Well like, if you want to hold it like a weapon, you might have to put it in as a launcher or pistol or where ever you decide

dense pine
#

i would have to turn the model into a ''weapon''?

snow monolith
#

If I were doing it, but this is just me, I would put it in as an item and use the ACE menu to start an animation/sound

#

But I don't really play without ACE

#

It would be kind of interesting to put it in as a launcher so you can physically see it in your back

dense pine
#

that's actually a awesome idea

#

is it possible?

snow monolith
#

Sure

dense pine
#

wow,didn't know that

snow monolith
#

You might want to get help from the model makers on that though, because I think there is a certain bone structure or something that you might need to have for a launcher, correct me if I am wrong

dense pine
#

oh ok

open tendon
#

Hey anyone knows for TFR mod, variables like TF_defaultWestBackpack should those not be available on the server too?

snow monolith
#

I really don't know the answer to that

dense pine
#

but , you can help me with the script ?

snow monolith
#

@open tendon that sounds like a mission specific thing

dense pine
#

kind guide me through it, cause i am to newbe at scripting

snow monolith
#

You can open up the config of any mod and check to see how they did their class

#

What is your config for getting the guitar in the game?

dense pine
#

what do you mean?

drowsy lance
#

@open tendon I define my TF settings in the Server Init and PV them.

#

it works, but not the only way probably

open tendon
#

Good idea Anog, I see now on their github the variable is set in clientinit, that explains it

drowsy lance
#

Example:
// No TFAR Backpacks on spawn. No!!
tf_no_auto_long_range_radio = true;
publicVariable "tf_no_auto_long_range_radio";

coarse dragon
#

Anyone know a way to get an osprey to land. I've tried the invisible helipad thing. But they just won't land

snow monolith
#

@dense pine You said it works in the editor as an object?

open tendon
#

Thanks, I think I'll work it out from here :)

proven charm
#

what's the purpose of the landing?

coarse dragon
#

To drop off troops

dense pine
#

@snow monolith yes, but i just spawn it there in the editor

proven charm
#

ok well for waypoint "TR UNLOAD" should work

coarse dragon
#

Yea that doesn't also the troops have a get out waypoint

proven charm
#

try removing the get out wp

#

leave only "TR UNLOAD"

coarse dragon
#

They the squad leader orders men out of the chopper. And it lands and drops off 3 or 4 guys

proven charm
#

did you create the helo via script or editor?

snow monolith
#

So you have to have some kind of config set up to actually have it included in the game?

coarse dragon
#

Just in the editor

proven charm
#

ok then "TR UNLOAD" should work if you put that for the helo group

#

i know landings in arma isnt always easy but you can also try (vehicle this) land 'LAND';

coarse dragon
#

On the init of unload?

proven charm
#

wp activation maybe

coarse dragon
#

K thanks

proven charm
#

or from script

snow monolith
#

Something like this?

#

class CfgVehicles
{
class ThingX;
class murshun_armbands: ThingX
{
mapSize = 0.31;
_generalMacro = "murshun_armbands";
scope = 2;
scopeCurator = 2;
model = "\murshun_armbands\murshun_armbands.p3d";
icon = "iconObject_1x1";
vehicleClass = "Tents";
destrType = "DestructNo";
cost = 100;
};
};

#

In a config.bin folder with your mod?

celest agate
#

Hi. We are using the attached script to spawn in 3 "hitboxes" for a character that is larger than the bounding box. The hitboxes are then attached to the character and used for routing damage into the player.
We are having issues when loading onto a MP server. If you choose a player slot into the character, it works as expected. It creates 3 boxes and attaches to the player. When you drop an AI down via zeus, it does the same but in addition also spawns 3 additional hitboxes but does not attach them to anything, he just leaves them behind (pictured). Again, only does this on AI characters dropped in via zeus, not player characters. Any ideas ?

dense pine
#

mine is just like this
class CfgVehicles
{
class Items_Base_F;
class Guitar : Items_Base_F
{
scope = 2;
model = "\Guitar\Guitar.p3d";
displayName = "Guitar";
vehicleClass = "small_items";
};
};

#

on a config.cpp

granite sky
#

Where are you putting this code?

snow monolith
#

Wait what are we trying to achieve right now?

#

Make it into an item?

dense pine
#

when i spawn in the editor

celest agate
#

It's in a mod. Specifically it's in a seperate addon which is then called up by config.cpp in the main addon directory

dense pine
#

i can not interactive with it

snow monolith
#

Yeah, I know what you mean okay

#

It should go into

dense pine
#

like scroll and pick up item, and then in the inventory appears on your hand

snow monolith
#

class CfgWeapons
{
class Items_Base_F;
class Guitar : Items_Base_F
{
scope = 2;
model = "\Guitar\Guitar.p3d";
displayName = "Guitar";
vehicleClass = "small_items";
};
};

young current
#

I think he means where is the code initialized in live game? is it in the units init eventhandler config or in say init field mission attributes of said unit in editor?

dense pine
#

or something like that

snow monolith
#

That isn't fully right for CfgWeapons, but it would be in the CfgWeapons not CfgVehicles

dense pine
#

ohh

celest agate
#

Not quite sure how to answer that tbh.
This is in the config.cpp?

class Extended_InitPost_EventHandlers {
    class BT_BME {
        class BT_InitEventHandler {
            onRespawn = true;
            init ="_unit = _this select 0; if ((local _unit)) then {_unit execVM ""BT_Terminator_AceScripts\Scripts\fn_initHitbox.sqf""}; ";
        };
    };
};
dense pine
#

so what's the difference between?

snow monolith
#

CfgVehicles would be just something like a building or sandbags or an actual vehicle

tough abyss
#

or soldiers

snow monolith
#

ye

dense pine
#

oohh ok

#

so if i just change to a cfgWeapons it would work?

snow monolith
#

I mean, you would still need additional scripting for the animation but I guess so

dense pine
#

the animation to pick up the item from the inventory?

granite sky
#

That's a sufficient answer.

#

Are you running any headless clients?

celest agate
#

There is yes. I did try using the isServer and variants to stop it running on a headless but that didn’t fix it. Also tried it on a server with no headless and it still did it

snow monolith
#

no for actually using the guitar

dense pine
#

so let see, if i change to cfgWeapons i will be able to pick up the guitar?

granite sky
#

And you're not putting these AI into player groups?

dense pine
#

or i still have to add some other commands?

granite sky
#

Thinking locality switch here.

somber folio
faint oasis
#

Hi, i have a question ? Is it possible to move out units from a plane without the plane land directly after ?

[] spawn {
    private _ggroup = mygroup;
    private _gveh = (vehicle (leader _ggroup));
    _ggroup leaveVehicle _gveh;
    
    {
        moveOut _x;
        
        sleep 1;
    }forEach (units _ggroup);
};

When i'm using a "sleep", every thing i did, still order the plane to land. I don't know what to do so is there a way to do that without sending a land order to the plane ?

the "leaveVehicle" command probably send a get out order and obviously without parachute, the plane is landing.
the "moveOut" command, probably send a get in order when they are in the air and the plane want to land to allow units to get in.

digital hollow
#

publicVariable to clients, perhaps?

granite sky
#

@faint oasis So what orders is your crew group on?

faint oasis
#

i'm order them to get in, and directly after i moved them into the plane

#

so the get in order is completed

granite sky
#

This is really poorly described :P

#

I mean, what are the crew group actually doing at the point when you run the script above?

faint oasis
granite sky
#

They're the crew? They're not waiting, they're flying the damned thing?

faint oasis
#

i order the plane to go where i want and when it is above where i need to drop the units then i run the code

faint oasis
kindred zephyr
celest agate
faint oasis
granite sky
#

Nowhere near that stage. Don't have enough information. Make a demonstration mission maybe.

kindred zephyr
#

its the same as any other namespace, the only difference its that its just available to the server.
Missions that have persistency/security measures/scoring systems usually do stuff here

little raptor
faint oasis
little raptor
#

all of them must be unscheduled

#
isNil {
  { moveOut _x } forEach _units;
  _units orderGetIn false;
  _group leaveVehicle _veh;
}
#

if you have many units it'll probably get laggy tho

faint oasis
#

ah yeah ok but i tried in an unscheduled environment but the problem is i want to get a sleep between

#

but i think the real problem is coming from the sleep

little raptor
#
isNil {
  moveOut _x;
  [_x] orderGetIn false;
};
sleep 1;
faint oasis
#

ok i will try then but i still need to use leaveVehicle ?

little raptor
#

I guess so blobdoggoshruggoogly

#

you need it eventually

#

you can try it first like you have now

#

or after all units are out

faint oasis
#

so it's like

[] spawn {
    isNil {
        moveOut _x;
        [_x] orderGetIn false;
    };
    _x leaveVehicle _veh;
    sleep 1;
};
little raptor
#

I guess the second one is safer

kindred zephyr
#

If this is the case, wouldn't it be best to focus on whenever anyone but the server can access and parse the variable to players?

That makes me wonder:

Is there a way to make variable read only without compiling them?

little raptor
faint oasis
little raptor
#

I mean remove the spawn

faint oasis
little raptor
#

what on earth is that anyway? meowsweats

#

you already have a spawn in your own code

faint oasis
#

ah yeah but actually this was an example

#

i won't put 2 spawns

little raptor
granite sky
#

Note that if you didn't addVehicle the group in the first place, you can skip the leaveVehicle and just unassign each unit individually.

little raptor
#

oh right that too

#

I forgot unassignVehicle

#
isNil {
  moveOut _x;
  [_x] orderGetIn false;
  unassignVehicle _x;
};
faint oasis
#

actually i order the group to get in and after i move them inside so i don't think a vehicle is assigned to the group. I checked "AssignedVehicles" but it return an empty array

kindred zephyr
#

this is ok as long as the updates to the variables are often enough to deter the change playerside I would say.

Have you taken a look to localNamespace? You cannot send data over network in there, both in or out so you add another layer of security in order to make the variable be completely secluded from changes

[localNamespace, _hashmap] remoteExec ["setVariable" ,-2];
```?
faint oasis
kindred zephyr
#

would it be possible to add at this point in arma another namespace that would let only server write to it but have client be able to take from it?
Or is this something that must be done using compile and remoteExecution trickery?

#

depending on how often you need to update the variable on player side, you might not be required to actually store it?

Like, for example if you want to be able to totally avoid it being changed ever by anyone but the server, I could see a simple get/set system in which the player ask for the variable to the server, the server answer and hand the variable as an argument but not as an stored value for your function in order to completely avoid this issue, the player would then answer back and the server will only update on its side until required to pass the value again.

But at what point it becomes more of an issue the frequency of updated against the security of your system?
Im not well versed on networking sadly

high vigil
#

so when you using attachTo for two objects that were created using createVehicleLocal is this still a GE ?

grand stratus
#

I think depending on what the 'effect' of a player having hacked their own variable value has could be useful information. For example if they have a variable thats controlled serverside, which the client then uses to dictate which type of squad members to create client-side (via Ui button), then there would be no good way to prevent a cheater from spawning whatever vehicle they wished.

If you made it so the client recieved the information so the Ui could display "Spawn a Grenadier", and upon clicking the button they send a remoteExec 'request' back to the server, where the server would confirm that the requested "soldier to spawn" was equal to the type the server intended - this could potentially address the problem.

serverSideVariableOFTRUTH = "B_soldier_F";
clientSideDisplayVariable = serverSideVariableOFTRUTH;
clientSideDisplayVariable -> send to the client. (through public var, remote exec, ect)

client recieves clientSideDisplayVariable and updates ctrlButton text = "Spawn a Rifleman!";
client can alter clientSideDisplayVariable to whatever it wants, and then clicks the button.
client sends spawn request to server. 

server recieves request and compares serverSideVariableOFTRUTH == "The solider requested from the client"

Now you know whether or not the server should spawn the infantry based on if they match, or if the person is cheating.

E.G; just having all networked global variables as 'display variables' for the client, have them send back requests using those values, which you compare to the actual values used on the server side to detect cheaters. Only issue would be the additional cost of having to do certain things on the clients behalf (If they request a new soldier once a minute who cares), or if the client has to be in charge of executing the functionality the variable is tied to on the client side (setting view distance ect)

narrow isle
#

How do you call alpha 1-1 In a script?

#

Like in Eden? It doesn't like spaces or hyphens at all.

little raptor
#

you give the object/group a variable name and use the variable

narrow isle
#

Oh shit. I'm just now realizing this!

#

Dude. I never even thought about that. I've been so wrong!!

austere granite
#

If you put it in cfgWeapons you can put it in inventory (And interact with it)

stable dune
#

Hi,
When I enable Editable object Zeus from Eden attributes.
Can I disable this from certain items or have I create those simple object or something else?

digital hollow
stable dune
#

Awesome. Thanks.
Is that only via script or is there config value for this ?

digital hollow
#

Config doesn't really come into this. scopeCurator affects whether something shows in the create tree.

dense pine
#

ok

#

would i be also be able to hold it like a weapon/

tough abyss
#

how would i hard lock a multiplayer mission into first person?

red rune
tough abyss
#

sorry

foggy stratus
#

I'm looking for the path and .paa name for the Old Man sick wound textures (the infected skin on units with boils). I looked at these "sick" units in the config viewer, under wounds and could not find it. Also, would I need the object material RVMats for this also? I want to apply this infected texture to another object via setObjectTexture.

limber heart
#

How do i make it where popup targets will actually pop up again on a scroll wheel option

austere granite
#

Not just like that afaik. Really though it's more of a model/config question.

dense pine
#

oh ok thank you

pulsar bluff
#

im having issue with MP sync of empty/invisible marker. is this a known thing? placed in editor, in dedi MP moving its pos on server, but tge pos is not moving on client

meager granite
#

setMarkerPos?

#

Very much doubt there are any special conditions for marker being invisible, maybe you mixed something up and markers are different on each client (different name?)

#

or you're storing its position somewhere and not updating

pulsar bluff
#

yeah setmarkerpos from server is not moving them on client

#

same code exec on client moves them

#

only difference is they are ā€œemptyā€ type

#

other markers working fine :/

meager granite
#

@still forum How does engine figure out distance check for "Assemble" action to be shown? I tried to pin down the number by checking distance between weapon holder and player with distance command and its far from being any round number of 2.57something. getNumber(configFile >> "CfgActions" >> "Assemble" >> "radius") isn't there either, so what does the engine do exactly?

#

I want to create my scripted "Assemble" action but it shouldn't show if there is engine one shown already, thus I need to know how to check for it.

pulsar bluff
#

hmm, "isEngineOn" returning true for this box? šŸ˜„

#

hmm isEngineOn actually returning true for lots of things :\

still forum
meager granite
#

Not sure who at BI needed to check engine of the building running šŸ¤”

#

Unless its used for targeting, like check if entity has engine running so it can be targeted?

pulsar bluff
#

what about for "thingx" or boxes/etc

meager granite
#

So alive buildings can be targeted and dead ones can't

little raptor
meager granite
#

Ground weapon holders have memoryPointSupply and supplyRadius, but I still can't figure out the formula no matter what I try

#

Gib BOOL = ENTITY canReachSupply ENTITY

#

Usage would be player canReachSupply _weapon_holder

#

You can do assemble action at any time thronking

#

Nice feature

#

Not when falling though

#

When swimming too

pulsar bluff
#

i mean people can do dumb things IRL in those situations too

meager granite
#

Yeah, people spawn their drones in the wall in front of them all the time IRL šŸ¤“

#

That Assemble action always positions the vehicle in front of you so you can guess what happens there, it just dies inside the wall

#

What could be useful is disableGameAction command to just forbid certain actions from appearing in action menu

#

So engine-driven actions can be hidden and properly scripted one created

#

"Assemble" disableGameAction true;

#

Or inGameUIDisableAction to be in line with inGameUISetEventHandler

still forum
meager granite
#

Or disableAction

#

"Assemble" disableAction true - disable Assemble completely
"Assemble" disableAction [_tripod_weapon_holder, true] - disable the action on a specific vehicle

quiet gazelle
#

How do i save data i calculate with scripts running in 3den so that it is still present when i run the mission/reload 3den?

quiet gazelle
#

Wouldn't that make the saved things profile dependent?

meager granite
#

Yes it would

#

You can use it during development but then export your pre-calculated data manually into some script before release?

quiet gazelle
#

No

#

I'm making a mod that adds trenches, the placement and connecting of which uses scripts to know how they interact.

I don't want the users of the mod to have to go through an extra step when creating missions using them.

sullen sigil
#

Not possible without using profile saving if you're not going to put a module or something in 3den with this info

quiet gazelle
#

how do modules work?

sullen sigil
#

however you want to make them work

quiet gazelle
#

so i guess i can save gobal variables into a modules attributes?

still forum
#

You can save it into object attributes

#

You can access object attributes via script. so you could add a (invisible?) text field where you store the data.
Calculate inside 3den, and set attribute https://community.bistudio.com/wiki/set3DENAttribute
And give it a expression (in config) that runs at mission start that retrieves and handles that data

quiet gazelle
#

great

#

is there a way to save references to other objects that way without giving them global variable names?

still forum
#

I don't think so.
Every entity has a "id" in mission.sqm. Maybe you can get that via attribute but dunno how to get it ingame when mission actually runs

#

seems like you can't

quiet gazelle
#

i just realized i already have my own system of giving my objects unique "ranks".
i guess i can use that as a system for IDs aswell since i'm gonna save those as an attribute anyways

quiet gazelle
#

where can i find documentation of how to do custom attributes?

#

nevermind found it now

wind hedge
#

guys, if I have an array with many uniforms that are the same, and then I do this: sqf _selected = selectRandom _uniformArray; _uniformArray deleteAt (_uniformArray find _selected);

#

Will that delete just the uniform once or will it delete all the uniforms in the array that are the same?

quiet gazelle
#

the first instance only

wind hedge
meager granite
#

deleteAt returns the value it just deleted

quiet gazelle
#

it could delete an item that is not the first instance of its kind

meager granite
#

Doubt it matters here

quiet gazelle
still forum
#

postInit functions are scheduled/async

#

it will start simulation before they are done

winter rose
#

wait, no yes partially
it's that the note does not apply to postInit function at all @quiet gazelle

quiet gazelle
#

so which is it now?

#

also is creating thousands of objects during init something i can do in multiplayer or will it just break due to network load or something?

#

the alternative would be to create all those objects as 3den objects and having them be part of the mission file that way

winter rose
#

ah

(clarify Scheduled env properties for postInit / init.sqf (SP only))

#

except that he didn't set that in the note itself -_-

quiet gazelle
#

Alright

winter rose
#

no

hallow mortar
#

No, because remoteExec causes the command to be executed somewhere else, and it's very unlikely the other machine could send back a return in time to be used the same way

winter rose
#

it returns the JIP identifier and that's it - it's "send and don't care" ↑

hallow mortar
#

It can also be sent to multiple targets, so even if it could wait for a remote return, lord knows what you'd get back

#

If you're executing a custom function, you can use uhhh remoteExecOwner? to target the originating machine for a manual callback

winter rose
#
private _playerNames = [{ name player }] remoteExec ["call"];
// waits for 10s
// _playerNames is now ["joe 1", "joe mama", "hello there", "general kenobi"];
```šŸ˜†
somber folio
meager granite
#
diag_log text format ["%1: MY SCRIPT JUST GOT EXECUTED", diag_frameno toFixed 0];
#

Check if its done on the same frame

winter rose
#

@celest agate / @somber folio same person?

meager granite
#

If not, maybe something else does the init again

somber folio
meager granite
#

Also make sure its really the only place you call your function from

#

Change your EH to something like:

class Extended_InitPost_EventHandlers {
    class BT_BME {
        class BT_InitEventHandler {
            onRespawn = true;
            init ="_unit = _this select 0; if ((local _unit)) then {diag_log 'About to execVM the fn_initHitbox!'; _unit execVM ""BT_Terminator_AceScripts\Scripts\fn_initHitbox.sqf""}; ";
        };
    };
};
#

If your function is called from elsewhere, it will call it but there will be no log

#

Then you'll have to search where its calling from needlessly

#

Not sure how Extended EHs work, I don't use CBA, but you can at least filter out some of the possible causes

somber folio
#

yeah will try this, thanks mate

meager granite
#

Also this copy-pasted code pains me meowsweats

kindred zephyr
#

atleast is not gpt

meager granite
#

Also you can make it JIP compatible by doing:

remoteExec ["spawn", 0, _BT_HITBOX_MID];
```(and each of your parts) it will execute code for newly joined players and JIP will get removed when entity gets deleted.
still forum
winter rose
still forum
#

Maybe the sp only was referring only to the init.sqf part
But that must be scheduled, people depend on jt

meager granite
#
{systemChat str 123} remoteExec ["call", 0, player];
{systemChat str 321} remoteExec ["call", 0, player];
```will this queue 2 calls for JIP?
still forum
meager granite
#

Wondering if supplying same entity for JIP will overwrite previous exec in queue šŸ¤”

#

Did

{diag_log str 123} remoteExec ["call", 0, player]; 
{diag_log str 321} remoteExec ["call", 0, player];
```RPT of connected client:

21:41:54 "123"
21:41:54 "321"

21:43:39 "321"

#

So yeah, having same entity in remoteExec JIP parameter overwrites it in queue

#

Not very mod-friendly to be honest

#

Can only be safely utilized on mission-level making sure you don't overwrite your own stuff

still forum
#

JIP ID is extra field after object right?

meager granite
#

params remoteExec [order, targets, JIP]

still forum
#

I'd think it should still ...

#

Oh

meager granite
still forum
#

You can do Array right? Maybe array with object at start

granite sky
#

We ended up with a ton of custom IDs and removal mechanisms for different bits of Antistasi

still forum
#

Doesn't object as JIP have special meaning? Aka only JIP to that object or smth

granite sky
#

well, it deletes the JIP entry when the object is deleted. Allegedly.

#

which is nice if you can get away with only having one of them.

meager granite
#

I'm curious how it does the delete šŸ¤”

#

Does it check if JIP handle is in netid format and tried to convert it to object?

final harbor
#

Hello, tell me how to find hiddenSelections[] if the 3d model is not available (abandoned)? Maybe there is some code like copy To Clipboard getText (configFile >> "CfgWeapons" >> "arifle_MX_F" >> "model");, only for hiddenSelections[] ?

meager granite
#

Huh, I just did:

{diag_log "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"} remoteExec ["call", 0, "2:1563"]
```checked that it logs for JIP, then I deleted the vehicle and new joins didn't log anything
#

Bet engine does a regex check if JIP handle matches netid format or something

willow hound
#

Read the docs šŸ˜›

granite sky
#

Object, Group or netId - The persistent execution of the remoteExec statement is attached to the given object or group.
When the object / group is deleted, the remoteExec statement is automatically removed from the JIP queue

meager granite
#

Yeah it doesn't seem to actually store the object in the queue, only its netid string

#

Thus the overwrite

granite sky
#

Are you sure? Have you tried creating two remoteExecs with an object and its netId?

hallow mortar
still forum
#

Something something on object delete smth know JIP smth remove smth

#

Worst case, on every object delete it checks all JIPs to remove some

#

Looked at how that works.... 2 years ago

meager granite
#
{diag_log "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"} remoteExec ["call", 0, "2:123"]
22:00:37 Trying to call remoteExec(Call) with a null-object as JIP ID ('2:123')
#

So yeah, JIP handles that looks like netid aren't allowed if they don't match some vehicle's netid

still forum
#

If everything had such good error checking šŸ˜„

granite sky
#

Question is what JIP clients get if you do this:

{diag_log "123"} remoteExec ["call", 0, _object]; 
{diag_log "321"} remoteExec ["call", 0, netId _object];
#

right

meager granite
granite sky
#

lol wat

meager granite
#

Restarted the game, now only

22:11:46 "DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"
#

WTF is going on thonk

#

Oh wait, I had another AAAAAAAAAAAA log from earlier experiments left

#
{diag_log "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"} remoteExec ["call", 0, "a2:156311"]
#

added a before the number and it treated it as valid JIP handle

#

So yeah, supplying entity into remoteExec is a mere shortcut from doing netid _object

#

Though it uses netid to check if object was deleted before executing queue item

#

So no, that was due to my mess up

#

Deleted messages with wrong results to not confuse anybody who sees\finds them later

granite sky
#

ok.

meager granite
#

So, summary of all tests:

{diag_log "123"} remoteExec ["call", 0, player];
``` is identical to
```sqf
{diag_log "123"} remoteExec ["call", 0, netid player];
```and will overwrite each other in the queue for JIP
hallow mortar
#

it might be useful to know what the error is

meager granite
#

Using netid that starts with 0: works like any other handle:

{diag_log "AAA"} remoteExec ["call", 0, "0:123123"]
```If netid starts with `1:` it throws additional error:
```sqf
{diag_log "AAA"} remoteExec ["call", 0, "1:123123"]

22:26:01 Object id Veh-123122 is not static
22:26:01 Trying to call remoteExec(Call) with a null-object as JIP ID ('1:123123')

granite sky
#

Well, the code should still be remoteExec'd, whatever it is.

#

client doesn't even get to see the JIP ID.

meager granite
#

Seems to be realiable, attaches to map objects by their "1:X` netid and executes for JIP

meager granite
granite sky
#

You mean with map object as target rather than JIP ID?

meager granite
#

Yes

#

Using cursorTarget on some far away map building returned handle of "1:-1680485812", code executed for JIP (that part of the map wasn't streamed in for sure), and objectFromNetId returns correct building too.

#

Seems to be pretty reliable

#

Still sucks we can't stack multiple JIPs against same entity

fleet sand
#

Question does anybody know how to get texture or material of a malaria disease from old man scenario ?

fleet sand
#

That is setting just a face what about arms and legs. So the malaria isnt just like a overlay texture or material ?

digital hollow
#

These perhaps?

\a3\characters_f_oldman\Heads\Data\hl_sick_black_mc.paa
\a3\characters_f_oldman\Heads\Data\hl_sick_mixed_mc.paa
\a3\characters_f_oldman\Heads\Data\hl_sick_white_mc.paa
\a3\characters_f_oldman\Heads\Data\m_sick_black_mc.paa
\a3\characters_f_oldman\Heads\Data\m_sick_mixed_mc.paa
\a3\characters_f_oldman\Heads\Data\m_sick_white_mc.paa
quiet gazelle
winter rose
#

^yup

fleet sand
little raptor
modern meteor
#

Sorry, I have a basic question. How can I move a group of AI units to consecutive waypoints? Where a1, a2, a3 are different objects and I want to group to move form a1 to a2 and then to a3?

winter rose
#

they will simply move in the addition order

modern meteor
#
_wpgroup = units group player -[player];
targetwp = _wpgroup addWaypoint [player, 0];
targetwp setWaypointType "MOVE";

But this gives me an error.

#

Not sure why?

#

player is just an example for an object

hallow mortar
#

What is the error?
I suspect order of operations problems in the first line.

#

Also waypoints can only be given to actual groups, not just a list of units

modern meteor
#

addWaypoint: No syntax matches theses arguments . ARRAY addwaypoint ARRAY

winter rose
#

not to an array of units

hallow mortar
#

"group" in Arma is a specific entity type, not just the generic term for an arbitrary collection of units

winter rose
#
{
  group player addWaypoint [getPosASL _x, -1];
} forEach [a1, a2, a3];
little raptor
#

alternatively you can run a loop that checks if the unit has reached his destination then add another one

modern meteor
#

I see. I wasn't aware that "group" is a specific entity. Thought I can create the group myself.

hallow mortar
#

Well, you can createGroup and then join the units into it

little raptor
modern meteor
#

Yea, makes sense

digital hollow
#

If you just want the AI to return to formation, you should use doMove instead of adding waypoint.

modern meteor
#

I want to keep the units in my group

meager granite
#

I wonder how complex that netid check is

still forum
#

the objects thingies things

meager granite
#

As in, can we have it remove JIP queue items that start with netid instead of matching it?

#

so we can do ```sqf
_args remoteExec ["func", 0, format ["%1 my unique JIP name", netid player]];

quiet gazelle
little raptor
#

another way is saving your data to mission.sqm directly (but I don't recommend it)

fervent wyvern
#

hi, i'm trying to create a dialog using CT_EDIT but i all the things i try doesn't work, does someone know how it works or have an example?, i'm using the example the wiki use but it doesn't work

little raptor
#

there are several ways blobdoggoshruggoogly

#

one way would be create a unit then put the data in his init field (you can do that using 3den commands)

#

another way is writing to mission.sqm directly (but I guess you can't unless it's unbinarized)

#

actually you can read the data using loadConfig even if it's binarized then you can save it unbinarized... oof nvm that's too messy meowsweats

final harbor
#

Hello, tell me how to find hiddenSelections[] if the 3d model is not available (abandoned)? Maybe there is some code like copy To Clipboard getText (configFile >> "CfgWeapons" >> "arifle_MX_F" >> "model");, only for hiddenSelections[] ?šŸ˜„

meager granite
#
{diag_log "000"} remoteExec ["call", 0, "2:123"];
{diag_log "111"} remoteExec ["call", 0, "2:123 stacked 1"];
{diag_log "222"} remoteExec ["call", 0, "2:123 stacked 2"];
{diag_log "333"} remoteExec ["call", 0, "2:123 stacked 3"];
```If queue got cleaned up by checking if string starts with netid instead of just exact match, we could've had stacked queue against single entity
meager granite
#

getArray(configFile >> "CfgWeapons" >> "launch_RPG32_F" >> "hiddenSelections") => ["Camo_1","Camo_2"]

meager granite
#

Unless its done the other way, by going through all handles and converting netids to objects, then its a bit of a problem šŸ¤”

quiet gazelle
#

is there a way to create a super-simple object as a 3den object?

modern meteor
#

Sorry, still confused. How would I proceed from here to move the AI in player's group to the destination of the enemy?

singletarget = player findNearestEnemy cursorTarget;
group player addWaypoint [getposASL singletarget, -1];

AI is not moving.

little raptor
little raptor
#

not the units in the group

#

that waypoint is telling you where to move

#

the AI just follow you along

fervent wyvern
meager granite
#

Your display class code

modern meteor
#

So there is no way to instruct the squad AI to move to the enemy via added waypoint if I do not create a seperate group for them?

little raptor
modern meteor
#

doMove is not an option for me because it is part of a loop and doMove creates a stutter step. That's why I thought addwaypoint would be a solution.

modern meteor
grim pasture
#

is there a way to add or edit a value in configs during a mission?
I want to generate a certain value for each group defined in my CfgGroups.hpp file at the start of the scenario and don't need to actual file to change

modern meteor
#

Or maybe I can use doMove in combination with moveToCompleted? And then give the unit a new target.

fervent wyvern
meager granite
meager granite
foggy stratus
grim pasture
meager granite
fervent wyvern
meager granite
#

Are you sure GUI_TEXT_SIZE_MEDIUM is defined?

#

Do you have #define GUI_TEXT_SIZE_MEDIUM somewhere above?

#

Where do you have your config anyway? Inside description.ext?

fervent wyvern
#

i have it define in another .hpp

meager granite
#

Are you sure that another .hpp is included properly before your RscEdit config?

little raptor
# modern meteor I got itl. My problem is that I do not know how.
_unit1 setVariable ["my_waypoints", [ASLtoAGL getPosWorld obj1, ...]];
_unit2 setVariable ...

[[_unit1, _unit2, ...]] spawn {
    params ["_units"];
    _units apply {_x setVariable ["reachedDest", true]};
    while {count _units > 0} do {
        _done = [];
        {
            if (_x getVariable ["reachedDest", false]) then {
                _wps = _x getVariable ["my_waypoints", []];
                if (count _wps == 0) exitWith {_done pushBack _x};
                _wp = _wps deleteAt 0;
                _x doMove _wp;
                _x setVariable ["destination", _wp];
                _x setVariable ["reachedDest", false];
            } else {
                _pos = ASLToAGL getPosWorld _x;
                _dest = _x getVariable ["destination", _pos];
                if (_pos vectorDistance _dest < 5) then {
                    _x setVariable ["reachedDest", true];
                };
            }
        } forEach _units;
        _units = _units - _done;
        sleep 1;
    }
}
``` something like that
fervent wyvern
#

i'm going to try changing that to another thing to see if that works

meager granite
#

Where do you have your dialog?

#

If its in description.ext, execute:

getNumber(missionConfigFile >> "MyDialog" >> "controls" >> "RscEdit" >> "sizeEx")
```in game to see what value you have actually in the config
fervent wyvern
#

i have two .hpp define in description.ext, one call define.hpp and another call dialog.hpp

meager granite
#

Change MyDialog to your display's config name

#
getNumber(missionConfigFile >> "MyDialog" >> "controls" >> "RscEdit" >> "shadow")
```should return `2` to make sure you address your `RscEdit` correctly with that path
fervent wyvern
#

i'll try that

meager granite
#
sizeEx = 0.1;
#

Also make sure you properly reload your mission so configs are reloaded

#

Not how this behaves in 3DEN

fervent wyvern
meager granite
#

MyDialog should be your display config name

#

whatever you defined in your dialog.hpp file

meager granite
fervent wyvern
#

how can i detect when a text of a dialog coincide with an array?

winter rose
fervent wyvern
#

i'm trying to create a dialog that permit the player to write a text (a computer display) and detect when the player write a key word to trigger an event

winter rose
#

so you want it to coincide with a string, no?

fervent wyvern
#

to detect if it coincide with a string, yes

winter rose
#

use ==

#
if (_ctrlText == "Password") then
{
  hint "OK!";
};
fervent wyvern
#

_ctrlText this was the thing i didn't understad how to do it but now i have an idea how to do it, thanks

kindred zephyr
#

if you want to go petty, you can even use isEqualTo to check it being case sensitive, ideal for password systems if you ask me šŸ‘€

open hollow
#

can i define a function as a variable, stream it and use it in a remote exec?

my_func = { //do local stuff }; 
publicvariable "my_func";
remoteexec ["my_func", 0]; 
kindred zephyr
#

I believe you need to compile it to be able to send it through remoteExec

open hollow
#

we need a name to the "biki blindness"

little raptor
open hollow
#

also i always forgot, there is function that does the same as "server exec" in the console?

#

i mean that executes the code in the server, and send you the result back?

little raptor
#

you can make it yourself

open hollow
#

how you send the message back to the specific user?

little raptor
#

remoteExecutedOwner

open hollow
#

with an remote exec with an { response = _value } remoteexec [ "call", remoteExecutedOwner ] ? there is some way to send a value?

little raptor
#

[]

#

tho I don't recommend using call. just send a callback function name

fair drum
#

might be better to link him the function how you do it in advanced developer tools to read

little raptor
little raptor
#

I don't want to encourage it

fair drum
#

ooooof lol

open hollow
#

do what i say, not what i do lol

fair drum
#

anyone off hand know the config value to search in order to find the model of a vehicle's dead/wreck state?

little raptor
#

it was just a lazy thing I added back when I was making the exec stuff
I forgot to change it

#

it's a proxy

#

in CfgNonAIVehicles

fair drum
little raptor
#

get wreckLodRes from wiki (21e15)

little raptor
little raptor
fair drum
#

it actually returns the model path with the word proxy: in the string lol so I have to do some string manipulation

little raptor
#

that + proxy index

#

it's proxy:path.00n

#

so you could do _proxy splitstring ":." param [1, ""]

#
  • ".p3d" meowsweats
little raptor
fair drum
#

looks like you can't do createSimpleObject with (at least the one I'm doing) proxies.

little raptor
#

you can

#

they're just models

fair drum
#

I get a model object return, but nothing visible

little raptor
#

you sure you're not putting it under ground?

#

also just to be safe use hideSelection to unhide it's selections

#

it might've hidden some of its parts

#

(shouldn't tho)

fair drum
#

I'm just using [0,0,0] for now in testing

little raptor
#

it might be under ground then

#

[0,0,0] for crSimpObj is ASL

#

if you're testing in VR that's below ground

fair drum
#

yup, threw in a ATLtoASL and it shows up

quiet gazelle
#

how does selectionVectorDirAndUp work?

little raptor
#

wdym how?

quiet gazelle
#

what does it return if i use it?

little raptor
#

2 vectors: dir and up meowsweats

quiet gazelle
#

how is the direction of a selection defined?

little raptor
#

generally a right-angled triangle

#

so dir and up are just its right angle edges

#

dunno about others

#

probably the first face in selection or something blobdoggoshruggoogly

#

example:

little raptor
quiet gazelle
#

thanks

modern meteor
#

I have a piece of code in an .sqf and which I trigger from a custom menu. Now sometimes I excecute the script again before it finished which starts multiple instance of the code. This is causing conflicts. What is the best practice to ensure that I don't run the same code multiple times?

little raptor
#

scriptDone

modern meteor
#

Thank you. I'll have a closer look how I can terminate the old script before starting the new one.

#

Would this work?

_scriptHandle = ["arguments"] execVM "\Scripts\AiAttackTarget.sqf";
_finished = scriptDone _scriptHandle;
if (!_finished) then {terminate execVM "\Scripts\AiAttackTarget.sqf"};
little raptor
#

no

modern meteor
#

😦

#

What am I doing wrong?

little raptor
#

well first you launch a script. then immediately afterwards check if it's done, then terminate it...

#

wait no that's not what you do...

#

you launch another script then terminate that one immediately meowsweats

modern meteor
#

Yea, fair enough

#

Not sure how to do this

#

Can only have one instance of it runnig

little raptor
#

you should save a global handle

#

first check if the old handle is done

#

if not terminate it

#

then start a new one

#
_oldHandle = missionNamespace getVariable ["my_scriptHandle", scriptNull];
if (!scriptDone _oldHandle) then {terminate _oldHandle};
my_scriptHandle = execVM...
#

the missionNamespace getVariable [... bit is in case you didn't define my_scriptHandle already

#

if you haven't it just uses a default value of scriptnull for it

modern meteor
#

ok, i see. so i have to run another sqf first to do the check and then execvm from there

little raptor
#
_code = {
  _oldHandle = missionNamespace getVariable ["my_scriptHandle", scriptNull];
  if (!scriptDone _oldHandle) then {terminate _oldHandle};
  my_scriptHandle = execVM...
};

...

["menu item",... [["expression", toString _code ]]...
modern meteor
#

Nice, I'll try to get this implemented. As always, thanks a lot for your help!

coarse dragon
#

is there any way to stop this call BIS_fnc_attachToRelative via a trigger?

hallow mortar
#

Do you mean to detach an object that has been attached with BIS_fnc_attachToRelative? If so, yes, it's just a wrapper for attachTo with some extra position calculations, so detach works fine as normal

coarse dragon
#

ah sweet thanls

digital hollow
# digital hollow Looking for a better way to find the position of the right-angle-vertex of a sea...

I ended up going with:

params ["_vehicle", "_proxy"];

private _firstPoint = _vehicle selectionPosition [_proxy, LOD_FIREGEO, "FirstPoint"];
private _averagePoint = _vehicle selectionPosition [_proxy, LOD_FIREGEO, "AveragePoint"];

if (_firstPoint distance _averagePoint > 0.85) then {
    _firstPoint vectorAdd [0, 0,
        (_averagePoint # 2 - _firstPoint # 2) * 2 / 1.333333
    ]
} else {
    _firstPoint
}

Since selectionVectorDirAndUp does just return [[0,1,0],[0,0,1]] for side-facing proxies.

Also apparently some seat proxies are not full size?! see https://www.youtube.com/watch?v=T-5jYbaUQUo
Where if I offset by 2m it's too low, and I have to scale the offset to the distance between average and first points.

modern meteor
little raptor
little raptor
#

toString _code is obviously used instead of "execVM ""\Scripts\AiAttackTarget.sqf"""

#

just look at the pattern... meowsweats

#

I intentionally put "expression" for you

digital hollow
little raptor
#

then I guess the dir and up is not what I thought they are

little raptor
digital hollow
#

may be only accounting for animations, like your other suggestion

little raptor
#

idk what you mean. selVecDirUp does account for animations

digital hollow
#

yes, I mean it diesn't care what dir something is in model, only reports how it has been changed by an animation

little raptor
#

but proxies don't change

#

do they? think_turtle

young current
#

usually not

little raptor
#

oh right they can

young current
#

but they can be animated too as part of moving parts

little raptor
digital hollow
#

yeah it's assuming that it's mostly vertical and the "rear" vertex never gets returned as first.

little raptor
#

well if you're going that route you can just do a comparison

#

you know where the average is always gonna be

#

now just compare it with the 3 possible diffs

#

i.e. avg is always [0, -1/3, 2/3]

#

diffs can be diff with [0,0,0] , [0,0,2], [0,-1,0]

#

they're all constant values

#

you just evaluate them once then based on which diff you match with find the correct point

#

actually you still need vecDirUp for that...

digital hollow
#

yeah, so if it is the top point, I'm only estimating a vertical offset.

little raptor
#

then cache the proxy pos

modern meteor
digital hollow
#

rn I'm checking every use, but the only regular vehicles that might change seat positions would be tank turrets, and that's not really super meaningful. So you're probably right that I should be caching these on first use.

smoky verge
#
private "_time"; 
_time = _this select 0; 
 
while {_time > 0} do { 
_time = _time - 1;   
hintSilent format["Time Left: \n %1", [((_time)/60)+.01,"HH:MM"] call BIS_fnc_timetostring];  
sleep 1; 
};

hey I'm running this on a trigger
how can I make it so that only people within a certain radius can see the hint?

fair drum
smoky verge
fair drum
smoky verge
#

its just an sqf in the mission folder at the moment

fair drum
#

and i'm guessing you are execVM that file when the trigger activates?

smoky verge
#

wasn't even sure about that since I don't know how to not activate it for everyone
so assume I have nothing at the moment

fair drum
#

this seems like it would be best if you made the trigger server only. the remoteexec will do the rest

smoky verge
#

so I tick server only and put nul = [300] execVM "timer.sqf"; in the trigger?

#

I'm illiterate code wise so I don't want to take anything for obvious

#

the [300] is the timer time

fair drum
#

[300, thisTrigger] execVM "timer.sqf"

and to clean up your code:

if !(isServer) exitWith {};

params ["_time", "_trigger"];

while {_time > 0} do {
    _time = _time - 1;

    private _txt = format ["Time Left: \n %1", [((_time)/60)+.01,"HH:MM"] call BIS_fnc_timetostring];
    [_txt] remoteExec ["hintSilent", allPlayers select {_x distance _trigger <= 50}]; //or whatever radius you want as that number

    sleep 1;
};
smoky verge
#

will thisTrigger recognize the trigger used or should I put something in its place?

fair drum
#

oh yeah forgot let me edit htat

#

there

smoky verge
#

I guess now it will recognize the trigger its fired from

smoky verge
fair drum
smoky verge
#

neat

#

thanks for the help

smoky verge
fair drum
#

yes

violet gull
#

What's the name of the listbox with a scrollwheel in list? RscListbox doesn't seem to have one.

#

Or does it just require a ControlsGroup?

warm hedge
#

Not sure which one you mean, can you post a pic?

violet gull
#

Scroll bar on right side allows you to see the additional options in the list, but mine doesn't have one. Thinking it's because I didn't create the listbox inside of a controlsGroup

#

Or if I'm just not using the correct RscListbox classname or w/e

little raptor
little raptor
meager granite
violet gull
#

Ahh okay, thanks šŸ™‚

quiet geyser
#

If you're using the standard Bohemia Support system (support provider and requester modules) for fire support, do placed units synced to the Provider modules get magically topped up ammo, or would you need to use a script to give them more?

fleet sand
#

Quick question has anybody played with UI on Texture. Is there simple example of map ui added to object texture ?

grand stratus
#
_obj = createSimpleObject ["SignAd_Sponsor_ARMEX_F", getPosASL player];
_obj setObjectTexture [0, "#(rgb,1024,1024,1)ui('RscMap','aaatest')"];

Something like this?

meager granite
#

You can do it with empty displays and ctrlCreate but its messy

pulsar bluff
#

Is there a way to get vehicle mass from config? I am modifying with "setMass", not sure if I need to save initial mass with a variable or something though

warm hedge
#

I do not think there is, actually a mass is a model side thing so without loading them... no

#

#rvenginesux

pulsar bluff
#

k

meager granite
#

SQF grew on me very much over the years, if only it had proper set of scripting commands right away

#

I remember I wanted to script something back in OFP days in like 2003 but quickly realized you can't do seemingly trivial stuff because there are just not enough scripting commands and I abandoned it.

warm hedge
#

Like what? Let's slap Dedmen's cheek together

meager granite
#

Having setHit but no getHit even in OA days was a shocker too when I looked into it all again

meager granite
#

But having some command to explore original model\shape properties like this one will be useful

warm hedge
#

Yeah that would be sick

old radish
#

Is it possible to use the killed event handler to check if a unit has a local variable assigned? Im trying to make a mode similar to shacktacs ’the game’ and im assigning the variable _myQuarry in the initPlayerLocal.sqf on a random civ player.

Determining if that unit/player isnt alive works well, but ive run into a block where i cant figure out how to check if the player has killed someone who was n o t their quarry.

(in ’the game’, killing a civ who wasnt your quarry punishes you with losing more health)

willow hound
#

im assigning the variable _myQuarry in the initPlayerLocal.sqf on a random civ player
@old radish What does this part of the code look like?

distant mirage
#

My question is, I figured out how to play the audio for the object. But how do I make sure when I put the .pbo into the server it plays the audio for everyone?

hollow plaza
#

Will a trigger only be activated once if the 'server only' setting is enabled, regardless of how many people walk into it? I'm mainly asking as I have a trigger in which multiple people will enter at the same time, but I need it to activate once as it has a remoteExec function.
From what I've heard, normally triggers are local, meaning the same trigger is created for everyone, and without the repeatable setting, it will also only trigger for everyone once. But server side triggers I'm not 100% certain of.

hallow mortar
#

Server-only trigger means there is only one instance of the trigger, which is local to the server. If it is not set to Repeatable, it can only activate once.

hollow plaza
#

Alright, just needed to make sure.

distant mirage
#

Anyone could help me?

meager granite
distant mirage
#

Well I don’t know how to know if it’s global, or if I when I put the .pbo into the server panel if it ports the audio over as well.

warm hedge
#

Depends on ā€œputting the pbo will make a soundā€ mean. A pbo itself does nothing to with a script

distant mirage
#

I put a custom sound in a mp mission attached to a object with a script, I’m expecting to heard it as same as everyone else. But since it’s not MY server I’m just porting the mission into a server panel, they won’t have ā€œsoundsā€ folder that the custom sound has been rooted to.

warm hedge
#

Not even sure how you port the mission into the server but it suggests that's not how to put the mission into the server properly?

#

Apparently a mission can have a custom sound using a sound file and a description.ext

distant mirage
#

It’s done properly because I’m putting extracting mission .Pbo file from MY mpmissions and putting it into the SERVER panels mpmissions folder.

warm hedge
#

Okay, then what does

they won’t have ā€œsoundsā€ folder that the custom sound has been rooted to
mean?

distant mirage
#

Because the sounds file is rooted in MY documents/arma3-other profiles/missions/mission name/sounds folder

#

Which they won’t have

warm hedge
#

Well... the thing you might misunderstand is a pbo is basically similar to a zip file, everything the mission has will be packed into the pbo

warm hedge
old radish
# willow hound > im assigning the variable _myQuarry in the initPlayerLocal.sqf on a random civ...

initPlayerLocal.sqf

sleep 5;
_competitors = allPlayers select {side _x == civilian && alive _x && _x != player};

_myQuarry = _competitors call BIS_fnc_selectRandom;
while {_myQuarry == player && count _competitors > 0} do {
    _myQuarry = _competitors call BIS_fnc_selectRandom;
};

hint format ["Your quarry is %1.", name _myQuarry]; //NO CONDITION

_quarryMarker = createMarkerLocal ["_quarryMarker", getPos _myQuarry];
_quarryMarker setMarkerShapeLocal "ICON";
_quarryMarker setMarkerTypeLocal "mil_dot";
_quarryMarker setMarkerColorLocal "ColorRed";
_quarryMarker setMarkerSizeLocal [1, 1];
_quarryMarker setMarkerTextLocal "<-- Quarry: " + name _myQuarry;

while {count _competitors > 0} do
{    
    sleep 5;
    _competitors = allPlayers select {side _x == civilian && alive _x && _x != player};
    if (alive _myQuarry) then
    {
        "_quarryMarker" setMarkerPosLocal position _myQuarry;
    };
    if (!alive _myQuarry && count _competitors >= 0) then
    {                
        deleteMarker "_quarryMarker";
        _competitors = _competitors select {alive _x};
        _myQuarry = _competitors call BIS_fnc_selectRandom;
        while {_myQuarry == player && count _competitors > 0} do {
            _myQuarry = _competitors call BIS_fnc_selectRandom;
        };

        hint format ["Your target has been killed. Your new quarry is %1.", name _myQuarry];
        
        _quarryMarker = createMarkerLocal ["_quarryMarker", getPos _myQuarry];
        _quarryMarker setMarkerShapeLocal "ICON";
        _quarryMarker setMarkerTypeLocal "mil_dot";
        _quarryMarker setMarkerColorLocal "ColorRed";
        _quarryMarker setMarkerSizeLocal [1, 1];
        _quarryMarker setMarkerTextLocal "<-- Quarry: " + name _myQuarry;
    };
    if (!alive player) exitWith {};
};

if (count _competitors == 0 && alive player) then {hint format ["%1 you have won The Game!", name player];};```
#

im not actually setting a variable am i? i suppose something like _myQuarry setVariable [ā€CurrentTargetā€, ā€Targetedā€] or something like that would work - but it needs to be something which will work if every player has their own quarry

fair drum
old radish
#

placed in initPlayerLocal

player addEventHandler ["Killed",
{
    params ["_killed","_killer","_instigator"]; 
    _killed = if (isNull _killed) then {
        _killed getVariable ["ace_medical_lastDamageSource", _instigator];
    } else { _killed}; //Incase ACE goes ape mode and decides to mess with the killed eventhandler.

    _instigator = if (isNull _instigator) then {
        _killed getVariable ["ace_medical_lastDamageSource", _instigator];
    } else { _instigator};
    
    _killedSide = side _killed;
    
    if (_killedSide == civilian && _killed != **variable here?**) then
    {
        "You killed an innocent bystander." remoteExec ["hint",_instigator]; //remoteexec may not be necessary if it runs locally
    };
}];```
#

it gets even more complicated because another condition needs to be that the killed player wasnt also hunting you :/

cyan dust
#

Good day. Is there a way to determine if the vehicle contains its 'original' crew? Like the one you see when placing it in the editor.

shut gate
#

Hi all. I've been doing some reading and just wanted a sanity check for something.

A couple months back I made a zeus mission which went alright, but a huge problem was that sound I set up to play via trigger was unbearably loud for the players. I had no idea why, but I think I know now.

In a file (dialogue.sqf), I had a playSound for the audio and a set of subtitles.

In a trigger, I had remote executed execVM for dialogue.sqf. I did this because I thought it wouldn't play on every player's machine without remoteExec.

I just read that triggers are global/executed globally. Does this mean that just execVM would have played it on every machine without the usage of remoteExec? Would the same apply to something like hideObject if ran from a trigger? Meaning, would it hide/unhide the object for every player?

#

I guess the source of my confusion is how local commands behave, in multiplayer, when used in a trigger's On Activation field

thorn saffron
#

I'm trying to use the boundingBoxReal with the third syntax of boundingBoxReal [object, LOD], but it throws an error as it expects only an object not an array. I wanted to check a bounding box of a specific LOD, but I'm unable to do so.

hallow mortar
#

That syntax is in 2.14, the next update

thorn saffron
#

I see, then, how can I get the Height at witch tree object is offset from a ground?

hallow mortar
#

getPosATL?

warm hedge