#arma3_scripting

1 messages · Page 571 of 1

young current
#

you may need a full recorded sound for that

austere copper
#

yep i think your right ,thanks for the help .

ornate prairie
#

I'm trying to prevent an ai helicopter from deploying its landing gear when dropping off / picking up troops. Is this possible?

young current
#

you can try force animating them

#

but that might not work

#

since the gears are usually deployed by engine animationSource that triggers at certain altitude and speed if I remember right

tough abyss
#

Hello! I'm having a problem here. When I use UnitCapture and UnitPlay, everything goes fine except for the UnitCapture not recording the engine being turned on/off, or helicopter gears being deployed. How can I fix this?

bright flume
#

"Plays back input movement data on input unit. Simplified." says nothing about tracking a unit's settings.

#

reading both functions only thing that is tracked is if its 'firing' (Capture) or living/dead (playback) other then movement

#

I never dealt with this but given its letting you set the time (frames) total. playback to (x) then issue the lower gear command possibly?, then continue playback? thats purely a stab in the dark.

winter rose
#

@tough abyss does the issue appear in Eden Editor or in MP?

bright flume
#

that or you do the playback and cacluate when you want gear down and issue the command after (x) amount of time gone by in the playback

#

lou btw is this the underpinning of how ambient flybys are done etc?

lapis ivy
#

Hey.
I am using a snow script.
When I get in the car, the snow does not follow me, but remains in place, and when I get out of the car, it follows me again. How to solve this problem?

