#arma3_scripting

1 messages Β· Page 316 of 1

copper raven
#

@still forum didnt think it would be case sensitive,but yeah sorry i guess πŸ˜„

still forum
#

I thought about it. Looked at your code.. Saw it's not the problem. And didn't say anything

copper raven
#

yea dumb me, should have read wiki before, i dont use in var alot, so yea

little eagle
#

How to make a list of classnames lower case in SQF

jovial nebula
#

@cedar kindle Thank you for the info. But can sock execute native javascript code and return values? I thought it was for more complex uses afaik

@rotund cypress Because there are any languages aside from C++ ?

little eagle
#
_array = ["Lol", "LOL", "loL"];
_array = toLower (_array joinString "$") splitString "$";
willow basin
#

Meh only Language that could me get away from C++/C# + SQF is Python

jovial nebula
#

Well i should start learning C# and c++ ...
This , for example, should allow to execute python code from arma https://github.com/maca134/armaext , but it is written in C# so no Linux at all..

little eagle
#

Huh? What's wrong with C# on Linux?

jovial nebula
#

I can't compile it, am i wrong?

halcyon crypt
#

@little eagle's comment should've inspired you to do a quick google search and the only proper response should've been: "Oh... yay!"

#

πŸ˜›

little eagle
#

Uhm. I'm pretty sure SOMEONE made a solution for it.

jovial nebula
#

'Oh yay'

halcyon crypt
#

😁

jovial nebula
#

nvm,it uses windows libraries.. :L

rancid ruin
#

i thought Mono solved .net on linux

pliant stream
#

.NET Core is on linux

queen cargo
#
_array = ["Lol", "LOL", "loL"];
_array = toLower (_array joinString "$") splitString "$";``` that is the worst solution for that i ever have seen
pliant stream
#

heh makes sense to me xD

queen cargo
#
_array = ["Lol", "LOL", "loL"];
_array = _array apply { toLower _x };``` ?
pliant stream
#

fucking apply

#

what retard named that

warm gorge
#

How bad is it passing an empty array to remoteExec? Getting error: Trying to call RemoteExec(Call) with 0 targets for func

rancid ruin
#

it's very bad because you will get the error Trying to call RemoteExec(Call) with 0 targets for func

jovial nebula
#

Can .Net core be used to write extensions for arma?

warm gorge
#

@rancid ruin Are you being sarcastic? Sorry cant tell lol. Surely thats not that bad

rancid ruin
#

i'm normally being sarcastic when i'm in here yes

#

^ except then

pliant stream
#

@jovial nebula i don't see why not

warm gorge
#

@rancid ruin So I guess it would be worth adding in a isEqualTo [] check?

rancid ruin
#

i honestly don't know m8

#

you should share your code if you want someone to help though

warm gorge
#
_targets = allPlayers select {_x getVariable ["medic",false]};
(format [""]) remoteExecCall ["SR_fnc_globalMessage",_targets];
#

@rancid ruin As you can see, it checks for a variable on all players and gets an array of targets to use with remoteExec. But this could sometimes use an empty array, causing this error

rancid ruin
#

what's that format doing?

warm gorge
#

Oh I got rid of that just so it was easier to read, but doesnt have anything to do with my concern tho

still forum
#
_array = ["Lol", "LOL", "loL"];
_array = parseSimpleArray (toLower (str _array));

Might be faster right?

rancid ruin
#

that format is just == to an empty string though, i don't understand

still forum
#

He removed the content of that format to make it easier to read

#

I would add an if isEqualTo [] check. It's less expensive than a RPT message

warm gorge
#

Yeah fair enough, I guess ill just do that, cheers

jovial nebula
#

@pliant stream How ?D:

pliant stream
#

i don't know if you can export native functions in C# on .NET Core very easily, so it might be easiest to make a C/C++ extension that loads your .NET Core library and calls a normal method

rotund cypress
#

You can use pretty much any language I think, as long as it produces a DLL.

rancid ruin
#

which is fine if you're running windows

rotund cypress
#

How many people here are using Linux?

#

I mean, I don't really get people running ArmA servers on Linux

#

It speaks for itself that support for Linux is always gonna be at the bottom of the list.

rancid ruin
#

errr loads of people use linux servers lol

rotund cypress
#

I know, but I don't get why

#

A part from it most likely being cheaper

rancid ruin
#

go host some servers then maybe you'll see why

rotund cypress
#

I've hosted a lot of servers, all running on Windows

jovial nebula
#

Me :L

#

Yeah basically because it is cheaper

#

It is harder to mantain,harder to configure
Only after around 6 months I wrote some scripts for making my life easier

gaunt cairn
#

lightweight, less bloatware. Sticks to widely accepted standards. Better error logging. I tkink it is easier to configure b/c shit is not cluttered over thousand places but maybe this is b/c I'm used to linux servers.

still forum
#

Linux is top server OS isn't it? I don't have the money for a Windows License. I also don't have the money for a 100€+ server

jade abyss
#

Monetize your Server.

still forum
#

It's a private Server. And it's running some Mods that don't allow Monetization

jade abyss
#

Doesn't matter!

#

Monetize it

#

$$$$$$$

tough abyss
#

hey folks, is there anyone who knows how to make a menu like the Escape one? i don't mean the button but the submenu buttons and the slider-effect. is there a command doing that or is it just a config thing?

hollow lantern
#

Anyone came across the global animation that gets triggered when you leave a plane? I mean the canopy gets closed and no ladder is present. I tried to read all animations from a plane and tried to apply some but thats not working. Anyone has an idea how thats done? Now even the A-164 Wipeout has that feature

queen cargo
#

gotta agree to @jade abyss
btw. got an addon to monetize addons
want me to sell it to you?

plucky beacon
#

We monetizing now

#

Buy my reskin $80 of the off-road

queen cargo
#

reskin so 2016
we switch skins now to get the sense of animation

copper raven
#
if (isServer && _bool1) then
{
_roads= _obj nearRoads _radius;
_roads call BIS_fnc_arrayShuffle;
_road= selectRandom _roads;
_unitType="O_Soldier_F";
if (isNil "_road") exitWith {};
//groupName addWaypoint [center, radius, index, name]
_unitPos= getPos _obj;
_number= (count _roads-1);
_WPstart = _roads select 0;
_WPend= _roads select _number;
_veh= selectRandom _vehArray;
_createVeh= createVehicle [_veh, _road, [],0, "NONE"];
_crew= createGroup _side;
_Driver= _crew createUnit [_unitType, _unitPos, [], 0, "FORM"];
_Gunner= _crew createUnit [_unitType, _unitPos, [], 0, "FORM"];
_driver moveInDriver _createVeh;
_gunner moveInGunner _createVeh;
_wp1= _crew addWaypoint [_WPstart,1];
_wp2= _crew addWaypoint [_WPend,1];
_wp1 setWaypointType "MOVE";
_wp2 setWaypointType "CYCLE";

};//isServer

the AI driver wont cycle (guard the road), he would just stop, any suggestions?

little eagle
#

Add diag_log and check if all the variables are right.

copper raven
#
Cycle as first waypoint has no sense
#

even doe its not first?

#

ye, every log is this, saying cycle as first has no sense

rancid ruin
#

cycle should be last waypoint i think

copper raven
#

it is last, isnt it?

rancid ruin
#

wait, there's only 2 waypoints

#

you're saying go to A, then B is saying go to A

#

so you'll never move

#

you need at least 3 for cycle to work i'd think

copper raven
#

a > b > c > a?

rancid ruin
#

yeah, with C being your cycle WP

#

it should also be near to B, location wise

copper raven
#

hm but you can do a > b >a in editor itself

#

so it should be possible outside editor

rancid ruin
#

it works? you tested it?

#

i always thought cycle wasn't actually a "go here" WP, it just does "go back to first WP"

copper raven
#

i cant test it atm, doing other stuff, will do soon

unreal siren
#

Hey peeps! First time using perams and I'd love some help.

#

My goal is to pass the distance to say3D but I'm not sure how. (param[0,objNull,[objNull]]) say3D (param[1,"",[""]]); that's current code. called via [_thisunit, _selectsound] remoteExec ["client_fnc_say3D",0]; And works fine. Not sure how to add support for distance though.

dusk sage
#

for the alt syntax?

#

Firstly, please use variables, that code is 🀐

unreal siren
#

Wait what

#

But... I'm using private variables?

dusk sage
#

where?

unreal siren
#

_thisunit, _selectsound

dusk sage
#

(** param[0,objNull,[objNull]]**) say3D (param[1,"",[""]]);

unreal siren
#

It's in another file

#

Worse than select I guess?

dusk sage
#

It's fine to use param(s), but do so before using them

#
params [
    ["_object", objNull, [objNull]],
    ["_sound", "", [""]]
];

.. say3D ...
#

So it's actually readable πŸ˜›

unreal siren
#

Oh, lol

dusk sage
#

So when you say distance, you want to use the alt. syntax for say3D?

unreal siren
#

Yeah

#

My death sounds are broadcasting waaaay too far away without any muffling

dusk sage
#

So then what stops you using it πŸ˜› ?

unreal siren
#

Syntax for skipping a peram

dusk sage
#

I'm really not sure what you mean

#

You are welcome to do something like

#
params [
    ["_object", objNull, [objNull]],
    ["_sound", "", [""]],
    ["_distance", 100, [0]]
];

_object say3D [_sound, _distance, 1];

#

Distance defaults to 100m by default, so if you don't want to pass a distance, you don't have to

#
[_thisunit, _selectsound] remoteExec ["client_fnc_say3D", -2]; //100m
[_thisunit, _selectsound, 50] remoteExec ["client_fnc_say3D", -2]; //50m
unreal siren
#

Awesome, killed two birds with one stone as I wasn't real sure how to specify expected type. [0]

#

So -2 excludes the server... Is this just good coding practice or an optimization?

rotund cypress
#

Well, why would you execute something where it's not needed? πŸ€” @unreal siren

unreal siren
#

Fair enough

#

