#arma3_scripting

1 messages · Page 91 of 1

south swan
#

as in _temppos = rocket_engine worldToModel getPosWorld this; or something like that

formal stirrup
#

For some reason this seems to execute on every person not just the people in the group. Any idea on how to make it work on just the units in the group?

{ [0, "BLACK", 10, 1] remoteExecCall ["BIS_fnc_fadeEffect"];  } forEach units group player;
south swan
#

@finite bone this should work as an example of getting the coordinates manually (kinda)

finite bone
#

Ooh

south swan
south swan
# finite bone Ooh

a bit of context: BIS_fnc_attachToRelative didn't work there because it attaches to target's origin and doesn't do bones with following rotation. But for non-skeleton-animated objects that function should be super good enough

orchid yew
#

hey all having issues with ghost riders extraction script (https://github.com/Ghostrider-DbD-/Config-Extraction-Tools)

its not pulling any magazines for primary weapons like rifles etc anyone got a fix?

ive found it misses items ive removed things from the exclusion but that didnt help.

Theres the loot table generator (https://steamcommunity.com/sharedfiles/filedetails/?id=785410905) as well but id rather have it just grab all items and export them to clipboard

i just want to pull things for the loot tables traders and what not want to pull everything from addons as well i dont know sqf sadly so yeah

south swan
#

last commit: 6 years ago, whew

orchid yew
#

yeah ahahah

#

i really want to fix it but yeah dont know sqf if someone could point me what to do or other options or fix it or anything youd be a life saver

cunning current
#

Hey all,
i am trying to get a trigger to fire when the combined numbers of two enemy groups falls below a certain figure. i am just unsure how such code would be written.
could someone demonstrate to me how such code would be written please. any help is greatly appreciated!

south swan
# orchid yew yeah ahahah

ah. Retro.
On a more serious note, have you edited a GRG_Root variable? By default it only seems to search for classnames that start with "CUP"

orchid yew
#

yeah i rmeoved it and removed the exclusions

south swan
#

and yeah, it doesn't seem to use weapon magazines anywhere tanking genius

golden cargo
orchid yew
cunning current
south swan
orchid yew
#

whole thing going in gimmie a min

#

error

south swan
#

yeah, sqfbin's page has some extras. There's a button to get raw contents there

orchid yew
#

looks like it might be working though

#

god i could fucking shove my tongue down your throat right now it worked my god thank you

south swan
#

that's some logic error, but it doesn't prevent the script from getting the output

orchid yew
#

idk if the other options are working as well i know weapons isnt pulling attachments like optics etc could you look at the others just to have aquick check for me please only if youre free and want to

south swan
orchid yew
#

testing

orchid yew
#

did you look at the others and notice anything?

south swan
#

the thing that i've noticed the most is that i don't really like to dig that code, sorry 😛

orchid yew
#

thats fine thanks for your help

acoustic yew
#

Hello and I'm sorry for interjecting, I've been trying to kick the player off the server if they are in an invalid slot. I figured out some code that does the kick but I'm getting an error when executing the kick (error in the server console).
** The code (ofc Hypoxic rewrote it for me and made it really nice and lot of others helped me) :**

[] spawn {
    scriptName "Unit Authorization Script";

    private _allowedUIDs = [
        ["SL_1", ["76561198105370015", "76561198846755720"]],
        ["SL_2", ["76561198105370015", "76561198846755720"]],
        ["RTO_1", ["76561198105370015", "76561198846755720"]],
        ["RTO_2", ["76561198350976093"]]
    ];

    private _index = _allowedUIDs apply {
        _x select 0
    } find vehicleVarName player;
    if (_index == -1) exitWith {};

    private _accepted = (getPlayerUID player in (_allowedUIDs select _index select 1));

    if (_accepted) then {
        sleep 10;
        hint "Welcome";
    } else {
        sleep 1;
        hint "Unauthorised slot!";
        sleep 1;
        password = "BigPPAdmin";
        password serverCommand format ["#kick %1",name player];
    };
};

Error in the console:
13:19:31 Failed attempt to execute serverCommand '#kick SgtDevRupesh_MW' by server.

granite haven
#

Make sure your pasword is defined in the server.cfg

#

under serverCommandPassword

#

and that the serverCommand command is server executed

acoustic yew
#

Oh it needs command password?

granite haven
#

yhea, you cant define it like this

acoustic yew
#

Ah, okay ^^ thanks I'll try using the command password

granite haven
#

so if you put in server.cfg as "test" on your server executed file you can just do ```sqf
"test" serverCommand format ["#kick %1",name player];

acoustic yew
#

Oh okay ^^

granite haven
#

and since it has to be server executed make sure you replace player

acoustic yew
#

oh okay

granite haven
#

my gues looking at how you set it up is you need the client to send a request to the server and the server "answers" back with a kick or no kick

acoustic yew
#

That sounds complicated lol

granite haven
#

just RE the servercommand function in replace of what you had.

#

did you put the password in server.cfg?

fair drum
acoustic yew
#

I searched for kick in this channel and found that script :D

#

Gave it a try and well it was a progress cuz now things were showing up in server console 😅

granite haven
#
if (_accepted) then {
        sleep 10;
        hint "Welcome";
    } else {
        sleep 1;
        hint "Unauthorised slot!";
        sleep 1;
        ["BigPPAdmin", (format ["#kick %1",name player])] remoteExec ["serverCommand", 2];
    };

Something like this

fair drum
#

why did you remove the remoteexec that was in my example before

#

you have to send the command to the server

winter rose
#

createVehicleCrew returns Group already

#

try BIS_fnc_spawnVehicle instead?

acoustic yew
#

what did I copy then?

#

I copied something else-

#

The code I copied did not came with remoteExec lol

#

Idk my wee brain is making me dizzy lol

#

I'll use remoteExec

fair drum
#

you must have copied it before we talked about remoteexecuting just slightly below that message

acoustic yew
#

Yeah

#

I did

#

I was up for 22 hours when we were talking about it lol

#

yesterday ig

#

yeah 14 hours ago lmao

#

Btw just reconfirming I need command password right? (what is difference between command and admin?).

acoustic yew
#

Oh, thank you so much!

fair drum
#

admin is for when you want to log into admin

acoustic yew
#

and command for scripts

fair drum
#

yes

acoustic yew
#

aye, learned a lot of new things! Tysm

#

I changed #exec kick to #kick and it works!

opal zephyr
#

Isnt there a function that checks which mods write into a class? Does anyone know what its called

sharp grotto
acoustic yew
#

Oh ye they'll go back to lobby right?

#

I thought it would end mission itself

winter rose
#

failMission maybe in order to not delete potential saves

leaden ibex
# opal zephyr Isnt there a function that checks which mods write into a class? Does anyone kno...

Not sure about function, but if you get Advanced Deloper Tools
https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://steamcommunity.com/sharedfiles/filedetails/%3Fid%3D2369477168&ved=2ahUKEwjj5dmft46AAxVQhP0HHS-MANwQjjh6BAgSEAE&usg=AOvVaw2085XztFC4wLNqxEnsDiAn
You can easily use the config viewer, it's listed at the bottom.

I think the vanilla one also shows it, but it's just pain to use.

opal zephyr
#

Ya I have those tools, not seeing what I want though

leaden ibex
#

Find the class you want to get the info from, open it, look at bottom

#

That list of all PBOs that edit it

sharp grotto
leaden ibex
opal zephyr
#

hmm

#

I wish there was a way to check the actual name of the pbo, that might be more helpful in this case, thanks

leaden ibex
opal zephyr
#

that addons name is the class name the addon has in cfgPatches. The pbo could be something entirely different. It sounds like you just got lucky

leaden ibex
#

I see. Lucky me then dogeKek
I hope this can at least help you narrow down which PBO it could be

robust dagger
#

Hello , I'm looking for some help with an eventHandler , specifficly - "SlotItemChanged" . I can't seem to get it to work.

south swan
#

what game version are you using? It'll not yet available in the regular release blobdoggoshruggoogly

acoustic yew
#

and its going to end mission (or fail) just for the client right?

winter rose
#

yes

acoustic yew
#

okay ^^

#

and I should remoteExec it right?

#
["END1"] remoteExec ["endMission", 0, true]; // Arma 3```
winter rose
#

that would end it for everyone

acoustic yew
#

oh

winter rose
#

<remote> <exec>

acoustic yew
#
failMission "END1";

this will end just for the client?

hallow mortar
# acoustic yew and I should remoteExec it right?

The command has local effect, meaning it only takes effect on the machine it's executed on. This is why it only affects the one client. By remoteExecing it with target 0, you are sending that instruction to every machine...where it will have local effect for all of them.

acoustic yew
robust dagger
acoustic yew
#

I did lmao but was wondering if its 'that easy' lol

acoustic yew
winter rose
acoustic yew
#

Hahaha yeah SQF does stab in the back sometimes ;)
I hope Enfusion doesnt, I havent touched it 'yet'.

winter rose
#

we're busy getting stabbed ourselves 😁
nah the language is very fine, it's network scripting / component organisation that can be tricky. but #enfusion_scripting will be here for assistance when the time comes!

acoustic yew
#

Ooo, tysm if I get issues I will bring stabbing wounds in that channel lmao

lavish ocean
#

@tough abyss please write A3FT bug report and PM me the URL

#

PM ideally on skype than on Discord, for now until Discord gets friendlist

brisk lagoon
#

I am going through my mod pack trying to resize it size and I just found a pbo called "baseconfig.pbo"

any clue what could it be?

#

contains something called "$PBOPRFIX$"
and config.bin

sharp grotto
brisk lagoon
sullen sigil
#

Is there any scripted method of having depth of field? Cannot seem to find any

#

Trying to make objects close up appear blurred

kindred zephyr
gloomy peak
#

It seems the FOW sherman has abysmal forward acceleration

#

is there any way possible to increase its acceleration?

hallow mortar
#

There aren't any good ways through scripting.
You can make an EH that gives it a little setVelocity boost when moving forward, but this is a dangerous game to play with Arma physics. You could reduce its mass, but this may have unexpected side effects if overdone.
Keep in mind that it may be accurate; 1940s tanks were nothing like the speedy MBTs of today.

opal zephyr
#

Does anyone know of a way to set a ui elements image (ex. background image) through script?

#

I want to provide it a new paa path when conditions are met

granite haven
#

Most likely using format

#

So you can make premade paths and then in the script.you cycle through them and put it in one string.

opal zephyr
#

^im going to move this to #arma3_gui , but I need it to be dynamic, cant have preset

tough abyss
#

Is it possible to script an option for the player to choose different times(day/night/morning) when clicking middle mouse(not sure what that menu is called) on an object?

winter rose
#

yes, it is.

hallow mortar
#

The scroll wheel menu is called the action menu

tough abyss
#

Got it, thanks

#

Other than skipTime is there a command that allows me to change the time to a certain point?

manic sigil
#

_blackbox apply 
{ 
_dummy = createVehicle [typeOf _helicopter, _x select 0,[],0,"CAN_COLLIDE"]; 
 
{_dummy disableCollisionWith _x} foreach vehicles; 
 
_dummy setdir _x select 1; 
 
_dummy setVectorDirandUp [_x select 2,_x select 3]; 
 
_dummy allowDammage false; 
 
_dummy enableSimulation False; 
}

_blackbox is a private array of arrays, each with four elements captured from a helicopter in flight - position, heading, vectorDir and vectorUp.

While a systemchat _x select 0 for instance reports the correct position from the first element, the whole thing hangs when attempting to createVehicle, stating that 0 elements of 3 have been supplied.

exotic flax
tough abyss
#

Got it, thanks

granite sky
#

@manic sigil If systemchat _x select 0 reports the correct position then the array is busted, because that's just outputting _x, not _x#0.

#

systemChat is a unary command so it has higher precedence than select.

manic sigil
#

... you may be right, I think I removed a layer of the array without thinking it through.

#

Lemme check.

granite sky
#

This line is busted for similar reasons but also pointless: _dummy setdir _x select 1;

#

And the disableCollisionWith part won't work as intended because only one disabled-collision reference is stored per object. Plus it doesn't work on physX objects.

manic sigil
#

Alright, that got a step closer, it creates the first helicopter dummy... then it spits out the entire rest of the array while trying to set it's heading, freaks out and exits, like it forgets its supposed to be working with the first element alone T_T

manic sigil
granite sky
#

simple objects maybe?

manic sigil
#

I think I gave that a try previously and it wasn't working out, but I'll give it a go when I've got the spawning figured.

#

Got it sorta working, it creates the dummies with a pleasant delay, but complains the whole time that one of the numbers it's using isn't right.

#

Ah feck I forgot I was collecting speed info and hadn't implemented it yet

#

Alright, now to get simpleObjects to work.

#

Simpleobjects still have collision :reducedToAshes:

vapid scarab
#

is there a way to get a list of all vests? or a category of items?

warm hedge
#

configClasses will do

vapid scarab
#

Can you help me out with that?

#

Like what am i looking for when trying to figure what the class type is of vest?

warm hedge
#

Wait till I'm home

desert socket
#

Hey! I'm trying to make a spooky operation and am wanting to know how to do the following.
If a player enters a trigger, then the objects with the variable names of 'lamp11' through 'lamp20' will play the same sound file called 'dalliminn' at the same time. Is there a way to do this?

granite sky
hallow mortar
#

What determines which crewmember gets control of a vehicle weapon, when added by addWeaponGlobal?
I had thought it was always the driver/pilot, but I've now encountered a helicopter (CSLA MH-60 DAP) where it goes to the copilot instead. For double the puzzlin', this vehicle has a pilot-controlled weapon by default, and this is defined as normal for pilot-controlled weapons, in the weapons property of its top-level config.

#

I can't find any config properties that appear relevant and different between this and vehicles that behave normally. And I can't see any reason why its default weapon would be assigned differently to an addWeaponGlobal weapon.

restive pike
#

HI im lookking to make a script that moves an item from a players inventory to the vehicle they are in. Anyone have an idea of how?

acoustic yew
# manic sigil 😎

Weird how helicopters land, hope in reforger it’s realistic and not this weird

manic sigil
acoustic yew
#

LimitSpeed works in MP?

manic sigil
#

Afaik yes, but you also have to lobotomize the AI or theyll ignore it when theres enemies around.

acoustic yew
#

Lobotomise…

#

Uhhh

#

do yk I’m dumb?

#

Time to Google

little raptor
little raptor
#

dalliminn should be a defined sound in cfgSounds class

south swan
proven charm
#

is it possible to deny placing men in zeus when you want to place static weapons? if I disallow men to be listed then also the static guns gets removed from zeus list

south swan
#

empty static guns are listed in yellow/neutral side blobdoggoshruggoogly

south swan
#

mission that only has playable unit, following code, result on screenshot

[[player], {
 params ["_player"];
 _grp = createGroup sideLogic;
 _new = _grp createUnit ["ModuleCurator_F", [1,1,1], [], 0, "NONE"];
 removeAllCuratorAddons _new;
 _new addCuratorAddons ["A3_Static_F", "A3_Static_F_AA_01"];
 _player assignCurator _new;
}] remoteExec ["call", 2];```
proven charm
#

thx trying

#

still not working

south swan
#

what's the code? Where is it tested? What's the result you get?

proven charm
#

I tried your code from console in new mission but still not working

#

im on prof branch

south swan
#

perf/prof branch, perf binary. 3DEN -> single playable unit -> preview -> code above into debug console -> works
same mission -> enable debug console to all -> exported to MP -> game restart -> multiplayer -> host server -> start -> same code in debug console -> works

#

#canNotReproduce

proven charm
#

aaah, its some mod doing it

#

probably zeus enhanced

#

@south swan thx man , working now. still have equipment in zeus for some reason

#

fixed the equipment with iskindof "AllVehicles" filter in CuratorObjectRegistered

modern mauve
#

Can I give Items in May inventory specific variables to identify Thema Forum example. If the Player buys a weapon in my shop ist get a serial number?

harsh sedge
#

As far as I know, items in inventory are just references to their configs.

#

With the exceptions of weapon holders that have container objects associated with them.

#

Albeit, TFAR does assign unique frequency sets to radios, but those also become their own, unique objects.

desert socket
hallow mortar
#

For locking the seats, lockCargo and lockDriver would be what you want.
For hiding the interior, ??? and bear in mind it may not be possible. Note that you also cannot hide the shadows cast by the "hidden" parts of the vehicle.

You do not need to remoteExec setObjectTextureGlobal. As the name implies, it is already a global command. remoteExecing it to everyone is unnecessary duplication of what the command already does.

#

In fact, object init fields are already executed on all machines, so you don't need setObjectTextureGlobal at all. Normal setObjectTexture without any remoteExec will do fine.

#

Look in its config under hiddenSelectionsTextures. Any texture listed there, you can remove or replace; if those don't cover it, there's nothing you can do.

#

No, the commander (if it has one) will be covered by either lockCargo or lockTurret, depending on whether the commander has a turret.

#

Cameras are turrets, just without any guns on

hallow mortar
harsh sedge
#

I had a question about the missionProfileNamespace and when it's loaded/reloaded for a mission. I have a framework I'm developing and I had the inventory persistence saving on the missionProfileNamespace, but despite saveMissionProfileNamespace running whenever all players disconnect, or the MP session ends, saved changes don't seem to be reflected until the server turned off and turned on.

Does a mission, or mission group's, missionProfileNamespace only load once on the server, instead of each time the mission is init'd? I switched over to the server's profileNamespace, and I no longer have this problem, but I was wondering if this behavior is intended.

If it helps, my server is running on Debian 11.

#

Oh, bother

hallow mortar
#

For inline code, just use one `

harsh sedge
#

Thank you!

little raptor
#
_lamps = [];
for "_i" from 11 to 20 do {
   _lamp = missionNamespace getVariable ["lamp" + str _i, objNull];
   _lamps pushBack _lamp
};
_lamps spawn {
  while {true} do {
     {
         _x say3D "dalliminn"
     } forEach _this;
     sleep soundDuration;
  }
}
#

Replace soundDuration with the duration of the song (in seconds)

hallow mortar
#

There's no need for DMs, this is the channel for solving scripting confusion

#

Rightclick on the vehicle, select "find in config viewer", and then scroll to the line that says hiddenSelectionTextures - it's in alphabetical order

sullen sigil
#

the lines are, not the textures -- to clarify

hallow mortar
#

The list of textures is in the same order as the selection indices used with setObjectTexture; first one is selection 0, etc. (actually I think you can also see the full list of selections in the hiddenSelections property)
Those selections are the only parts of the vehicle that can be retextured with scripting. Everything not included in a selection is part of the model and can't be changed at this level.

#

There are more, you can see the start of one and there are more in the hiddenSelections list above

south swan
#

you can copy the entire entry with Ctrl+C blobdoggoshruggoogly

#

and then paste it somewhere more comfortable to read

hallow mortar
#

None of those look like interior textures so you're probably out of luck

south swan
#

i haven't posted anything about "not here", mind you 😛

#

i was only meaning "in-game config editor can really be difficult to read"

hallow mortar
#

Actually, it looks like the interior is covered by selection 2...but this texture also appears to include the turret ring and gun mount. So you can try selection 2, but don't be surprised if it also hides things you want to keep.

#

...same way you're hiding selections 0 and 1 already

#

Precisely

#

No, 3 is the camo net optional component

#

4 is the slat cage and 5 is the camera mast

#

Then that's it. The interior isn't set up for retexturing, so there's not really anything to be done.

#

The numbers are the order of the selections as listed in the config (starting at 0).

#

Because I'm using Advanced Developer Tools, I can look at the texture files and see what they look like (flat, not applied to the model, at least). But you can also get a rough idea by looking at the names of the textures and selections, and also by just trying them all and seeing what changes.

#

btw, the reason this isn't an issue on the Panther and Marshall is because you can't see inside them from the outside. Their interiors only exist in the first-person model, not the third-person. The Marid has windows so the interior is present (in low detail) in the third-person model.

sullen sigil
#

why are you remoteexec'ing it meowsweats

hallow mortar
#

Zeus placement. Zeus-placed object inits are only executed on the machine that placed them.

upper siren
#

the functions tag can't start with numbers, right?

sullen sigil
sullen sigil
#

so, no

upper siren
#

😦 thx

hallow mortar
sullen sigil
#

I just get around that by writing out the first number though

#

Six12th etc

sullen sigil
granite sky
harsh sedge
#

Thank you! At least it saves, somewhat.

granite sky
#

hence Antistasi community still supports profileNamespace saves :P

#

I imagine it'd get fixed if someone put together a proper bug report, but I don't run Linux personally.

harsh sedge
#

Where could I put that in?

#

Additionally, would you happen to know if mission.vars files are swappable? In it's current state, it's not good for persistent states, but sometimes our missions get swapped between servers, and it might be nice to copy and past a mission-specific variable file to have it initialized on another server.

granite sky
harsh sedge
#

Thank you!

granite sky
#

I assumed they were swappable. I don't think I've actually tested it though.

#

Give me a sec and I'll check :P

harsh sedge
#

Thank you again!

granite sky
#

yep, vars file swapping works fine.

harsh sedge
#

Excellent, at the very least, I can use it as a back-up and memory card.

mortal snow
#

When i add a script to mission, and use that mission on multiplayer, is the code only runs on server?

#

Or is it shared with client

upper siren
#

(init/initserver/initplayerlocal) etc

mortal snow
#

lets say i want a death counter

#

where does it run

upper siren
#

that I don't know

little raptor
#

generally speaking events run where they're added, and only if the target is local to that computer

#

except for MP events

little raptor
#

t can be assigned to a remote unit or vehicle but will only fire on the PC where EH is added and explosion is local, i.e. it really needs to be added on every PC and JIP and will fire only where the explosion is originated.

sullen sigil
#

Is there any way to use a string as a variable name? Want players to put object variable name into module attribute and use that in a function

granite sky
#

missionNamespace setVariable ["myString", _val]

sullen sigil
#

I'm confused
the string is the value, that is the name already

#

so module gets "myfunnyobject" as the value
where myfunnyobject is an object

hallow mortar
#
private _object = missionNamespace getVariable ["myfunnyobject",objNull];```
sullen sigil
#

oh wait

#

yes i understand

#

guh

#

thanks

#
private _varString = _logic getVariable ["KJW_CapitalShips_Module_Interior", objNull];
private _ship = missionNamespace getVariable [_varString, objNull];```
don't like it but who does 🙃
indigo wolf
#

Are local variables per execution basis?

#

like if I use a local variable, complete the execution and in the same machine/player i run another sqf with the same local variable, would it work?

tender fossil
upper siren
#

is there a function I can call to get the callsign of a group (as displayed in the slot selection)? It's different from the groupname itself.

#

Defined like so

#

CBA feature, ignore me

tribal sinew
#

Is it possible to stop the landAt after a plane touches the runway? It seems that it's not waypoint based 🤔.

#

What I'd like to do is to stop the plane from doing a full taxi procedure.

warm hedge
#

I think there is an EH to detect if a plane lands. You may want that

tribal sinew
#

Yeah, there is. But I don't think that there's a way to interact with landAt tho.

#

Tried doing disableAi with "MOVE" but didn't work.

indigo wolf
naive needle
#

If I would say make a own pretty basic damage system. Would it be good to calculate the damage over Hit eventhandler since it gives out the damage or with damage eventhandler

mortal snow
#

Hey guys, where should i start scripting?
Any good tutorials to make myself familiar with editor and sqf?

plucky tulip
#

Does anyone here know if there's a way to attach a spotlight relative to a players facing direction?

winter rose
#

unit or camera facing?

plucky tulip
#

Camera

winter rose
#

you could potentially use an EachFrame mission EH + camera direction

lunar goblet
#

anyone know how to script it so every time an action is done via the scroll wheel it will have a different result

open fractal
#

specifics?

winter rose
#

random

warm hedge
#

Or selectRandom

lunar goblet
#

thanks

opal zephyr
#

Im having some trouble with an event handler, im using the "Hit" one, and its calling consistently, but the _damage value is returning 0 almost everytime. Im shooting a unit with a rifle

opal zephyr
#

yup

#

I could see how ace medical might affect that

#

I thought id tested it with ace loaded and had fine results, but now it doest work. Ill test it again

tribal sinew
#

What is the best way to call playSound for every player on a dedicated server? Should I just yeet it into remoteExec and execute it globally (target param set to 0)?

#

Had some trouble with this last time I did so - not every player heard it.

#

[["fogEntrance", 1]] remoteExec ["playSound"];

granite haven
#

Yes, you can also use -2 as target param

#

Optional*

tribal sinew
#

Yeah, I was thinking of using -2. Perhaps it would be even more efficient?

granite haven
#

They are both the same only thing is with 0 is that itll still work on a non dedi server without issue

warm hedge
#

Hmm, is there any way to prevent AI from sway their turret while aiming? Expect a stupid workflow like use lockCameraTo slowly, but similar to how they aim an arty

#

Attempted to make a CIWS but it is very stupid to see a mechanical turret sways like there is a human in it

granite sky
#

huh, didn't figure that was a thing. What if you setCustomAimCoef to 0 on the AI?

warm hedge
#

Nope, it doesn't do anything

granite sky
#

when you say "make a CIWS" you mean a custom weapon and turret or what?

warm hedge
#

Currently using vanilla Praetorian and script the entire system. More like just trying to proof the concept

#

One thing I can try is removing the entire engine-driven turret animation and let animateSource do everything

warm swallow
#

is there a way to disable the zeus ping behavior without disabling the Y button?

molten yacht
#

is there any way to place some bushes from Tanoa?

warm swallow
#

yes

#

there are mods that gives you access to items hidden in the editor

hushed tendon
#

So I've been looking for a while on how to save data from a played mission and use the data within another mission on a dedicated server. What I've found so far...

I looked into using InidBi2 but from what it seems, you're unable to save and not meant to save large quantities of data. Which sadly is what I need so it doesn't seem viable from what I've found.

Another option I've found is to use the saveVar command where you can save data into a campaign space. This option seems more viable but requires you to make a campaign, but it doesn't seem to work on a dedicated server

Idk what to do or if this is possible :/

granite sky
#

You can save what you like in profileNamespace, although there is a reasonable limit to the quantity.

hushed tendon
#

isn't the profileNamespace different for each mission? or would the namespace be the dedicated server?

granite sky
#

profileNamespace is attached to the profile. It's written to the [profilename].vars.arma3profile file.

#

Any code can read anything from it.

#

Hence you should tag whatever you put there so that collisions don't happen. And be a bit careful about the quantity of data.

#

There is also missionProfileNamespace, which can actually be shared cross-mission.

granite sky
#

You mean for AI or players?

#

enableCopilot just controls whether the copilot action is available, I think.

warm hedge
#

Not sure if AI copilot can take over whenever they supposed to

#

You can probably:

  1. Force eject the dead pilot
  2. Switch the seat
  3. Let the dead get in again
    Of course in scripts
#

Should

rich bramble
#

@queen cargo in OOS, what are the semantics of the SQF statement/operator/whatever it is?

queen cargo
#

there is an ebnf in the git

rustic lava
#

can someone please help me? I am trying to create a execVM command using a string from a variable.

my variable is formmated as a string "string" and I would like to run the execVM like this execVM string.sqf" but not sure how to do this?

#

thanks

rich bramble
#

Thanks!

little raptor
#

You mean something like:

execVM format ["%1.sqf", _myVar]

?

rustic lava
#

yes, would that work or would _myVar inlude the ""?

little raptor
#

Yeah the "" around string is not included

rustic lava
#

awesome, thank you very much.

rich bramble
#

What does SQF return? The return of the SQF inside it?

finite bone
#

I'm trying to create a particle effect at 4 sites and then delete them later to create a different particle effect. However, I can't seem delete it after its execution. sqf _emitters = []; { _li = format ["_li%1", _x]; _li = "#lightpoint" createVehiclelocal (getPosASL _x); _li setLightBrightness 100; // Rest of code _emitters pushBack _li; _ps1 = format ["_ps1%1", _x]; _ps1 = "#particlesource" createVehicleLocal getpos _x; // Rest of code _emitters pushBack _ps1; } forEach [site_1, site_2, site_3, site_4]; _time = diag_tickTime; while{ count _emitters > 0 } do { { if ( diag_tickTime > _time + 4 ) then { deleteVehicle _x; _emitters set[ _forEachIndex, objNull ]; }; } forEach _emitters; _emitters = _emitters - [ objNull ]; };

queen cargo
#

later @rich bramble midgam

finite bone
#

In other words, is it possible to attach a particle effect to an existing object and when the object is deleted the effect also goes away? (If the above doesn't work)

winter rose
#

(the first line serves no purpose (_li = string))

#

and use waitUntil or sleep 🙂

#

I would store the emitters in a variable on the object itself, then use the Mission Event Handler "EntityKilled" (we don't have "EntityDeleted" afaik)

finite bone
#

I'm trying to execute this in an unscheduled environment so uiSleep and waitUntil wouldn't work. Ill look into the EH, and if nothing else works convert the code to be run in a scheduled environment.

winter rose
#

your while will do 10k loops then stop

#

that's why

#

why do you need this unscheduled anyway?

rustic lava
#

I'm not sure why I am getting this error, could someone advise please?

error '...yerLocal.sqf" private _player = [player |#|name, getplayerUID player]; private _nam...' Error Mission ] File {path to file} line 1

This is the sqf file contents

private _name = _player #0;
private _uid = _player #1;

if (_uid !in allowedPlayers) then {  //  need to check this before we look for UID in "players" else error
    endMission 3;
} else {

    private _index = players find _uid; // returns index of element that contains UID
    private _element = players #_index;
    private _medic = _element #1;
    private _engineer = _element #2;
    private _eod = _element #3;
    private _rank = _element #4;
    private _role = _element #5;

    _this setVariable ["ace_medical_medicClass",_medic,true];
    _this setVariable ["ACE_IsEngineer",_engineer,true];
    _this setVariable ["ACE_isEOD",_eod,true];
    _this setUnitRank _rank;
    execVM format ["%1.sqf", _role];
};```
#

again thanks

finite bone
winter rose
rustic lava
#

is it round the wrong way?

winter rose
#

yep
name _obj so name player

rustic lava
#

stupid mistake, I thing it was late when I contrived this idea lol

winter rose
#

don't code when tired 😛

rustic lava
#

I get my best ideas when I am falling asleep lol

#

now for some reason starting a multiplayer in Eden editor is still giving me role selection screen even though I set auto role selection in the settings grrr sometimes this annoys me

#

ah I see, I only have 1 playable side. is it possible to skip role selection in this situation?

finite bone
winter rose
#

are you still hiring? 😄

finite bone
rustic lava
#

I'm looking at description.ext but was assuming the line skipLobby = 1; // 0: disabled - 1: enabled. Default: 0 does the same as Attributes -> Multiplayer ¬ Lobby - Auto Assign Slots?

sullen trellis
#

Whats the correct way to use this code?: while { getMarkerPos "enemy1" distance player < 1500} do

sullen trellis
#

I want a script to work if a player is x distance from a marker. Like spawn enemies

winter rose
sullen trellis
#

while { getMarkerPos "enemy1" distance player < 1500} do {
_pos = [getMarkerPos "enemy1", 50, 500, 0, 0, 100 , 0] call BIS_fnc_findSafePos;

_eastGrp = createGroup west;
for "_i" from 0 to random 4 do {
_type = ["vn_b_men_sog_06",
"vn_b_men_sog_21"] call BIS_fnc_selectRandom;

warm hedge
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

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

// your code here
hint "good!";
sullen trellis
#

Do i paste on that?

#

Im pretty sure that whole code works fine except the first line “while…etc”

queen cargo
#

now i got time

rustic lava
#

interesting.

anyone able to help me with this last bit for now I think

private _player = [name player, getplayerUID player];
private _name = _player #0;
private _uid = _player #1;
if (_uid !in allowedPlayers) then {};

is giving an error "Type String, expected Bool" not sure how to do the check I am trying.

warm hedge
#

In where?

#

What is allowedPlayers?

#

Ah just noticed

#

!in is illegal

rustic lava
#

sorry, missed it off.

execVM "DM_Scripts\playerList.sqf";
sleep 1;
allowedPlayers = [];

{
    allowedPlayers pushBack (_x #0);
} forEach players;
warm hedge
#

It is players not allowedPlayers

rustic lava
#

sorry wrong bit. edited

#

player list has the code I previously posted

warm hedge
#

Well anyways I've pointed out that !in

rustic lava
#

yep, thank you what would be a work around please?

warm hedge
#

!(_uid in allowedPlayers)

rustic lava
#

thank you 🙂

quaint star
#

Good day.
Is there a way to assign units placed in the editor to a specific headless client ? Маybe some command in squad init with HC name.

sullen trellis
#

i fixed the code just had to switch some words : D // while {true && player distance getMarkerPos "enemy1" < 1500;} do

warm hedge
#

true &&
Huh

queen cargo
#

@rich bramble which "SQF return"?

still forum
rustic lava
#

yep, will do. thanks I am just in testing of ideas with basically vanilla arma

queen cargo
rich bramble
#

Thanks, didn't know there was a server for OOS :)

queen cargo
#

more for all stuff maintained by me

#

right now

brisk lagoon
#

is there a benefit in converting a cpp file to bin file?

winter rose
finite bone
#

Am I right in assuming that detach will also work on objects attached with BIS_fnc_attachToRelative?

rustic lava
#

ok, so I thought I was done but I was wrong.

problem seems to be the _index is not returning anything at all.

Any suggestions?

// UID, Medical (0 = none, 1 = Combat Medic, 2 = Doctor), Engineer (0 = no, 1 = yes), EOD (0 = no, 1 = yes), Rank ("PRIVATE" · "CORPORAL" · "SERGEANT" · "LIEUTENANT" · "CAPTAIN" · "MAJOR" · "COLONEL"), Role ("Commander", "PlatoonLead", "SquadLead", "Rifleman")
DM_allPlayers = [
    [ "76561198001748042", 0, 0, 0, "COLONEL", "rifleman" ], // Dungeon Master
    [ "76561198436075493", 0, 0, 0, "COLONEL", "commander" ]  // Nez
];
private _allowedPlayers = [];
{
    _allowedPlayers pushBack (_x #0);
} forEach DM_allPlayers;

private _player = [name player, getplayerUID player];
private _name = _player #0;
private _uid = _player #1;

if !(_uid in _allowedPlayers) then {  //  need to check this before we look for UID in "players" else error
    endMission "END1";
} else {

    private _index = DM_allPlayers find _uid; // returns index of element that contains UID
    private _element = DM_allPlayers #_index;
    private _medic = _element #1;
    private _engineer = _element #2;
    private _eod = _element #3;
    private _rank = _element #4;
    private _role = _element #5;

    if (_medic == 1) then {
        _this setVariable ["ace_medical_medicClass",1,true];
    };
    if (_medic == 2) then {
        _this setVariable ["ace_medical_medicClass",2,true];
    };
    if (_engineer == 1) then {
        _this setVariable ["ACE_IsEngineer",1,true];
    };
    if (_EOD == 1) then {
        _this setVariable ["ACE_isEOD",1,true];
    };
    // _this setUnitRank _rank;
    execVM format ["DM_Scripts\DM_Loudouts\%1.sqf", _role];
};

This is being run from initPlayerLocal.sqf and works up to the _index point

Thanks for all your help so far guys

winter rose
rustic lava
#

how do I check it is correct? I have tried running that code then with hint str _index; and it returns nothing

I am really struggling with nested arrays

open hollow
#

hasmap 😄

#

or

private _index = DM_allPlayers apply  {_x #0 } find _uid; 
#

afaik apply dont change change the order

winter rose
sullen sigil
#

please tell me this is being tested in mp too

rustic lava
open hollow
#

also for readability is better to use params (https://community.bistudio.com/wiki/params)

    private _medic = _element #1;
    private _engineer = _element #2;
    private _eod = _element #3;
    private _rank = _element #4;
    private _role = _element #5;
    _element params ["", "_medic", "_engineer", "_eod", "_rank", "_role"]; 
sullen sigil
rustic lava
#

I've tried to understand how params work but couldn't figure it out. Right now I just want it to work.

rustic lava
sullen sigil
#

oh right yeah 3den multiplayer will work fine

rustic lava
#

when I took my UID out of the list and ran it the end mission function worked

finite bone
#

Does negative velocity cause objects to decelerate (accelerate backwards) or simply stop?

winter rose
#

velocity goes the way you tell it to go, instantly

manic kettle
#

Velocity is speed with direction. Negative velocity is speed in the opposite direction

finite bone
#

So in a scenario where an object is travelling at 200 velocity and I execute setVelocity [0,0,-200]; will it immediately go to the other end or take time (even smaller amounts) to switch from +200 to -200 like a wave

winter rose
#

in-stant-ly

#

no transition, boom

finite bone
#

Then 0 is an instant stop

winter rose
#

yup

#

for transition, see setVelocityTransformation

finite bone
#

Is it possible to ensure random returns value based on bimodal distribution than a bell curve?

winter rose
finite bone
#

I saw but it was bell curve though

#

I'm looking for an inverse bell curve

#

with min and max preferred over mid

winter rose
#

use the other syntax

#

everything you can do is listed on the page, that's it
if you want something between 10 and 20 don't use [10, 15, 20], use 10 + random 10

finite bone
#

random [-200, 0, 200] weighs towards 0 as stated - but what if i want it to be within the defined range yet weigh towards the extremes than 0

sullen sigil
#

what lou said is what you'd do

#

i think

finite bone
#

wait so you mean to say that mid being higher than the extremes will make it weigh towards the extreme its close to?

winter rose
#

if you subtract the curve, you have your two poles

tender fossil
#

Couldn't you just do 1 - RESULT? (Edit. if normalized)

winter rose
#

(otherwise, hire a couple of Polish people)

#

0.5 * (random [-200,-200,0] + random [0,200,200]) ^^

still forum
still forum
rustic lava
#

thanks guys, I got it working fully now and tested on dedicated server.

Just fleshing it out now 🙂

still forum
#

The only way _index could be undefined though, would be if DM_allPlayers is (but its not, you define it above) or the _uid is, which I don't see how that can happen, getPlayerUID never returns nil

sullen sigil
#

does setPos### sync across network every time it is run?

#

i.e if i have server local object and setposasl oneachframe do i need to be concerned about network performance or just let the game do its thang

tender fossil
sullen sigil
#

but setvelocitytransformation has global effect too and is meant to be used oneachframe meowsweats

winter rose
#

just create SP scenarios

tender fossil
rustic lava
# still forum The only way _index could be undefined though, would be if DM_allPlayers is (but...
DM_allPlayers = [ 
        [ "76561198001748042", 0, 0, 0, "COLONEL", "rifleman" ], // Dungeon Master
        [ "00000000000000000", 0, 0, 0, "COLONEL", "commander" ]  // Other Player
];
private _allowedPlayers = [];
{
        _allowedPlayers pushBack (_x #0);
} forEach DM_allPlayers;

private _player = [name player, getplayerUID player];
private _name = _player #0;
private _uid = _player #1;

if !(_uid in _allowedPlayers) then {
        endMission "END1";
} else {

        private _index = DM_allPlayers apply {_x #0 } find _uid;
    private _element = DM_allPlayers #_index;
    private _medic = _element #1;
    private _engineer = _element #2;
    private _eod = _element #3;
    private _rank = _element #4;
    private _role = _element #5;

    if (_medic == 1) then {
        _this setVariable ["ace_medical_medicClass",1,true];
    };
    if (_medic == 2) then {
        _this setVariable ["ace_medical_medicClass",2,true];
    };
    if (_engineer == 1) then {
        _this setVariable ["ACE_IsEngineer",1,true];
    };
    if (_EOD == 1) then {
        _this setVariable ["ACE_isEOD",1,true];
    };
    player setUnitRank _rank;
    execVM format ["DM_Scripts\DM_Loudouts\%1.sqf", _role];
};

Thats the final code I managed to get working if you want to take a look and play with it

still forum
#

private _index = DM_allPlayers apply {_x #0 } find _uid;
->
private _index = DM_allPlayers findIf {_x#0 isEqualTo _uid };

But you probably don't care about performance

sullen sigil
#

but ive only just thought setPosASL & setVectorDirAndUp oneachframe may not be the vest

#

however i know some other people who do dirandup oneachframe fine for network

winter rose
#

('twas a joke I hoped obvious ^^)

sullen sigil
#

but that takes local args, setposasl does not

#

ya i know im just stressed about the past 5 months of work being possibly pointless because of network moment lmao

winter rose
#

nah, dw too much
at worst, well one feature is going to eat network from time to time
at best, you can local SimpleObject your way 😉

sullen sigil
#

its running constantly

#

its an entire new movement system within sqf lol

winter rose
#

sweats profusely

sullen sigil
#

its my capital ships one 😄

#

im taking static objects and turning them into things that fly 😄

winter rose
#

static objects don't have velocity, sooo

#

well, unless you attach them to something

sullen sigil
#

i gave them velocity

#

check your pms 😄

rustic lava
open hollow
#

TIL findif exist notlikemeow

sullen sigil
#

just need sortIf now 🙃

open hollow
#

yea, that will be usefull AF lol

sullen sigil
#

i currently have to apply distance check then sort which i do not like at all

winter rose
sullen sigil
#

tbf i only found out about it a few days ago too

winter rose
#

guys, follow the path of Enlightenment

sullen sigil
winter rose
#

There is currently no text in this page
therefore I assume there are none 🤷‍♂️

sullen sigil
#

😱

#

fr though, a commonly used commands page would be useful or something similar rather than having to scroll through all the commands and figure out what they do 😅

open hollow
winter rose
open hollow
#

yea.. but seeing that have spend like 3 month of your life on a wiki will be painful to know lol

kindred zephyr
#

same could be said about some college educations LOL

winter rose
#

I'll keep a fair price for online wiki access guys, you know me

kindred zephyr
#

tuition free wiki

#

regarding

setVelocityTransformation

is interval representing begin and end over certain minimal time or over a frame?

I see it being executed OEF to calculate a transition over time but i cant picture it working wihtout a frame loop

winter rose
#

it's the intermediate 0..1 position you want between from and to

sullen sigil
#

all setVelocityTransformation does is set the objects stuff accordingly based on the interval that it currently is

#

for smoothness, yes it needs a frame loop

kindred zephyr
#

Ok, I get it now, thanks

#

just needed some coffee

sullen sigil
#

make sure youre using diag_deltaTime too

#

else it'll look shit

rustic lava
#

is it possible to script a player to either create a group or join a group if the group already exists based on my script above?

#arma3_scripting message

I would like to set each players squad using the top section of the code and then have them create or join a group based on the squad.

I would also like to set the leader of the group based on two variables, if there is nobody in the group with the SquadLeader role then the highest ranking member to be leader.

Is this possible?

drifting portal
#

is it possible to change the speed of the sound being played? (for example play a sound at 2x speed)

stable dune
drifting portal
granite sky
#

That's natural. Changing pitch without speed or vice versa is hard.

drifting portal
winter rose
indigo wolf
#

I am trying to add the objects found by nearObjects command into an array to delete it later. This is my code:

private _objs = [];
{
 if (_x == restricted_object) then { continue; };
diag_log _objs;
_objs pushback _x;
} forEach _nearbyObjects;

[_objs] spawn {
    sleep 3;
    {
        deleteVehicle _x;
    } forEach _this;
};```

When I  execute it, it says ``Error: Type Array, Expected Object``. I checked the logs and this is what I have in ``_objs``:

[21cdd2e5890# 561068: a_tvtower_base.p3d,21cdd2e5000# 561070: a_tvtower_mid.p3d,21cdd2e6120# 561071: lighthouse_03_red_f.p3d,220d1b088e0# 561072: portablehelipadlight_01_f.p3d,21cdd2e69b0# 561073: scf_01_chimney_f.p3d]```

Thanks in advance!

winter rose
#

it says Error: Type Array, Expected Object
where? 🙃

#

(I know the issue :p)

proven charm
winter rose
#

otherwise, it's an array of array [ [el1, el2] ]

indigo wolf
#

Oh god notlikemeowcry

#

Thanks!

mortal snow
#

guys

#

can someone explain

#

why some commands take parameters before command

#

and some after

#

like

#

player setDamage 0

#

and name player

#

is it really inconsistent or is there a meaning to that

drifting portal
#

didn't work

#

it's capped

winter rose
#

0.5..2?

drifting portal
#

if say I put 5 or 20 or anything past 2, it will cap to 2 regardless

winter rose
tough abyss
#

i

#

dont

#

know why

#

they talk like that

winter rose
slow brook
#

Some people type like they would a conversation, short bursts followed by a pause or new line.

mortal snow
tough abyss
#

guessing for some it might also make more sense at a glance because to someone with little idea of code languages etc setdamage [player,1]; would look a bit wack

slow brook
#

Christ it's how many people used to use msn

sullen sigil
#

<object you want to scale> setObjectScale <scale of object you want>

mortal snow
#

it is confusing

tough abyss
#

insert read the wiki link here

winter rose
#

it's a 20yo+ API that has been expanded over time without clear guidelines, so yeah

tough abyss
#

nah big bohemia trying to destroy my brain with hashmaps

sullen sigil
#

BI turned my dog into a hashmap :/

winter rose
tough abyss
#

my first thought is how that would be defined lol

kindred zephyr
#
_hm = [[doggyVar, ["woof"]]];
sullen sigil
#

no, i use emojis as my hashmap keys

#
_hm get "🐕"```
kindred zephyr
#
_hm = [[:dog: , ["woof"]]];
mortal snow
#

why is second item is a list?

kindred zephyr
#

easier to get larger datasets

tough abyss
mortal snow
#

btw, is it possible to make a http request in scripting

kindred zephyr
#

they use to do that to BI-curious ppl too, now they just publicly declare themselves

mortal snow
#

it would be cool to make a permission system for multiplayer

#

just like in minecraft

#

something like ```
if([player, "some.some"] hasPermission)

kindred zephyr
#

yes, the database system can be managed in multiple ways. Its not uncommon to do so in larger persistent gamemodes like exile

winter rose
sullen sigil
#

TIL stopSound is a 2.14 feature after trying to troubleshoot it for an hour or so 😃

#

idk how its taken up to now to get stopsound

drifting portal
sullen sigil
#

playsound3d returns id not object

#

and cant iterate through allmissionobjects for performance

drifting portal
#

maybe move soundSource away when done with it?

little raptor
#

you can use remoteExec with callback

sullen sigil
#

oh as in just create a different object for the sound source?

drifting portal
#

yeah invsibile helipad

sullen sigil
#

im stacking sounds so not optimal with how slow createvehicle is

drifting portal
drifting portal
tough abyss
little raptor
sullen sigil
#

can you use simple objects as sound sources? thonk

drifting portal
sullen sigil
#

either way its just a matter of waiting for 2.14

#

dont want to shit about with sounds when its not needed

drifting portal
tough abyss
#

is there any commands that replicate createvehicle and arent as laggy as it? im imagining createunit is a bit better (not making a simple object/agent)

tough abyss
#

just curious is create unit less laggy than createvehicle?

mortal snow
#

so i can just type something like

#

.addpermission <player_name> <permission> inside game

little raptor
mortal snow
little raptor
#

still can use remoteExec

surreal gorge
#

can someone help me with this?
I have a trigger area, i just want to deletevehicle of any kind that enters that area. Not the people in it tho

reef granite
#

naw

tough abyss
#

what would the filepath to the .rpt file for a local ran mission be located? im digging through local appdata arma 3 and cant see anything of use

little raptor
#

rpts are created per game session

#

not mission

tough abyss
little raptor
surreal gorge
little raptor
#

you can use a trigger as the "area" but you need another loop to check it

tough abyss
#

i saw it

little raptor
#

did you?!

tough abyss
#

once i pressed enter and looked back

little raptor
#

then why is it still bugged?! 😛

tough abyss
#

i see it v2 eletric boogaloo

open hollow
south swan
open hollow
#

well... i needed that infomation a few... years ago.
i did all that using drawTriangles nootlikethis

#

i dont know if there is some performance gain using drawEllipse, but yea... i spend more hours than necesary lol

hallow mortar
#

Well, one ellipse[agon] shape is probably slightly more performant than however many separate triangles it takes to make a hex. Not necessarily through anything inherently different about the command, just from using less of them

opal zephyr
#

Hello! Im trying to use this event handler

this addEventHandler ["SlotItemChanged", {
    params ["_unit", "_name", "_slot", "_assigned"];
}];

but im getting the error "Unknown enum value", I have no clue why as im using it the same as the wiki

hallow mortar
#

Have a look at the version number just to the left of the SlotItemChanged section title on the wiki

#

Then have a look at the version number displayed in the bottom right corner of the Editor UI/pause menu/main menu

opal zephyr
#

Mm 2.14, thats the next one isnt it

#

Damn

#

Thanks for letting me know!

stable dune
#

Hello,
Is there an easy way to get all roads from the area of the module?
I know nearRoads , but if my module is rectangle.

hallow mortar
#

nearRoads , and then inAreaArray to filter the results down to the ones in the rectangle?

stable dune
wary needle
#

im trying to get this to work in my mission, but for some reason it wont work

mortal snow
#

Guys, i just saw a system in a server which msde vehicles "activatable". Unless you activate them, they are nothing more than static objects but once you activate they become interactable. Any idea how that works?

#

Before activation, vehicle wasnt shown in map as well. So i know it is not just restricting actions you can do

little raptor
#

either it was using simple objects which would get replaced with actual vehicles, or just disabled simulation

#

tho not sure if disabling sim would also hide the action

granite sky
#

It does now, yeah.

#

So you have to put the action on the player.

granite sky
#

Making a unit fire in an arbitrary direction is a pain and I'm not sure if any of the commands work directly with a building.

vapid scarab
#

is there a way to export a functions code?

winter rose
naive needle
#

is there a 100% way to determine which hitpoint got hit by the bullet?

#

because handledamage for example triggers all parts which got effected by the damage

granite sky
#

I don't think so. Only slow and shitty heuristics.

naive needle
grand idol
#

Can hashmaps be created in profileNamespace?
Specifically, a variable populated by a hashmap that can be accessed from the client in different scripts.

granite sky
#

You can store hashmaps in profileNamespace. Not sure what you're talking about with the second bit.

#

point of profileNamespace is that it's persistent outside the current mission.

grand idol
granite sky
#

No variables are network-published by default. That only happens when you use publicVariable or setVariable [x, y, true].

#

If you want a variable to remain client-specific, just don't publish it.

tender fossil
grand idol
#

Got it. I was under the impression that any variable that lacked the underscore in from would be public.
So,
clientVar createHashMapFromArray [ ["A", 1], ["B", 2], ["C", 3]];
will hang around and be available to any scripts run on the client side.

And
publicVariable "clientVar";
will broadcast it.

Is that correct?

grand idol
tender fossil
grand idol
#

Cool. thanks.

sharp grotto
opal zephyr
#

Is there an estimated release for 2.14?

warm hedge
#

No, but you can play 2.13 already

grand idol
little raptor
opal zephyr
#

Thanks

vapid scarab
warm hedge
#

Same thing

midnight niche
#

no changed weapon eventhandler? i.e changing from primary to secondary?

granite sky
#

There isn't even a lifeStateChanged :P

midnight niche
#

rip

granite sky
#

maybe you can fudge it with the animation handlers.

#

thinks

midnight niche
#

at that point would key down be borderline more efficient?

granite sky
#

If you only care about players it's fine regardless

#

This stuff only gets expensive if you're dealing with 200 AIs on one machine.

midnight niche
#

fair ..

thanks

warm hedge
#

People can prefer Action Menu instead, so it won't make a 100% case

granite sky
#

animation version should work regardless. Probably.

#

But then for just players you could eachFrame it.

midnight niche
#

that's a good point ..

I'll investigate, i might just take the easy way out anyway

granite sky
#

Worst case for the animation version is that the final animation change happens before currentWeapon does, but that seems unlikely.

formal stirrup
#

How would one spawn a waypoint 15m infront of the player?

#

Not sure how i would get the waypoint to be infront

granite sky
#

(getPosATL player) getPos [15, getDir player];

#

Just for the position. I'll leave the waypoint part to you.

formal stirrup
#

Ballin, tysm

finite bone
tender fossil
winter rose
mortal snow
finite bone
indigo wolf
#

I am trying to addAction to an object for all players to enter / exit a tunnel. Is this code correct and would this work even when the player respawns / reconnect without any duplicates?

{
    mine_entrance_door addAction[
        "Enter the Tunnel", 
        {
            params ["_target", "_caller", "_id", "_args"]; 
            1 cutText ["","BLACK OUT",1];
            _mine_exit_spawnpos = [((getPosASL mine_exit select 0) + random (3)), ((getPosASL mine_exit select 1) + random (3)), (getPosASL mine_exit select 2)];
            sleep 2;
            _caller setPosASL _mine_exit_spawnpos;
            _caller setDir 333;
            1 cutText ["","BLACK IN",1];
            enableEnvironment false;
            sleep 0.4;
        },
        nil,
        1.5,
        true,
        true,
        "",
        "true",
        5,
        false,
        "",
        ""
    ];
} remoteExec ["call", [0, -2] select isDedicated, true];```
mortal snow
#

Guys, i am learning about locality. If i am not wrong, this means it take an object that is global (everybody can see it) and has an effect of global. And must run in server side

#

am i correct?

sullen sigil
#

it means global locality -- vehicles that players are driving are local to the players for example, so local args wont work if the server is running the code on a vehicle not driven by server-controlled ai

mint goblet
#

Is there a way to get what is output in chat, without BE?

vapid scarab
#

So the effect and server effect are simple to understand. But the global/local argument is not so obvious. For example, a unit is local to the client controlling it. player units are local to the player's client. AI are local to the server OR the headless client controlling (if you have one). A vehicle is local to the server if it isnt being driven. It is local to the player driving it if its being driven (i dont know what the case is when players are in the passenger but not driver seat, I assume local to server). And I think there are a few other wierd scenarios.
Another one that comes to mind is that a player unit is not local until control of the unit is given to a client. Meaning on mission start and DURING JIP, init functions that take local arguments and that are being passed a player's unit on mission start or JIP might run into this.

Point being, test your shit or read a bunch of shit. Either Or, but probably both. I also recommend learning how to open two instances of arma and testing stuff in multiplayer between the two clients. (Idk how with vanilla launcher, I use Swifty).

limber panther
#

Hello 👋
There's something wrong and i don't know what, can i ask for a little help?
I have a trigger set to be activated if a civilian enters it and in the "on activation" field i have this script:
["Silentalarm"] remoteExec ["playSound", west];
It sot of works. The problem is, that the sound is played twice at the same time and since they don't start playing exactly at the same second, they overlap and sound terrible. Why is it playing twice and not just once? Thank you

stable dune
#

You are hosting by your self?

limber panther
cerulean cloak
warm hedge
#

USS Freedom does

#

DynamicAirport_01_F

cerulean cloak
#

thanks, is there a quick way to place that down in eden?
it doesn't show up in the search bar

warm hedge
#

create3DENEntity

cerulean cloak
#

thank you bery much

limber panther
kindred zephyr
#

is west even a valid target?

limber panther
#

sure is

south swan
#

is trigger set to "Server only"?

vapid scarab
#

Is the trigger activating once on client and once on server? I dont think that is how triggers work, but.... ^

#

I havent looked at triggers in a while

kindred zephyr
#

triggers are activated once in each machine, they do not sync

south swan
#

editor-placed triggers have independent instance on every client and on the server

kindred zephyr
#

^

limber panther
vapid scarab
#

there ya go

limber panther
kindred zephyr
#

setting a trigger to server only warranties that executions and checks are done only in the server. Is it intended to be only used once too? If so remove the repeatable checkbox too.

vapid scarab
#

Thanks Artemoz more.

vapid scarab
limber panther
vapid scarab
#

@limber panther Make sure you check that closely to make sure you get the behavior you want

cerulean cloak
kindred zephyr
warm hedge
#

Make a Mod

cerulean cloak
#

ah well, thanks anyway

limber panther
limber panther
queen cargo
#

"output"?

wary needle
#

anyone know how to lock the gamma setting? i need a way to detect if it has been moved

hallow mortar
#

Gamma is one of the things you can check with getVideoOptions. There's no way to change it through script commands.

wary needle
#

It's fine imma just kick the player if they turn it up

#
private _videoOptions = getVideoOptions;
/*
[
    ["aspectRatioName", "Auto (Stretch)"],
    ["brightness", 1],
    ["cloudQualityName", "VeryLow"],
    ["displayModeName", "Window"],
    ["dynLightsCount", 4],
    ["dynLightsQualityName", "VeryLow"],
    ["gamma", 1],
    ["guiScale", 0.55],
    ["guiScaleName", "Small"],
    ["hdrQuality", 16],
    ["hdrQualityName", "Normal"],
    ["monitorResolution", [0, 0, 2304, 1440]],                            // presence not guaranteed
    ["objQualityName", "VeryLow"],
    ["objectVisibility", 800],
    ["overallPresetName", "VeryLow"],
    ["overallVisibility", 1000],
    ["particleQualityName", "Low"],
    ["pipQuality", 512],
    ["pipQualityName", "VeryLow"],
    ["pipVisibility", 835],
    ["ppBloom", 0],
    ["ppBrightness", 1],
    ["ppCausticsQualityName", "Disabled"],
    ["ppColorPresetName", "Default"],
    ["ppContrast", 1],
    ["ppDOF", 0],
    ["ppFSAA", 1]
    ["ppPPAAQualityName", "Disabled"],
    ["ppRadialBlur", 0],
    ["ppRotationBlur", 0],
    ["ppSSAOQualityName", "Disabled"],
    ["ppSaturation", 1],
    ["ppSharpenFilter", 0],
    ["refreshRate", 60],
    ["samplingPercentage", 100],
    ["shadowQualityName", "Low"],
    ["shadowVisibility", 100],
    ["terrainQuality", 25],
    ["terrainQualityName", "Low"],
    ["texQualityName", "VeryLow"],
    ["vramInfo", ["5.8 GiB", "7.9 GiB", "0 B", "231 MiB", "5.5 GiB"]],    // presence not guaranteed
    ["vsync", false],
    ["waterReflectionQualityName", "Disabled"]
];
*/
_gamma = _videoOptions select 7;

if (_gamma > 1) then
{
hint "gamma is to high lower it now!";
};
#

is this a good way to write it?

proven charm
#

gamma is # 6

wary needle
#

_videoOptions = getVideoOptions; 
_gamma = _videoOptions select #6; 
 
if (_gamma > 1) then 
{ 
hint "gamma is to high lower it now!"; 
};
#

now im getting an invalid number in expresion

warm hedge
#

It is a HashMap not an Array

south swan
#

Return Value: HashMap
blobdoggoshruggoogly so _videoOptions get "gamma"

wary needle
#

_videoOptions = getVideoOptions;
_gamma = _videoOptions get "gamma";

if (_gamma > 1) then
{
hint "gamma is to high lower it now!";
};

#

i dont think its working as i am not getting a hint. any ideas?

warm hedge
#

Because 1 > 1 is false

wary needle
#

i changed my gamma setting

#

to 1.5

#

im a dumbass

#

i turned my brightness up lmao

#

it works lol

cosmic lichen
#

Instant kick 🔨

wary needle
#

yes

#

unless there is a easy way to black out there screen

hallow mortar
#

I would recommend picking a threshold value higher than just the default. Aside from its use as a nighttime cheating option, gamma is a real accessibility option, and people may have it set a reasonable amount higher than default, to account for differences in screen brightness/quality, room lighting, and their own eyesight.

wary needle
#

yeah ill make it 1.2 or 1.1

#


[] spawn {
while {true} do {
_videoOptions = getVideoOptions;  
_gamma = _videoOptions get "gamma";  
if (_gamma > 1.2) then  
{  
titleCut ["", "BLACK FADED", 999];hint "gamma is to high lower it now!"; sleep 5; titlecut [" ","BLACK IN",5]; 
};
sleep 1
};
};
sharp grotto
wary needle
#

At least we will slow em down ok

#
 
 
 
[] spawn { 
while {true} do { 
_videoOptions = getVideoOptions;   
_gamma = _videoOptions get "gamma";   
if (_gamma > 1.2) then   
{   
titleCut ["", "BLACK FADED", 999];playSoundUI ["Alarm", 10000, 1.9];playSoundUI ["Alarm", 10000, 1.9];playSoundUI ["Alarm", 10000, 1.9];playSoundUI ["Alarm", 10000, 1.9];titleText ["<t color='#ff0000' size='5'>GAMMA IS ABOVE 1.2, LOWER IT TO PLAY!</t><br/>", "PLAIN", -1, true, true]; sleep 5; titlecut [" ","BLACK IN",5];  
}; 
sleep 1 
}; 
}; 
cosmic lichen
#

Good thing volume gets capped at 5

wary needle
#

if you play serveral sounds it will earattack you

#

it will just play it once louder. try it

#



[] spawn {
while {true} do {
_videoOptions = getVideoOptions;  
_gamma = _videoOptions get "gamma";  
if (_gamma > 1.25) then  
{  
titleCut ["", "BLACK FADED", 999];playSound "AlarmCar";titleText ["<t color='#ff0000' size='5'>GAMMA IS ABOVE 1.2, LOWER IT TO PLAY!</t><br/>", "PLAIN", -1, true, true]; sleep 5; titlecut [" ","BLACK IN",5]; 
};
sleep 1
};
};
#

here is the new version

manic kettle
jaunty drift
#

use the systemChat command

formal ridge
#

Hello gentlemen

#

how would i go about writing a custom module?

#

because the official documentation for it is shit at best

opal zephyr
formal ridge
#

yes

#

i cant wrap my head around it

opal zephyr
#

Are you familiar with creating a config for an addon?

formal ridge
#

no

#

this would be my first addon

#

@opal zephyr im guessing i should learn how to make an addon first?

opal zephyr
#

Eh theres always gotta be somewhere to start, this one isnt the worst

formal ridge
#

roger

opal zephyr
#

The "Creating a Module" part of that wiki, very near the top, actually directs you on which files to create and what to put in them (config.cpp). I suggest following that

formal ridge
#

I've got the config.cpp in the root directory

opal zephyr
formal ridge
#

nono

#

the module folder

#

so myTag_testModule/config.cpp

#

should that folder be inside of an addon or is it ok on its own?

opal zephyr
#

Ok, it tells you to then make the cfgPatches, and cfgFactionClasses

formal ridge
#

got them already

opal zephyr
formal ridge
#

ahhhhh

#

understood

opal zephyr
formal ridge
#

oh nothing

#

i just thought the file structure looked a bit odd

#

thanks for your help!

opal zephyr
#

No problem :)

#

_
Does anyone know why this waitUntil might be stuck looping?

_unit setObjectTextureGlobal [_forEachIndex, format ['#(rgb,%1,%2,1)ui("RscDisplayEmpty","%3")', _texSize#0, _texSize#1, _uniqueUIName]]; 
waitUntil {
    systemChat "loop";
    !isNull (findDisplay _uniqueUIName);
};

I was having an issue where the display wasnt creating instantly, so the loop is there to fix it. Wait until works for the first 2ish (succesfully moves through it) but then just get stuck loop after that. No idea why, any help is appreciated

mint goblet
#

If a player if typing something in chat, I want to be able to retrieve that text through code

opal zephyr
#

Maybe its because the waitUntil pauses the execution of that script, including the creation of the display in the background...?

mint goblet
#

Systemchat types to the chat

compact vortex
#

I've got a scripting Question. I have a trigger that should activate when any independent forces are in its area, except the drone u_scoutdrone (unit variable name). This code doesn't exclude the drone, any idea why?
this && (u_scoutdrone != thisTrigger)

mint goblet
#

Basically I want to log what is being typed, without using BE

willow hound
#

Try this && !(u_scoutdrone in thisList) 🙂

compact vortex
vapid scarab
#

how would I test an object to see if it has an inventory?

willow hound
pulsar pewter
#

Hey guys!
Is there a way to "Save" info from a mission that is part of a campaign? I think I have some ideas for how to do it, but thought it might make sense to consult y'all.
I want to build a campaign for my players where one mission, they have to go behind enemy lines and takeout logi depots/enemy artillery positions. I want to somehow save that info, so in the next mission in the campaign, the next op starts with those arty positions/logi depots destroyed

#

One option I was thinking was creating arrays with the destroyed positons' info and saving it to my profilename space/dediserver's or something, but not sure if there's an easier way.

warm hedge
#

Good question, it should be possible but IDK how

#

I'll check one I eat breakfast

vapid scarab
#

2 ways. if you want completely premade missions, you will have to somehow save and export information about objects. If you want to do the same mission in the same mission file, you can save stuff to mission namespace, but you need to be careful about what you use to end a mission as one function will erase the save data.

2 suggestions:
look into the persist mod and/or how it works
Rebuild the remains of previous missions during zeus setup or in eden.

#

I recommend rebuilding stuff as its the simplest solution.

#

How do I trigger a zeus notification?

harsh sedge
#

Like the Global Hint?

harsh sedge
#

To give them unique variablenames, you can use missionProfileNamespace setVariable [vehicleVarName object + "damage", _theDamageArray].

#

And then run similar code to get the unique variable at mission start.

pulsar pewter
#

That's why I was thinking just profileNameSpace, since I'll be the Zeus both times, I can just save that info to my profile and pull next time.

granite sky
#

You need to set a description.ext parameter so that they use the same missionProfileNamespace.

#

missionGroup

pulsar pewter
#

So, just to check I'm understanding correctly, each separate mission folder will have, in its description.ext, an entry to say which mission group they are in?

granite sky
#

It probably won't unless you add it.

#

missionGroup defaults to some form of the mission name if you don't specify it.

slow brook
#

Soo.. I may be in the middle of writing a persistence mod...

#

Trying to decide if I get allVehicles and save them, or just ones with players in

#

make sure if you're doing this, you save the stuff in the right namespace, ie Server Profile or players profile

harsh sedge
#

If you have the script launch through initServer, for the mission, at least, it will only save the items to the server.

#

Also, keep in mind, if your server is linux based, that missionProfileNamespace won't be quite as reliable for saving/loading.

slow brook
#

initially yes. and beware that listen servers (Localhosted) behave completely differently to MP servers with it

#

Does anyone know what the size limit is for profilenamespace? I'm assuming it'll be os dependent

candid sun
#

i asked that the other day, think it was commy who said there's no command for it, but the chat text is a rscText so it should be possible to access it if you find the display # and then ctrlText - i've not had time to test yet

slow brook
candid sun
#

if you figure it out, post back pls

rich bramble
#

Talking about ressource id's. Is there any logic to them? Does BI have an internal tool to make sure they don't accidentially use an id twice in the same context?

harsh sedge
#

As in the arguments? Or the damageArray?

#

getAllHitPointsDamage results in a non Zero index

slow brook
#

hmm

vapid scarab
#

How do I trigger/call that hint?

hallow mortar
tender fossil
#

You could try logging the preceding values and see which one of them is faulty/nil

dusk gust
#

try (count (_pDMG select 0)) - 1

#

Count will start at 1 if it exists, where select will start at 0. (One index vs Zero index)

Say you have

_array = [0,1,2,3,4];

_count = count _array; // 5
_lastCountIndex = _array select 5; // will return nil because there are only 5 values in the array (0 is the first element, where 4 would be the last)

Basically the last loop you have will return nil for both _a and _b due to the bad array index.

vapid scarab
#

Confusing question. Ive tested the results and this doesnt break anything. So to be clear, everything works fine for me.
I copied a loadout from a default unit in arma. Idk if this is legacy arma code that works or what, but I noticed the gun name is arifle_MX_Hamr_pointer_F.
The MX rifle is normally named arifle_MX_F.
When importing arifle_MX_Hamr_pointer_F with no attachments in the appropriate slots in the loadout array, it imports as if it is arifle_MX_F.
What is going on here and why?

granite sky
#

It's the same base weapon, just with attachments. Not sure if the attachments listed in the loadout override that or it just doesn't run the attachment code. Either way it'd be pretty weird if it did come out with attachments.

jade abyss
#

Yeah, some tool is called: Excel or .txt file with note, wich range is beeing used by whom :P

hallow mortar
#

The weapons with pre-linked attachments get automatically converted into the base version + attachments when actually added to a unit

queen cargo
#

i doubt that @jade abyss
most likely they just hope nothing collided and add ~100 to their last submission

#

just like i usualy just take something around 30k

#

and hope nothing collides with it

jade abyss
#

AND, mostly it doesnt realy matters, wich one is in there.

#

Since CreateDialog will create that thing, with those IDs, even when another one exists, it won't be loaded.

#

For example: We got 2 Dialogs, with the same IDs/IDC etc blabla, just with different names. soo... pff, who cares.

#

P.S.: Klaatu Verata Nektu

hasty gate
#

Does anyone know a way to disable RMB zoom (eagle eye) functionality in a nice way?

sharp light
#

FLG_wReady or FLG_eReady or FLG_iReady anything wrong with this condition?

winter rose
sullen sigil
#

Is there any way of stopping a uav from appearing in the uav terminal list? meowsweats

sullen sigil
#

but i need the player to still be able to remote control it via script 🙃

winter rose
#

create said crew on script

sullen sigil
#

and in some instances the uav has no crew (createvehicle but no createvehiclecrew) and still appears and functions normally 😮

winter rose
#

¯_(ツ)_/¯

sullen sigil
#

of course, the simple solution is for me to not use drones as cameras 🙃

#

oh wait i can just createvehiclelocal

sharp light
sullen sigil
winter rose
winter rose
sullen sigil
#

ah, assumed arg/eff was an automatic thing when creating a page

#

i am however unable to test it i think meowsweats

finite bone
#

Will detach make the object retain the position it was prior to detaching?

winter rose
#

try and find out 🙃

sullen sigil
#

time to find out what happens if you createvehiclecrew into a local vehicle

#

i hope something explodes

winter rose
#

rip CPU

sullen sigil
#

the things i do to avoid using scripted cameras

#

it creates the unit but the vehicle does not appear globally thonk

#

i guess it'll have to do for my applications but it's quite peculiar

tough abyss
#

is there any way one could make similar effects to that in apex campaign where the map has two lines that enhance or is that something made out of game with a pprogram like adobe video maker pro or paid effects?

#

or any idea of the name of the effect

sullen sigil
#

sounds similar to the og star wars battlefront loading, though ive never played apex campaign

#

(lines just zooming in)

tough abyss
#

2 lines go on a map and have a small square then they zoom into the square guessing it is an external effect not a command and just play video any idea where I might find something like it

#

Will get a thing of the effect in 5 or so Min guessing this is better for some cinematic channe

sharp light
winter rose
#
private _a = true;
// private _b = true;
// private _c = true;
if (_a || _b || _c) // error
``````sqf
private _a = true;
// private _b = true;
// private _c = true;
if (_a || (not isNil "_b" && { _b }) || (not isNil "_c" && { _c })) // OK
sharp light
#

that explains it, thanks!

#

would declaring them in init.sqf define for every client?

winter rose
#

do you want each client to have a version of these variables?

sharp light
#

now you say it, only the server needs to know them

#

but every client having their own version won't be a problem

winter rose
harsh sedge
#

I'm not sure if I haven't figured it out yet, but why do the getXCargo commands return [[item],[amount]] vs [[item, amount],[],[],etc.]? Is there a method that makes the translation to addXCargo simple or is it just purely for efficiency?

sullen sigil
#

are you trying to duplicate a cargo container or something? not quite sure what the use case is here

harsh sedge
#

I mean, the addCargo commands take an argument of [[item, count]], butthe getCargo commands return [[item],[count]]. I was wondering if we were meant to figure out the translation for bulk items or if there's something I'm missing.

sullen sigil
#

its just... the same thign

winter rose
harsh sedge
#

Thank you

sullen sigil
#
private _box1 = boxymcboxface;
private _box2 = otherbox;
private _items = getItemCargo _box1;
{
  _box2 addItemCargo [_x, _items#_forEachIndex];
} forEach _items#0;```
harsh sedge
#

I thought that might be the case.

sullen sigil
#

oh wait

#

i see what you mean now i'd misread

#

there

harsh sedge
#

Augh now that I think about it, it's much easier to check if an object is in something if you only have to check one array vs thirty-four arrays

south swan
#

still no arrayTranspose for arbitrary arrays meowsweats

tough abyss
#

Is there any way to create an infared Light to show in nvd/tvds?

sullen sigil
#

just a local light source is how it tends to be done that's disabled when no nv/ti on

tough abyss
#

Any other methods?

hallow mortar
#

Lights don't show in TI whatever you do. For NV only, use setLightIR

sullen sigil
#

that's a thing? 😮

#

oh, 2.06

jaunty drift
#

Nectar... Necktie...

kindred zephyr
kindred zephyr
limber panther
#

Hello!
Recently i've been thinking about triggers and i got an idea for a new feature on my server but first i need to do a little trick with triggers and i would like to ask, if it's possible. First, when trigger gets activated, the command , let's have a hint as an example gets executed on every client. Therefore, although hint has local effect, everyone is going to see it. So, is it possible to actually give the hint to only the player who triggered the trigger? Secondly, would it be possible to have triggers working individually for each player? For example player (1) enters the trigger and gets a hint but player (1) is still in there and now a player (2) comes in too. Can he get that hint as well since the player (1) never left the area and therefore trigger remained activated?

tribal sinew
#

["hi!"] remoteExec ["hint", thisList select 0]; I guess this should work for the first part (didnt test tho)

#

^ in the On Activation

#

The second part looks kind of like it would be solved by keeping the triggers local and not server-side.

south swan
#

trigger triggerAttachVehicle [player]; in initPlayerLocal.sqf would change the trigger on player's machine to only react to them blobdoggoshruggoogly

hallow mortar
#

For triggers based on players being in them, using player in the condition will ensure they activate on the machine of the client that enters them, since player refers specifically to the local player. e.g.

(vehicle player) in thisList```
means the trigger will only activate on the client of players who enter the trigger
tribal sinew
#

How can I retrieve this vehicle icon thingy that is visible in the editor?

south swan
#

this icon?

tribal sinew
#

Nope, the one on the left 😄

#

Not sure if icon is the best word

tribal sinew
south swan
#

getText (configOf _vehicle >> "picture") should give the path to image

warm hedge
#

Isn't it editorPreview

tribal sinew
#

thanks guys, ill check em out ❤️

jade abyss
#

necbrcoughcoughcough

noble flicker
#

Anyone have experience with ExtDB? Can it handle two tables? (I'm pretty familiar with SQL just in designing what I'm working on, realizing it needs a database and a CSV isn't going to cut it)

#

I'm probably in the wrong place, I'll ask tools

tough abyss
#

can one replicate the laser's used under night vision via code? not in an ai or anything, checked draw3d and can't see anything that would let me make it for nvg's

sharp grotto
noble flicker
#

Thank you!

compact vortex
#

I'm localizing my mission to be in multiple languages. Creating diary entries in init.sqf with:
0 = player createDiaryRecord ["Diary", [localize "$STR_D_Execution_title", localize "$STR_D_Execution"]];
and Stringtable.xml:

    <English>Execution</marker>.</English>
    <German>Ausführung</German>
</Key>
<Key ID="STR_D_Execution">
    <English>Your mission today is to advance to <marker name='mCÄSAR'>phase line Cäsar</marker>.</English>
    <German>Ihre Mission heute: Rücken Sie zu <marker name='mCÄSAR'>Phasenlinie Cäsar</marker> vor.</German>
</Key>

In the diary entry, it only shows phase line Cäsar how do I get the html tags to work?

compact vortex
# hallow mortar <https://community.bistudio.com/wiki/Stringtable.xml#String_Formats>
hallow mortar
quaint star
#

I have a headless client named Egbert.
Can someone please help me with the code that I can add to the init of the units placed in the editor to transfer them to HC.
Someone mentioned setGroupOwner, but I know very little about scripts and do not know how to apply it correctly.
Thank you !

granite sky
#

In the init of one unit in the group:

if (isServer) then {
  (group this) setGroupOwner (owner Egbert);
};
#

Might not work for various undocumented timing reasons.

#

You would certainly need the headless client to be connected before the mission starts.

#

Maybe a spawned wait until Egbert is non-local.

quaint star
#

Thank you very much, will try it !

boreal parcel
#

so im writing a script for a mission I plan to run with my group.
I am going to try to make spawning of the ai as un-noticeable as possible by only spawning friendlies every few seconds on the vietnam spider holes and immediately having them start running.

I am currently having a small issue where some of the ai spawned will not move as if they are stuck, and if I move them in zues and let them continue on their current waypoint some just keep running in place and others will run forward like 10 feet and then run in place again, stop and repeat. Any idea whats up with that?

TRA_SIEGE_FINISHED = false;
TRA_MAX_AI_OPFOR = 80;
TRA_AI_OPFOR = 0;
TRA_OPFOR_INFANTRY = [
    "vn_o_men_vc_local_28"
];

while {!TRA_SIEGE_FINISHED} do {
    private _basePos = getPosATL hill_881;
    private _playerList = allPlayers apply {[_basePos distanceSqr _x, _x]};
    _playerList sort true;
    private _closestPlayer = (_playerList select 0) param [1, objNull];

    private _spawnPoints = (getPosATL _closestPlayer) nearObjects ["Land_vn_o_trapdoor_01", 100];

    {
        private _grp = createGroup east;
        // Current result is saved in variable _x
        [_x, _grp, _basePos] spawn {
            params ["_posObj", "_grp", "_basePos"];
            
            private _pos = getPosATL _posObj;
            if (TRA_AI_OPFOR >= TRA_MAX_AI_OPFOR) exitWith {};
            _grp createUnit [selectRandom TRA_OPFOR_INFANTRY, [_pos select 0, _pos select 1, (_pos select 2) + 1], [], 0, "NONE"];
            TRA_AI_OPFOR = TRA_AI_OPFOR + 1;

            if (TRA_AI_OPFOR >= TRA_MAX_AI_OPFOR) exitWith {};
            sleep 1;
            _grp createUnit [selectRandom TRA_OPFOR_INFANTRY, [_pos select 0, _pos select 1, (_pos select 2) + 1], [], 0, "NONE"];
            TRA_AI_OPFOR = TRA_AI_OPFOR + 1;

            [leader _grp, _basePos] spawn lambs_wp_fnc_taskAssault;
        };
        sleep 2;
    } forEach _spawnPoints;

    sleep 5;
};
#

I was also looking for suggestions on way to improve my code

sullen sigil
#

Is there any method of increasing a vehicle's max speed via script? Trying to make a "turbo" but don't really want to setvelocitymodelspace a bunch meowsweats

quaint star
granite sky
#

Can try:

if (isServer) then {
  this spawn {
    waitUntil { sleep 1; !local Egbert };
    (group _this) setGroupOwner (owner Egbert);
  };
};
#

actually I'm not even sure if it switches the ownership of the HC logic object, but hopefully it does...

tulip ridge
#

Working on a mod that currently uses ACE's ace_firedPlayer event handler, but I want to either rework it so that it works with and without ACE, or have a vanilla version as well.

if isClass (configFile >> "CfgPatches" >> "ace_common") then
{
    // ACE version
    ["ace_firedPlayer",
    {
        params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"];

        if !(_magazine isKindOf ["HandGrenade", configFile >> "CfgMagazines"]) exitWith {};
        // End early if not a grenade

        private _nearbyUnits = nearestObjects [player, ["Man"], 30];
        [player, "[vl-ThrowGrenade]Grenade Out!"] remoteExecCall ["CWR_fnc_SendLocalMessage", (_nearbyUnits)];
    }] call CBA_fnc_addEventHandler;
};
#

I call this script in a Extended_PostInit_EventHandlers, since I only need it to run once to create the EH.

I did also try using CBA's Extended_FiredBIS_Eventhandlers with an initClient and an init, but that didn't seem to do anything

granite sky
#

There's a vanilla Fired EH. It just doesn't catch some ACE actions, like advanced ACE throwing.

tulip ridge
opal zephyr
quaint star
opal zephyr
#

Thanks!

granite sky
#

Isn't ZHC supposed to do that on its own

quaint star
#

Yes, it can transfer automatically, but in some cases I need one side to be on a certain HC. Like BLUFOR on HC1, OPFOR on HC2.
And when the squad is transferred, such commands like allowCrewInImmobile and allowFleeing need to be reapplied to it.

finite bone
#

I noticed that the AI soemthimes just leave their turrets and engage players with their primary firearm even though the turret is in perfect health and condition (with ammo). Is there a reason why this happens and how to force lock them in the turrets.

manic kettle
vapid scarab
#

In some piece of code within a function, is there a way to get the name of the function?

manic kettle
#

I think using _this magic variable returns the scope? After that idk.
I'm curious if that's possible

south swan
finite bone
#

Is setPiPEffect LE or GE? - can't find the info in biki

warm hedge
#

PiP only exists L