MKY_fnc_create_Emitter_Host = { objEmitterHost = "Land_Bucket_F" createVehicleLocal (position player); objEmitterHost attachTo [player,[0,0,0]]; objEmitterHost hideObject true; objEmitterHost allowDamage false; objEmitterHost enableSimulation false; (true);

I did not fully understand this script, I can send it to you if you have a desire to help me.

winter rose
#

lou btw is this the underpinning of how ambient flybys are done etc?
no, it's spawned units that fly around @bright flume

#

the snow script

maybe an attached object is not following once a unit gets in a vehicle, but gets reattached when exiting it

bright flume
#

ah okay thought maybe it was a recorded one then using playback to recreate it easy. rgr that ty

#

goes back to staring at vcom scripts and why globals just randomly not found...

#

omg so wish bi had a fnc that just did a simple exists() so one can verify variables even exist without dumping errors...

winter rose
#

like, isNil?

bright flume
#

thought even isNil errors out if you call it for something that doesnt exist vs 'not defined' for its value

winter rose
#

isNil doesn't error if you use it properly

lapis ivy
#

@winter rose
Can you help me fix this?

winter rose
#
MKY_fnc_create_Emitter_Host = {
  objEmitterHost = "Land_Bucket_F" createVehicleLocal (position player);
  [objEmitterHost] spawn {
    params ["_emitter"];
      private _camOn = objNull;
      while { true } do {
        waitUntil { sleep 1 ; _camOn != cameraOn };
        _camOn = cameraOn;
        _emitter attachTo [_camOn, [0,0,0]];
      };
  };
  objEmitterHost hideObject true;
  objEmitterHost allowDamage false;
  objEmitterHost enableSimulation false;
  (true);
``` @lapis ivy
bright flume
#

wow colors and all... Kami-sama has landed ^_^

winter rose
#

Kami-sama?
So, did you find your issue with isNil?

lapis ivy
#

@winter rose
Thanks, I’ll check it now.

bright flume
#

yeah and Im now betting somewhere this is happening <bla> = nil;

#

ie the value its nil (not intended...);

winter rose
#

Code example of isNil usage please

bright flume
#

cant this reverse debugging. trying to find out why globals are randomly 'poof''

winter rose
#

you said you wanted some

exists()
isNil does what you want.

tough abyss
#

@winter rose I am testing my mission from the Eden Editor in a LAN MP server

winter rose
#

and what does it give in Eden preview @tough abyss ?

#

(not in MP)

lapis ivy
#

@winter rose
Thank you very much! It works! It remains to check on a dedicated server!

tough abyss
#

Nothing happens in Eden because I need to use the radio command to trigger the UnitPlay

winter rose
#

@lapis ivy should still work 😉

tough abyss
#

Can't have the helicopter fly around in Eden Editor

winter rose
#

well, you can

#

just use preview, not MP preview

tough abyss
#

Will there be any difference? I mean, my mission is a multiplayer event, so I thought I'd test it in a multiplayer setting

winter rose
#

test in single player
if it works, test in multiplayer
if multiplayer doesn't work, you have a locality issue

#

because so far that's what it seems to be to me

tough abyss
#

What I mean by "doesn't work" is that the helicopter can fly and go around BUT the UnitCapture command doesn't record turning engine on/off or deploying helicopter gears

lapis ivy
#

@winter rose
Can you still help me? :)

I add 56 backpacks to the box, but the backpacks are not empty, there are 2 mines in each backpack. How can I clean the backpack that I added to my drawer?

blufor_box_backpack addBackpackCargoGlobal ["B_mas_usl_Kitbag_w", 56];

winter rose
#

@tough abyss
place an AI for the landing gear (unsure)
use engineOn to turn the engine on

tough abyss
#

AI for the landing gear?

winter rose
#

a driver

tough abyss
#

I do have a full crew for the helicopter

#

Pilot, copilot, and 2 gunners

winter rose
#

then maybe just engine on should do

bright flume
#

do ai even know what they doing in that?

tough abyss
#

Okay, and what about the landing gear? When UnitPlay is being executed the AI will follow exactly what's been recorded, and since landing gear deploying/pulling back up isn't recorded, it doesn't do it.

#

And, as the wiki says, UnitCapture and UnitPlay only follows movements, not interactions like the engine and gears. So...

winter rose
#

that's what I said, maybe engineOn will make the AI use landing gear - try

lapis ivy
#

@winter rose
I do not get you. This backpack is from a modification. There are items in the backpack as standard.
Maybe I'm not using BIS_fnc_basicBackpack correctly?

winter rose
#

@lapis ivy wait, didn't you want to add empty backpacks?

lapis ivy
#

No, that's right. I need to add empty backpacks to the box, and this “B_mas_usl_Kitbag_w” is added with two mines.

winter rose
#

then basicBackpack returns the root, empty class of the backpack, without the items

tough abyss
#

Like this?
USSLibertyHeliPath =engineOn[insert big blob of movement recording here];
[USSLibertyHeli, USSLibertyHeliPath] spawn BIS_fnc_UnitPlay;

lapis ivy
#

It looks like the class of this backpack comes with items.
Maybe I do not use this function correctly? How do I use it correctly?

winter rose
#

@tough abyss no

#

@lapis ivy then maybe there is no class where it is empty
let me look at something

bright flume
#

trying to make a foreach loop to empty it easily if possible you might beat me out on that

tough abyss
#

Excuse me because, evidently, my knowledge of SQF is in embryonic form. How can I do the engineOn command?

tough abyss
#

USSLibertyHeliPath =USSLibertyHeli engineOn true[insert big blob of recorded heli movement here];
[USSLibertyHeli, USSLibertyHeliPath] spawn BIS_fnc_UnitPlay;
Like this?

winter rose
#

no.

#
USSLibertyHeli engineOn true;
/* the rest of your usual code */
``` like this ^
#

ComboTombo @lapis ivy ```sqf
{ clearMagazineCargo _x } forEach everyBackpack _myAmmoBox;

#

@lapis ivy ^

bright flume
#

heh knew it... basically what I just verified was jumping in and out of the editor

lapis ivy
#

Wooow! Thanks!
blufor_box_backpack addBackpackCargoGlobal ["B_mas_usl_Kitbag_w", 56];
How do I write correctly?

winter rose
#

insert my code after this ^ addBackpack thing

lapis ivy
#

I'm really doing something wrong 😄 😄 :D
blufor_box_backpack addBackpackCargoGlobal { clearMagazineCargo _x } forEach everyBackpack _myAmmoBox ["B_mas_usl_Kitbag_w", 56];

Sorry, I really don’t understand, I started 😄

winter rose
#

…indeed ^^

blufor_box_backpack addBackpackCargoGlobal ["B_mas_usl_Kitbag_w", 56];
{ clearMagazineCargoGlobal _x } forEach everyBackpack blufor_box_backpack;
lapis ivy
#

Now I understand.
Sorry, I need to poke my finger: D

#

Thaaaaanks!!!!

#

@winter rose
@bright flume
I love you

winter rose
#

@tough abyss did it work?

tough abyss
#

When I tried it, the AI took off and almost immediately pulled up gears. Great! Then, when it reached the LZ and was about to touch down, it didn't put down gears. And when it went back to the ship to land, it landed on the helipad without gears, and when the UnitPlay command was finally done, it put down the gears while it was on the helipad (so it just bounced a meter up, gears down, and straight back)

winter rose
#

weird flex but ok

tough abyss
#

Also, the engine didn't turn off once it landed

winter rose
#

engineOn false, yep

tough abyss
#

Right, now what about placing down gears on touchdown on the LZ + on touchdown on the helipad?

bright flume
#

since the ai reacting, maybe put the land WP there since you force controlling the flight of the vic? so they know they landing? maybe thats what was missing?

#

ah

tough abyss
#

@winter rose
USSLibertyHeli engineOn true;
USSLibertyHeliPath =[insert big blob of recorded flight movement here];
[USSLibertyHeli, USSLibertyHeliPath] spawn BIS_fnc_UnitPlay;
USSLibertyHeli engineOn false;
This?

winter rose
#

the AI is not performing anything at all actually; you could use unitPlay on an empty helicopter with its engine off it would still play

bright flume
#

yeah why I thought this was a static movement thing, and the ai well since they not flying really dont know where they were going..

winter rose
#

@tough abyss kind of, you would have to wait for the play to stop

sleep 120; // seconds of flight
tough abyss
#

Hmm, okay. I'll have to record the exact flight time for that.

bright flume
#

btw Lou does A3 support short circuit boolean logic?

winter rose
#

you can short-circuit your motherboard while playing Arma 3, if this is what you are asking

bright flume
#

no when a boolean eval, if the first element is false automatically nothing else is evaluated.. or true evals the other half of the logic like || && etc

winter rose
#

yes, but the second one has to be wrapped with Code

#

e.g ```sqf
if (not isNull player && { alive player && { damage player > 0.9 } }) then {
player setDamage 1;
};

bright flume
#

actually dude you are a kami-sama thats exactly the situation I was looking at using it for or trying to so I can hunt problem children down.

#

or isNill in this case.

winter rose
#

Kami-sama?

bright flume
#

god...

winter rose
#

oh

bright flume
winter rose
#

me no speak Japanese; me barely speak Engrish

bright flume
#

I dont speak japanese either lol

#

actualyl given how much I listen to subs I prob if forced could atleast understand some things verbally

#

btw if you can think of how I could do what i mentioned in sound_music_makers I would be floored.

tough abyss
#

Right so my timer says from the time the trigger is issued till the helicopter almost touches the helipad is 358 seconds. I'll put on a sleep 358; followed by an USSLibertyHeli engineOn false;

winter rose
#

yep

tough abyss
#

Absolutely perfect! Thank you very much @winter rose

spark turret
#

Hey iirc we had a solution here some months ago after a big discussion:
Is there a way to automatically correctly offset crates etc. -> read out how far the objects center is from the actual edges of the object

#

iirc the problem was correct offset for attachTo and the solution was to not give it any parameters so it automatically offsets?

#

doesnt solve my problem since i want to stack crates of diffeent sizes automatically

rustic plover
#

Is exists command which can "commit" changes in 3DEN Editor for returning these back? If I change something by scripts (i.g. create entities or delete it) I cannot do UNDO command

distant oyster
#

@rustic plover collect3denHistory

rustic plover
#

@distant oyster u awesome. Thx :)

distant oyster
#

@spark turret have you tried boundingBoxReal?

spark turret
#

is the object center always the perfect center of the bounding box?

#

or can the objectcenter be offset from it?

rustic plover
#

delete3DENEntities not history recorded. Is no way to record deleting entities?

distant oyster
#

@rustic plover ```sqf
collect3denHistory {delete3denEntities _entities};

Is not working?
rustic plover
#

nope

#

I tried this, but it didn't record deleting

distant oyster
#

Can confirm not working. Dont know why though.

spark turret
#

how do i convert the BBR positionRelative coordinates into posAGL coords? i tried modeltoworld and modeltoWorldWorld but the points are always offset on x and y axis by magnitude ~ 2

#

according to the biki the BBR points are "the extreme points of the model in format PositionRelative" and modeltoWorld "Translates relative position from object model space into world position." with the parameters " [x,y,z] offset relative to the model centre, format PositionRelative".

#

but if i convert it back into positionRelative with worldToModel, x and y are offset. i also created helpercircles at the points and the are way off on 2 axis.

spark turret
#

in conclusion, modeltoworld seems to be broken

sacred slate
#

how can i add all friendly groups to HC bar?

young current
#

@spark turret got pictures of that? Some models have invisible parts that make the bounds larger than what the model looks like

spark turret
#

give me some time, ill present what i mean

#

@young current which clippingtype would you recommend for best results?

#

another thing i noticed is, my handplaced helpers tell me the object center is at the bottom of the crate but bounding center tells me its at 0.8m height.

still forum
#

land contact center is probably at the bottom

young current
#

bounds are the "physical" measurements of the object but objects model can (and for things placed on ground usually is) made so that modelspace [0,0,0] origin is at the bottom so that the object sits on surface and does not sink into it.

#

you could try the other modelToWorld commands @spark turret the modelToWorld as you said is calulcated from the model center which is as you say usually different than boundingbox center

#

or you need to get the model center, and boundingbox center offset and apply that to your BB coordinates to make it relative to the model center

ebon ridge
#

cos right now it looks like i have to add manual #line after every single preprocessor block to correct further lines?

young current
heavy kindle
#

https://steamcommunity.com/sharedfiles/filedetails/?id=954149033

Does anyone have experience with this mod/script? I am attempting to get it set up in some missions and found the google link provided on all the links doesn't work anymore and am unsure how to config it within the mission.sqm if someone could provide some direction or has a copy of the original doc that would be awesome! Apologies if this isn't the right place to ask

ebon ridge
#

hmm yeah i integrated this with antistasi at one point

#

you can see the code it might help

heavy kindle
#

Yeah so would the code go above or below the }; ?

#

sorry am very new to these things

ebon ridge
#

nah i mean i will point you at my code on github and you might be able to work it out

#

i don't remember

#

it was years ago

heavy kindle
#

Oh ty!

ebon ridge
#

sorry i can't find it, maybe i only integrated it on my server or something i don't remember 😦

heavy kindle
#

Yeah all good not sure what happened to the link am sad 😦

young current
#

likely the author deleted it or the whole account it was on.

#

from the forum posts it looks like he stopped developing it

heavy kindle
#

@ebon ridge Can you link your github kind sir

ebon ridge
#

i can but its not in there i don't think, i can't remember where i did it

heavy kindle
#

tarnation

ebon ridge
heavy kindle
#

found a the documentation in the pdf of Gdrive version Idk why I didn't look sooner haha

#

but for future reference with A3 Wounding System - AIS Revive

winter rose
#

sqf files are not started by themselves; how do you call the scripts?

stark granite
#

Any idea why the scripts on my mission would run on singleplayer, but not on multiplayer? when using the exact same mission files?

#

Having trouble getting both the killhouse and range to run properly, its asif not all the triggers are being activated, and im struggling to get the _add actions to work

winter rose
#

player usage and locality are what make the difference between SP and MP scripting yes

stark granite
#

Do you mean having any unit set to player?

#

Ill see if that fixes anything, thanks 🙂

surreal peak
#

no, I mean doing something like [player] joinGroup _unit

#

random example but is what I mean

#

you basically should be using private variables

young current
#

@stark granite pastebin your scripts and link here

stark granite
#

Im unsure on that, Would this require me to edit the script itself to change who is being called? 😦

#

is it coming from the: player addAction , is that different for mp than sp?

young current
#

so that we can read the scripts instead of having to unpack your pbo

stark granite
#

What should I pastebin?

#

Because theres a good number of scripts in there

young current
#

the sqf stuff that doesnt work

#

start with one

stark granite
#

Thats the init, which I assume is what adds the actions to controll the script, they show up in singleplayer, but not multiplayer

surreal peak
#
// Add Player Actions
player addAction ["[CQC] Start New Round",  {[1] execVM "scripts\new_round.sqf";}, [], 2, false, true];
player addAction ["[CQC] Toggle Day/Night", {execVM "scripts\toggle_day_night.sqf";}, [], 2, false, true];
player addAction ["[CQC] Show Enemies",     {execVM "scripts\toggle_show_enemies.sqf";}, [], 2, false, true];
player addAction ["[CQC] Refill Ammo",      {execVM "scripts\refill_ammo.sqf";}, [], 2, false, true];
player addAction ["[CQC] Infinite Ammo",    {execVM "scripts\toggle_infinite_ammo.sqf";}, [], 2, false, true];
 
// Remove ACE medical event handlers
if (ace_is_loaded) then {
    player removeAllEventHandlers "hit";
    player removeAllEventHandlers "hitpart";
    player removeAllEventHandlers "handledamage";
    player removeAllEventHandlers "killed";
    player removeAllEventHandlers "explosion";
    player removeAllEventHandlers "dammaged";
};
 
#

is a glaring issue

stark granite
#

How so?

surreal peak
#

if its in init then it will only really work in single player IIRC

#

because player is only one person

#

doing something like

{ _x addAction ["[CQC] Start New Round",  {[1] execVM "scripts\new_round.sqf";}, [], 2, false, true];} forEach playableUnits;
#

should work

stark granite
#

Im sorry if im being dumb, just inexsperienced, i still dont understand what it is that ill need to change, is it just that line, do I need to modify all player referenced lines to work, is it worth the effort at all? Theres a bunch of scripts running that came with the fairly small basic assets I added to our training map, and I have no idea what most of them do unfortunately. 😦

#

Is there anywhere I can find an error file after running it on the server for a better idea on which scritps ar'nt working?

winter rose
#

when you say

it's the init
is it init.sqf ?

stark granite
#

The Init.sqf is whats in the pastebin above yes

surreal peak
#

Also when you say on multipolaer, is it a dedicated server or are you hosting?

winter rose
#

if you have respawn on start, the addActions remain on "old" bodies iirc

surreal peak
#

@winter rose doesn't player just reference the host?

winter rose
#

init.sqf runs on all machines

surreal peak
#

ahhhh

#

so that means he can ignore my point using forEach playableUnits

stark granite
#

what is respawn on start? I have used playable units to place the spawn points, and theres respawn point to get to other parts lf the map

winter rose
#

it is a description.ext or Eden MP settings

#

where you "respawn on start" (and for example get to choose your equipment)

stark granite
#

as far as I know,, just placed the playable units using the 3den editior

#

without the scripts, respawn works just from the mission.sqm

winter rose
#

where is the respawn configured?

stark granite
#

the only scripts added are - A killhouse, a range, a medical practice script, and a vehicle spawner

#

the respawn should just be configured in eden?

#

I havnt done anything to the respawns from the basic map we made without any mods or scripts or anything

winter rose
#

if you don't configure the respawn, you don't respawn (or as a seagull maybe)

#

so I believe there are shenanigans, either in Eden settings or in description.ext

stark granite
#

The respawn on the server works fine, it respawns you as it would in public zeus for example, on one of two points, after initially spawning you where the unit is placed in the mission

winter rose
#

@stark granite I am not asking you whether it works fine or not, I am asking where it is configured, who configured it

stark granite
#

Right, I see what you mean about the description.ext, however the respawn details are not covered there currently?

winter rose
#

so this is the entirety of description.ext?

#

if so, then respawn is configured in Eden MP settings

stark granite
#

so I should be able to find it in the mission.sqm right?

#

Which is that bit in the sqm?

#

If I change the respawn settings/add them to the discription.ext will this over write them or cause problems?

#

also is it the respawn which is causing the scripts to fail, such as the units not spawning in the killhouse

winter rose
#

1/ shouldn't
2/ your init script gives all the actions to everyone, and starts "new_round.sqf" (number of players) times, which… is wrong?

#

try adding respawnOnStart = -1 in description.ext

spark turret
#

@young current are you for real you fixed the damn thing i was fighting with all afternoon?? awesome!!!!!!!!

#

feel kissed

stark granite
#

Where should I add that? just right at the top? @winter rose

winter rose
#

yep

#

also, what is in "VVS\menu.h" ?

stark granite
#

Thats just the vehicle spawn menu, its a virtual garage, that script is working perfectly fine as far as I can tell

winter rose
#

yeah but check in every include that there isn't any respawn setting

stark granite
#

in the description?

winter rose
#

in every include

#
_me         = _this select 0;
_killer     = _this select 1;
_instigator = _this select 2;

// Stop system mesages covering up restart button
sleep 3;
clearRadio;

nothing wrong in there

stark granite
#

So it seems that adding ' respawnOnStart = -1 ' to the description.ext disabled both scripts from working, unsure why that would happen

oblique arrow
#

Is -1 an actual value for that? I imagined that only 0 for no and 1 for yes work

stark granite
#

respawn=3; in the mission.sqm too, does that correlate

winter rose
#

@oblique arrow -1, 0 & 1

oblique arrow
#

huh neat, what does -1 do?

winter rose
#

wiki 👀

oblique arrow
#

Thanks

winter rose
#

@stark granite no problem with respawn 3 being declared in multiple locations but there is a priority: description.ext > Eden settings

stark granite
#

I dont have any of the cfg3den settings in my mission.sqm or my description.ext do I need to add them, otherwise where are the 3den settings being saved in the mission.sqm?

#

I see the respawn template being ran at the top of the SQM

#

Can I just re-open the mission in singleplayer editor again, and set the 3den settings in there, because this is somthing I hadnt done previously'/

winter rose
#

See Arma 3 Functions Library on the wiki @coral owl

tough abyss
#

when i did Maintenance work and load the new mission file, are my server logs cleared?

winter rose
tough abyss
#

sorry

harsh vine
ornate prairie
#

is engineon a local command? Does it need to be run through the server?

ruby breach
#

It has to be executed by the machine where the vehicle is local, which could or could not be the server

ornate prairie
#

I don't quite understand how a vehicle could be local to anything besides the server, but if i just remote execute to all machines that would be the safest bet?

bright flume
#

a driven vehicle is always local to the machine of its driver

open vigil
#

@surreal peak Your profanity was removed. Zero tolerance policy regarding offensive behaviour, this includes harassment, name calling, racism, sexism, homophobia, other derogatory remarks (profanity) or any insults.

winter rose
#

@ornate prairie an empty vehicle should be local to the server yes

broken snow
#

Anyone know a script that saves game progress similar to antstazi? Trying to add it to a warlords mission

lapis ivy
#

Hey.
How can I make sure that a player without a long-range walkie-talkie could not create marks on the map in an additional channel?

austere sentinel
#

So something I'm not quite getting; I have an object that I created in the editor with a variable name. According the initialization order page, that should be created prior to serverInit.sqf, so why can I not access it? What am I missing?

lapis ivy
#

Mabye initServer.sqf?

#

"initServer.sqf" = Executed only on server when mission is started. See Initialization Order for details about when the script is exactly executed.

austere sentinel
#

I have that already, and I read the init order page, but it says that initialization fields should be done before that script is run. I'm asking why I can't access a variable created in the editor in initServer

#

is the variable name not part of the init field for that object? (edit: wrong terms, its an attribute which should exist even before the object init is called)

winter rose
#

Object init or object varname?

austere sentinel
#

varname, sorry still learning.
According to the init order page; it should be "object created -> varname (+ other attributes) -> object init called -> initServer.sqf called".
So the variable name should be accessible in initServer right?

winter rose
#

Yes

austere sentinel
#

it gives me an 'undefined variable' error

winter rose
#

then something is done wrong

austere sentinel
#

after changing nothing, it works? eden is seriously a pita sometimes. Thanks for trying I guess.

winter rose
#

Eden is not a pain about this; my guess is you tried something in Eden Multiplayer Server or something like that - either that or you did not save the file you were editing

austere sentinel
#

I hosted via server browser on LAN, but why would eden MP be different out of curiosity?
Also it wasn't a saving issue. Literally the first thing I checked before posting lol.

winter rose
#

ok, better check than be sorry indeed

sometimes (from my experience some time ago) exporting to MP would not override the mission file; playing from Eden MP (and not exporting to mission -then- playing) helps avoiding this behaviour

austere sentinel
#

No I get it, PEBCAK is my usual go to as well lol. Hm, that actually explains a couple things I ran into the other day. Ah well, working now. Thanks for rubber ducking at least.

winter rose
#

it seems I am quite good at that actually

#

just, from my POV, make sure it works in SP first then test in MP - it avoids the hassle of Eden MP Server and allows for quick, repeated tests

worn forge
#

Relic, perhaps post the code you are trying to run?

worn forge
#

So, people's opinion: what's better between the two code approaches. Use case: when player connects, update them with variables they need that are maintained by the server.
Approach #1: from client's initPlayerLocal.sqf, run [player, "theNecessaryVariable"] remoteExecCall ["publicVariableClient", 2];
Approach #2: on server,

addMissionEventHandler ["PlayerConnected", {
  params ["_id", "_uid", "_name", "_jip", "_owner"];
  _owner publicVariableClient "theNecessaryVariable";
}];```
cunning crown
#

I would go with the later, I find more organized.

austere sentinel
#

ryko, its not an issue anymore, but I will in the future.

worn forge
#

Heyoxe I'm leaning that way as well. My initPlayerLocal is also 1400+ lines so I could afford to make it a bit leaner 😛

cunning crown
#

Put everything in functions, far more easier like that (and use the function library so you can set postInit = 1) 😄

austere sentinel
#

My initPlayerLocal is also 1400+ ಠ_ಠ

cunning crown
#

I don't even have one on my mission 😄

worn forge
#

Next question: better to send 20 publicVariableClient lines with individual variables, or send one publicVariableClient line with an array and then have the client unpack it back into individual variables?

cunning crown
#

Sending only one should be better and wil probably put less stress (?) on the network

worn forge
#

That's what I'm thinking, I'm just worried about the variable getting to big and exceeding the message size.

cunning crown
#

There is a message size limit?

worn forge
#

Though for the most part the variables I'm sending are basically single-digit integers. Man it's easy to get paranoid and stressed about what the engine can handle.

#

I think so - I get this error in the server rpt when the server gets under stress:
2020/02/21, 20:23:38 NetServer: trying to send a too large non-guaranteed message (len=1348/1353) to 186850323

cunning crown
#

To hit that limit you must sent a really really large publicVariable, and maybe it get sent anyway?

worn forge
#

It might not even be related to my code as there's no reference - could be something internal to the mission. And I'm pretty stingy with the data I send.

cunning crown
#

Then there shouldn't be any issue with sending just one variable, and if one day it hits some sort of limit, if there is any, just split it in 2, always better than sending each variable individually

winter rose
#

@worn forge just so you know, publicVariable'd variables are automatically synchronised to JIP players

worn forge
#

Yeah, that would be the easy way, wouldn't it. Some of my values change during the life of the mission, however.

cunning crown
#

Then you can just rebroadcast it to update on everyclient?

copper raven
#

call publicVariable again then, the thing is, with both solutions you provided, players who are currently in the game will not get the value synchronized

worn forge
#

Eh, I like the control of sending the right variable at the right time rather than spamming the JIP queue.

winter rose
#

it replaces the previous entry though

worn forge
#

Hmm, I didn't know that. I thought it parsed all the entries in order.

winter rose
#

it's somewhat optimised I believe 😉

cunning crown
#

That would create some awfull bugs if it was the case 😄

winter rose
#

I believe it might have been the case in Armed Assault though 👀

cunning crown
#

Wasn't there a thing were you could juste do true = false in that game too ?

worn forge
#

black = white

winter rose
#

and in Arma 2 too 😄

#

(the true = false)

#

until a certain patch that protected commands and keywords. Before that you could do player = "hello"

worn forge
#

anywho, thanks for the input folks, I'll dial back my OCD and go with publicVariable

winter rose
#

I strongly believe this is the way to go yes!

cunning crown
#

At least we cannot do that in Arma 3 anymore, I would have broken the game much more than I already do 😄

harsh vine
#

is anyone here good with sector control scripting ??

worn forge
#

Just ask your question

winter rose
#

not me

exotic flax
#

Lou knowns everything... he wrote the wiki!

cunning crown
#

He is the wiki!

winter rose
#

😱

#

sometimes I daydream, therefore you have a 502

#

we are an AI of multiple users… bewaaare!

exotic flax
#

FATAL ERROR: maximum AI count reached

cunning crown
#

{ if !(isPlayer _x) then { deleteVehicle _x } } forEach _wikiContributor

exotic flax
#

anyway... I'm only familiar with the Sector modules, although it should be possible to use BIS_fnc_moduleSector and BIS_fnc_bleedTickets to get the same results in a scripted version

#

although the wiki doesn't have any details about them, so I suggest checking the code of those scripts to see how they work exactly

winter rose
#

@harsh vine ^

worn forge
#

that feeling when you find code that explains why something has been working all along

winter rose
#

sorry which feeling?
which code are you talking about?

worn forge
#

(unrelated. Just feeling pretty wise right now)

winter rose
#

(oh)

harsh vine
#

is there an easier way to make a marker (on map) on each sector when an enemy has enter the area, rather than having 10 different trigger and mapmarkers?? for example if blufor enters sectorA it should dispaly a map marker to opfor side saying sectorA is under attack.

forest ore
#

What kind of stuff you put into initPlayerLocal.sqf that makest it 1400 lines long 🤔 🙂

worn forge
#

eventHandlers mostly

forest ore
#

or, is 1400 lines that much after all 🙂

exotic flax
#

1400 lines is nothing... but it's a death trap when it's in a single file

spark turret
#

any way to convert a string into an object name? trying to loop over multiple objectnames without having to type in each of them:

//not working code:
for "_i" from 0 to 7 do {
_crate = ("crate_" + str _i);
_success = lkw setVehicleCargo _crate;  //_crate has to be an object
hint str ["was loaded:",_success];
};

worn forge
#

missionNameSpace getVariable format ["crate_%1", str _i]

spark turret
#

thanks man (y)

austere sentinel
#

Looking for advice;
In an MP mission I have several squads, each that can "request evac" using a specific smoke color.
I want to notify a group of pilots on their side of the request. Would tasks or 3d markers be more suited to the job?
(side question; can you have multiple tasks assigned at once)

worn forge
#

You can have multiple tasks, but only one can be "assigned" at one time - this is the one that will show up in the player's GUI

#

If you need all the "tasks" to be shown on the GUI you'll have to use drawIcon3d

austere sentinel
#

Hm. drawIcon3d is pretty performance heavy though right?

worn forge
#

I haven't found that. And it's client-side, so who cares 😛

austere sentinel
#

Fair enough lol. I'll try both and see which one seems more intuitive, thanks!

coral owl
#

Does
postInit = 1;
work when used in the cfgFunctions of a function inside a description.ext of a mission?

Basically I can spawn my function correctly in a mission (when for example adding it to a unit init) but I cannot have it autostart with init =1.

Thanks

exotic flax
coral owl
#

my function is simply displaying a systemChat "OK" and I can see that working when I spawn it from an init, but if I use postInit = 1 it does not auto-start

#

I am trying to create a template that allows my scripts to become stand-alone mods so mission makers can avoid adding them manually to missions

exotic flax
#

it's most likely because the mission isn't fully loaded yet, but the objects are already placed

coral owl
#

it's an empty virtual reality scene with just me as the player?

winter rose
#

most likely, the systemChat is not displayed
try player setDamage 1 for example

coral owl
#

thanks @exotic flax and @winter rose trying now!

exotic flax
#

or use diag_log to print stuff in the log file 😉

winter rose
#

setDamage is more fun 😛

high marsh
#

preInit is the only attribute that has to be ran in an addon.

coral owl
#

yeah eheheh

#

mh ok I will try preinit

high marsh
#

?? No.

#

Wait it might not be preinit

coral owl
#

Neither work anyway..
but I can call the function manually from the editor and I do get killed

exotic flax
#

preStart won't work, since it will trigger on game start (so before the mission is even selected)

high marsh
#

Prestart = addon
preInit before object
post after object

coral owl
#

postInit is still what I need as I need player setDamage 1

high marsh
#

You'll likely want to use postInit for anything that you want the players to see after the mission start. Preinit would be for background systems.

coral owl
#

I can do [] call PREFIX_fnc_killplayer and it works in the editor

high marsh
#

Try suspending a few seconds.

coral owl
#

e.g. sleep 3?

high marsh
#

Yes, has to be scheduled.

coral owl
#

no luck (still works when called in local)

#

my only thinking was that because this cfgFunctions is in my description.ext it .. was not working..

it only works in config.cpp maybe? <--makes no sense

#

I tried to put it in the description.ext to test if it was ok in a mission environment before I moved full binarize PBO etc. etc.

#

I see no diag_log either (which is also there..)

#

I also noticed some write:

  class init { postInit = 1 };
};