I'm trying to find a way to detect when a player receives an invite from the BIS dynamic group system, what's a good way to go about retrieving said information? The vars aren't public inside the function as I'd use a Public Variable Event Handler but... ["GetPlayerInvites", [player]] call BIS_fnc_dynamicGroups; Can be called. Doesn't clear list when the invite is accepted though. I don't really want to use a while loop when the player respawns.

abstract shuttle
#

Hey guys! Is there any option to display the safezone mousecursor position?

hallow spear
#

I think my AI became sentient. after hours of testing a mission where death is inevitable, one has given himself a raven vest and 23 rgn grenades. the story goes a little differently now...

#

im looking for a rogue game logic or something, an init field somewhere...

vivid locust
#

Small question. When I set a global variable in init.sqf and I want to edit this variable for clients, how can I do that? Let's say this variable is DZE_preferHint = true;
I will make a script that is called in !isServer part of init.sqf so only for client. In this script I will change the variable DZE_preferHint to false. Is this only for the client or is this disabled on the whole server then?

dusk sage
#

A global variable is local to the client

#

Changes to it won't be broadcasted automatically

vivid locust
#

@dusk sage Thank you!

tough abyss
#

@vivid locust use publicVariable.

vivid locust
#

I don't want to make it public.

tough abyss
#

Ok, sorry.

dusk sage
#

πŸ”₯

proven crystal
#

how can i generate a respawn point on the fly through script, i have sectors that can be captured and i would like to make those respawn points, depending on who owns them and maybe other conditions

#

and how can i attach a respawn point to a vehicle for a mobile HQ?

#

will it work if i generate new matrkers with name "respawn_west_XXXXX" usw?

#

and move them around?

teal coral
proven crystal
#

so that is a yes? because i now that page, im just wondering if all that applies for markers generated and moved or changed during game, or if its only initialized once on start of the mission.

#

so i mean if i change a markername from respwand_west to respawn_east during game, that will work, yes?

rancid ruin
#

it should do yes

tough abyss
#

How do I check if a player is the host in a non-dedicated, player-hosted server?

rancid ruin
#

isServer & hasInterface?

tough abyss
#

Wiki says ```SQF
if (isServer) then {
//run on dedicated server or player host
};

rancid ruin
#

that is true, but if you want to filter out a player host vs. dedi server then hasInterface will do

tough abyss
#

Ok, thank you!

rancid ruin
#

KK's comment on that sums it up nicely

tough abyss
#

πŸ‘

twilit tartan
#

Hi, I want that the arsenal opens if a player spawns and is not in a vehicle

#

So I tried to put these in the onPlayerRespawn.sqf, but both donΒ΄t work

#

if !(isNull objectParent player) then {["Open",true] spawn BIS_fnc_arsenal};

#

if !(player == vehicle player) then {["Open",true] spawn BIS_fnc_arsenal};

rancid ruin
#

if you diag_log !(player == vehicle player) at the same point in the script does it say true?

still forum
#

maybe good old waitUntil {player == player} Just guessin

twilit tartan
#

Sorry where does that output to @rancid ruin

still forum
#

RPT @twilit tartan
you could also systemChat str (!(player == vehicle player)) to show it in chat box

twilit tartan
#

ah ok

#

Sorry IΒ΄m a noob still, my onPlayerRespawn.sqf looks like this atm: waitUntil {player == player} {["Open",true] spawn BIS_fnc_arsenal};
systemChat str (!(player == vehicle player))

#

DoesnΒ΄t output anything

still forum
#

wat?

#

yeah.. Okey.. πŸ˜„

twilit tartan
#

πŸ˜„

still forum
#
waitUntil {player == player};
systemChat str (isNull objectParent player);
if (isNull objectParent player) then {["Open",true] spawn BIS_fnc_arsenal};
#

you were also using if !isNull. That would only execute when the player has a parent. Which means he is in a vehicle. so your objectParent code would execute only if player is in a vehicle. The opposite of what you want

twilit tartan
#

Ah ok thanks

#

now it returns true in chat, but the arsenal doesnt trigger when outside the vehicle

still forum
#

uhm

#

maybe semicolon missing. right after BIS_fnc_arsenal

#

check RPT for script errors

twilit tartan
#

Lol the rpt has 41203 lines

#

Thats what 60gb mods do to you

steep matrix
#

have a weird issue here: moveInTurret/action ["moveToTurret",.. works fine in 2d editor, but not in Eden

#

assignedVehicleRole shows the correct turret but the player doesnt get moved to it

little eagle
#

probably because no time passes in 3den.

#

same issue when using animate I think.

twilit tartan
#

@still forum It says this: 15:55:22 File C:\Users\Fried\Documents\Arma 3 - Other Profiles\Fritz%20von%20Bordeaux\mpmissions\IRAQ%20APACHE.DYA\onPlayerRespawn.sqf, line 2
15:55:22 Error in expression <emChat str ((isNull objectParent player);
if (isNull objectParent player) then {>
15:55:22 Error position: <;
if (isNull objectParent player) then {>
15:55:22 Error Missing )

still forum
#

my systemChat has one ( too much

twilit tartan
#

@still forum Alright, the arsenal starts now, but it starts in the helicopter as well sadly. Any more Ideas?

still forum
#

Player spawns directly in helicopter? Doesn't maybe get moved into it after arsenal opened?

twilit tartan
#

IΒ΄m using the standart arma spawn selection screen, so that could be the case yeah

#

Would a delay help maybe?

steep matrix
#

@little eagle thanks!

warm gorge
#

In the Killed event handler, whats this new instigator object parameter? As in hows it different from killer

little eagle
#

the unit that shot if the killer is a vehicle

warm gorge
#

@little eagle Would this be a workaround for killer sometimes being the driver of a vehicle rather than the gunner? As in would the instigator properly return the gunner

tough abyss
#

If time doesn't pass in 3den, then how come it starts raining when setting the overcast to max...?

little eagle
#

magic

#

ShadowRanger, maybe.

rancid ruin
#

rain is probably a shader effect rather than an actual environmental physical thing i'd guess

tulip cloud
#

When I pull a string from a database, for example, the name George should it be stored in a VARCHAR(30) with quotes or is it good practice without?
Is it common/good practice to store an array in a database or should I store the data in separate columns and create the array in arma?

still forum
#

Didn't I read the same question a minute ago somewhere else?

#

I don't see why you would store it with quotes.. You'd have to parse the quotes away again later.. Why do additional processing?

#

Do what's fastest and easiest

tulip cloud
#

Ok I get the first answer but the second I'm not sure. (Fastest/Easiest) It seams like storing it as '[""data"",43,b_soldier_n]' would be quicker but will arma detect it as a string when I do _anArray = ["data",42,b_soldier_n] ?

still forum
#

look up parseSimpleArray

tulip cloud
#

thanks

robust hollow
#

is showGPS the command to show/hide the Rctrl+M minimap? Am trying to force it to show but it is unresponsive both in my mission & in a plain editor mission :/
I should also say: the unit does have a GPS assigned.

rancid ruin
#

yeah it seems to be fucked

#

visibleGPS reports true/false correctly

#

and if you have GPS open already, then showGPS false hides it again

#

but showGPS true does nothing πŸ€™πŸΏ

#

almost certain that you'll be able to display it via script somehow though

proven crystal
#

this ```sqf
_pos = _mobileHQ getpos [5, (getDir _mobileHQ + 180)];

#

should give me a position 5 meters behind the mobile HQ right?

#

fr some reason it returns random positions around the mobile HQ....

tough abyss
#

heyho, is there a button which can contain a picture as well? like rscPicture but with an action attribute?

plucky beacon
#

you can put a button with no opacity over a picture

tough abyss
#

thats what i did until now, but i thought there is an easier way ;D

plucky beacon
#

I'm sure you can set an onclick event handler but I've never tried it

digital pulsar
#

command looks good @proven crystal

#

what kind of positions are they

plucky beacon
#

how do you get the stupid callouts to stop interrupting sideRadio, because enable sentances also turns off sideradio commands

plucky beacon
#

TIL you can have multiple radio messages at once if they're from diffrent units

subtle ore
#

disable the voicePack for the unit? 🀷

plucky beacon
#

trying to stay vanilla, want to release this :P

#

I found out I can just layer over it with other units

subtle ore
#

I know there is a solution to this, because I used it to disable AI from talking during mision run

plucky beacon
#

There is enablesentences but that turns off the sideradio command too

rotund cypress
#

Hey guys, is there any function to check how much inventory space a player has left? I can't remember.

#

I tried looking at the RscDisplayInventory, but I couldn't find it all in RscDisplayInventory function.

plucky beacon
#

and why does changing numbers on only one array change nothing

#

I've been testing numbers in the debug menu for an hour now and it's either sideways and staring straight ahead, how the fuck do you do this shit

still forum
#

Don't sleep in maths lessons πŸ˜„

plucky beacon
#

_camera setVectorUp [0.001,0,0]; is 90 degrees sideways, but _camera setVectorUp [0.000,0,0]; is straight

#

wat

still forum
#

you can't have a 0,0,0 up vector

#

it has to be normalized

#

meaning x+y+z == 1

plucky beacon
#

pbtbtbtbtb okay

still forum
#

and.. yeah... The results are correct. That's how vectors work

#

google for some angles to upVector calculator

#

I know you can cross product the forward vector with something and then you get the right vector.. and then you can cross product that with something again to get the up vector

hollow lantern
#

I'm not sure what to search for if I want to get the position of a player where he is lookin with a rangefinder or similiar. While writing this question maybe lookAt will do the job?

#

Control what the unit(s) is/are looking at (target or position). ah nope

still forum
#

Gimme a sec

#

Or just
eyepos + viewDirection * RangeToTarget
dunno how to get the range to whatever point the player is looking at without lineIntersects

plucky beacon
#

I found a bis function for pitch and bank so I'm using that

#

thanks though, I'll bookmark it

hollow lantern
#

hmmm could be a tryout. Not sure how its done with the BIS arty / cas module

#

there you also just spot a location and ask for support via the radio πŸ˜„

hollow lantern
#

[_supportType, _supportCoords] call BIS_SUPP_pickProvider; interesting I need to investigate further πŸ˜„

subtle ore
#