and others

#

Anyway neither work, (also checking that it is case-sensitive).

So weird! Hitting a wall for sure.

exotic flax
#

so you CfgFunctions looks like this:

class CfgFunctions {
   class myTag {
      class myCategory {
         class myFunction {
            postInit = 1;
         };
      };
   };
};

And the file is located at: %MISSIONS_ROOT%\functions\myCategory\fn_myFunction.sqf

coral owl
#

Yes, I have this:

{
    tag ="VTO";
    class clients
    {
        file = "functions\clients";
        class namePLACEHOLDER
        {
            postInit = 1;
        };
    };
};```

and it's in %MISSION_ROOTFOLDER*\functions\clients\fn_namePLACEHOLDER.sqf
#

in fact when I do [] spawn "VTO_fnc_namePLACEHOLDER" it works

#

(player dies instantly)

exotic flax
#

hmm... need to go out for a moment, but will then test this out... because it SHOULD work

#

and otherwise the wiki is incorrect 🤣

soft niche
#

Can anyone help with a DMS Mission question? I’m looking to add pop tabs to the loot boxes once a mission is completed. I’d like to add different amounts of pop tabs depending on the mission difficulty. I can’t seem to find the script to edit to make the change. Do I need to create/add a new script or is there one to edit?

worn forge
#

DMS = ?

soft niche
#

In exile. Sorry wasn’t sure if normal Arma had missions too

woeful sundial
#

hi to everyone i'm trying to create my first extension for arma in c# but i cant make it work i followed the official wiki page and also the Maca134 tutorial but in game i can't get any responde the game doesnt crash and there are no errors in the rpt file suggestions. (ps tell me if u need the source code 🙂 )

tame lion
#

Confirm battleeye is off and not blocking the extension?

woeful sundial
#

yep disabled

hollow thistle
#

Reezo is doing something wrong, postInit, preInit work in missions just fine.

exotic flax
#

@coral owl I created a very basic mission (single unit in VR, and only CfgFunctions), and I can see them all running correctly.
preStart gives an error (since it's in a mission)
preInit runs after server start
unit init (aka init field of object) runs right after that
postInit runs after mission has been setup

#

the only thing I can image is that on preInit the unit object exists, but is not initialized yet, and therefor no scripts can target it

#

however it should exist and work on postInit

#

since all the init scripts (server, playerLocal and playerServer) are also executed

cunning crown
#

Having the source file would be great @woeful sundial

winter rose
woeful sundial
#

ok

coral owl
#

@hollow thistle @exotic flax thanks guys. I am embarrassed that this does not work, I confirm this feels to me as a blatant easy overlook and rookie mistake somewhere... which is ultimately the type of issue that has granted me the most hours of troubleshooting in Arma eheheh

#

@exotic flax if you feel like it is not stealing too much of your time, I would love to read your code to find out where I went wrong..

exotic flax
coral owl
#

Thanks @exotic flax really thanks - anyone who got stuck in scripting/programming (on trivial things like mine, for example ;)) knows how helpful this is. 🤝

#

Yours work and I cannot for the life of me find out why mine does not ahah this is the beauty of programming ahah

#

The only thing that I was doing different is I had an include into the CfgFunctions

  #include 'functions\includeThis.hpp'
};```
coral owl
#