@plucky beacon well, you have to use a combination of directions. One axis controls left or right of the original pos, one controls forward and backwards from original pos, and one controls the up and down. Assuming it conforms to the regular positioning

rancid ruin
#

it's basically Euler angles right?

#

like pitch/roll/yaw on an aircraft

outer fjord
#

I'm using the Y-32 as the transport. Since AI drive them like a run away semi I figured I would just use UnitCapture.

#

took me like 20 times, but I finally got a decent landing and take off. However, the gear, and VOLT manuvering wasn't rrecorded.

jade abyss
#

iirc, Enemy Units can't enter Vehicles, wich is taken by the enemy.

#

(or does it work?)

#

+What is your issue?

outer fjord
#

The landing works, but the unit fails to deploy landing gear, and the door. As well as not using proper vector(which is fine for now).

#

It basically just stops were it's gear normally would hit. But since it doesn't deploy them it just kinda floats.

jade abyss
#

As well as not using proper vector(which is fine for now). <- Is it a prob or not.

#

You must be clearer with your statements.

#

I have no clue what the actual problem is, that you need help with

outer fjord
#

The prroblem is the AI will follow the UnitCapture path but fail to deploy landing gear. Which means it doesn't properly land but instead hovers about .8m off the ground.

jade abyss
#

UnitCapture Path? oO

#

Okay, let me rephrase:

#

You have a unit, wich is "captured"?

outer fjord
#

BIS_fnc_UnitCapture

jade abyss
#

and a VTOL is following it?

outer fjord
#

BIS_fnc_UnitCapture is a function that allows you to create movment data from player made paths.

jade abyss
#

Wait a sec, i mixed that with another Command

hollow lantern
#

@outer fjord Yeah but not sure if deploying landing gear will covered by that. You could try to press F2 to copy the weapons data

jade abyss
outer fjord
#

Hence why I put a link up first thing >.<

hollow lantern
#

Maybe that includes the landing gear deployment

outer fjord
#

mmm, I'll give it a try. Kinda sucks I have to go back to landing that. VOLTs have became a pain since Auto-vector is broken at least in dev. :\

hollow lantern
#

hmm yeah

#

Β―_(ツ)_/Β―

outer fjord
#

Now that I think of it, probably explains why BI never used a vehicle that has deployable gear that uses that featurre.

hollow lantern
#

_coords = _this getVariable "BIS_SUPP_supportRunCoords"; hmm now I need to find out where this variable gets set and how πŸ˜„

#

ah that comes from _supportCoords = (player getVariable "BIS_SUPP_request") select 1; via _provider setVariable ["BIS_SUPP_supportRunCoords", _supportCoords, TRUE];

cerulean whale
#

Hey guys, this problem has been pissing me off for an hour and it makes absolutely NO sense.

#

        _thisItem = _x;

        id = (_thisItem select 0);
#

That returns ```SQF
["Vest_White","Vest"]

#

but when I do ```SQF
_thisItem = _x;

    id = (_thisItem select 0) select 1; // To return "Vest"
#

HOWEVER! When I do it in the "watch" section of debug console with public variables

hollow lantern
#

shouldn't just id = (_thisItem select 1); work?

cerulean whale
#

it works fine

#

but not in script

#

No, select 0 includes the brackets. I want to have the second entry within those brackets

hollow lantern
#

ah

jade abyss
#

Show the full thingy

#

I assume its an ForEach

cerulean whale
#

Gimme a sec to get it all up lol, I just deletesd a ton

#

ye

jade abyss
#

rgr

cerulean whale
#

It was working fine the other day

#

which is the odd part

jade abyss
#

Β―_(ツ)_/Β―

cerulean whale
#

It's been working for weeks xD

subtle ore
#

@jade abyss do you have some way for replacing words with acii? Or a text pad for the shrug ? :P

jade abyss
#

Are you sure it is nothing before?

#

?

#

Type /shrug

cerulean whale
#

Well when I look at id for example in the 'Watch' section it is correct

subtle ore
#

Ooohh....

jade abyss
#

Β―_(ツ)_/Β―

cerulean whale
#

and when I go (id select 0) select 1 it works

#

but when it's in a script

#

no dice..

#

even if it's just that in a script

jade abyss
#

I don't have a magical glassbowl

cerulean whale
#

xDD

#

Screw it, I'll just rewrite it

jade abyss
#

As long as you don't show anything, i can just guess

#

🀦

cerulean whale
#

it'll take 20 mins anyway

#

πŸ˜‚

hollow lantern
#

grr it seems really hard to find out how arma gets the coords from the player where he is lookin at trough an object (laser designator for e.g.). As far as I see that doesn't seem to be available in the modules_f.pbo hmmm only thing I was able to find is that the coords maybe get transported trough a variable with name BIS_SUPP_request

#

ah yeah modules, ofc its maybe not inside there lol

subtle ore
#

Raycasting to the rescue? 🀷

jade abyss
#

1KM Max

#

(if you talk about "intersect")

subtle ore
#

Only 1 km wtf?

jade abyss
#

uh, wait a second

#

5k oO

outer fjord
#

:, damn having no luck with this.

#

Is there anyway to force gear down on a aircraft controlled by AI? action ["LandGear", planeOne]; doesn't seem to work.

jade abyss
#

prolly animate

#

Check in the configViewer for the AnimationSources, then do a PlaneOne animateSource ["AnimNameForTheGars",1];

But i doubt, it would help.

tough abyss
#

this tells me if a player is in a vehicle (vehicle player != player)

jade abyss
#

or (isNull objectParent player) = not in a Vehicle/on foot

tough abyss
#

would !(vehicle player != player) tell me if the player is not in a vehicle

#

ok so (isNull objectParent player) means they are not in any vehicle?

jade abyss
#

☝ Read above, i edited

tough abyss
#

ok thanks

outer fjord
#

Meh, I think I give up for now, and will just switch to a helicopter. I can see why Bi never used the VOLTS in the campaign either.

subtle ore
#

Well. Mission development versus when the vtol was made is important to consider

#

If they felt they needed to use it they would be adding more functionality specifically for use in that mission

outer fjord
#

Well yea, it's nice to run into the hurdles they delt with during their own mission making.

#

Hopfully fixing the auto-vector when jet DLC comes out will fix this. At least then I can just force the AI to take it very slowly so it's not a crazy 3 orbits to land.

jade abyss
#

Quiksilver, the only person that talks more trash than me.

#

(difference: I mostly mean it as a joke πŸ˜„ )

#

🀦

#

Why did i removed you from my blocklist again? ^^

subtle ore
#

Do they even have job openings for ai programmers?

outer fjord
#

Honestly the Arma 3 AI is pretty damn impressive consideriring what it does.

subtle ore
#

Indeed, and the truth of it is: it's not going to get any worse.

#

Well, if there is a poor design decision, it could go down.

outer fjord
#

So far the only issue which is what is effecting my mission set up is the AI is having trouble with VOLTS now a few things have changed with the flight model in dev.

subtle ore
#

And that's only an issue post flight model changes correct?

outer fjord
#

That I don't know, been stuck in dev forr awhile just foaming at all the jet DLC stuff :S

subtle ore
#

Lol, yeah it's really weird getting used to the new stuff. First time engaging a ifrit I was like "wtf?". But yeah, that'll get fixed if it hasn't been already I guess. O'

#

Maybe a few more days on the dev branch and see if it gets fixed?

outer fjord
#

Hopfully, the lack of auto-vector is killing me and many AI. XD

subtle ore
#

Hmmm..are you sure there isn't like a defined user action for it? I mean like if I were to do "_myCoolAI action["Eject"(vehicle _myCoolAI)]" except with vectoring? 🀷

rancid ruin
#

why do you call them VOLTS, isn't that a measure of electricity?

jade abyss
#

πŸ˜‚

#

@tough abyss Nah, i just tab in when PboProj is packing files πŸ˜›

#

I need a 3rd monitor -.- everythings full

subtle ore
#

Lool, they're quite the shock @rancid ruin πŸ˜ƒ

outer fjord
#

Cause I'm on mobile and it keeps auto-correcting 😦

#

T-T

subtle ore
#

I hate how tiny mobile devices are 😦

rancid ruin
#

just use desktop PCs boys

#

that's WATTS up

#

sorry auto correct

subtle ore
#

Oh jeez, I can see this being a fad now.

rancid ruin
#

i think logic gately thinking you'd run out of electric puns pretty quickly

subtle ore
#

who knows. We can be CREATIVE Β―_(ツ)_/Β―

tough abyss
#

its telling me im missing a )? if (!(isNull objectParent player) && (_stage = 1)) exitWith {hint "Debug: You are in a vehicle"};

rancid ruin
#

stage == 1

tough abyss
#

thanks

#

any way to see if you are wearing a certain peace of clothing? cant find it in arma

#

i think i found something _uniform = uniform _unit

vapid frigate
#

that's the one

jade abyss
#

Yep

outer fjord
#

So just a update, putting the AI on limited speed in the waypoints will cause the VTOL's to switch over. But only the Blufor one will activily/some what effectivly land at the designated spots. The Y-23 still won't turn full VTOL and will go for runways.

#

I decided to just settle with a Taru T-T

copper raven
#

how does the nearRoads work? its so confusing, iam running a script so it selects the first position in road, then middle position, and the last position by selecting specific number in array, but it doesnt work since this: http://prntscr.com/f51dsv

#
_roads= _obj nearRoads _radius;
_number= (count _roads-1);
_count= (floor(count _roads)-1);
_div= _count / 2;
_WPstart = _roads select 0;
_WPmid= _roads select _div;
_WPend= _roads select _number;
#

this is what iam up to, but it doesnt work since nearRoads returns array in a very interesting way, i could just do this:

_WPstart = _roads select 6;
_WPmid= _roads select 3;
_WPend= _roads select 25;

by the screenshot, but i run script of different camps passing the obj, so the preset selections wouldnt work, because radius is different

little eagle
#

The array reported by nearRoads has an arbitrary size depending on how many roads are inside the circle.
What is confusing to me is what you're doing with that.

copper raven
#

making cars spawn/despawn

little eagle
#

What is the difference between _number and _count?

copper raven
#

dont judge me on that, iam too lazy :T