Ok it seems it did not like my #include - the rest was written correctly. I am not sure why I wanted to be so anal with the #include thing.. I can ditch it easily

winter rose
#

the simplest the bettest!

exotic flax
#

Hmm... Will test it, but CfgFunctions should work correctly through an include, and the path it's searching in should always be mission/add-on/Arma root

coral owl
#

the only idea of having an include was to keep my "shell" the more "template-oriented" and go change stuff only in specific places. But anyway, it works this way..

#

Now, I have a rather appealing question of something I totally forgot from my Arma 2 days of modding..

in an MP game, if a script runs on a client and adds damage to a unit.. will the damage broadcast over the net to all clients/server?

#

This simple script I have adds a bit more damage to vanilla hand grenades, through a simple FiredMan EH.. once it gathers the entities in the blast radius etc. etc. it just setDamage on them according to their proximity to the blast and their possible proximity to buildings that can emphasize the blast/shrapnel.

I wonder if I should call a server script for adding the damage to those units, maybe using NetIds etc. etc.

winter rose
coral owl
#

I just realized what those icons are. Sorry @winter rose and thanks!

#

looks down in shame 😉

#

My last step is moving this "script" to a "Script-in-a-mod".. using config.cpp and retouching the paths as I am afraid %ROOT% and such will come into play and try to haunt my night XD

#

I think in the case of a mod, this:

class CfgFunctions {
    class VTO {
        tag = "VTO";
        class VTO_modCategory {
            file = "functions\clients";
            
            class preStart {
                preStart = 0;   // returns error, since it's in a mission
            };
            class preInit {
                preInit = 0;    // runs after server/mission is loaded, but before objects are placed and initialized
            };
            class postInit {
                postInit = 1;   // runs after mission configuration and after object initializing
            };
            class tougherVanillaGrenades {
                preStart = 0;
                preInit = 0;
                postInit = 0;
            };
        };
    };
};```

will have to be put in a config.cpp ... mhhhhhh.,........
winter rose
#

@coral owl
```cpp
/* config */
```
plz

exotic flax
#

actually, the root of the files is always mission root, or addon root, so no need to write a full path (not even sure if it would technically be possible to call a script from another addon)

coral owl
#

ah @exotic flax ok!

@winter rose sorry I am not sure I get that?

worn forge
#

Lou is just being really anal

winter rose
#

@worn forge in u

worn forge
#

burned

winter rose
#

@coral owl if you add "cpp" and a line return after the first ``` , it colours the config, enhancing readability

coral owl
#

uh, got it, trying now, thanks!

#

nice!!

#

looks better than my Notepad++, I want those colors lol

#

Looks like MONOKAI to me

worn forge
coral owl
#

Thanks @worn forge I have it but it looks hard to read on darker themes, by default

winter rose
#

Wiki to the rescue!

coral owl
#

nice thanks! - I did have the SQF plugin for Notepad++ but it forced me to go for a lighter theme, I was more of a dark type. But anyway it works well, I was using C++ before and it kinda worked too

winter rose
#

same, I went to Visual Studio Code a bit due to that (light theme… UGH)

coral owl
#

One question on the config.cpp - as I might be making my first mistake of the night -

is this the correct structure?

        config.cpp
        addons \
                modname.pbo
#

and inside modname.pbo essentially there is what used to be the functions folder I had in the mission..

#

and note: I've searched for info on "scripts turned to mods" all day yesterday and could only find very little definitive information, sorry if I keep asking!

exotic flax
#

each addon (aka pbo) needs a config.cpp file with CfgPatches

coral owl
#

even if I open and close it cpp CfgPatches {};

exotic flax
#

in that case nothing will work 😉

coral owl
#

ahah lol omg sorry

#

All of the forums posts that talk about config.cpp for CfgFunctions start right in with

CfgFunctions {
// stuff in here
};```
#

the only ones that had CfgPatches were related to mods doing re-textures etc. etc. so I thought for scripts I only needed to create a config.cpp that looked exactly like my description.ext (basically had only the CfgFunctions thing)

exotic flax
#

I might annoy Lou to make a page about basic mod strucctures, since I can't find one

coral owl
#

I am at a total loss and I totally understand I look like I am harassing this channel lol

#

The more videos I watch and threads I read the more different methods I get and this is definitely meaning none of them will work 🙂

winter rose
#

y mi

coral owl
#

Even something like Addon Builder is not totally sure for me after I've watched people PBO the addons folder, PBO the @MYMOD folder, PBO the folder inside addons folder etc. etc. etc.

#

I thought I had become finally a man with my Skyrim modding but no lol

#

Surprisingly there is very little info on how to turn a mission script into a mod.. I thought more was there. I promise I'll make a video of my own once I get out of this alive

exotic flax
#

well, missions are more simple since you can submit them to the Workshop directly from the editor

coral owl
#

For example this script I've done that makes hand grenades just a little more powerful especially in close quarters.. I had it as a mission script then lots of friends started asking me to "make it a mod" so they load it in and go.. and there it started..

#

They basically wanted grenades to be a bit more powerful regardless of a mission that needed an init call in it.. makes sense I mean the request is legit.. and off I went to Google thinking it was a simple step!

exotic flax
#

the moment you know how it works it is simple 😉

coral owl
#

ahah true!!

exotic flax
#

because no one uses it, we all use Mikero's Tools 😉

coral owl
#

the only difference between the two on YouTube is that the former gives Portuguese people speaking, the latter russian lol

#

I really don't want to ask my wives to translate that lol, I divorced from both XD

#

I'll start from the basics:

❓ "Addon source directory" in Addon Builder, means the ROOT folder of the mod, e.g. e:@MYMOD
🔲 true 🔲 false

lol

exotic flax
#

both 😛

coral owl
#

ahah ok MAME32.exe here I come

#

STUNT.exe here I come, make room for MS-DOS 6.22

#

I get that you use SOURCE: your root folder mod and you use DESTINATION: the addons folder inside your root mod

#

then you delete everything but the pbos stuff in the addons subfolder, as you have the pbo that basically replaces it

exotic flax
#

negative

#

SOURCE: is the location where the mod starts (parent directory with addons folder)
DESTINATION: is a new folder (aka @modname) where the contents of source are being placed after packing

coral owl
#

ah got it. Thanks. That's my milestone now.

Interrogative: will DESTINATION have an addons subfolder with the pbo inside? or does the pbo generated by the Addon Builder go straight in the root?

exotic flax
#
Before packing
---
- \myAddon
    - \addons
        - \myAddon
            - \config.cpp

After packing
---
- \@myMod
    - \addons
        - \myAddon.pbbo
coral owl
#

HEAD EXPLODES

#

finally!

exotic flax
#

and you should always use the P drive to ensure proper naming inside the pbo's

coral owl
#

Thanks for taking the time to help me out

#

Got it on the P Drive, mounted now

#

ok off I go, I am renewed in the blessing of this new information

#

Ok I got it, let's see if it works in A3

#

sips tea

#

ok it all loads but the function/script does not, and I suspect now the problem is my config.cpp

exotic flax
#

although it's more for #arma3_config, here's a basic structure for config.cpp:

class CfgPatches {
    class myAddon {
        name = "My Addon";
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {};
        author = "My Fabulous Name";
        url = "My Website or Discord";
        version = "1.0.0";
    };
};

#include "CfgFunctions.hpp"
// other includes
coral owl
#

HEAD RE-EXPLODES
Many thanks! I am devouring the info as we speak (we don't speak)

exotic flax
#

for me the best way to figure out how it works is by looking at other mods and try (and fail)

coral owl
#

I thought about it, I should probably unPBO some mods and take a look in there...

#

I hate that A3 is so silent when having errors in mods that use scripts, at least in missions it spits errors like crazy

exotic flax
#

although I suggest not to start with CBA or ACE as a starting point, since they do a lot of things "smart" which can be even more intimidating...

coral owl
#

yeah something simple ofc

#

OH YES, at least it works now, it says it cannot find functions\clients\fn_preStart.sqf

A sign of life!

young current
#

The Arma 3 samples on Steam are ok startingpoint

coral owl
#

which means the path is wrong, but still, I am there

young current
#

as well as the wiki pages about configs

#

you should have a Reezo_Addonname folder where you put the config at its root and the rest of the stuff

#

also if you want debugging at packing, you should use pboProject

#

it can catch quite a lot of common mistakes and missing files

coral owl
#

nice thanks! Took note of this. The configs Iooked for but could not find and then when I did they were always tailored to some specific need of a modder (e.g. soldier classes etc)

#

but it makes sense

hollow thistle
#

Does anyone know what type of ID is used for player created markers?
Their names are like "_USER_DEFINED #2/0/2", "_USER_DEFINED #2004492438/3/0" first one is player-server, second one is client. I'm not sure how to get player id for that. (format seems to be "_USER_DEFINED #<owner_id>/<marker_id>/<channel>")

coral owl
#

Quote:
Where %ROOT% is either mission root (where mission.sqm file is), or the game root (path to an addon is not included and has to be part of the file path, e.g., myAddon\myFile.sqf).

#

this probably means I have to add the mod root to it..

exotic flax
hollow thistle
#

thx, I've checked only createMarker page.

exotic flax
#

and it's a unique DirectPlay ID

#

which you can catch trough the PlayerConnected EH

hollow thistle
#

eh, It seems you can only get the ID from server via the EH

#

hoped for some command

coral owl
#

Also, is it recommended for mods to be always in the game root? e:\Arma 3\ @MYMOD ?

exotic flax
#

never do that!

coral owl
#

At the moment I have them somewhere totally different

#

e:\ArmA 3 Mods

#

the last A is intentional lol eheheh ducks for cover

exotic flax
#

since Arma will always load mods/addons in the root, so you won't be able to disable them

coral owl
#

I basically added my e:\Arma 3 Mods as a watched folder and off I go from there

ebon ridge
#

eh_killed = {
    systemChat format["%1 killed", _this];
};
private _hG = createGroup independent;
private _hO = _hG createUnit ["I_Protagonist_VR_F", position player, [], 10, "FORM"];
private  _ehid = _hO addEventHandler ["Killed", eh_killed];
systemChat str _ehid;

This prints the killed message twice. Why is killed getting called twice?!

hollow thistle
#

arma bug triggered by rewrite of ACE Medical

ebon ridge
#

thanks, and sigh!

hollow thistle
#

CBA XEH events are not having this bug as it's fixed in there.

ebon ridge
#

yeah i will switch to that now

exotic flax
#

... and ACE uses CBA EH's

hollow thistle
#

not everywhere

exotic flax
#

and how can a mod cause a bug in a game?

hollow thistle
#

setDamage inside killed EH

#

use this

ebon ridge
#

yeah that is an arma bug, they should have thought of it

#

its classic event handler error to retrigger

hollow thistle
#

Killed event handler double execution bug fix:

params ["_unit"];

if (_unit getVariable [QGVAR(killedBody), objNull] != _unit) exitWith {};
_unit setVariable [QGVAR(killedBody), _unit];

// do your stuff
ebon ridge
#

as well as CBA EH?

hollow thistle
#

CBA XEH does need it as it's guarded from that

coral owl
hollow thistle
#

as you can see in the linked code.

ebon ridge
#

yeah i just noticed thanks

#

i will just use CBA we intended to do that anyway cos other mods keep removing our event handlers and suchlike

#

so is it CBA_fnc_addEventHandler or CBA_fnc_addBISEventHandler?

coral owl
#

hopefully it will work (it won't I am sure)

#

and it does
not.

ebon ridge
#

whelp CBA_fnc_addBISEventHandler doesn't work it still fires twice

coral owl
#

it weeeeeeeeeeeeeeeeeeeerks

#

That's the taco you were all expecting

young current
#

why do you have a x\ folder?

coral owl
#

I no longer have

young current
coral owl
#

True, sorry. I am done with it zipties mouth 🙂

#

going to sleep, thanks everyone!!

#

zzzz

ornate prairie
#

hey im trying to play a custom sound effect from an aircraft, and i cant seem to get it loud enough to be heard over the sound of the engines

#

if i set the fade distance to 1000 meters, will the sound play at 50% volume at 500 meters or is that not how it works?

leaden summit
#

Is there an easy way to count the number of seats in a vehicle? I'm trying to make sure a vehicle has between 1 and the max number of occupants in it

smoky verge
#

@leaden summit something like (count (crew vehiclenamehere)) == _maxseats?

exotic flax
leaden summit
#

crew doesn't count empty seats does it?3

#

wait, fullcrew does

#

Ok thanks for pointing me in the right direction guys ❤️

oak elbow
#

so how can i Place a weapon that can't be picked up to make it like an object so to speak in the editor

violet gull
leaden summit
#

Awesome thanks phronk, ❤️ your work

coral owl
#

@ornate prairie I've always thought that if maxDistance = 100 then at 50 you have 50% power or something like that. Maybe it's not like y/x=k but it should smoothly decrease with distance.

First off, is your custom sound normalized close to 0 dBfs? I'd stay a bit lower just because when turned to ogg, as any other encoding, being close to full scale might introduce slight distortion.

Then I would try to attach that sound to something like a soldier, just to make sure I can hear it in absence of stronger sounds.. and test how easy it easy to listen to it at various distances.

Worst case you can create an invisible particle between the source and you and have your sound be played on that invisible source, so it's actually closer than the main engine sound.. but I'd prefer it to be exactly where the item is.. Maybe also double check how the entry is in description.ext or config.. to make sure you have full volume (not sure you can go over 1.0 though)

hollow thistle
#

@ebon ridge none of them is XEH

#

addEventHandler is handler for CBA triggered events

#

addBISEventHandler allows you to use vanilla EH with additional arguments tied to it.

#

This is XEH (config or script)

ebon ridge
#

Okay thanks, that will be useful. I got the behavior I wanted by using the CBA_fnc_addBISEventHandler provided event handle id to remove it again so it only fires once.

sacred slate
#

i want to add all groups to players HC. i found this command: player hcsetgroup [Razor_team,""]; how can i set it to all groups without naming them?

#

looks like i have a different problem. in this sp scenario i cant set wp's for later added hc groups.

#

so looks like i have to enable some major hc function for the player first

winter rose
#

forEach allGroups

sacred slate
#

ok.. i will fiddle this together, thx.

#

still i cant issue waypoints for hc squads, i can on the map, but they wont move. no line. in fps view they also dont move.

worn forge
#

If you've moved them to the HC, then the HC is the owner

sacred slate
#

yeah but its broken. HC wp's don't show any effect

#

the unit stands still

winter rose
#

@worn forge HC means High Command here (not Headless Client)

sacred slate
#

yeah high command.

worn forge
#

Ah.

austere sentinel
#

Is there a way to determine if a littlebird can land in an area? Working on a pilot tasking system but I don't want to spam them with impossible LZs

exotic flax
#

selectBestPlaces 😉

worn forge
exotic flax
#

although findEmptyPosition works better to find empty spots (instead of occupied)

austere sentinel
#

Whew, I was expecting to have to do the area calculation myself, thats awesome, thank you!

exotic flax
#

there are a lot of functions which you can use to find locations on terrains, and they all have their uses.

austere sentinel
#

Other than bestplace "meadow", do these commands check that the area above the pos is clear, or would something like a hangar tent be considered a valid area?

exotic flax
#

You can "calculate" the area, so for example: meadow - trees - houses - sea - hills

worn forge
#

selectBestPlaces is good, but in no way perfect.

austere sentinel
#

Hm, didn't see the "ambient parameters" page there. RTFM 🙄
Thanks a ton, just saved me probably a couple hours of digging through the wiki lol

worn forge
vocal agate
#

Good morning.
In order to provide an easier way for mission makers to configure my script, I want to use .hpp "config" files. I am, however, having trouble finding information about how to read them in SQF. Using _content = preprocessFile "myfile.hpp"; returns a String of the file's contents - with which I remain unsure what to do.
Although the file has been "pre-processed", I am unable to access its contents using configProperties. In facts, "true" configClasses (missionConfigFile); returns an empty array ([]) - whereas I would expect it to return my file's top class.

austere sentinel
#

I believe you'll have to #include the files in description.ext

exotic flax
#
  1. what is in those config files?
  2. how do you include those config files?
  3. what/how do you want to read the config files?
vocal agate
#

I believe you'll have to #include the files in description.ext
That might be the easiest option, although one I would not be keen on implementing.

#
  1. what is in those config files?
    Let me copy the one I just did to test that out:
class Users {
  class root {
    password = "password";
    clearance = 7;
  };
};

class Files {
  class welcome {
    text = "success";
  };
};
#
  1. how do you include those config files?
    I currently don't. I consider #include to be a "static" way of doing that, and I would like to avoid this.
austere sentinel
#

configs are static as far as I know

young current
#

Scripts don't read files like that on the fly

exotic flax
austere sentinel
#

If you want mission makers to configure the script, have them subclass a config class that you've supplied

#
class BaseConfig { foo = "xyz"; };
class MissionMakerConfig : BaseConfig { foo = "abc"; };

something along those lines

vocal agate
#

configs are static as far as I know
And I don't need them to be dynamic. I need a way to load as many of them as I can without worrying about having to add them all to the description.ext.

young current
#

What is the actual purpose of the configs?

austere sentinel
#

It sounds like you're trying to fight the framework, honestly. If you're trying to keep description.ext clean, you can #include a file that #includes all of your headers

vocal agate
#

Scripts don't read files like that on the fly
That costs me dear to admit it. I guess I will have to find another way around that issue.

exotic flax
#

CBA Settings framework? 🤔

vocal agate
#

It sounds like you're trying to fight the framework, honestly.
I probably am. I am still learning all that scripting stuff and I am mostly unaware of the limitations of the framework so far.

#

CBA Settings framework?
Wouldn't that require the mission makers to use CBA as well?

exotic flax
vocal agate
#

What is the actual purpose of the configs?
Sorry for the xyproblem here.
Those configs are to be the "init values" of electronic devices (computers, tablets...). Those electronic devices (which are actual "objects" in Arma 3) have an ID (like the ones you can give to triggers or units) that I planned to use to read the corresponding config file and populate these electronic devices with the content of these config files (i.e. users, files...)

#

As a result, I am unable to predict how many config files there would be.

#

There could be dozens of config files (for dozens of devices) with different users or files in them.

austere sentinel
#

Maybe I'm a C++ dev with a hammer, but that sounds more like a job of an extension rather than configs

vocal agate
#

What's the difference? An extension would also need those config files.

winter rose
#

what you can do is an include of a single file, and in there have one entry "id" "values" per object

#

+1 item = +1 entry

vocal agate
#

Something like that ?

class Devices {
  class Device1 {
    value1 = "abc";
    text = "blabla";
  };
};
winter rose
#

for example

#

You can even make a macro for this

vocal agate
#

That might work then... I am sorry I didn't get to see the broader picture before.

You can even make a macro for this
While I know what a macro is, I'm not sure to understand how I could do that.

winter rose
#

don't worry, we can help on this one

vocal agate
#

Thanks Relic, Grezvany13, HorribleGoat and LouMontana for helping me on my first newbie question 🙂

#

I think I will go with what Lou Montana suggested.

exotic flax
#

to be fair; I wouldn't even touch config files in this case, but create functions to dynamically create objects for a mission, instead of pre-defining them.
Of course, having a set of pre-made objects can be done as well.

vocal agate
#

create functions to dynamically create objects for a mission, instead of pre-defining them.
I already had a take at that thing. The mission makers I am collaborating with had some... issues using said functions. That's why I decided to try something else, i.e. the configs.

#

Lou Montana, I just read the wiki page about preprocessor commands and macros. Did you mean I should use one of the command other than #include?

queen cargo
#

@vocal agate maybe use XML instead for a Config

austere sentinel
#

you'd be looking for #define

vocal agate
#

😮

queen cargo
#

There are also parsers for other file Formats iirc

#

But XML at least I can link you

vocal agate
#

I think XML can do the job, honestly. Although I have some... bad memories with it.

#

I will try to find parsers for the file formats I believe are a bit more user-friendly.

#

You're all amazing here ❤️

lapis ivy
#

Tell me, how can I do that except for the commanders, no one could put tags on the map in an additional channel?

austere sentinel
#

Do they have an assigned role? if so, just delete any markers made by players that don't have that role

lapis ivy
#

Is it possible to combine this with TFAR?
If the player has a long-distance radio, he can put tags in an additional channel. And if there's no radio, he can't.

worn forge
#

sounds like if !( backpack player in ["classname", "classname2", "etc"] ) then { deleteMarker "marker"; };

#

Pity there's no eventhandler for when the player places a marker

austere sentinel
#

There really should be honestly. You could probably hack one together using UI events & publicVariableServer & addPublicVariableEventHandler, but it'd be ugly

worn forge
#

Though I suppose you could add a ButtonDblClick ctrl event handler, combining it with currentChannel

#

not sure what you mean by additional channel

austere sentinel
#

probably a custom channel that isn't standard

lapis ivy
#

sideChannel

austere sentinel
#

Question on MP scripting; if I want to call a function file do I have to compile preprocessFile 'path' in both initServer & initPlayerLocal?

worn forge
#

You don't have to do either

#

Oh wait, you mean to turn a .sqf file into a function?

austere sentinel
#

kind of, I know how to do that; just wondering if "funcA" that I compiled in initServer is accessible in a client local script

#

still wrapping my head around locality lol

worn forge
#

I think the filename initServer will probalby tell you all you need to know about that. If you want it accessible to both, you'd use init.sqf

austere sentinel
#

lol good point

worn forge
#

@lapis ivy not tested, but this is what I'd do... just replace the classnames below with TFAR classes. Disables double-click action for placing markers if you are in side channel and aren't wearing the proper radio backpack

mapEventHandler = (findDisplay 12) displayAddEventHandler ["ButtonDblClick", {
  params ["_control", "_button", "_xPos", "_yPos", "_shift", "_ctrl", "_alt"];
  if ( _button == 0 && {currentChannel == 1} && {!( backpack player in ["classname", "classname2", "etc"])} ) exitWith { true };
}];```
lapis ivy
#