little eagle
#

Also I don't think you can just apply waypoints to these road segments like that.

copper raven
#

theyre working

#

tested this:

_wp0= _crew addWaypoint [_WPstart,1];
_wp1= _crew addWaypoint [_WPmid,1];
_wp2= _crew addWaypoint [_WPend,1];
_wp0 setWaypointType "MOVE";
_wp1 setWaypointType "MOVE";
_wp2 setWaypointType "CYCLE";
little eagle
#

Like say the middle road segment in the array has the WP in the middle of the first and last segment.

#

I don't think the order is guaranteed and the road segments can be from totally different roads.

copper raven
#

so how shall i do it then?

#

iam stuck with this

little eagle
#

Leave out the middle waypoint completely I guess. It serves no purpose anyway.

copper raven
#

then cycle stops working

#

returning error of cycle as first WP makes no sense

#

creating 2WP same place as "MOVE" doesnt work, already tested

little eagle
#

Yeah, you need a starting WP, then a first waypoint and CYCLE can only be the second waypoint

#

I guess when you createUnit the crew, it doesn't add the starting waypoint until a few frames later and then it doesn't for you, because you already created some.

#

Just add the first "MOVE" waypoint twice.

copper raven
#

k, but how do i return road positions again

little eagle
#

getPosASL _road?

copper raven
#

and what would you do with that after?

#

i also need it to be in radius

little eagle
#

You don't even need the position really. addWaypoint accepts objects as positions and I don't see why that wouldn't work with road objects.

#

What radius?

copper raven
#

any, passed into VM

#

as i said iam running it so i could pass different settings into VM

#

onto different camps with different obj

little eagle
#

"VM"?

copper raven
#

pff

little eagle
#

lol

copper raven
#
_bool1= (_this select 0); //enable vehicles
_bool2= (_this select 1); //enable garrison
_obj= (_this select 2); //obj
_radius= (_this select 3); //radius
_side= (_this select 4); //AI side 
_skill= (_this select 5); //AI skill
_percentage= (_this select 6); //percentage
_exclusionList= (_this select 7); //exclusion list
_vehs= (_this select 8); //vehs
#
null=[true,true,camp1,200,EAST,0.20,50,_exclusionList,_CSATvehs]execVM "garrison\init.sqf";
little eagle
#

eww

copper raven
#

potato iknow

little eagle
#

What is the question again?

copper raven
#
commy2 - Today at 10:16 AM
You don't even need the position really. addWaypoint accepts objects as positions and I don't see why that wouldn't work with road objects.
What radius?
#

you would just write _radius i think if using getPosASL

little eagle
#

I don't get it. How is that different from what you're doing now?

#

And you don't need getPosX. addWaypoint accepts objects as positions.

copper raven
#

you mean how different is the radius?

little eagle
#

What radius do you speak of?

copper raven
#

passing 200atm

#

since its enough for mike26

little eagle
#

I have no idea, but
_roads= _obj nearRoads _radius;
seems fine to me

copper raven
#

yes, but we arent talking about nearRoads anymore bcuz it doesnt work me

little eagle
#

nearRoads works fine

copper raven
#

so... nearRoads, how do i get first and the last position in road then? selecting first and last element in array wont work, dumb

rancid ruin
#

why don't you just place the waypoints manually since you know where they are meant to be?

little eagle
#

sort them, but idk if they aren't sorted already.

copper raven
#

@rancid ruin debugging road positions, then placing waypoints for many camps different radiuses its just too much of work

rancid ruin
copper raven
#

already messed with it, got nothing working

#

its more for placing static cars

rancid ruin
#

a minute ago it was for placing waypoints...you really need to explain yourself better lol

copper raven
#

it is about placing waypoints wdym?

#

i wantedto mention that roadsConnectedTo is more for placing static objects

little eagle
#
#define ASCENDING true
#define DESCENDING false

_roads = _roads apply {[_x distance2D _origin, _x]};
_roads sort ASCENDING;
_roads = _roads apply {_x select 1};
#

sorts roads by distance from _origin. For Dscha edition.

rancid ruin
#

that's good if there's no sharp corners πŸ˜ƒ

copper raven
#

well, ill take that one probably the best i can get, there are some turns, but i will workaround them

#

thanks

proven crystal
#

do i see this right, that eventhandler respawn is only usable on players, not ai units?

proven crystal
#

to fill a vehicle with gear i can use [_this,_value] call bis_fnc_initAmmoBox;and replace _value with this array of arrays? i dont find documentation of that function anywhere

#

hm i guess i might just use these 4 functions

#

BIS_fnc_addVirtualBackpackCargo
BIS_fnc_addVirtualItemCargo
BIS_fnc_addVirtualMagazineCargo
BIS_fnc_addVirtualWeaponCargo

#

but why is there the 'global' variant for them?

#

wont the stuff that i add be available for everyone anyway?

hollow lantern
#

Anyone used https://community.bistudio.com/wiki/screenToWorld lately? It returns coords but I'm not sure what is meant by the screen. atm I just check if the player is in (cameraview == "GUNNER") and then use screenToWorld with the example coords

still forum
#

Well.. It converts screen coordinates to world coordinates

#

0,5,0,5 returns the position you are currently looking at

hollow lantern
#

hmm thats fine exactly what I want

little eagle
#

but only where it intersects with the terrain.

still forum
#

Yeah.. Just remembered we talked about exactly that yesterday

#

not also with buildings?

little eagle
#

Nope

#

But you can make a LIS between posScreenToWorld 0.5,0.5 and that point to get that

hollow lantern
#

hmm well goal is that player looks trough laser designator and "marks" a target. that position then should be returned

little eagle
#

Yeah, do what I said

#

LIS = lineIntersectSurface

#

with some S's in there

hollow lantern
#

I know I will try that thanks

still forum
#

Is there really no command that returns the current camera FOV? I want to add a 3D compass to the Drone Feed. Currently doing that via posCameraToWorld and drawIcon3D which works fine. But is ofcause way to big If I zoom in. Any way to detect how much zoomed in a player currently is?

hollow lantern
#

@still forum guess you want use CBA?

still forum
#

I have CBA yeah

hollow lantern
still forum
#

Ah yeah.. Nice. Thanks

still forum
#

I'm watching the uav Feed and shownUavFeed == false...
Probably only applies to the little onscreen video thingy above the gps :/

#

Well.. Alternative works atleast
uavcontrol (getConnectedUAV player) select 1 == "GUNNER"

twilit tartan
#

Noob here, I have a question: I have this in the Init of a Helicopter: position[west, this] call BIS_fnc_addRespawnPosition; Now I want that this respawn only gets activated when the helicopter leaves the area of my marker called "FOB_Marker", so something like waitUntil not on FOB_Marker or something?

hollow lantern
#

_targetPos = screenToWorld [0.5,0.5]; I want to use that in a script but what I don't get is where I tell Arma to get the screen from one specific player? In Singleplayer there is only one but in MP?

still forum
#

in MP there is only your local screen

hollow lantern
#

yeah but which local screen? How does the screenToWorld determines which local screen to use?

#

I don't get that

outer fjord
#

@twilit tartan not a super scripted but maybe add a trigger area using the on activate and on deactivate to toggle it on and off?

formal jetty
#

Quick question that i was hoping someone may be able to help me out with, we use ACE on our server and im working on a addaction vehicle respawn script for aviation on the Nimitz carrier. i have got the respawn system working but im wanting to find out if there is a way to have the aircraft spawn with a init and also with the FRIES fastroping that ACE has. Im able to do this in the editor but with the respawn its a base craft without any init or selected attributes. This is the init im running on the sign to spawn in aircraft

#

MenuObject addAction ["UH1Y Ground Support Chopper", {createVehicle [(_this select 3), (getPosATL chopper), [], 1, "NONE"];}, "RHS_UH1Y_GS"];

#

the getPosATL chopper is just a invisible landingpad so i could set hieght

hollow lantern
#

@still forum I mean if I have three players in a mission and have a screenToWorld that is present in a script. How can I determine which player is used then? e.g. sqf _targetPos = screenToWorld [0.5,0.5]; _intersectTargets = lineIntersectsSurfaces [_targetPos, _targetPos];

still forum
#

You only have one screen.

#

@hollow lantern

#

_targetPos will be different for each player

hushed helm
#

anyone knows how to get a hold of a king of the hill mission? or do i need permission to host it?

hollow lantern
#
_targetPos = screenToWorld [0.5,0.5]; 
_callerPos = [positionCameraToWorld [0.5,0.5]]; 
_intersectTargets = lineIntersectsSurfaces [_callerPos, _targetPos]; 
``` can someone explain the command ``positionCameraToWorld`` for me? I don't get what exactly I need to give as arugments. I tried to give 3 args but then the error tells me I only have provided 1...
runic spoke
#

@hollow lantern _callerPos = positionCameraToWorld [0.5,0.5,0];

hollow lantern
#

thx

still forum
#

why that 0.5?

#

positionCameraToWorld turns a camera relative position into a world relative position
positionCameraToWorld [0,0,0] == position of the camera
positionCameraToWorld [0.5,0.5,0] == position of the camera + [0.5,0.5,0]

#

if player is in first person that should be extremly close to eyePos

hollow lantern
#

well I just want the position of an objet that lineIntersectsSurfaces because screenToWorld does only on the work terrain side

still forum
#

if you want the exact position of the camera use positionCameraToWorld [0,0,0]

hollow lantern
#

@still forum it returns a coordinate but sadly its the one where I'm standing at 😐

still forum
#

Yeah.. .Exactly

#

your camera

hollow lantern
#

hmm thats not what I want πŸ˜„ I'm looking trough a Rangefinder and want the position where I'm looking at with the Rangefinder

#

and if there is a Object (Unit / soldier) it I want that position instead.

#

I tried stuff with sqf _targetPos = screenToWorld [0.5,0.5]; _callerPos = positionCameraToWorld [0,0,0]; _intersectTargets = lineIntersectsSurfaces [_callerPos, _targetPos]; _intersectTargets params ["_intersectTargetPos"];

still forum
#

Yeah

_targetPos = screenToWorld [0.5,0.5]; 
_callerPos = [positionCameraToWorld [0,0,0]]; 
_intersectTargets = lineIntersectsSurfaces [_callerPos, _targetPos,player]; 
_pos = _intersectTargets  select 0;
#

_pos is the target you are looking at

hollow lantern
#

hmmmm sqf 16:37:02 Error in expression < screenToWorld [0.5,0.5]; _callerPos = [positionCameraToWorld 0,0,0]; _intersect> thats my code sqf _targetPos = screenToWorld [0.5,0.5]; _callerPos = [positionCameraToWorld [0,0,0]]; _intersectTargets = lineIntersectsSurfaces [_callerPos, _targetPos, player]; _strikePos = _intersectTargets select 0;

still forum
#

what error in expression?

#

wait what

#

wtf are you doing

#

[positionCameraToWorld 0,0,0]; that's not how.. wtf

#

dude

thick sage
#

lol

hollow lantern
#

ah I see

blissful depot
#

Hey what script editors does everyone use? Is notepad++ good? Is there one that particularly good for Arma 3?

rancid ruin
#

i've used notepad++ for years but there's a few options

#

sublime text (website seems to be down)

#

try a few and see what you like best

still forum
#

I'm mostly using Atom and N++

thick sage
#

atom/sublime here

hollow lantern
#

I use Intelij IDEA Ultimate ^^

hollow lantern
#
_targetPos = screenToWorld [0.5,0.5];
_callerPos = positionCameraToWorld [0,0,0];
_intersectTargets = lineIntersectsSurfaces [_callerPos, _targetPos, player];
_strikePos = _intersectTargets  select 0 select 0;

_weap1 = "R_60mm_HE";
_weap2 = "rhs_mag_AZP23_100";

_orbitalstrike = createVehicle [_weap1, _strikePos, [], 10, "CAN_COLLIDE"];``` thats weird, the coordinates are still near my soldier. 2meters away but I looked at an house 1 click away hmmmmm
leaden summit
#

If I want specific weather and fog values set for a MP mission, does setting it from the intel screen in the editor work fine, or do I need to specify it via the init? I guess what I'm asking is what's the best way to make sure everyone (including JIP) sees the weather the way I want it?

median abyss
#

Does anyone have any experience with packing scripts into a .pbo? I'm having a hard time finding info about it in general, like what should the folder structure be and contain? And how do I execute functions or scripts from that PBO?

arctic veldt
#

@median abyss I'll have a look for you in a moment

#

This is the line in my init.sqf for a CTI mission, ```[] execVM "scripts\towingandslingloading\fn_advancedSlingLoadingInit.sqf";

[] execVM "scripts\towingandslingloading\fn_advancedTowingInit.sqf";

As you see it's for the advanced sling loading and towing :p If you can execute the script while in game with other means I imagine you can drag drop it into a mission and add to the init.sqf [] execVM "insertpathtothescript/insertscriptname.sqf"
median abyss
#

Thanks πŸ˜ƒ I'll have a closer look at that in the morning

plucky beacon
#

The code inside of even handlers is unscheduled right?

still forum
#

yes @plucky beacon

plucky beacon
#

Thanks

leaden plover
#

hey guys, anyone know the CFGmagazine of the IFA3 Katyusha rockets?

polar mural
#

quick question guys how do I get my script to broadcast globally from the server to everyone that is on it. I was looking at BIS_fnc_MP but it doesnt seem to have the functionality to complete this task

#
while{true}
        do
        {
            x = selectRandom[1200, 1400, 1800]; 
                
            sleep x; 
            _null = [] spawn
            {
                [selectRandom[1,2,3,4]] call BIS_fnc_earthquake;
            };
            sleep x; 
        };
#

is the script

#

and I do not wanna put it into the init.sqf as what will end up happening is that earthquakes will happen at different times for every player

little eagle
polar mural
#

I looked at that I thought that it couldnt execute this without it being defined in CfgRemoteExec

#

ill give it a go though

#

something like this?

"EpicEarthquakesDude.sqf" remoteExec ["EpicEarthquakesDude.sqf",0];
little eagle
#

No

#
[selectRandom[1,2,3,4]] call BIS_fnc_earthquake;
->
[selectRandom[1,2,3,4]] remoteExec ["BIS_fnc_earthquake"];
polar mural
#

wow. for some reason I thought I had to make another script for this

#

Thanks commy! your the man

little eagle
#

But I haven't done anything yet.

polar mural
#

?

fierce dock
#

is there a script to reduce vehicle (only vehicle) sound while in a vehicle? i know the 1944 KOTH mod has like a bar where you can set the volume..... the ifa3 vehicles are way to loud

rotund cypress
#

you can use fadesound

#

but if you are looking for changing sounds for the vehicle specifically, modding is required

blazing zodiac
#

Does anyone know the display of the in game pause menu off the top of their head (the debug console)

halcyon crypt
#

RscDisplayMPInterrupt or something like that

#

RscDisplayInterrupt and RscDisplayMPInterrupt

#

but I guess you're looking for the number ^^

#

MPInterrupt is 49 apparently

#

the other one is probably the same

warm gorge
#

@blazing zodiac For the debug console specifically, RscDisplayDebugPublic

hollow lantern
#

more watch lines would be nice πŸ˜„

austere hawk
#

is it possible to define the name of a function inside a variable and then execute it? How would i do that?
_myfunc = "myaddon_fnc_test";
[stuff] call _myfunc; // obviously wont work

vapid frigate
#

without the quotes it would

#

functions are just global variables (with code in them)

#

@austere hawk

ocean veldt
#

@fierce dock

player addEventHandler ["GetInMan",{0 fadeSound 0.5}];
player addEventHandler ["GetOutMan",{0 fadeSound 1}];
austere hawk
#

@vapid frigate problem is that i read _myfunc from a config - and thats always text

vapid frigate
#

if it has to be a string you could call compile "myaddon_fnc_test"

strong shard
#

Is it possible to get the OBJECT of player's weapon, like backpackContainer?

noble juniper
#

nope

#

sadly not

median abyss
#

Does anyone have any experience with packing scripts into a .pbo? πŸ™‚

noble juniper
#

sure. Basically everyone here !

median abyss
#

Nice, is there any folder structure or specific files that needs to be present when packing?

noble juniper
#

yes.

#

well.

#

not realy

#

mod or mission

median abyss
#

mod

noble juniper
#

there is no structure for what needs to be in a pbo.

#

all the pbos must be in a addons folder.

#

normaly you make a modfolder marked with @fervent nymph..

#

fuuck

#

that wasn't intended XD

median abyss
#

Is there any documentation for creating the pbo's on the wiki? Tried searching but came up empty

#

hehe

noble juniper
#

/@ModName /addons/ pbos must be here

median abyss
#

Yeah, I get the structure for the whole mod

#

But was mainly thinking about the pbo

noble juniper
#

then there is none

median abyss
#

ah great

#

Thanks alot πŸ˜„

noble juniper
#

just a config.cpp in the root

rancid ruin
#

you can use official arma 3 tools to pack addons, or mikero's 3rd party tools, or most tools from arma 2 days

noble juniper
#

that wasn't the problem i think πŸ˜„

median abyss
#

Yeah, I know about the tools :p

#

But thanks anyways πŸ˜ƒ

rancid ruin
#

oh right

#

de-pbo other people's mods to learn how to structure your own, that's how i figured it out

median abyss
#

Yeah, I've been looking at one or two

#

But the problem has been that they binarized parts of them

#

Making me unsure about what's important and not πŸ˜ƒ

rancid ruin
#

you can make binarized stuff readable again with official arma 3 tools

median abyss
#

Oh you can?

#

Well that's great πŸ˜„

rancid ruin
#

yeah can't remember the name, it's de-something

median abyss
#

Now that I know about it it shouldnt be hard to find

#

Thanks dude

austere hawk
#

@vapid frigate i tried, but that doesnt work. No error but it doesnt do anything. Whereas the "standard way" (commented out line) works
switch (true) do {
case (_effectType == 2): {
// [_vehicle,_memorypoint] spawn k40_fnc_effect_exploTurret;
private _func="k40_fnc_effect_exploTurret";
[_vehicle,_memorypoint] spawn compile _func;
};
case (_effectType == 1): {
// [_vehicle,_memorypoint] spawn k40_fnc_effect_fire_blowout;
private _func="k40_fnc_effect_fire_blowout";
[_vehicle,_memorypoint] spawn compile _func;
};
default {
// [_vehicle,_memorypoint] call k40_fnc_effect_fire_medium;
private _func="k40_fnc_effect_fire_medium";
_effectVehicle = [_vehicle,_memorypoint] call compile _func;
};
};

vapid frigate
#

private _func=call compile "k40_fnc_effect_exploTurret";

austere hawk
#

oh ok.

vapid frigate
#

[_vehicle,_memorypoint] spawn _func;

#

probably more useful to make the string in the config a generic bit of code though

austere hawk
#

of course, thats the next step

vapid frigate
#

which would be [_vehicle, _memoryPoint] spawn compile _stringFromConfig

#

then you could make the string in the config _this spawn k40_fnc_effect_exploTurret

#

(or any code)

austere hawk
#

i'd rather just put the name of the function in the config

vapid frigate
#

yeh works either way, just more flexible having code in there

austere hawk
#

works, thanks

simple solstice
#

if I add players names to the lblist like that

_list lbAdd format["%1", name _x];
#

how would I sort it?

#

but would it work?

#

considered doing something like that

lbSort [_list, "DESC"];
lbSortByValue _list;
little eagle
#

That format is pointless. And why sort the LB twice?

simple solstice
#

saw it somewhere as an example on the BIS wiki, guess they were just examples but didnt look like that

little eagle
#

lbSort should sort them by their label (the name of the player)

#

lbSortByValue would sort them by their lbValue, which is set by lbSetValue and defaults to 0

#

So the second sort would do nothing or even undo the first sort.

#

And format ["%1", STRING] does nothing.

rotund cypress
#

Don't know if I am putting this in the correct section, but when working with dialogs, I have made a full screen dialog initially on a 1920x1080 display with Small interface size. I have used safezones, but people still tend to get their dialogs squished together and unable to load a RscCombo for example. Is there anyone who is experienced with dialogs here?

tough abyss
#

Sorta.

little eagle
#

I don't use the safezone stuff directly, but use the predefined grid system from that BI library.

rotund cypress
#

Do you mean these all strings with a bunch of brackets?

#

@little eagle

#

What BI library are you referring to?

little eagle
#

#include "\a3\ui_f\hpp\defineCommonGrids.inc"

rotund cypress
#

Oh

tough abyss
little eagle
#
x = X * GUI_GRID_W + GUI_GRID_CENTER_X;
y = Y * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = W * GUI_GRID_W;
h = H * GUI_GRID_H;
#

X,Y,W,H are some numbers

rotund cypress
#

I know that lol

#

🀣

#

So, would that solve my problems do you reckon? @little eagle

little eagle
#

I know. Im just drilled to put legends on my examples. lol

rotund cypress
#

Also @tough abyss as I mentioned above, I already use safezone.

little eagle
#

Idk. I never had problems since I use it like that.

tough abyss
#

Ok.

rotund cypress
#

Okey, well thanks @little eagle I will give this a try, if this works I owe you big time cause I've had problems with this for such a long time.

still forum
smoky crane
tough abyss
#

I usually use the following format for my dialogs: ```
x = "SafeZoneX + (510 / 1920) * SafeZoneW";
y = "SafeZoneY + (285 / 1080) * SafeZoneH";
w = "(100 / 1920) * SafeZoneW";
h = "(30 / 1080) * SafeZoneH";