Thanks, I will check back later.

potent depot
#

Anyone around here ever attempted to create a unit caching system for use with HCs and Zeus?

worn forge
#

TMZulu Headless Client or High Command? Not gonna get burned again

potent depot
#

Headless. I’ve been making my own system based off a mix of werthless and acex

worn forge
#

define unit caching? Do you mean using enableSimulation in some way?

potent depot
#

Essential either fully or partially removing or disabling simulation on ai units not within a certain distance of players

#

And then respawning them or enabling simulation once they are

#

There are a few script out there for editor or spawn scripts style of unit spawning but I don’t think there is one for Zeus.

worn forge
#

It seems to apply to mission spawned units, as when I'm viewing my MP mission in Zeus, AI units that aren't close to players aren't moving until players (or the zeus curatorCamera) gets close

austere sentinel
#

is there a list of icons used with drawIcon3d somewhere?

potent depot
#

Yeah I’m aware of dynamic simulation however that doesn’t seem to function in the way we intend it.

#

Relic, you can use pretty much and .paa with it. There are a bunch of icons in the Arma source folders you can use though. I can’t remember the location hopefully someone can give you it. I don’t think there is a list anywhere though as the icons are spread out across multiple pbos.

austere sentinel
#

ah ok, yeah that seems to be the theme for any assets lol. I'll probably just throw something together using ImageToPAA

potent depot
#

I would try looking through the arma folders there are more icons for things than you’d think. You just gotta find them.

worn forge
#

@austere sentinel I've been using drawIcon3d lately, here's what's useful for me:

  1. You can use any of the task icons, ie., taskVariable call BIS_fnc_taskTypeIcon
  2. Rank params will work, ie., [_unit,"texture"] call BIS_fnc_rankParams
  3. As Zulu says, any .paa will work, ie., "\A3\ui_f\data\igui\cfg\simpleTasks\types\target_ca.paa",
potent depot
#

Ah yeah ui_f has most of them

austere sentinel
#

You guys are awesome, thanks again

worn forge
winter rose
#

(or getPosVisual if you prefer this syntax)

austere sentinel
#

Using it to mark LZs/Bases for pilots. The icons won't be moving at all (in world space at least), was using tasks but it doesn't show the icon in the UI, just the 3d waypoint icon

ornate prairie
#

@coral owl my custom sounds being used I balanced myself just by testing in game. What is dBfs? I’ve been working off the official wiki which makes no mention of this in the sounds configs.

I have more or less solved my original problem, right now I’m trying to figure out how to stop an sfx from looping after starting it. (setting it to nothing and deleting the trigger don’t seem to work)

coral owl
#

oh sorry @ornate prairie for dBfs I meant the peak amplitude value in an audio software, just to make sure the audio file itself is not "weak" so to speak. Basically 0 dBfs is the point at which your typical red light that is "OVER" or "PEAK" turns on and the sound, from there up, starts distorting.

I basically only meant: you obviously made sure the sound file is not "weak" in volume by itself (hence I usually normalize audio files at around -3 or -1 dBfs maximum peak level in an audio application).

ornate prairie
#

ahh ok

#