rotund cypress
#

Ooh, thanks @smoky crane

smoky crane
rotund cypress
#

Oh right, thank you!

little eagle
#

good wiki page

rotund cypress
#

πŸ˜‰

hollow lantern
#

hmm I'm not able to find a solution on how to create a bullet (or lots of) in arma via script. Can it be archieved?

little eagle
#

createVehicle ?

hollow lantern
#

yeah just found out

#

thx

twilit tartan
#

Dunno if this is the right channel but how do I format this correctly? if this !alive call BIS_fnc_removeRespawnPos; So basically if this heli is dead, remove the respawn position

rancid ruin
#

maybe
if (!alive this) then {call BIS_fnc_removeRespawnPos}

#

although i've never seen that function before

twilit tartan
#

Alright gonna try that

#

This is the init: Null = [this] spawn {params["_heli"]; waitUntil {sleep 1; _heli distance getMarkerPos "FOB_marker" > 1000}; [west, _heli] call BIS_fnc_addRespawnPosition}; if (!alive this) call BIS_fnc_removeRespawnPos; BIS_fnc_removeRespawnPos should remove it if the chopper died

twilit tartan
#

@rancid ruin hm doesnΒ΄t work, it does not remove the respawn. Is there any other solution maybe?

rancid ruin
twilit tartan
#

Oh. Thanks πŸ˜„

rancid ruin
#

also you need to put a then after an if or it will never work

little eagle
#

Should've come up as error when game started with -showScriptErrors

rancid ruin
twilit tartan
#

Good Idead, I will do that thanks

hollow lantern
#

is there a specific way to get the bulletobject from a specific weapon? I'm unsure where to look in the config viewer as I didn't saw anything bout it. Weapon is sqf "RHS_weap_2a14" "RHS_weap_AZP23" with "rhs_mag_AZP23_100"

rancid ruin
#

i'm pretty sure the fired event handler returns the bullet object itself, so you could probably run typeOf on it or something

indigo snow
#

magazine cfg should contain the bullet ammo config name

hollow lantern
#

I'll take a look thanks

thick ridge
#

any good tricks for making a sound loop via script and avoiding it (a) playing on top of the other sound for a fraction of a second or (b) having a slight silent gap between the sounds?

#

simply playing and sleeping in a loop works ok, but hard to avoid either (a) or (b).

subtle ore
#

hintSilent?

thick ridge
#

hintSilent?

thin pine
#

hintLoud?

little eagle
#

definitely not with a sleep or loop due to scheduler shenanigans.

half inlet
#

it used to be possible to make a CfgVehicle class play a looping sound for as long as it exists, but it seems that this is no longer the case

#

A3's Sound_Alarm object used to play a looping alarm sound for as long as it was spawned, but now you can't even spawn it

thick ridge
#

ah - that's what I'm thinking about doing now

#

dummy object and set it's sound to a custom sound source

#

and then just moving that dummy object around

#

hopefully that will work well

half inlet
#

I'm interested in figuring this out aswell, as I had it working before, which is even more annoying because I know it worked perfectly

#

I've tried but wasn't able to make it work anymore unfortunately

half inlet
#

but if you can come up with something, let me know!

thick ridge
#

using that setting?

half inlet
#

yes, precisely that

thick ridge
#

so what happens?

#

it just does't play the sound, or the sound stops looping?

half inlet
#

nothing - the object spawns and doesn't play a sound

thick ridge
#

hmm

#

well I'll play around with it

half inlet
#

I already looked into other ways of doing it, such as the air conditioning units on Tanoa

thick ridge
#

(im trying to use this to create train sounds for ATS - and changing them depending on if you're inside or outside the train)

half inlet
#

it turns out the buildings with AC units have a selection in the memory LOD, the name of that selection matches the sound entry of a class in the Tanoa terrain, meaning it is bound to the terrain

thick ridge
#

interesting

#

well also let me know if you find anything - looping via a script stinks

half inlet
#

and if you think you can edit the Default terrain class to make all terrains inherit from it, you'd probably be right about that idea, however that sound class is not defined in the Default terrain

#

instead, Tanoa and Altis both create that class rather than inheriting it from elsewhere

#

meaning you'd have to add your sound to both of these terrains and hope that all custom terrains from other mods all inherit from either Altis or Tanoa (which thankfully 99% of them do)

#

but still, it's a big hackjob

#

yeah, I resolved to looping my sounds with a script that uses uiSleep

#

not the prettiest solution but it gets the job done

hollow lantern
#

hmm config viewer does not list rhs_mag_AZP23_100. Is there a way to get the MagazineCFG without opening a pbo? something like currentMagazine

thick ridge
#

I've asked a BI dev who has helped me out in the past with the train stuff - maybe they have some ideas. Will let you know if I hear anything back.

agile pumice
#

why can't we disable simulation on weapon holders 😦 I just want to spawn a weapon that you can't interact with

jade abyss
#

createSimpleObject ?

little eagle
#

createSimpleObject

#
allVariables

disabled for controls?

#
(allControls (allDisplays select 0) select 0) getVariable "a"
1
allVariables (allControls (allDisplays select 0) select 0)
[]
agile pumice
#

I tried using the simple object option from eden

#

is that not the same thing?

jade abyss
#

There is no real number, that anyone can tell.

#

It hardly depends on the Scripts itself

agile pumice
#

I don't think you can use createsimpleobject with weapon models

#

_model = getText(configFile >> "CfgWeapons" >> (primaryweapon player) >> "model"); simpleGun = createSimpleObject [_model, getpos player]; doesn't do anyting

#

alright, its creating the object now, but its not visible

jade abyss
#

place it higher

agile pumice
#

ah, there it is

jade abyss
#

πŸ‘

agile pumice
#

but I think I've reached a new issue which can't be solved lol

#

Why BIS 😦

jade abyss
#

especially the Examples

agile pumice
#

do you think its an animation that's giving it the appearance of being fired?

jade abyss
#

Of course

agile pumice
#

I'm gonna try simpleGun hideSelection ["proxy:\a3\data_f\proxies\muzzle_flash\muzzle_flash_rifle_mk20.001",true] firstly

#

simpleGun hideSelection ["zasleh",true];

#

got it

#

shit I'm too late

#

XD

#

I uses selectionNames and tried them one by one

blissful depot
#

Hey yall, I got this flying script I'm working on. It works as intended BUT

The toggle_flight function and toggle_hover function seem to only work properly every second time the script is run. I can't figure out why, it seems bizarre to me that it would work properly only every other time you run the script. even if you restart the mission. Any idea what's going on? (I call the script from init.sqf call compile preprocessFile "fly.sqf")

https://pastebin.com/V8yigMv6

subtle ore
#

So in a function how do I return a value? Is it just a value placed at the very end? Or?

#

^ disregard last

jade abyss
#

solved or not?

blissful depot
#

nah, can't figure it out

jade abyss
#

Was talking to midnight.

#

Anyway:

#
keyToggle = (findDisplay 46) displayAddEventHandler ["KeyDown","if ((_this select 1) == 21) then {call toggle_flight;false;}"]; //y toggles flight
keyForward = (findDisplay 46) displayAddEventHandler ["KeyDown","if ((_this select 1) == 17) then {call fly_forward;false;}"]; //W - Forward
keyBackward = (findDisplay 46) displayAddEventHandler ["KeyDown","if ((_this select 1) == 31) then {call fly_backward;false;}"]; //S - Backward```

Put them together in one KeyHandler
#

e.g.

(findDisplay 46) displayAddEventHandler ["KeyDown","call My_fnc_KeyHandler;}];

My_fnc_KeyHandler =
{
    params["_ctrl","_button","_BtnShift","_BtnCtrl","_BtnAlt"];
    private _ButtonDisabled = false;
    private _BD = {_ButtonDisabled = true;};

    if (_button == 21) then {call toggle_flight; call _BD;};
    if (_button == 17 hen {call fly_forward; call _BD;};

_ButtonDisabled
};```
subtle ore
#

@jade abyss Yep all solved I was being retarded

jade abyss
#

rgr

thick ridge
#

Anyone know to get the position of the camera if the player is currently looking at the work via a camera?

#

I essentially want to know the eyepos of the player (which might be the eye pos of the player object or the position of the camera)

#

maybe I want positionCameraToWorld

#

ok, answered my own question - thanks πŸ˜ƒ

blissful depot
#

thank you @jade abyss Ill give htat a try in a bit

thick ridge
#

If anyone wants to know how to create an empty object that emits a custom sound (kinda like the camp fire) and can be moved around, here's how you setup the config:

#

class CfgSFX
{
class ATS_Train_Outside_SFX
{
sound0[] = {"\ats\sounds\sounds\ats_train_outside.ogg", db+0, 1, 250, 1, 0, 0, 0};
sounds[] = {sound0};
empty[] = {"", 0, 0, 0, 0, 0, 0, 0};
};
};

class CfgVehicles {
class House_F;
class ATS_Sound_Source : House_F {
scope = private;
simulation = "fire";
};
class ATS_Track_Exterior_SS : ATS_Sound_Source {
class Effects
{
class sound
{
simulation = "sound";
type = "ATS_Train_Outside_SFX";
};
};
};
};

#

then you create the vehicle (in this case ATS_Track_Exterior_SS ) and then call _theObject inflame true; to turn on the sound

jade abyss
#

```sqf (or cpp for configs)
//Code
```
...

#

@thick ridge

subtle ore
#

Formatting is key

warm gorge
#

Anyone know a workaround for having to rename a mission file on a server everytime to avoid people getting kicked as soon as they dl it?

vivid locust
#

Is there an option for Arma 2 to make a line break in a RscText? I tried with \n and <br/>. Or at least an option that the text starts in the next line when the previous one is full?

rotund cypress
#

@warm gorge you can not work around it, however you can make a build script to do it.

warm gorge
#

@rotund cypress What do you mwean by that

rotund cypress
#

Well, you can make a build script that does that. For example, with my continous integration, it builds a PBO for me and names it whatever name + build number. @warm gorge

warm gorge
#

@rotund cypress Ah yeah I see what you mean. Out of curiousity what PBO builder do you use?

rotund cypress
#

Armake @warm gorge

#

Jenkins is currently what I use for CI @warm gorge

warm gorge
#

Ill have a look at that, havent found many updated tools other than Mikeros

rotund cypress
#

Armake is really good and very updated ^^

#

I think its PBO builder is based off of Mikeros as well

#

But Koffeinflummi is in this discord, so him would be the guy to ask.

outer fjord
#

Can anybody assist me with BIS_fnc_establishingShot? I'm trying to make it follow a unit rather then just a location.

#

Or is that possible?

warm gorge
#

@rotund cypress Considering this is just the source code on GitHub, do I need to compile it myself or something? Cause im not sure how to

rotund cypress
#

No you do not have to compile yourself, check releases tab.

warm gorge
#

oh derp didnt see that

rotund cypress
#

Then there is for both Linux and Windows, and you can execute from whatever script you like.

#

I.e. Bat

warm gorge
#

Would it be possible to make a bat to drag and drop a folder on to build a PBO out of it

rotund cypress
#

Wot? You can build a folder to a PBO yes. @warm gorge

half inlet
rotund cypress
#

Can you not just manipulate an array instead? @half inlet

#

Like select, deleteAt etc

half inlet
#

you can, but that's not interaction with the inventory

#

it wouldn't actually remove anything from the unit/container

rotund cypress
#

What? Why not?

half inlet
#

well, maybe I'm missing something, but how would you do it?

rotund cypress
#

Well, if you would get contents of a box, you could get an array with certain items, just select at what index you want that and remove it?

half inlet
#

okay, but how would you actually remove a certain item using a given index?

rotund cypress
#

deleteAt

half inlet
#

that deletes the entry in the array, but you can't set the inventory of a container/item to match an array

rotund cypress
#

But if it's not in the array anymore, surely it won't be in the inventory?

half inlet
#

no, the array and the inventory are completely separate

#

we'd need more commands to access the inventory, as currently most of it is handled by the engine, and the few parts that have commands to allow interaction are still very restrictive

rotund cypress
#

Okey, I think I see what you mean now

#

We can get array of contents, but we can't actually update the box again, since the array is only returned?

half inlet
#

exactly - and while I wish it was possible to access inventory data with scripting means (such as getVariable/setVariable - this would give us FULL control), I don't think this will happen anytime soon

rotund cypress
#

Ye, certainly would be nice then

half inlet
#

which is why I suggested introducing a small set of commands that use UIDs for a start

rotund cypress
#

Ye, I was looking the other day at the Inventory display script, but noticed it was all handled by the engine

half inlet
#

it still wouldn't solve all problems, but it would at least make life easier, as currently you have to go through a lot of workarounds to achieve simple things

#

yeah, been looking into making a custom inventory, already have a lot of it planned out, but it wouldn't be pretty due to the lack of adequate scripting commands

rotund cypress
#

Yep

#

I guess it's handled by the engine for all the shenanigans it has

#

Animated drag/drop etc etc

half inlet
#

well, some things can be done with scripts, which leads me to believe they at least had something planned - for example you can make units take/drop weapons from/to containers around them, however they're pretty much workarounds as there are no native scripting commands to support these actions

rotund cypress
#

Yep

half inlet
#

for example, if you wanted to create a weapon with a dynamics set of attachments (that means a custom CfgWeapons entry is not an option here), you'd have to spawn a dummy unit and equip him with the weapon and all the attachments, then have him drop it on the ground

#

I've made a script like that and optimised it as much as I could, yet it still takes anywhere between ~0.3 to ~0.8 seconds for the action to complete

#

not to mention you need to spawn a unit to achieve this, which can lead to all kinds of exceptions and issues

#

what's surprising however is it seems that BI actually wanted to work with IDs when handling inventories, since at least 2 functions use IDs in either their arguments or their output

#

however these 2 aren't meant to be used with one another, and there are no other functions (to my knowledge) that would return IDs from inventory items, making the whole thing useless

rotund cypress
#

Hmm, ye very hacky and mimicky πŸ˜‰

#

At the end of the day, always a headache

warm gorge
#

So I have a script which loops through groups on a player and sends a remoteExec to the server to delete the group. But some players are detecting groups as being null/have no players in them when they actually arent like that. Any ideas? Syncronization issues?

tough abyss
warm gorge
#

@tough abyss Yeah ill most likely do that. Might use that new command as well. Have seen it but held off using it yet

#

Cheers for help πŸ˜ƒ

little eagle
#

If the group is null, then it is deleted. No? πŸ€”

warm gorge
#

Thats what you would think, but it doesnt seem to work like that for me with groups stored in an array and accessed by all players. Some detect them as null, others perfectly fine. @little eagle

#

With how my script works, its either the player is detecting it as null, or that its units isEqualTo []. Either way its returning innacurate results.

#
if((isNull _group)||{(units _group) isEqualTo []})then {
    [_index] remoteExecCall ["SR_fnc_removeGang",2];
};
little eagle
#

deleteGroup doesn't have to run on the server. It has to run on the machine that owns the group

warm gorge
#

Yeah I know, my removeGang function does some other stuff as well, on the server. Thats not the problem tho

little eagle
#

And the if isNull makes no sense. You cannot delete a null group, as it already is deleted.

warm gorge
#

Good point, I guess I can just remove that. But even then, ill probably still get the same issue

#

Could it be issues with the groups being synchronized with the player?

little eagle
#

You break the system by using deleteGroup on remote groups.

#

That's my guess.

#

It's like using addWeapon on a remote unit. The weapon is only added on the machine where addWeapon was executed, but is not synchronized to the machine that owns the unit.

warm gorge
#

In the code I provided up above, I dont call deleteGroup, thats called on the server within the function, so that shouldnt be an issue? Its just a matter of getting this function called, the local player has to detect the group as empty, which it seems to be doing when it isnt

little eagle
#

units _group
is not guaranteed to be the same on every machine

#

dead units are removed from groups, but that doesn't happen immediately when a unit dies, but is delayed on every client

#

Just do the whole check on the server. No need to remoteExec at all.

warm gorge
#

Alright yeah will do. I might use the deleteGroupWhenEmpty as well

#

cheers for help

warm gorge
#

I dont know whether I should start using the private keyword to make variables private rather than through a private array

still forum
#

private keyword is much faster

#

and you can also directly set the default value

warm gorge
#

Yeah I might as well start using it then

still forum
#

I'm writing a script to get as much performance as possible for video playback.
So far I have disable HUD, set viewDistance to 100m and disableEnvironment. Any more Ideas what could boost performance?
Is there any way besides loading screen how I can stop Arma to render the world?

rancid ruin
#

do it in VR terrain?

still forum
#

No. It's the intro video to a mission

rancid ruin
#

even in blank VR terrain you still get pretty bad FPS though 😦

still forum
#

At the start of the mission that video runs fullscreen.

halcyon crypt
#

ALT+TAB, start VLC, play video, ALT+TAB back in πŸ˜„

still forum
#

I guess I could create a custom loading screen and play the Video on that using RscPicture.. But I'm not sure if that's worth the effort or if it even works

rancid ruin
#

ohhh, so you're trying to play a video in game and suppress what's going on in the background as much as possible?

still forum
#

yeah

rancid ruin
#

put the player like 5km above terrain so nothing renders?

still forum
#

setViewDistance 100 and objectViewDistance 1 hides almost everything already. Without video I jump from 30 to 80 fps when doing that

halcyon crypt
#

use loadingscreen? I believe we had a video playing in that in A2

rancid ruin
#

there's still shit going on near to you even if you can't see it. this game has butterflies and stuff remember

still forum
#

I guess I'll have to try that then.. Thought there was an easier way

#

I'm already disabling butterflies with enableEnvironment and also environmental sounds while the video is playing

rancid ruin
#

have you tested the map display?

#

if you zoom in max on the map then your FPS goes mad high

halcyon crypt
#

also encoding settings possibly affect performance quite a bit

little eagle
#

@still forum Object view distance can even be 0 (or 1?) and not even the player renders.

still forum
#

it can be 1. setObjectView distance arguments can be as low as 1. Didn't try 0.1. setViewDistance is limited at 200 I think.. or 100

peak plover
#

Is there anything that stops me from calling functions in the Killed EH? EDIT: onKilled is actually killed

#
// Executed when unit dies
"respawn_fnc_onKilled" spawn debug_fnc_log;

// Code begins
params ["_oldUnit","_killer","_respawn","_respawnDelay"];
// Set unit as dead
_oldUnit setVariable ["respawn_dead",true,true];
// Disable respawn button
respawnButton = 0;
// Run onKilled scripts
_nul = [_oldUnit,_killer,_respawn,_respawnDelay] call respawn_fnc_runOnKilledScipts;

respawn_fnc_runOnKilledScipts does not run

#

But if I just do call respawn_fnc_runOnKilledScipts; in the debug box it works

little eagle
#

killed, not onKilled
?

peak plover
#

"respawn_fnc_onKilled" spawn debug_fnc_log;
this line works

#

You are correct

#

But that does not solve the issue of the call not working

#

OH MY GOOOOOD

#

It says runOnKilledScipts ( should be runOnKilledScripts)

#

😳 STUPID STUPID STUPID

vivid locust
#

What's the difference between closeDisplay and closeDialog

subtle ore
#

One is for displays and one is for dialogs. If you dont know the difference look it up.

#

Dialogs will take control over the mouse for things like buttons or controls.

#

Oh god, take it away commy :P

little eagle
#

The naming is inconsistent and the concept is stupid. You generally want to use closeDialog with createDialog and closeDisplay with createDisplay.

subtle ore
#

Why use them any differently?

#

There is an explanation with the difference between the two on the biki, so its not like its information you couldnt find.

vivid locust
#

I am searching and testing for 6 hours now but I think I made one mistake I am not able to find.

#

When a display/dialog is executed with

_layer cutRsc ["rlnt_weaponhud_2_bg","PLAIN",1];

what do you use then?

subtle ore
#

Errors? Slow downs? Mistakes? Explain.

vivid locust
#

There are no errors. It's the typical uiNamespace issue that no errors are given out.

subtle ore
#

Where is your layer definition?

vivid locust
#

It's _layer = 1300; I think this is not necessary for now. I am more interested in how to close a display that was created with cutRsc

subtle ore
#

Take a glance at the cutRsc eexamples on the biki.

vivid locust
#

I did

subtle ore
#

Posted by kk: cutRsc ["myRsc", "PLAIN"]; //show cutText ["", "PLAINS"]; //remove

vivid locust
#

The wiki doesn't answer everything. I am studying it for about half a day now

subtle ore
#

Look at my post above

vivid locust
#

Wait you take "Default" as the class in the cutRsc and then it's gone?

subtle ore
#

Sure

vivid locust
#

I'll give that a try

#

I'll report my feedback

little eagle
#

It's the typical uiNamespace issue that no errors are given out.
wat

vivid locust
#

@subtle ore God damn it it worked!

#

Thank you very much <3

#

#fullhomo :D

subtle ore
#

Oh jeez, not ready for that yet. Slow it down at least.πŸ˜‚

#

@little eagle shhhhhh...its okay. Breathe in, breathe out.

little eagle
#

I'm confused by what he meant saying this.

subtle ore
#

Shhhhhhh....its okay.

little eagle
#

OK

subtle ore
#

🀷

little eagle
#

🀦

twilit tartan
#

Hi, I have this in my init to set a respawn position when the heli leaves the base: Null = [this] spawn {params["_heli"]; waitUntil {sleep 1; _heli distance getMarkerPos "FOB_marker" > 1000}; [west, _heli] call BIS_fnc_addRespawnPosition}; And this in my init to remove the spawnpoint when the heli is dead: if (!alive this) then {call BIS_fnc_removeRespawnPosition}; Any Idea why the spawn isnΒ΄t getting removed?

little eagle
#

I guess the heli is still alive when that init line is executed and afterwards nothing happens anymore.

twilit tartan
#

maybe waitUntil? But I don´t know how to implement that 😦

little eagle
#

You also need to put the argument before the call of BIS_fnc_removeRespawnPosition

#

Otherwise it doesn't know which respawn position to remove obviously.

#

You should use init.sqf and not the init boxes from the editor imo.

#

That would be a great help for you.

twilit tartan
#

Alright, how would that look like in the init.sqf? Sorry IΒ΄m still learning this stuff is pretty hard

little eagle
#

Name the heli My_Heli

#

name field. You know how?

twilit tartan
#

yep

rotund cypress
#

Hey guys, I have a question regarding HandleDisconnect eventhandler. Does anyone know if it will keep the player disconnecting on the server and run the code in the eventhandler before it lets that player disconnect?

little eagle
#
// init.sqf
if (isServer) then {
    0 spawn {
        waitUntil {
            sleep 1;
            My_Heli distance getMarkerPos "FOB_marker" > 1000
        };

        private _respawn = [west, My_Heli] call BIS_fnc_addRespawnPosition;

        waitUntil {
            sleep 1;
            !alive My_Heli
        };

        _respawn call BIS_fnc_removeRespawnPosition;
    };
};
#

I guess

rotund cypress
#

Was that, "I guess" for me @little eagle ?

little eagle
#

No, Fritz

twilit tartan
#

Thanks, trying!

little eagle
#

HandleDisconnect only works on the server, so idk what you mean by "before it lets that player disconnect".

rotund cypress
#

Do you know @little eagle if HandleDisconnect EVH will keep player on server until code is executed?

little eagle
#

The player disconnects and then the EH fires on the server.

rotund cypress
#

Hmm, okey.

#

And PlayerDisconnected will only execute on server, but can be added on client?

subtle ore
#

No

little eagle
#

They both fire only on the server no matter where added.

rotund cypress
#

I know that, but what I wondered if it could be added on client

subtle ore
#

The eh is just a stackable version of the command

little eagle
#

Those are both stackable mission eventhandlers

subtle ore
#

Ummm...im not talking about the eh. Im talking about the eh vs the command

subtle ore
#

🀦

little eagle
#

And probably also SimZor.

rotund cypress
#

Also what I am talking about

little eagle
#

πŸ‘

rotund cypress
#

I mean I did say EVH, not command

#

I guess I can override abort button instead and use that.

little eagle
#

They both fire only on the server and I don't think it's possible to remoteExec something to that disconnecting player if that was the question.

little eagle
#

That one is old and busted.

subtle ore
#

I was confused, i was to believe zor was talking about that one

#

Which is not stackable

rotund cypress
#

I mean remoteExec would not work anyways, I could do that, execute on the client in question. But since it's remoteExec it would not execute in same scope regardless?

little eagle
#

And also only fires on the server, so nothing to gain from that.

rotund cypress
#

Well, I could execute on the client, but it would ofc execute on server as well.

little eagle
#

It all depends on what you're doing I guess.

rotund cypress
#

Also, if they were to disconnect quick, it could cause problems as well, so no thanks.

subtle ore
#

Depends on what you are saving / doing.

little eagle
#

Yeah, you can always Alt+F4 and then the game has no chance to do any SQF

subtle ore
#

Like if you wanted to save a player variable that is massive then of course, but anything reasonable would not cause problems

rotund cypress
#

Hope scripting

little eagle
#

Again

subtle ore
#

🀦

rotund cypress
#

Ye, I think I'm just better off with overwriting the abort button and doing it from there.

#

Too bad there is not a local disconnect EVH

#

🀣

twilit tartan
#

@little eagle Thanks works perfectly!

#

Now another little thing: My Heli always explodes first time after it respawns in the hangar, Can I avoid that by making it invincible for 10 seconds?

little eagle
#

Of course it does. Was there ever any doubt?

twilit tartan
#

Never πŸ˜„

little eagle
#

Better not spawn it inside a hangar I guess.

twilit tartan
#

Not an option πŸ˜›

rotund cypress
#
sleep number;
My_Heli allowDamage true;```
#

Or waitUntil {spawnvar};

#

@twilit tartan

twilit tartan
#

I put this where? The init.sqf?

rotund cypress
#

You put My_Heli allowDamage false; before vehicle is spawned

#

And My_Heli allowDamage true; after vehicle is spawned

#

@twilit tartan

#

If you are using respawn position I am not sure you can use this method though

#

😭

twilit tartan
#

Sorry what do you mean before and after vehicle is spawned?

#

and @little eagle if I want to add more helos, do I just go My_Heli1, MyHeli2 or do I have to copy the whole thing?

little eagle
#

copy everything

twilit tartan
#

ok

little eagle
#
// init.sqf
if (isServer) then {
    {
        _x spawn {
            waitUntil {
                sleep 1;
                _this distance getMarkerPos "FOB_marker" > 1000
            };

            private _respawn = [west, _this] call BIS_fnc_addRespawnPosition;

            waitUntil {
                sleep 1;
                !alive _this
            };

            _respawn call BIS_fnc_removeRespawnPosition;
        };
    } forEach [My_Heli1, My_Heli2, My_Heli3];
};
#

or something like this

twilit tartan
#

Cool, That makes it a lot easier! Do you know where I put the spawn protection?

little eagle
#

Do you have CBA in that mission?

twilit tartan
#

yep

little eagle
#
["Helicopter_Base_F", "init", {
    params ["_heli"];

    _heli allowDamage false;

    [{_this allowDamage true}, _heli, 10] call CBA_fnc_waitAndExecute;
}] call CBA_fnc_addClassEventHandler;
#

There. Every newly spawned heli should be invulnerable for 10 seconds.

twilit tartan
#

Put it in the init?

little eagle
#

yes

twilit tartan
#

Thanks a lot, you guys are wizards

little eagle
#

oops

#

replace

#

CBA_fnc_addEventHandler

#

with

#

CBA_fnc_addClassEventHandler

#

🀦

twilit tartan
#

πŸ‘

little eagle
#

For this? No.

blissful depot
#

does anyone know if/how you can change the texture of a player's face and/or hands to a procedural texture? is that possible?

#

I saw a guy make his face glowy and I want to do that

kindred lichen
#

Hey guys, I'm trying to make it so a VIP vehicle can get disabled but not completely destroyed is there a good way to do that? I'm thinking of modifying the on-hit stuff, but last time I tried that the vehicle would become like all red, but still have wheels and be able to drive.

jade abyss
#

handleDamage EH

#

and disable/negate the Damage that is assigned to "Fuel"

kindred lichen
#

Awesome, so fuel dmg is what will trigger the vehicle to explode?

jade abyss
#

iirc in some cases the "Hull" also (depends on Config)

inner cypress
#

is mikero's rapify used to lint sqf script files?

gilded rover
#

srifle_DMR_06_camo_F = currentWeapon p1; anyidea why this does not trigger my trigger?