i have also notice when searching through people's sound configs online that they use "db+10" to set the volume of a sound, though the wiki doesn't explain this at all. Do you know what that means or how it works? (currently just setting the volume to 100 - 300 depending on how loud i need a sound to be

dreamy kestrel
#

Q: when working with the particle source stuff and a target object, with its own position... can I adjust the position of the spawning particles using the particle array position input? In other words, if I want particles to spawn 200m above the target object, then that is something like [x, y, 200]? Seems straightforward enough, I just wanted to clarify... Thanks!

young current
#

yes it should work like that

oak elbow
#

so how can i Place a weapon that can't be picked up to make it like an object so to speak in the editor

young current
oak elbow
#

@young current so when i set it as an object i can pick it up but i dont want to have anyone pick it up

young current
#

probably not

#

for that I dont know an answer

#

from your initial question I though you just wanted it to be a prop, not something only you can use

oak elbow
#

no worries i appriciate you giving me some advise to find some answers

young current
#

what is the usecase?

oak elbow
#

i dont want anyone to be able to use it i just want it as an object i dont want anyone to be able to interact with it

#

but when i start server i can pick it up

young current
#

perhaps you could tie an addaction to it that only shows to you

#

so that it checks the player has your steamid or something like that

#

it sounds a bit cheaty though 😛

oak elbow
#

yea i rather not do it that way lol

austere sentinel
#

^this would be the easiest. I thought there was an event handler for taking stuff off the ground, but it seems it only handles containers

oak elbow
#

yea

austere sentinel
#

you could just put it in a box, delete from anyone's inventory but your own (using the Take EH) then replace it in the box

finite jackal
#

The Take EH triggers for GroundWeaponHolder as well

oak elbow
#

well i dont want myself our anyone to be able to pick it up

austere sentinel
#

when you place the object in the editor; check the simple object checkbox

oak elbow
#

ok ill try that and see

austere sentinel
#

if that option doesn't exist, disable simulation on it. You'll still be able to "interact" with it (i.e. the 'take' option shows up), but it doesn't do anything.

oak elbow
#

you will just keep attempting to pick up but it wount pick up correct

austere sentinel
#

yep

ornate prairie
#

How would I make an event handler that automatically applies to all units in the mission of a certain class?

#

It would take forever to add them to each unit's init

oak elbow
#

@austere sentinel so i was still able to pick up the weapon

#

😦

#

oh i figured it out but know i need to figure out how to get it to not fall of the object i have it sitting on lol

ornate prairie
#
{if (_this isKindOf "placeholder_1" OR _this isKindOf "placeholder_2") then {
    
    _unit addEventHandler ["Killed", {
        [_this, {
            params ["_corpse"];
    
            private _dummy = "#particlesource" createVehicleLocal [0,0,0];
            _dummy setPosWorld getPosWorld _corpse;
            _dummy say3D "placeholder_death_sound";
        }] remoteExec ["call"];
    }];
    
    }

} forEach allUnits;

would this work for adding death sounds to specific classnames?

#

it would be executed at mission start

rugged acorn
#

Hello there guys... I am a super noob on scripting and I would like to just start learning. I tried to set a holdAction on an .sqf file to run it on MP and multiple "objects"/units. But I keep getting a "generic error" message. Does anyone would like to help a bit? If yes please DM me (I do not want to spam here and possibly scroll up and down to get all the pieces of the conversations!) Cheers.

winter rose
#

if you post at least the concerned line people here could help here @rugged acorn

bright flume
#

its showing its set in CBA settings?

bright flume
#

a simple yes or no would have done... its kinda built into ace didnt need to see the script.

sacred slate
#

i play a sp scenario with team switch. when i switch, i become squad leader. but when i switch to the next unit i want the unit to have a stop command issued, or hold position

#

this is what i got so far: onTeamSwitch commandStop;

crisp cairn
#

Hey all, I am looking to create a script which will be executed by a Zeus Module. I have no idea how to do this but I am at first needing to get the object that the module has been placed on. Does anyone know how I can do this?

sacred slate
#

i rephrase my question: i want onteamswitch the last controlled unit to get commandStop, but i cant get the syntax together.

#

well maybe like this. onTeamSwitch {_oldUnit commandStop};

#

or like this onTeamSwitch _oldUnit commandStop;

#

it makes me crazy.

spark turret
#

Replace _oldunit with _from and it should work

crisp cairn
#

Dedmen, could I hint "logic" then to see what the module is placed on?

spark turret
#

If i understand the biki correctly _from and _to are automatically assigned in in onTeamSwitch for the old and new unit.

still forum
#

My name is Dedmen

bright flume
#

or the fact when you release the AI as SQL, it starts issuing orders again.. try making it so when you switch order to move where you are already.

still forum
#

you can hint or systemChat or diag_log or remtoeExec whatever you want

spark turret
#

Also: When player switches and leaves behind AI unit, you need to enable "TeamSwitch" AI on it (with onTeamSwitch { _from enableAI "TeamSwitch" };) so that the unit continues with waypoints.
@Helltiger

#

If ai is disabled it wont do anything.

sacred slate
#

thx. i dont want the ai to move. when i switch away from a unit (its in the same squad) i want the last played unit to get a stop command.

crisp cairn
#

So logic is the item under the module?

sacred slate
#

i play every role in a squad, when i switch, i become team leader, but the unit loose its stop command.

winter rose
spark turret
#

Ai tends to ignore stop orders. Better to just disable pathing

winter rose
#

(they won't defend themselves)
else ```sqf
onTeamSwitch { doStop _from };

sacred slate
#

lets try this. thx

#

this works! many thanks.

smoky verge
#

can you get rotation values from getpos?

winter rose
#

wut?

#

getDir/direction?

#

@smoky verge …?

smoky verge
#

I'm loading a script in a sec
basically trying to spawn some things inside others with setpos get pos but they spawn rotated at 0°

winter rose
#

getDir/setDir should do the trick yes

smoky verge
#

should it be in another line or can I put it inside the setPos?
createVehicle ["Land_pond_01", getPosASL p2, [], 0, "NONE"];

#

@winter rose

#

not sure how to phrase it since the spawned objects will not have variable names

winter rose
smoky verge
#

but how can I set the direction of an object I have no variable name?
could use the way people use to manage terrain object but forgot how it was called

winter rose
#

look again, createVehicle returns the object

#
private _james = createVehicle ["Land_pond_01", getPosASL p2, [], 0, "NONE"];
_james setDir 225;
#

also, you should use → getPosATL

smoky verge
#

I need them all at a specific ASL height(even though it doesnt seem to work
I'll show you why

spark turret
#

Subtle joke lou

winter rose
#

@smoky verge the createVehicle command specifically takes ATL position; hence why it won't work

#

you can still setPosASL after creating it

spark turret
#

Which is quasi instant so you wont notice it

smoky verge
#

yeah istantaneusness is not a problem thankfully

winter rose
#

createVehicle → setDir → setPosASL

#

(for network, setDir before setPos)

smoky verge
winter rose
#

working then?

smoky verge
#

still writing it

winter rose
#

with pleasure
that's sexy looking!

smoky verge
#

the reason behind this messy script is because ponds have infinite depth so you'll be underwater no matter how under them you are
so I made so players can walk inside the Dam before they get outside and then spawn the pieces for when they surface on top

winter rose
#

in SP, no problem

#

in MP, you might want a local script and createVehicleLocal

smoky verge
#

why exactly?

#

doesn't that create the objects only for those in the trigger?

austere sentinel
#

vehicles exist globally, but their locality is weird if created on the server I believe

#

I defer to lou though, he's the living wiki here 😛

winter rose
#

you would be strongly disappointed with me as a wiki, even against a 502 one 😁

smoky verge
#

so is that a yes or a no?

winter rose
#

if you createVehicle, the pond would exist for everyone
if you createVehicle_Local_, it only exists for the current player - which is what you want

#

you don't want to have a playerA walking under it then, because another playerB is out of your structure, playerA having to swim

smoky verge
#

but I need it for everyone, there wont be any playerB luckly
plus pilots who come afterwards would need to see the hole filled

winter rose
#

all the players will run this script

#

so locally, if they go under it, it's not there

but others outside will have it

#

if you create it globally so the pilots see it, then all players walking under it will swim

#

because it would be one state for everyone

smoky verge
#

the players will activate it only when everyone is above it
and the pilots will not pass until they are above

#

its all conveniently organized

winter rose
#

okay then, your call on mission design

smoky verge
#

thanks for the help, was getting desperate

winter rose
#

pleasure

alpine ledge
#

i'm trying to create an objective that will trigger when the player knowsAbout a static object placed randomly on the map
however, it seems that the moment the mission starts, my knowsAbout of said object is immediately set to 4
anyone have any possible workarounds?

exotic flax
#

create item after mission start

alpine ledge
#

tried that, still 4 when it spawns

bright flume
#

then just issue forgetTarget?

alpine ledge
#

tried that too, it kinda does what i want it to, but it means the player then has to manually mark the object with T even if they're looking directly at it

#

weirdly doing it that way doesn't return 4 on knowsAbout, but 1.5 instead GWcmeisterPeepoShrug

exotic flax
#

knowsAbout is also more useful for AI, since the engine can never know what a player knows 😉

bright flume
#

spawn it in the middle of nowhere, then teleport the object back into view distance

#

knows about says its reset to zero normally if goes out of view distance?

#
Note: neither fog nor daylight affect this behaviour ```
alpine ledge
#

no joy, now i apparently have no knowledge of it even when standing right next to it eyeclawpepe

bright flume
#

is automatic reporting off?

alpine ledge
#

nop, but even if it was when i was manually marking it with T it was still returning 0

queen cargo
#

you got an HQ for that side?

alpine ledge
#

a what GWseremePeepoThink

queen cargo
#

is the unit you are spawning the first unit of that faction in the game?

alpine ledge
#

yes

#

just debugging atm so he's the only unit on the map

queen cargo
#

and you are placing that unit using a script? or 3den?

alpine ledge
#

hold on who are we talking about

#

atm i'm just in a test mission where i'm the only soldier on the map, with an object randomly placed somewhere

#

done via 3den atm

queen cargo
#

then ignore what i said
HQ is automatically created if you place everything via 3den

bright flume
#

what is the static object in question atm just wondering

alpine ledge
#

Land_PowerGenerator_F

#

will spawn somewhere atleast 400m away from the player

exotic flax
#

based on the discussion in #arma3_ai it seems that all the functions like knowsAbout, targets*, etc. are not predictable, even for AI usage.

bright flume
#

Quiksilvers I&A tanoa does basically what you trying to do but where in all that code I cant say nor know so know its possible.

alpine ledge
#

weirdly if i swap the generator out for an opfor soldier, it functions as expected

exotic flax
#

usually there's a trigger which works by range (eg. if target range < 100 = trigger action)

bright flume
#

its likely cuz its a static.

alpine ledge
#

that's what i'm starting to think too...

#

mby player always knows where all statics are?

#

could i have an opfor static?

bright flume
#

place a empty tank see if you get the same result as a static or like a soldier

alpine ledge
#

placed 4 units and here's their knowsAbout at mission start
csat soldier - 0
full angara - 0
empty angara - 0
static generator - 4

exotic flax
#

interesting

alpine ledge
#

urgh, even manually changing the generators side to east in the sqm doesn't work

bright flume
#

well the static is civ by default trying to change its side see if that helps but not a specific one trying 'enemy' 🙂

winter rose
#

knowsAbout most likely only deals about AI knowledge yes, not objects

alpine ledge
#

GWvertiPeepoSadMan must've changed it for arma 3; i remember this working just fine in arma 2

bright flume
#

Lou, what about some trickery and use a invisible unarmed AI?

winter rose
#

I know I did some player-side trickery with checking if an object was on screen…

#

BI does with distance…
invisible AI would be, well, invisible

bright flume
#

CBA_*_invisibleTarget refering to

winter rose
#

oh

#

I don't know about CBA 😄

alpine ledge
#

this could work GWseremePeepoThink

exotic flax
#

hmm.... currently testing it on Altis, where I have a unit about 11km from a static object (ammo crate), and knowsAbout returns 0

alpine ledge
#

yeah when they're on the other side of the map it's fine

#

CBA invis targets seem to be close to what i want it seems - doesn't instantly hit 4 at a glance so that's good peepoCheer

#

doesn't build up very quickly either FeelsWordMan

bright flume
#

could be one of the reasons they even made invisible AIs

#

can make static map objects have proper spotting/knowledge like if its manned by AI but dont need to be?

#

hell could be a miarad of factors that generator has cammo value also

exotic flax
#

It seems that knowsAbout is always 4(?) for objects within viewDistance, but goes down again depending if it is allowed to see it.
Because targetKnowledge says it "knows" the object (even has a position), but still returns false for "knowing" it

bright flume
#

yeah the error factor is what goes up I believe over time? honestly I have no clue how the real underpinnings of this stuff is.

winter rose
#

I would come back to "why do you need that?"

bright flume
#

mission objective to trigger a event I believe is the end game

alpine ledge
#

that's the goal, yeah

#

once player knows about this generator, do xyz

bright flume
#

kinda like how I was saying QS's I&A has laser designating vics for CAS strikes. otherwise cas cant engage ground with how its set up

winter rose
#

you can put a civilian close to the generator 😄

bright flume
#

gotta look at it hold space, then it marks the target and reveals it for cas

winter rose
#

or do what I did, a client-side script that will check that said generator is on screen and generatorHeight > x% of screen's height

alpine ledge
#

that's a bit of a roundabout way to do it, lol

bright flume
#

I was thinking cursor look at

winter rose
#

I coupled it with cursorTarget yes

#

"just" cursorTarget is fine too

alpine ledge
#

hmm, that could work i guess

bright flume
#

btw what is that script/module that does the new 'hold enter/space' thing to interact you see like in Oldman and Contact

alpine ledge
#

cursorTarget + time > _t + 5 or something

bright flume
#

the interact spin wheel cant even think of a name accurately to describe it

hollow thistle
#

holdAction

alpine ledge
bright flume
#

ty thats likely it

alpine ledge
#

cursorTarget and a timeout trigger works well enough i think

#

thank for patience everyone iLOVEyou

bright flume
#

brainstorming FTW

alpine ledge
#

i quite like the idea of that hold space thing now that you mention it peepoStudy

#

wonder if i could get it to do the same thing but without hold a key just as a visual feedback that stuff is happening for the player

bright flume
#

well you could derp it with a addaction with a insane distance 😛

winter rose
#

perfs-- 😄

alpine ledge
#

could do, but i'd rather the player not have to press anything if i'm gonna go down that route PepeHmm

bright flume
#

now ya just asking for like raytracing detection with object occlusion....

alpine ledge
#

make it so, number one

bright flume
#

sadly if this was second life I could hand you the script over cuz I wrote it

exotic flax
#

creates AI with Machine Learning which is capable of writing scripts to do anything I want

winter rose
#

@bright flume lineIntersectsWith

#

down side being "a tree? a bush? a window? can't see through"

bright flume
#

yeah but the whole wrapper is where I'd be hung on. making a raytracing gun was hard enough.

winter rose
#

I did a proof of concept Slenderman once in A2 😄

#

if he was on screen (and not hidden by objects), the screen would shake

bright flume
#

nice

#

yeah arma has poor object occlusion to rely on trace rays

#

why ai shoot at you thru everything.... perfect eg. tanoa

alpine ledge
#

spends millions of dollars inventing an AI that will automatically put a ; at the end of your lines so you don't keep testing the mission and get hit with error missing ; every time you start honestly stupid machine what is your problem youre smart enough to tell me its not there but not smart enough to put it on yourself

winter rose
#

that would be a text editor rule, and it already exists 😄

bright flume
#

or you learn the right way and start only in VI as your editor...

#

I still use VI for my git commits lol

winter rose
#

"how do you generate a random string with VI?"
"you place a new user in front of it and ask him to exit the editor"

bright flume
#

Word!

#

but thats only if they randomly hit i or a otherwise who knows what will happen.

winter rose
#

Ctrl^C? Nope! Alt+F4? Nope!

#

fuuuuuuuuu…

#

(for anyone wondering: wq)

bright flume
#

wq! the god all power

exotic flax
#

#offtopic_editors?

winter rose
#

yes, I'm dropping the topic already 😄

high marsh
#

Well I mean if you mispell a command or just not recognized as anything it'll throw "missing ;"

#
player enableMoarFps false;

for example.

spark turret
#
player enableMoarFps false;

for example.
@high marsh

Ultimate hacker command lol

lapis ivy
#

Can you help me? The map label mod doesn't work well with the ace mod

spark turret
#

I certainly cant. But maybe others. Give more info pls

lapis ivy
#

This mod works together with TFAR, it changes the interface of map labels. It has everything I need, but if I run it with the ACE mod, the interface doesn't change.

still forum
#

what are map labels

lapis ivy
#

I'm sorry, I can't Express myself correctly, I use a translator myself from Russia.

Double-click on the map = tags. Em... how to say it correctly.

queen cargo
#

markers

#

map markers is what he talks about

lapis ivy
#

You can identify yourself and write something on the map. For example, your nickname and put a point where you are on the map.

#

A, thanks

#

Markers

#

I can send the mod in the archive, can anyone see what's wrong with it?

worn forge
#

I think perhaps you want to post on the bohemia forums, or in another discord channel that deals with mods... if you don't have specific scripting issues to sort out, not sure this is the channel to discuss it

lapis ivy
#

Ok, thanks

still forum
#

Not sure how TFAR and ACE are connected to map markers and scripting

spark turret
#

Through eldritch magic

lapis ivy
#

This is because if you don't have a long-distance radio, you can't set a marker on the map in the side channel

still forum
#

Ah! Nice idea

#

If you suspect its a scripting problem, have you tried putting diag_log everywhere, and seeing what doesn't get log that should get logged?

lapis ivy
#

No, I don't really understand it.
How do I do this?

still forum
lapis ivy
#

Oh, I still don't understand how to do it correctly 😄

neon snow
#

Hello, how do we recompile functions added with config?

still forum
#

Oh, I still don't understand how to do it correctly
Just add logging everywhere, if you don't understand how to add logging to your script and the wiki page doesn't help then I can't help further either

neon snow
#

I have added recompile = 1; to cfgFunctions but it doesnt load edited sqf. Maybe I understand it incorrectly?

still forum
#

and then with BIS_fnc_recompile you trigger a recompile

#

it ofc can only see updates if it even has access to them. meaning filepatching and files in correct place

neon snow
#

I tried this from wiki: 1 call BIS_fnc_recompile; and it doesnt recompiled it. All files are on P drive

still forum
#

All files are on P drive
Arma doesn't know what a p drive is

#

they have to be in your arma directory, in the correct pboprefix path

#

for example
SteamApps/common/Arma 3/z/ace/addons/common/functions/fnc_test.sqf

neon snow
#

Hmmm, that I did not know

#

Do I need to run ARMA with 'Enable File-Patching' ?

still forum
#

yes

#

without that arma cannot read outside of pbo's

neon snow
#

ok great, thanks will try it

worn forge
#

There were some questions lately related to particle effects. Is anyone able to share some insight into how to create a decent smoke artillery explosion? Right now you can spawn all manner of smoke shells, but they basically land and then lazily generate smoke. I want serious smoke!

bright flume
#

most methods are client side mods. and a few server based ones like splendid smoke.

neon snow
#

So not sure whether ask it here
I tried following the setup on wiki for files loading using FilePatching but got nothing.
Is it supposed to be like that:
ARMA 3/VTX_FLIR/addons/vtx_uh60_flir.pbo and file $PBOPREFIX$ in Arma 3\VTX_FLIR with this line inside: x\VTX_FLIR\addons\vtx_uh60_flir ?
I also have to have pbo file in there becouse Arma3 Launcher does not add this folder without pbo file in it
I feel stupid.

bright flume
#

big problem is fx tend to be client side limitations/settings and unpredictable

still forum
#

$PBOPREFIX$ in Arma 3\VTX_FLIR
No, the pboprefix is inside the pbo

#

I also have to have pbo file in there becouse Arma3 Launcher does not add this folder without pbo file in it
You load the pbo as mod, and if the file inside the pbo, is also unpacked in arma folder, it'll load the unpacked file instead

worn forge
#

I'm fine with it being client-side, it's atmospheric more than anything

still forum
#

so, you load -mod=VTX_FLIR (btw mod folder usually start with @)
and then you have
Arma 3/x/VTX_FLIR/addons/vtx_uh60_flir directory, with your files inside

neon snow
#

I dont quite understand the reason for x folder, I added it like you said now
Launching game with -mod=VTX_FLIR doesnt seem to locate the mod, shouldnt it be -mod=x/VTX_FLIR?

still forum
#

no

#

I dont quite understand the reason for x folder, I added it like you said now
Its in your pboprefix, you need to have the same folder structure as in the pbo, which means with pboprefix

#

assuming that is actually the pboprefix of your pbo, and not some random file that is laying around nearby

grizzled lagoon
#

hello i have question, what is the variable that declares v_item space ?

still forum
#

v_item? what's that?

grizzled lagoon
#

is the life server item virtual

still forum
#

Ah some mod thing?

#

can't answer that without knowing what mod you're talking about

grizzled lagoon
#

okay is framework tonic 🙂

grizzled lagoon
#

i make script for change space items in the zone

#

Yes

grizzled lagoon
#

I don't know because it's a burden and I want the place

still forum
#

Yeah that code is a real burden to read, so outdated and messy.
I don't know life well enough to be of any help

harsh vine
#

is it possible to create a task for a spectic unit?? For example ```sqf
[_hvt, ["task1"], ["GET TO THE POINT ALIVE AND RECIEVE A REWARD", "Get to the point! ", "pen"],pen,"assigned",99 ,true, "run", true] call BIS_fnc_taskCreate;

alpine ledge
#

just replace _hvt with whoever you want to have the task

spark turret
#

@worn forge have you figured out smoke artillery?

#

i recommend you take a look at goon dust for an example of nice particle effects. They run clientside and are spawned in a donut around the player to simulate far away dust and restrict view distance.:
http://www.armaholic.com/page.php?id=29026

#

Also you will need to deeply test AI behaviour with these particles. i dont know if they can see through it or not, so if the players use your artillery but ai can just see through it.. suboptimal

#

but im very interested if you can come up with a solution. smoke artillery in arma sucks.

neon snow
#

I think you selected wrong nick 🙂

spark turret
#

sorry river

worn forge
#

Yeah, I found a lovely script and I've learned much from it.

spark turret
#

script for smoke art?

worn forge
#

not specifically, but it had a great example that pointed me in the right direction.

spark turret
#

alright. tag me if you produce something usable

#

also if you find out how AI reacts to it

worn forge
#

It's client-side, so AI won't react at all. Well, at least, theoretically it's client side, though the effect is createVehicleLocal'd via remoteExecCall to all clients, which would include the server, so... who knows?

#

My implementation is that AI OPFOR fire a volley of smoke rounds before they assault, so it's only meant to cover an advance anyway.

spark turret
#

you can exclude the server for that with -2 (iirc)

#

ah so its used against the player.

also if you also execute on the server, why execute on the clients too?

worn forge
#

my understanding is that particle effects are local.

winter rose
#

^ yep

high marsh
#

Better to use BI GC or make my own?

#

I feel like it could be easier to just use the BI one as I can just "add to" the GC at any time.

winter rose
#

yep, BI GC is fine

#

you can still have yours and the BI one as backup, it depends on what you want to do really

spark turret
#

how do smoke grenades restrict AI view? are they not particles?

high marsh
#

They are, I believe it has some geometry that provides blocking.

winter rose
#

^

spark turret
#

Do you have further info i can look into?

#

Or is there an option to add geometry to a particle

high marsh
#

I think this applies to models like trees and buildings though. So I don't think that's right.

winter rose
#
blockAIVisibility = true;
#

@spark turret ^

high marsh
#

^^

spark turret
#

Interesting. I need to tesr if it works for big clouds too

winter rose
#

well, sure thing

#

just that it will eat some more CPU, but not that much - I believe it's better to have one big cloud than many small ones

spark turret
#

Does the particle need to run on the server to be Ai blocking then?

winter rose
#

I would say yes

high marsh
#

it seems like the "effectsEmitter" variable for objects can change color