#arma3_scripting

1 messages · Page 534 of 1

tough abyss
#

i think when i'm adding text afer id error

#
22:48:53 Error in expression <ban "UID" "MY TEXT">
22:48:53   Error position: <"MY TEXT">
22:48:53   Error Missing ;

22:53:50 Error in expression <ban "UID" MY TEXT>
22:53:50   Error position: <MY TEXT>
22:53:50   Error Missing ;
#

hmm so this will be hard to do i guess?

still forum
#

I'd say probably impossible

tough abyss
#

i think its possible with extension .dll, but no knowledge in this😉 .

still forum
#

nooooot really

#

maybe

#

somewhat

#

not really

tough abyss
#

The codecrew _vehicle;return the same array in all clients? I mean with the same order.

#

_vehicle is the same object in all clients

#

@still forum you know 😀 ?

still forum
#

I would've already answered if I did

tough abyss
#

if yes i will be able to do a good optimization in my code

astral dawn
#

What are you trying to do? In 0.001% of cases, when someone is entering/leaving a car, it might return different values because nothing gets synchronized instantly in multiplayer

#

...and, if something has even a slightest chance to fail, it will fail some time

#

so probably relying on this command to return the same value for all players on the server is a bad thing to do

#

critical decisions must be done centralized, preferable at the server

cosmic lichen
#

Can anyone recommend a good tool to build GUIs for Arma? Something a bit more flexible when it comes to macros compared to the Vanilla GUI Editor?

astral dawn
#

Arma Dialog Creator !

#

@cosmic lichen

cosmic lichen
#

That looks nice. Thanks for the info!

astral dawn
#

Although not without drawbacks... it doesn't support groups or a few other types of controls

#

But it can organize classes pretty well

cosmic lichen
#

Love the UI for changing control properties.

wary vine
cosmic lichen
#

@wary vine Are these like 1000 lines drawn to create a graph?

tough abyss
#

Try adding 512 to the RscLine style property

west grove
#

oi people. quick question.. i'm trying to export data from a variable into a generic text file... i think that's possible, no?

jade abyss
#

diag_log? 😂

west grove
#

wiki says it exports to the report file

still forum
#

copyToClipboard

#

no you cannot write a text file without a extension

west grove
#

damn

#

alright, then i gotta do it manually via copytoclipboard

#

would have been easier / more fancy to just have it create what i need manually

blazing quiver
#

So, not sure if this is the right place to ask, but may as well try here.

#

Does anyone know how RHS has setup their disposable launchers to be auto-dropped upon use?

#

I’m working on a disposable launcher of my own and I’d really like to explore adding that functionality.

hollow thistle
blazing quiver
#

Oh, that’s neat

#

Though it looks like that still requires going into your inventory and ditching the tube

spark turret
#

Hi there,
is there a way atm to make AI put their weapons on their bakcs (and ideally walk around with them)?
SoldierOne action ["WeaponOnBack", SoldierTwo]
does not work. Couldnt find anything in formus as well.

astral dawn
#

Would like to know that too ^

#

AFAIK that thing only works for players 😢

spark turret
#

snooping through ACE github bc i know they have a player function for that, maybe itll work for AI

astral dawn
#

tell me if you find it plz

spark turret
#

i found this, doesnt seem to work when issued via INIT tho

#

on AI at least

lost copper
astral dawn
#

It's for disposing weapons though 🤔

#

we want to put weapon on back

#

for AI units

spark turret
#

i found some really clonky way to do it

lost copper
spark turret
#

freeze the unit with diableAI "Anim", then add the weapon with addWeaponGLobal. It will stay on the untis back. thos the unit is frozen

#

frozen in terms of "its head moves a bit but it wont walk or react"

#

Another really bad way to do it is: create an invisible weapon holder (like the ones spawend when a weapon is dropped) and attach that one to the back of the unit. then the unit can walk around with it too

lost copper
still forum
#

@lost copper CBA has disposable weapons. That's probably preferable over the rhs thing

lost copper
#

@still forum yep, you are right. 😅

wary vine
#

@cosmic lichen yeah

#

but only 100

cosmic lichen
#

Interesting

#

But I unfortunately don't know how to get rid of the artifacts.

#

Have you tried using dots instead of lines?

wary vine
#

I haven't what I was thinking of trying next was using just something with a background and using atan2 to find the angle between the 2 positions and trying ctrlsetAngle

cosmic lichen
#

That could work. Question is if you can properly align those lines then.

wary vine
#

i already have the start x/y end x/y and the length

#

thats what I use for rscline

wispy cave
#

Any easy way to detect if a player is teleporting?

young current
#

Intentionally or cheating

wispy cave
#

cheating

#

I'm getting a bit fed up with the script kiddies joining the mission I maintain

rough heart
#

Infistar anti cheat?

rocky mortar
#

hi, does anyone know in wich cfg entrie tree models are declared ? I found grass in cfgworld but not tree

austere granite
#

nowhere

#

they're not classes

rocky mortar
#

is there a method to find them ?

nimble yew
#

In a switch do what does the default case do?

rocky mortar
#

it does what other case don't

nimble yew
#

So basically a case else? (in other languages)

rocky mortar
#

yes something around that 😃

nimble yew
#

thanks

tough abyss
#

Do you have to be logged as admin or server command admin to use serverCommand?

#

I have 2 buttons in my admin menu that uses serverCommand kick and ban

tough abyss
#

You don’t have to be logged in at all

astral dawn
#

What is the lifespan of variables in uiNamespace?
And what if I set a variable to an object handle placed on a map by default?

edgy dune
#

so I ran into a little issue with MP respawn EH. I made a mission in eden with respawned enabled, and played it in Multiplayer. in my init.sqf I have

player addMPEventHandler ["MPRespawn", {
    params["_unit","_corpse"];
    diag_log format["%1 respawned",time];
}];

Now I noticed in the RPT file, that if I respawn, theres two entries in the log that show up. Is it because I am both the server and a player that theres two entries or is there something else?

I also did use CBA_fnc_addClassEventHandler to see if that would do anything different, which Ik it cant use MpRespawn so I used respawn so idk if that would cause any issues in MP

still forum
#

@astral dawn till game restart

#

object will turn objNull after it's despawned

#

"if that would cause any issues in MP" you didn't understand the difference between MP Eventhandlers and normal ones

#

If you addMPEventhandler ONCE, it will be added on every client and server

astral dawn
#

aand it's despawned when map is unloaded, right?
will it get unloaded when I leave editor and go to main menu?

#

in my case the variable turned to nil actually

still forum
#

yes,yes

astral dawn
#

actually no, it turned to objNull, you're right

#

thx

edgy dune
#

ill go read up on MP respawn again then

astral dawn
#

what do you want to achieve? if you are doing a mission, there is an onPlayerRespawn.sqf event script

#

it's executed locally on the computer of the player that has respawned

edgy dune
#

oh well I started out scripting on a mission just cause its easier, I might make it into a mod idk. thats why I didnt want to use onPlayerRespawn.sqf

astral dawn
#

yeah but what do you want, do you need this event handler to be executed on every computer in MP or where?

#

MP event handlers are executed on every PC

edgy dune
#

I just need to be executed on the player that respawns, which I thought MP EH only executed on the local unit

#

It is only triggered on one machine where the unit it was assigned to is local. thats wat it says on the wiki, maybe my mistake was thinking triggered and execute are not the same word?

tough abyss
#

You can add it from anywhere but it is executed on local unit when player respawn, ie on player's machine only

astral dawn
#

Ah wait, MPRespawn has its own description where it states that it doesn't work as other MP event handlers work :////

tough abyss
#

target: Myvar = 4;
dunno what it is, defo not sqf

astral dawn
#

added with addEventHandler

tender fossil
#

marker.sqf:

_playerPos = "";

{
    _playerPos = createMarker ["PlayerMarker", position _x];
    _playerPos setMarkerShape "ICON";
    _playerPos setMarkerType "hd_arrow";
    _playerPos setMarkerDir direction _x;
    _playerPos setMarkerText profileName;
} forEach allUnits;

while {true} do {
    {
        _playerPos setMarkerPos position _x;
        _playerPos setMarkerDir direction _x;
    } forEach allUnits;
    sleep 0.05;
}

What am I doing wrong? This is executed from initServer.sqf this way:

[] execVM "marker.sqf";
tough abyss
#

Maybe was added twice? @astral dawn

astral dawn
#

Maybe yeah 🤷

edgy dune
#

@astral dawn I will, I was doing this last night so maybe a good nights sleep will help today lol

astral dawn
#

But he said that he adds it only in init.sqf

#

@tender fossil Marker names must be unique

#

I guess it works but only for one person in your case, right?

tender fossil
#

Yeah, also it's not updating the position and direction

#

I'll make individual names with format

astral dawn
#

you can probably use client owner as a unique ID for each player

still forum
#

@tender fossil _playerPos is only one value

#

ever

#

you re moving one marker

tender fossil
#

Oh lol

#

I guess it's the +30°C that causes this... 😄

astral dawn
#

neural processor needs a cooler too

tough abyss
#

Tin foil

tender fossil
#

How do I generate unique variable for each unit?

still forum
#

wrong approach

#

make an array

tender fossil
#

Oh ok

astral dawn
still forum
#

or setVariable onto the unit

tough abyss
#

ProfileName is local command

still forum
#

setVariable a "playerMarker" variable on the unit.
then use getVariable in your loop where you set the marker position

#

Then you can also check if the variable is nil, and if so, dynamically create a new marker. That way you also handle newly spawned units

tender fossil
#

Maybe I should also use local variables to avoid extra traffic on network?

still forum
#

"extra traffic"?

#

what traffic?

tender fossil
#

Local markers instead of global markers (?)

tough abyss
#

@tough abyss its my new Langage xd😂

still forum
#

local markers makes sense yes

tender fossil
#

Aren't global markers synced over network?

#

Ah yeah

still forum
#

but I don't know why variables

#

I never said anything about public variables 😄

tender fossil
#

Yeah meant markers

tough abyss
#

Markers are the worst and the oldest implementation in Arma. When you reference a marker the engine has to cycle array of all markers to find it, For. Every. Marker. Command.

#

Same for network markers, each marker command is a packet sent

#

Arma 3 😂

#

It is all fun and games when you have only a few markers

astral dawn
#

how long does it take to iterate through them?

#

Compared to speed of SQF

#

if I have 100 of them for instance or 1000 or do you have any numbers for any value?

tough abyss
#

You are missing the point

still forum
#

"Compared to speed of SQF"
like the blink of an eye compared to a snail crawling up stairs.

tough abyss
#

It is fast to find marker

still forum
#

But still bad, because it could be done SO much better and faster

tough abyss
#

But when you have to do it for every marker command it mounts

#

so if I lbAdd in a dialog all marker map, this will use a lot of traffic?

#

No idea

#

Vague question

drifting copper
#

I am using the following for a moving respawn point that is attached to a vehicle.

 
while {alive rspn} do {"respawn_west" setmarkerpos (getpos rspn); sleep 1;}; ; 
{}; 
 
_killspawnusmc = alive rspn; 
if (not _killspawnusmc) then 
{ 
   deletemarker "respawn_west"; 
};```

Is there a method of moving the spawn-in to that same vehicle? Note not using a "respawn" module but ``respawn_west`` marker instead.
still forum
#

what does lbAdd have to do with markers 🤔

astral dawn
#

and with traffic 🤔

tender fossil
#

What I'm doing wrong this time? :D

{
    _x setVariable ["playerLocalPos", (createMarker ["PlayerMarker", position _x])];
    (_x getVariable "playerLocalPos") setMarkerShape "ICON";
    (_x getVariable "playerLocalPos") setMarkerType "hd_arrow";
    (_x getVariable "playerLocalPos") setMarkerDir direction _x;
    (_x getVariable "playerLocalPos") setMarkerText profileName;
} forEach allUnits;

while {true} do {
    {
        (_x getVariable "playerLocalPos") setMarkerPos position _x;
        (_x getVariable "playerLocalPos") setMarkerDir direction _x;
    } forEach allUnits;
    sleep 0.05;
}
tough abyss
#

Name of the marker has to be unique

tender fossil
#

Even if I attach it to object right away?

tough abyss
#

@Dedmen for pushing marker info in a dialog.

lost copper
#

"PlayerMarker" --> format["%1_marker", name _x]

tender fossil
#

Yeah, was just gonna add format @lost copper 😄

#

Thanks!

lost copper
#

But sleep 0.05 looks like bad for network

tough abyss
#

Getter commands do not broadcast @tough abyss

astral dawn
#

he's going to do it locally anyway @lost copper

#

in the future

lost copper
#

@astral dawn local marker for every player with his own pos?

astral dawn
#

as I understand, yes

tough abyss
#

@tough abyss so i'm safe ty for anwser.

#

but yep command with global effect with a loop is never good😉 .

tender fossil
#

@lost copper Local markers yeah

still forum
#

Even if I attach it to object right away? you are not doing that.
(_x getVariable "playerLocalPos") get it once, and store it in a variable.

lost copper
#
if (hasInterface) then {
     _marker = createMarkerLocal [format["%1_m", name player], player];
    _marker  setMarkerShapeLocal "ICON";
    _marker  setMarkerTypeLocal "hd_arrow";
    _marker  setMarkerDirLocal (getDir player);
    _marker  setMarkerTextLocal (name player);
    while (true /*maybe "alive player" here*/) do {
        _marker setMarkerPosLocal player;
        _marker  setMarkerDirLocal (getDir player);
        sleep 0.1; 
    };
};
tough abyss
#

I feel scared of this because, imagine if a cheater send a loop with global effect command i'm fucked no?

still forum
#

"imagine if a cheater" well you are already f-ed

tough abyss
#

xd

still forum
#

@lost copper that only spawns one marker

lost copper
#

For one player

still forum
#

Ezcoo's code shows every unit

#

yours only the local player

lost copper
#
local marker for every player with his own pos?
#

@tender fossil

tender fossil
#

Yes

tough abyss
#

@Dedmen i have good AH but, what u can do if a player exec global command effect in a loop?

still forum
#

nothing

tender fossil
#

I already tried this with no luck:


{
     _x setVariable [format ["pos%1", name _x], (createMarker ["PlayerMarker", position _x])];
     (_x getVariable str [format ["pos%1", name _x]]) setMarkerShape "ICON";
     (_x getVariable str [format ["pos%1", name _x]]) setMarkerType "hd_arrow";
     (_x getVariable str [format ["pos%1", name _x]]) setMarkerDir direction _x;
     (_x getVariable str [format ["pos%1", name _x]]) setMarkerText profileName;
 } forEach allUnits;

 while {true} do {
     {
         (_x getVariable str [format ["pos%1", name _x]]) setMarkerPos position _x;
         (_x getVariable str [format ["pos%1", name _x]]) setMarkerDir direction _x;
     } forEach allUnits;
     sleep 0.05;
 }
still forum
#

@tender fossil the variable name is not the marker name

#

"PlayerMarker" is the marker name, which needs to be unique

lost copper
#

Player should localy see only his position or position of all players on the map? @tender fossil

tender fossil
#

Position of all players on map

#

Alright @still forum

lost copper
#

Ok, wait a min

still forum
#
{
     private _newMarker = createMarker [format ["PlayerMarker%1",name _x], position _x];
     _x setVariable ["playerMarker", _newMarker];
     _newMarker setMarkerShape "ICON";
     _newMarker setMarkerType "hd_arrow";
     _newMarker setMarkerDir direction _x;
     _newMarker setMarkerText name _x;
 } forEach allUnits;

 while {true} do {
     {
        private _marker = _x getVariable "playerMarker";
        _marker setMarkerPos position _x;
        _marker setMarkerDir direction _x;
     } forEach allUnits;
     sleep 0.2;
 }
tender fossil
#

Do they both need to be unique or just the marker name?

#

Ah alright

#

So I put the format in wrong place

still forum
#

To make it local, just use the local marker commands everywhere, and let that code run on every players machine

tender fossil
#

Yeah, that's what I'm doing now

lost copper
#

@still forum your script is not JIP compatible)

still forum
#

Problem is, if you spawn a new Unit, it will be in allUnits but not have a playerMarker set on it

#

"your script is not JIP compatible" wat?

#

You can fix that though by just checking if _marker is nil at the bottom, and then creating a new marker if needed

lost copper
#

Yep i want to say that

still forum
#

It's JIP compatible if the new player joins into a existing AI

tough abyss
#

FFS profileName is local command you will see the same marker text

still forum
#

oops
_newMarker setMarkerText profileName; -> _newMarker setMarkerText name _x;

ruby breach
#

Could always have it setup something like ```sqf
while {true} do {
waitUntil {visibleMap};
//spawn markers
while {visibleMap} do {/Update markers each frame/};
//delete markers
};

astral dawn
#

what if we want them at GPS too

tough abyss
#
[] spawn {
    while {true} do {
        {
          _x addTorque [1000,0,0];
        } forEach vehicles; 
    };
}; 

Result my server got killed in like 2sec.

still forum
#

visibleMap true for gps too?

ruby breach
#

Not sure

still forum
#

need to try then. I assume it should be tho

tough abyss
#

@ruby breach or drawIcon like a pro

ruby breach
#

The example I have for that method is pre-pushBack, so I'm just not going to bother posting it lol

still forum
#

don't even dare 😄

astral dawn
#

@tough abyss as dedmen said, if you hyave a client sending random crap around you are f*d already

tough abyss
#

Disable addTorque with CfgDisableCommands @tough abyss

tender fossil
#

@still forum I tried your code, it's not working for some reason

still forum
#

(_marker setMarkerPos position _x;derp

#

stray (

#

edited above

tough abyss
#

@tough abyss yes i have done that but there is plenty of another command doing the same.😬

#

but anyway u right i can't do nothing sad.😰

#

Sounds like you are not using battlEye

#

I don't run server atm, i just prepare my self to RP communty😂 😂

lost copper
#

RP server
no battleye

tough abyss
#

hahha i want to see result of that

tender fossil
#

@still forum Still not working for some reason, it shows only one marker

ebon ridge
#

I want to do simple in game debug menu, any recommendations? I was going to use CBA Fleximenu but there appears to be no documentation at all (if anyone knows where it is, or a project that uses it that would be helpful!)

still forum
#

don't know why Ezcoo, can't see error

astral dawn
#

How do I get the current zoom level, or better - current view cone which the player is observing?

#

This thing should take into account binoculars, optics, right mouse button zoom, etc

tough abyss
#

Best way to see if player is on copilot seat in a heli?

#

or maybe on the benches on a hummingbird for example?

high marsh
#

@astral dawn maybe bind some action to the input action for zooming?

#

afaik, there is one of two states the regular fpp, and then the zoomed in mode to compensate for real vision.

#

same with the binocs.
Opened -> RMB -> Action

astral dawn
#

yeah but how do I get the size of the view cone, in whatever way? be it angles or coordinates of the four edge points of my camera?

high marsh
#

screen to world?

harsh sphinx
#

Is there any way/function to get the idc from the actual Display object? I can easily pass it along to the function I'm using it in, but if there's a simple way to get it that'd be preferable.

high marsh
#

you mean the displays that are open?

#

allDisplays

#

if you end up needing to find one in specific you're going to need to look at the config.

harsh sphinx
#

No an individual one, for example a select and hinting it out would give you something like "Dialog #301" - I just need to capture that number by itself

astral dawn
#

Probably like this:
_className = findDisplay 12 getVariable ["BIS_fnc_initDisplay_configClass", ""]; // "RscDiary"
Then go to config >> className >> "idd"

high marsh
#

oh, controls

#

displayCtrl

#

for control handle

#

you'll still need idd

astral dawn
#

I think he means, he has a display handle, and he needs to get its IDD - Display ID

harsh sphinx
#

No I need the idc, not the idd

astral dawn
#

IDC is the ID of Control

#

IDD is the ID of Display

high marsh
#

which is it? control or display?

harsh sphinx
#

Yeah I don't work with dialogs too often, it's a control.

astral dawn
#

if it's a control.... because initially you said 'display'

high marsh
#

you can also use a UI EH to enact mouse over actions

harsh sphinx
#

Thanks, yeah as mentioned I don't work with dialogs too often so it's a foreign area and that distinction wasn't clear to me.

#

Is ctrlIDC the only way?

astral dawn
#

why would you need another way 🤔

#

I mean it does what you asked for

#

getting IDC of a control handle

high marsh
#

missing the control handle? :[

harsh sphinx
#

Yeah, it's also an Arma 3 function and I'm working within the constraints of 2 by working on a revival of an old game mode for a challenge. However the most challenging part is not having access to A3 functions. I still come to here for support, since it still helps.

astral dawn
#

so it's arma 2, ok 🤔

high marsh
#

shouldn't change a ton

astral dawn
#

ctrlIDC was added in arma III

#

ctrlClassName - in arma III too :/

harsh sphinx
#

Yeah a lot of useful functions got added in 3. I can just pass along the idc to the function, so it's no biggie.

tough abyss
#

shouldn't change a ton
You think? A2 is way behind now, you just have no idea until you try something

astral dawn
#

10 years from its release date :{ damn I'm old

meager granite
#

What would be a reliable way to tell if player has mouse cursor on the screen? 🤔

#

Be it some menu or map open

tough abyss
#

dialog?

meager granite
#

Doesn't cover map being open

tough abyss
#

Ah ninjaed

meager granite
#

getMousePosition returns previous position regardless of cursor being visible

#

I can check if map is open by another command sure but I wonder if there is better way

#

99.9% its not

#

Even less reliable

#

Well, I guess dialog || visibleMap is sufficent enough

thorn saffron
#

I have this string: "[[myMedevacVehicle, 15], [myMedicTent, 10]]" and I need to convert it to an array, how do I do that?
I tried the compile, but it returned a code, the toArray is unreadable for normal humans and you have to then convert it back to a normal text one letter at a time

still forum
#

remove the space in there

#

and then use parseSimpleArray

#

toArray is unreadable for normal humans toArray doesn't turn a string that contains an array to the array

#

myMedevacVehicle that won't work with parseSimpleArray

#

do you not have any way to simply not put that array into a string?

astral dawn
#

call compile should do the job, no?

still forum
#

ye

thorn saffron
#

@astral dawn it returns a code block, not an array. Like this:
{[[myMedevacVehicle, 15], [myMedicTent, 10]]}
and that breaks the script down the line

astral dawn
#

but did you call it?

thorn saffron
#

I just get this:
[[any,15],[any,10]]

astral dawn
#

what is myMedevacVehicle then?

#

and myMedicTent

#

do they exist at all in your mission namespace?

still forum
#

well undefined variables gonna be undefined

thorn saffron
#

myMedevacVehicle is a name of an object, but AFAIK you will be able to put in classnames as well.
However I do need to convert that string to an array. Its a string because the CBA settings editbox sends strings down the line.

still forum
#

Then use call compile

#

like you did

thorn saffron
#

and I just get [[any,15],[any,10]] instead of [[myMedevacVehicle, 15], [myMedicTent, 10]] the names are gone

still forum
#

The variables are undefined then

tough abyss
languid schooner
#

What is the logically explanation to why systemChat in initPlayerLocal.sqf isnt shown in the game, unless you first put in a sleep? - I am new to this arma scripting, and are trying to learn the ropes!

winter rose
#

Yes, there is.

#

😋

languid schooner
#

fixed! 😄

winter rose
languid schooner
#

Yeah I understand that, but I guess that the reason why a systemChat in the beginning of initPlayerLocal.sqf isn't shown, unless you give it sleep 1; is be cause that the chat module isn't yet loaded or something?

thorn saffron
#

oh so there has to be a an object that is named in the mission for it to work. I just thought it would be passed into the array anyway. Now I get it.

languid schooner
#

Just make the intro a little longer? 😛

#

I would have guessed that when it reached the point where it went on with the initPlayerLocal it would be ready for what ever you tossed at it, like systemChat

#

hmm

#

ok so I guess it has something to do with the player object then: it writes the systemChat before my client takes over the player object and make it local?

#

And therefor I do not see it

languid schooner
#

ok i guess the chat / message system is just slow AF to initialize? because hints, and other effects shown is working right out the start

jade abyss
#

Try that
waitUntil{!isNull (findDisplay 46)};

languid schooner
#

that worked!

#

So this means that I didnt see the systemChat because there was no display at the time?

jade abyss
#

correct.

languid schooner
#

much appreciated 😃

#

And why hint is working is because its a way slower function, I guess...

jade abyss
#

Yep

little ore
#

Hey guys,

working on a script for a mission to rescue AI in the field.

this setSpeaker "NoVoice";
this disableAi "ALL";
[this, "Acts_InjuredCoughRifle02"] remoteExec ["switchMove", 0];
_action= ["Carry", "Carry", "", {[player, cursorTarget] call ace_dragging_fnc_startCarry;},{true}] call ace_interact_menu_fnc_createAction;
[this, 0, ["ACE_MainActions"], _action] call ace_interact_menu_fnc_addActionToObject;```

```ace_dragging_fnc_startCarry``` is sadly returning nothing, so how do i get the AI back into the first Animation. 
I thought of a  ```waitUntil {inputAction "defaultAction" > 1};``` because u have to press that Key anyway to drop down the AI. 
Someone has a better idea?
jade abyss
#

```
Code
```
for better readability

tough abyss
#

Yep
nope

thorn saffron
#

sadly an object classname wasn't passed through a compile. also if you dont have the object with the name on the map the compiling stops and it breaks the scripting.
I think I will have to come up with something completely different

astral dawn
#

What are you even trying to do? So you have a string representation of an array, and you need to get data out of it. It's pretty weird. Why would you even need that? Maybe there is another way?

still forum
#

it comes from a CBA setting, and cba settings are strings

#

the user is supposed to enter a proper variable name in there, but you cannot ever trust the user to enter something correctly

quartz pebble
#

also that might happen when you work with arma extensions - they return results as strings

astral dawn
#

Well it certainly works:

myVar = "Whatever";
myArrayString = "[[myVar, 0], myVar, 1]";
myArray = call compile myArrayString;
myArray // Returns: [["Whatever",0],"Whatever",1]
#

You can pass a string through a string and then through call-compile too:

myArrayString = "[[""classOfDude"", 0], ""classOfDude"", 1]";
myArray = call compile myArrayString;
myArray // [["classOfDude",0],"classOfDude",1]
languid schooner
#

When didJIP is true means the player joins a server where the mission is started right?

#

So for it to be false is, to join a server without a mission or?

astral dawn
#

JIP is when you join a mission after the server owner has started it

#

Non-JIP is when you are in the lobby when server owner presses 'OK' button to start the mission

languid schooner
#

Ah ok, I thought the lobby was part of the mission too

astral dawn
#

all the SQF functions, preinit, postinit, init.sqf or whatever, run after the lobby

languid schooner
#

gotcha

#

Btw do you have any idea why, when I use TEDST to start the localhost test server, that it looks like a have 3 running in the server browser window?

astral dawn
#

Yeah I don't know, I have three 😄

#

I mean, I have two, not three, lol

languid schooner
#

ok weird

#

I can't seem to find any place with a list of attributes on the player object?

spice axle
#

In which direction?

#

What is a attribute in your definition

languid schooner
#

I mean all the attributes like name and uid etc

#

the initial ones

spice axle
#

These are apps

#

All

languid schooner
#

Hmm I am not following

#

you mean name and uid is all there is? 😄

#

untill you add your own?

#

hmm ok

#

I would have guessed there would be stuff like IP, versions, mods, etc etc

#

ok that could be handled server side

rough heart
#

JIP : Join In Progress?

languid schooner
#

Yes

languid schooner
#

is it possible to spoof UID still? - watched some aged videos where people were dll injecting

#

I am just asking, if it's safe to use like auth

neon snow
#

Is there a way to have procedural RVMAT?

#

To make dynamic emmisive object

astral dawn
#

Dedmen can you make an SQF command that will...
...change the 3ms scheduler limit to something else?

still forum
#

ye

astral dawn
#

Hmm really? That would be most awesome actually, because we are currently trying to push as much processing into that poor scheduler

winter rose
#

Can you add a -useAllCores flag (that works?)

still forum
#

sure

#

but your game will crash before the loading splashscreen

astral dawn
#

I'm not joking, can you really do that?

still forum
#

what?

#

changing the limit? yes

astral dawn
#

Damn that would be cool 🎇

winter rose
#

what about a "script priority" then (:

#

(it's "non-scheduled" so far)

astral dawn
#

I don't get what's script priority 🤔

hollow lantern
#

Question: I have a box on the map, near that box I have a MIM-145 AA battery. I now want to automatically rearm the battery once the ammo of it is 0 and then after 3 minutes rearm it. Can someone tell me how to run the script continuously and if there is a better way of doing it? My script: ```sqf
params ["_ammobox"];

_list = _ammobox nearEntities ["Car", 15];
_list params ["_gun"];

if (typeOf _gun == "B_SAM_System_03_F" && _gun ammo == 0) then {

sleep 180;
_gun setVehicleAmmo 1;

};

tawny kindle
#

make a loop

hollow lantern
#

ok and about the nearEntities, is there a better way of getting the SAM class? I get some _gun is not defined variable which makes me believe that the missile isn't always the first object

#

nvm I rewrote the script, thanks for the hint @tawny kindle

tawny kindle
#

np

tough abyss
#

_gun ammo <- wrong syntax

jaunty ermine
#

Is there any function that changes a player's vision mode? I'm getting the vision mode through _var = currentVisionMode _player; but can't seem to set it again.

chilly wigeon
thorn saffron
#

ok so passing the array through CBA setting didn't work well at all.
Is it possible to get all objects in a mission that have a specific variable? I think it might be possible to set variable for an object in the editor by putting something like this into the init:
this setVariable ["funkyMedevacStation", true]
Then after mission launches I would need a script that finds all of the objects with funkyMedevacStation set to true and build an array out of them.
Is it feasible to do it like this?

hollow thistle
#

Doing it once on mission start is reasonable.

#

You would just need to run your stuff in postInit as preInit will run before editor init "box" code is ran (so your variable will be not yet set on the object).

#

something like this in postInit should work:

MY_funkyMedevacStations = (entities [[], [], false, false]) select {_x getVariable ["funkyMedevacStation", false]};
thorn saffron
#

will it run only for editor like objects and skip map houses, trees and such?

hollow thistle
#

Yeah entities does not run for map objects.

#

If it would it would freeze your game for someeee time.

#

(or more likely crash the game)

thorn saffron
#

cool it seems to work

#

scratch that, it does not work on static objects placed in the editor (tents and such)

hollow thistle
#

try with (allMissionObjects "") then

velvet merlin
#

does getIn EH set in configs always trigger at mission start even if units start in a vehicle?

compact maple
#

Hello guys, does the lbSetCurSel function trigger the onLbSelChanged EH ?

tough abyss
#

It should

thorn saffron
#

I'm trying to get units to ragdoll when they are injured. Sadly setting the setUnconcious true then false stops units from reporting that they are injured with prevents you from using the normal heal action and breaks the AI ordering medics to heal units.
I tried setUnconcious to false and then apply some damage in order to remind a unit that it's injured and report it's status.

spark turret
#

a questions about global variables. if i declare IRON_GasAreas = [x,y,z]; in the initServer, will the clients be able to access it? i tought thats the point of global variables, that they are global

#

i need some way to have an array that gets declared by the server and is accessible by all clients

hollow thistle
#

Global variable is global on your environment. Every network instance client/server has it's own copy of all namespaces. So if you want to have server variable accessible to all clients you need to broadcast it over the network.

spark turret
#

thank you i will try that.

compact maple
#

gosh I wish there was a way to just ctrl + s a script and instant test it instead of rebooting and repack pbo etc etc

winter rose
#

-filePatching?

broken forge
#

i'm currently making a zeus op and would like all of the players first person apart from me, as the zeus (so i can fly better when in a heli - to improve speed of medevac's etc). i've placed my zeus as a BLUFOR unit with the game master module attached (just so long range radio will work with TFR) so i don't know if that'll affect anything scripting wise.

Is there any way to have all caharacters but mine first person locked?

gleaming estuary
#

Trying to get setPosATL to set a location of an object about a meter directly in front of the player, can someone help? _panel setPosATL [(getPosATL _unit select 0) -5, (getPosATL _unit select 1) + 5, getPosATL _unit select 2];

surreal peak
#

@gleaming estuary not entierely exactly what you've asked, but ive achieved a similar thing with:

        _enemyPosX = (_targetToMurder call CBA_fnc_getPos) select 0; 
        _enemyPosY = (_targetToMurder call CBA_fnc_getPos) select 1; 
        _enemyPosZ = (_targetToMurder call CBA_fnc_getPos) select 2; 

        _enemyPosX = _enemyPosX + 25; 
        _newPos = [_enemyPosX,_enemyPosY,_enemyPosZ]; 
        _boogy setPos _newPos; 
#

_targetToMurder is the person u want to set the object in relation to. boogy is the object you want to set the location

gleaming estuary
#

not really sure what this is doing... gets the x,y and z adds 25 to x to create a new pos?

astral dawn
#

but it works with AGL position, not AGL

ruby breach
astral dawn
#

so you can try like...

private _object = player;
_dir = direction _object;
private _newPos = _object getPos [1, _dir]; 
#

yeah actually getRelPos should be better!

ruby breach
#

For all intents and purposes, _panel setPosATL (_unit getRelPos [1,0]) would work fine unless you're doing shenanigans over water

astral dawn
#

wait, but getRelPos takes heading relative to current object's heading (that's why I meant that it's better)

#

so it must be getRelPos [1, 0]

ruby breach
#

Yeah, missed that bit. getPos is relative to North, getRelPos is relative to the object in question.

tough abyss
#
_posATL = ASLtoATL (player modelToWorldWorld [0,1,1.8]);

@gleaming estuary

torpid grail
#

In callExtension, are the strings passed in UTF-8 or UTF-16? The wiki says the internal encoding is UTF-8 but toString always converts to/from UTF-16

queen cargo
#

Uhm... Wut?

torpid grail
#

When I receive a call to my extension, be it either RVExtension or RVExtensionArgs, are the strings UTF-8 or UTF-16 encoded? The wiki says the internal encoding of strings is UTF-8 but it also says that toString encodes and decodes to/from UTF-16 strings. But I already figured it out, I was just reading the wiki wrong

dreamy kestrel
#

hello, question about creating Praetorian 1C "vehicles" (or similarly classed assets). I have a script that automatically stages key assets when the server initializes.

#

however, they are not appearing in the UAV Terminal list. do I need to set a flag on them?

#

if it matters, this is an ACE server.

#

if I just place the assets via editor, they appear in the list oddly enough. but when through createVehicle, no.

dreamy kestrel
#

I figured it out. Follow createVehicle with createVehicleCrew as appropriate. Works like a champ. 👍

tough abyss
#

@torpid grail it’s multibyte

still forum
#

@surreal peak

        _enemyPosX = (_targetToMurder call CBA_fnc_getPos) select 0; 
        _enemyPosY = (_targetToMurder call CBA_fnc_getPos) select 1; 
        _enemyPosZ = (_targetToMurder call CBA_fnc_getPos) select 2; 

Oof.. You are calling getPos 3 times, that's so inefficient, and all the selects don't make it better.
->

(_targetToMurder call CBA_fnc_getPos) params ["_enemyPosX", "_enemyPosY", "_enemyPosZ"];
...
_enemyPosX = _enemyPosX + 25; 
_newPos = [_enemyPosX,_enemyPosY,_enemyPosZ]; 
_boogy setPos _newPos;

Soo complicated.

_enemyPos = _targetToMurder call CBA_fnc_getPos;
_newPos = _enemyPos vectorAdd [25,0,0];
_boogy setPos _newPos;

@torpid grail utf8

surreal peak
#

@still forum thanks for advice, I was att the end of my ropes trying to get some other parts of the script to work so I decided to be very lazy. Also I completely forgot about the actual function for getPos. Thanks!

exotic tinsel
#

can someone help me with a code issue. I need to use apply on player attachedObjects to see if one of the attached objects iskindof "man". I still dont fully understand how apply works. could somoeone help me out?

still forum
#

You know you NEED to use apply, while you don't actually know how it works/what it does?

#

Sounds to me like you don't actually want to use apply

#

show me code or idea of what you're trying to do

exotic tinsel
#

in the condition of an action menu i need to determine if one of the players attachedbojects is a man. if true then i can show the action.

still forum
#

sounds like you want findIf, and not apply

exotic tinsel
#

researching it now

spark turret
#

anyone got a recommendation for a function to increase the players weapon sway. kind of like after someone ran and the weapon moves around a lot. setCustomAimCoef did not have an effect when executed on the player.

subtle flint
#

Hey guys 😃

#

Is there a way to get the weight of an item ?

still forum
#

getMass?

#

What is your definition of "item"?

subtle flint
#

No it does not work on an item (only an object)

#

For exemple a map

still forum
#

You need to look into it's config then

subtle flint
#

Yeah, that's what I thought

still forum
#

getNumber (configFile >> "CfgVehicles" >> _itemClassname >> "ItemInfo" >> "mass")

subtle flint
#

Yes I have already tested this, the problem is that some mods are made differently (they define the mass in the main class)

#

But it doesn't matter, with a condition I can easily find it

still forum
#

Arma itself only reads mass from one place

subtle flint
#

Oh yes ?

spark turret
#

watch out as mass is an abstract value not really representing it

#

i have a script reqiring the weight of different weapons, the only way to acuratly get the mass in Kilograms was to place it in an ais backpack, weigh the ai before and after and then subtract.

subtle flint
#

she represents the weight of the item in the inventory

spark turret
#

the mass in the config is not equal to the mass in the inventory.

still forum
#

I can write mass all over the place, doesn't mean that Arma will read it.
A config file is just that, a config. The config entries are read by the engine, at the place the engine expects them at.

subtle flint
#

:/

still forum
#

"the mass in the config is not equal to the mass in the inventory." huh? Sure it is

spark turret
#

not for the weapons i used

#

let me check again so i dont say something wrong

still forum
#

There was a bug with rocket launcher ammo that the ammo mass was counted wrong, not sure if that was fixed yet

spark turret
#

wasnt 2 weeks ago when i last checkd

still forum
#

In weapons the mass comes from WeaponSlotsInfo it seems. On items it comes from ItemInfo

#

Magazines have it directly in their class

#

vehicles have it in their 3D model and not in the class at all

spark turret
#

now for example, BW mg3 has no mass entry, also no weaponSlotinfo.

#

i remeber that getting the mass from the config was such a pain in the ass i couldnt solve.

still forum
#

Are you sure it's not just inheriting that?

spark turret
#

so instead i spawn a unit by scrit and weigh it, add the weapon, weigh it again

#

i have no idea where mass is defined in the config. i only know that i wasnt able to solve that

still forum
#

Well. It's in ItemInfo for items, and WeaponSlotsInfo for weapons.
Every weapon class needs to have WeaponSlotsInfo

spark turret
#

ah, i also remeber that the mass from config for magazines is abolsutely off. it seems like a random value really.

subtle flint
#

There's something strange about it. When I use loadabs with a map on me it returns 2. Whereas when I put it in my backpack and use loadBackpack it gives me 0.0125.

still forum
spark turret
#

yeah well 200 mass

#

but what do i take from that.

#

its ~ 11 kg in game in inventroy

still forum
#

mass is mass and volume combined

#

Arma doesn't have any "kg"

#

It's just a arbitrary "magic" mass unit, it's not kilogram or grams or anything

spark turret
#

well the inventory does have kg (might be ace, idk)
i dont know what rainboypony needs the mass for, but an abstract mass value is worthless to me mostly

still forum
#

Mods like ACE though made up a formula to convert game-mass into real world values that about match what you expect

#

Here's what ace uses

private _weight = loadAbs _unit * 0.1;
format ["%1kg", (round (_weight * (1/2.2046) * 100)) / 100]
subtle flint
#

I have the answers to my questions, thank you 🙃

still forum
#

I don't know why they do a * 0.1
or why loadBackpack returns a weird value

spark turret
#

lol

#

one would assume that such an easy thing like weight would be easy to get in this game

#

load player returns an absolte value (in kg iirc) tho

#

thats what i use to weigh MGs

#

and its accurate

#

also not an ACE function

still forum
#

load returns the relative mass.

#

It's explained on wiki what it does

#

it doesn't return mass

subtle flint
#

I found out about my question. I have to get the full capacity of the bag and multiply it with : 0.0125. * 160 = 2

still forum
#

it returns load in percent

#

I guess loadBackpack does the same then

subtle flint
#

Yes

#

Exactly

spark turret
#

Returns current sum of mass from items stored in all unit's containers

im like 95% sure it returns KG

still forum
#

"and its accurate" I have absolutely no idea what you are doing mate 😄

#

it returns percentage of "maxSoldierLoad"

#

not mass in kilograms at all

spark turret
#

well, i put a gun in the units backpack, weigh him before and after and then write down the difference = weight of gun#

still forum
#

not with "load" no.

#

You get the percentage that the gun weighs relative to maxSoldierLoad

#

I'll fix the wiki page for loadBackpack. Thanks @subtle flint

#

and loadUniform.. and loadVest

spark turret
#

hm let me test again

subtle flint
#

👌

spark turret
#

now okay, it either a huge coincidence, but i tested my script again and got all the weights of all MGs i use

#

with the "load _unit" command

#

"rhs_weap_m249_pip_S_vfg",7.17255 for example

#

IRL weight is 7,31 bis 8,4 kg

#

"CUP_lmg_M60E4",10.314 - IRL 10.5 kg

#

beware as that only worked for guns, the magazines gave back really wierd values.

still forum
#

Wiki fixed

#

maxSoldierLoad in vanilla Arma is 1000

#

rhs_weap_m249_pip_S_vfg is 159.39 in config
Using ACE formula 159.39*0.1 * (1/2.2046)
That's 7.22kg

#

Don't know what your script does.

spark turret
#

interesting

still forum
#

But the wiki is correct.
load returns percentage of max load.

spark turret
#

_mass0 = load _unit ;
_unit addWeapon _wepclass;
_mass1 = load _unit ;
_unit removeWeapon _wepclass;
_wepMass =(_mass1 - _mass0)x100x0.45;
//*0.45 bc lb to KG

#

thats the core of the whole thing.

still forum
#

maxLoad is either 56 or getNumber (configFile >> "CfgInventoryGlobalVariable" >> "maxSoldierLoad")

spark turret
#

good to know the formula for config to Kg tho

#

makes it much easier to get precise values

still forum
#

according to your results. In your config maxSoldierLoad seems to be 22.2 for you?
I have never seen a mod that changes that, and my configs all have 1000 in there

#

*0.45 bc lb to KG hold on. what?

spark turret
#

dont ask me

#

its just the value i got and i played around until i got useful stuff form it

still forum
#

You said load returns the weight, but it doesn't at all.

#

As I said
(159.39/1000) * 100 * 0.45

#

Boom

#

(weight/maxSoldierload)* yourspecialthing

#

It returns a percentage

spark turret
#

i dont know what i did, i only know that it works and i get KG in the end lol

still forum
#

ofc if the maxLoad is always 1000, and you multiply it by a thing it will end up roughly at the same value

spark turret
#

yeah thats probably what i did. but your method is better

still forum
#

Are we clear now that load doesn't return weight?

spark turret
#

yes

#

it just corresponds to weight if the max weight in a player is 1000

#

coincidence basically

still forum
#

If you want to still use load, and get real weight.

(_loadDiff * getNumber (configFile >> "CfgInventoryGlobalVariable" >> "maxSoldierLoad")) * 0.1 * (1/2.2046)

spark turret
#

yeah ill see that i use the ace formula in the future to get more precise values

oblique vale
#

Since I currently can't test it, are variables local or shared across the network?
Client 1: fooBar = createVehicle ['LOP_AA_Offroad', [3380.74,2139.57,0.0236716], [], 0, 'CAN_COLLIDE'];
Client 2: player distance fooBar

hollow thistle
#

Global variables are not shared over network by default. You would need to publish it over network.

dull drum
#

Hi guys. Any thoughts why I can't put an item to the player's inventory with this code?

`this addAction ["Take the Antidote Kappa", {

[ player,"RyanZombiesAntiVirusCure", true ] call BIS_fnc_invAdd; }];`

I've tried different item classes and addItemToBackpack stuff too.

still forum
#

BIS_fnc_invAdd never heard of that..
Holy macaroni what is that function..
Why does one need vectorDiff for adding a item to inventory.
And wtf, it's counting slots? That's not a thing anymore in A3.... wtf..

#

u sure that classname is correct?

dull drum
#

Most probably, yes, because I've tried other classnames from tutorials and they also didn't work.

ruby breach
#

Have you tried... you know... vanilla items?

#

addItem definitely works

#

If it works for a vanilla item and not your modded item(s), it's a mod issue (or you've got incorrect classnames)

dull drum
#

Not sure about addItem somehow I've hit addToBackpack from the first googling and then got to functions because sometimes they were more bulletproof than scripting commands

#

I'll try addItem for sure

twilit field
#

Hi, can i detect, that player is using scope? I tried to use animationState but this doesnt work (same state).

ruby breach
#

Most BIS functions aren't really preferable

twilit field
#

great

still forum
#

BIS functions are nice.... But not 10 year old arma 2 bis functions that someone forgot to delete

dull drum
#

And it was a cherry on a cake after 5hrs struggling with ai getting through the walls, so i probably weren't too focused :)

devout stag
#

Oh god don't mention AI phasing

#

that crap is so annoying...

ebon hornet
#

Hey folks! I'm having some issues with the v1.93.145618 waitUntil change/update. I have as follows:

mug_types = ["LandVehicle", "Ship"];
waitUntil {uiSleep 1; ({if ((objectParent player) isKindOf _x) exitWith {true}} forEach mug_types)};
//do something

And I'm getting a "Type Bool expected Bool" error. I know why it's happening, I'm pretty sure (if it returns false it becomes nil) -but- I've been pulling my hair out trying to figure out a workaround. On dev-branch as well, FWIW.

Am I missing something?

ruby breach
#

waitUntil {mug_types findIf {(objectParent player) isKindOf _x} > -1}? (an idea anyway)

ebon hornet
#

You know what, I think that'll work fabulously! Much appreciated. Knew there had to be some not-overly-convoluted way to do it, but be damned if my brain wanted to go there. Thanks again!

dull drum
#

Thanks guys for the addItem command, much appreciated! But the adventure continues - does anybody know how to find actor of the triggered addAction command?

#

I have a mission for the blufor guys to bring an item to the specific place and push the button with addAction. Inside there is an if that checks that the guy who pressed the button has an item. But there are 4 different MP guys and I can't just check a player.

still forum
#

"find actor of the triggered addAction command" you get it as argument in the code that addAction executes

#

read addAction wiki page

dull drum
#

Read thrice and now it seems that I'm a blind and / or stupid. _this params ["_caller"], right?

still forum
#

says somewhere on there, can't look now

dull drum
#

Hell yeah, it works!

gritty grotto
#

Is it possible to get the Legacy Fatigue to work? It would be kinda cool if I could get the very old stamina system working again

#

i wondered since it is found in arma 3 samples

winter rose
#

@gritty grotto not without an addon (available on the Steam Workshop) I'm afraid

gritty grotto
#

what you mean?

#

do you mean that it won't work without making it as a mod? I figured that.

winter rose
#

"to get the Legacy Fatigue to work" yes

restive leaf
cosmic lichen
#

According to the first comment it works with some exeptions

restive leaf
#

That comment was 2017... lot of water under the bridge since then

drifting copper
#

I am trying to get players to respawn on a carrier but you know, lets fall through the deck glitch cause object solid state is weird.

At the moment I have tried a respawn_west marker on land with a trigger using

Cond

this && (player in thisList)```
On Act
```player setPos [getmarkerPos "something" select 0, getmarkerPos "something" select 1, 10]; player setPos [12670.24, 24750.043, 23];```

Issue is the "teleport" works though setting height is a issue. 23 on Z lets you fall 20m onto the deck and 22 lets you fall in water. Tried every .something value with no luck. Does anyone maybe have an idea how to do this or how to make the carrier a "solid object"?
young current
#

Use absolute positioning with setposasl

drifting copper
#

Thank you, though I might need that in a "simpler" english as that was foreign to me

#

Teleporting player into a vehicle that is on deck like the RHS CH-53 that has the cargo space will work. Just lack the know-how

drifting copper
#

I have found this as well

  if (!isServer) exitwith {};
  {
    _x addEventHandler ["respawn",{
      _unit = _this select 0; 
      if (!isPlayer _unit) exitWith {deleteVehicle _unit}; 
      _vehicles = vehicles select {(side _x == side _unit) && canMove _x}; 
      if (count _vehicles > 0) then { 
         _unit moveInCargo (_vehicles select random (count _vehicles -1))
      }; 
   }]
  } foreach playableUnits
}```

On line ``_unit moveInCargo (_vehicles select random (count _vehicles -1))`` I assume that is any random side vehicle? If so how would I set it to a specific vehicle?
still forum
#

@drifting copper

#

instead of setPos

drifting copper
#

It worked ^ Thank you

quartz pebble
#

Guys, maybe someone has faced this:
-multiplayer, a group of 2 UAV's spawned. When logging any of them diag_log format ["uav: %1", _uav] in logs I see 9:41:51 "uav: B Alpha 4-1:2"
-after some time, the group entity itself disappears. The vehicles themselves are in place, but out of crew and out of the group itself. When you try to log, you see 9:45:51 "uav: 00007FF63C13C4E0"
-about 4 minutes passed since the group was spawned to the moment of it disappearing
-happens regularly on the live environment

any ideas what the heck is this?

still forum
#

Some mod script deleting groups/ai units

quartz pebble
#

don't think.. the only assumption - is arma might consider the gruop with UAV's only - an empty group and eat it with the deleteGroupWhenEmpty mechanism

#

will be able to check in some hours

#

what actually confuses me a lot - is what gives the uav: 00007FF63C13C4E0 when I make diag_log

still forum
#

that's the memory address of the uav vehicle

dull drum
#

Hi there guys.
Any advices on how to get trigger owner via script?

still forum
#

have you tried if owner works?

dull drum
#

Oh gosh. It's like "google how to get owner of the trigger? Oh, nobody knows for sure. Just spend an hour or so digging commands never finding nothing useful and then boom it's owner!"

#

Thanks, @still forum i'll try owner now 😃

dull drum
#

Yeah, was there just looking at the wrong direction.

Tried in trigger onAct:
_caller = owner this
Didn't work.

still forum
#

what did it return?

#

this is not defined in on activation

#

the variables are thisTrigger and thisList

#

owner thisTrigger

dull drum
#

digging through debug console docs to get what it returns

still forum
#

Just save it into a global variable

#

but. I can already tell you it returns nil, because this is nil too

dull drum
#

Just got some fun debugging. 3 MP players, each has a script that creates a task and addAction on death. Code is 100% similar (except for units names of course). Works well for the Singleplayer. In MP the "host" player script works only for the task creation. addAction does not apply. Other players' scripts work just fine.

still forum
#

locality of addAction?

lethal sandal
#

I'm trying to use the invisible O_TargetSoldier by spawning it in front of BLUFOR AI but the AI aren't targeting it or even reacting to it. I've been using createVehicle to spawn them. Does anyone know how to get AI to react to these targets?

dull drum
#

@still forum
locality of addAction?

Could you elaborate on this a bit more?

still forum
#

it needs to be executed locally to the player

#

not serverside

dull drum
#

How can I ensure on that?

#

And is it okay that it works for non-host player?

still forum
#

how do you run the script that executes the addAction?

#

could remoteExec it over to the correct player

dull drum
#

it's a trigger that checks if the MP player is dead and has an Item as Condition and then adds action to the player's name variable: bf1 addAction ["blabla", {dirty deeds}];

still forum
#

does the trigger run globally or server only?

dull drum
#

globally

still forum
#

then it should probably work 🤔

lethal sandal
#

does anyone know how to get O_TargetSoldier to work?

dull drum
#

@lethal sandal are these soldiers OPFOR or do they have something that eagers BLU guys to shoot them?

lethal sandal
#

no, just needed sides. however, i found another classname that works: LaserTargetW

#

to clarify, I wanted AI to to target a prop based on it's init file

#

but independent does not have a LaserTarget

#

wait nvm. LaserTargetW doesn't work

dull drum
#

@still forum

then it should probably work

That's exactly my thought!
I'm running this MP player as host from the editor wonder if that could be an issue

#

Long story short if the target is a vehicle (not an object) then doTarget + doFire should do the trick

lethal sandal
#

the issues is that I need all the Units to not only attack but also react to it as if it were another AI.

timber wadi
#

hello all. I'm creating a mp scenario and I was wondering if there's a way to detect when players are in a certain area and teleport them to a location? This is easily doable with variables but do I have to assign a variable to each player? There's more than 70 so that way would be very inefficient. I heard that each (human) player already has a local variable called "player" but would this work with an area trigger?

still forum
#

"I heard that each (human) player already has a local variable called "player"" no that's not how that works.

lethal sandal
#

{/your code here/} forEach allPlayers?

still forum
#

area trigger trigger onActivation code get's all units in thisList variable

#

Just grab all players thisList select {isPlayer _x}
and then teleport all the units in that list

timber wadi
#

if (player inArea playercatcher0) then{
player setPosASLW [15457,15485,23.7];
player setVelocity [0, 0, 0];
};

so this is the code

still forum
#

You might want to make a serverside only trigger for that.
For one that improves performance for your players.
Second it prevents every player trying to teleport every other player 😄

timber wadi
#

yeah exactly what I want to avoid lol

still forum
#

make a area trigger, server only
onActivation: {_x setPosASLW [15457,15485,23.7];} forEach (thisList select {isPlayer _x})

Why do you set the velocity?
And why aslW ?

timber wadi
#

so this is on a carrier and anything other than ASLW didn't work for some reason. My guess is that this is due to the sea floor not being equal in terms of altitude.

#

when players jump down the carrier they gain a velocity and when I tested the script on a singleplayer scenario I died when I teleported back, setting the speed to 0 solved the problem

#

@still forum thanks for the code! really helpful.

still forum
#

ASL should also work fine

timber wadi
#

@still forum just tested it and it works on players. thanks for the heads up.

delicate lotus
#

I want to use DEBUGMSG(TEXT) as marco in my script to print TEXT in the chat using systemChat.
I would to define it like this #define DEBUGMSG(TEXT) systemChat TEXT;, right?
If I were to use #ifdef, #else and #endif to only make this work if DEBUG is defined. How could I still keep using DEBUGMSG but nothing would happen?
Just an empty define like #define DEBUGMSG(TEXT)?

queen cargo
#

why don't you first try before asking? i really hate those questions @delicate lotus
The answer is indeed, yes

delicate lotus
#

I did try it and it kind of didn't work 😅

queen cargo
#

#define DEBUG

#ifdef DEBUG
    #define DEBUGMSG(TEXT) systemChat TEXT
#else 
    #define DEBUGMSG(TEXT)
#endif 

DEBUGMSG("my text")```yields 
```sqf
{ systemChat "my text" }```
still forum
#

;

delicate lotus
#

hmmm. Maybe because I used format ["%1,%2", _unit, _anim] instead of just a string it did not work

#
#ifdef DEBUG
    #define DEBUGMSG(TEXT) systemChat TEXT;
#else
    #define DEBUGMSG(TEXT) 
#endif

DEBUGMSG(format ["%1,%2", _unit, _anim])
still forum
#

yes

#

commas start a new argument

#

you are calling DEBUGMSG with the arguments
format ["%1,%2"
_unit
_anim]

But a DEBUGMSG macro with 3 arguments doesn't exist

queen cargo
#
// #define DEBUG

#ifdef DEBUG
    #define DEBUGMSG(TEXT) systemChat TEXT
#else 
    #define DEBUGMSG(TEXT)
#endif 

DEBUGMSG("my text")``` yields ```sqf
{  }```
#

ahh, the good old comma problem
solution:

#define COMMA ,
#define DEBUGMSG(TEXT) systemChat TEXT

DEBUGMSG(format ["something is odd with %1" COMMA "peter"])```
delicate lotus
#

ahhhh

still forum
#

not solution

#

you missed a thing

delicate lotus
#

the ;?

still forum
#

that too

#

but also the thing without the dot

queen cargo
#

ohh ...

#

*fixed

delicate lotus
#

This would also probably work then.

#define DEBUGMSG(TEXT) systemChat TEXT
_msg = format ["bla%1",bla];
DEBUGMSG(_msg);
#

since it no longer contains a comma

still forum
#

yes, but now you waste performance cuz you always do the format ^^

queen cargo
#

but it defeats the whole "only render when DEBUG is set" thing

still forum
#

It's still only "rendered" when it's set

queen cargo
#

but eats computing power

#

||i love it when we end each others sentences @still forum 😏 😏||

still forum
#

Deja'vu

#

wtf I can't find it. You did that spoiler mention thing already I swear

delicate lotus
#

I guess its best if I just do an formatting macro

queen cargo
#

nope, not me @still forum
barely used spoilers at all by now

still forum
#

someone did :U My brain knows this

queen cargo
devout stag
#

I'm sure this has been asked recently but is it possible to disable the footstep sounds of a player?

winter rose
#

not the sound themselves (without a mod),
but the effect on AI yes

devout stag
#

Ah gotcha, the effect is for a tvt game-mode but thanks anyway!

astral dawn
#

Am I allowed to do #include "\A3\ui_f\hpp\defineCommonGrids.inc" in my description.ext ?

hollow thistle
#

No.

#

Will work in eden but will crash the server.

astral dawn
#

'No, never' or 'No, not any more'?

#

I mean it used to work some time or not?

hollow thistle
#

Not anymore since they changed how filepatching works.

astral dawn
#

Hmm... so it means, I can not include a file from another addon?

hollow thistle
#

Yes, you can't.

astral dawn
#

But Mikero's build tools solve this problem by doing preprocessing at build time?

#

That's the way, right?

hollow thistle
#

🤷

astral dawn
#

I mean if there is no way then it makes no sense to me

hollow thistle
#

If it does preprocessing at build time there will be no include but inlined code so yeah it will work.

#

Also i don't know if it is the case for missions in addon.

#

I summon @still forum

#

He will know for sure.

still forum
#

not now

#

ask again in an hour

astral dawn
#

Ok thanks Veteran

still forum
#

"Not anymore since they changed how filepatching works." since 3DEN.
"But Mikero's build tools solve this problem by doing preprocessing at build time?" description.ext is not binarized

astral dawn
#

So if it's not binarized then it doesn't do its preprocessing?

still forum
#

yes

hollow thistle
#

I guess you could just preprocess it manually or smth.

#

But can't help you as I don't use any of BI or Mikero tools. Only armake2 and hemtt.

queen cargo
#

You always can use sqf-vm for preproc 😏 😏 rebStare

still forum
#

Yeah works nicely

astral dawn
#

what's bad in being able to include something from another .pbo?

#

if I have that pbo and I am at a server then it's not forbidden on the server

hollow thistle
exotic tinsel
#

im trying to use the following in an action condition. the goal is to make sure the cursor object is not already attached to a player. but its not working. Can someone advise me on what im doing wrong.

((attachedObjects cursorObject) findIf {isPlayer _x} == -1)
ruby breach
#

I don't see a reason that check wouldn't return what you expect it to. true if no player attached, false otherwise

native hemlock
#

Isn't that testing for what's attached to your cursorObject, not what your cursorObject is attached to? I think you would want to use attachedTo instead.

ruby breach
tough abyss
#

Try

(!isPlayer attachedTo cursorObject)
cosmic lichen
#

Does anyone know a tool which allows comparison of two files and merge diffs line by line quickly?

astral dawn
#

Don't know the one which does merging
But notepad++ has a comparison plugin

cosmic lichen
#

Alright, thanks. Seems using git seemed to have worked.

upper lintel
#

I have an array of locations and I want to prune all locations that are not inArea of a list of another locations. How would I do this? More specifically, I have an array of houses and I want to only have houses that are in my array of city locations.

tough abyss
upper lintel
#

@tough abyss So in basically uses inArea?

#

so houses = houses select {(_x in cities)}; ?

tough abyss
#

I dunno. What houses is, an array of what?

upper lintel
#

created using nearestTerrainObjects

tough abyss
#

Then no.

#

Read the page I linked to

#

What type of argument should be on the left of in

#

And cities is an array too?

#

Then double no

upper lintel
#

Yeah basically I'm filtering an array created using nearestTerrainObjects with another array created using nearestLocations

#

is there a way during nearestTerrainObjects I can filter it? (nearestTerrainObjects [player, ["House"], 300]) select {(count (_x buildingPos -1) > 0)}

tough abyss
#

It sounds more complicated than a single expression, but reading what you said again it is unclear to me what you want to achieve

upper lintel
#

Okay. I want all of the houses on the map within a 300 meter radius but only inside of a specified list of locations (using nearestLocations [getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), ["NameCityCapital","NameCity","NameVillage","CityCenter"], 25000];)

tough abyss
#

That is even more confusing. How many locations you want your houses to be searched in, one location or every location?

upper lintel
#

Okay look. I have the following

A: list of houses in a 300m radius to the player (using nearestTerrainObjects)
B: list of locations I want to filter the houses to (using nearestLocations)

That means I want NO houses that are OUTSIDE of B.

tough abyss
#

Dunno try something like this:

_filtered = _houses select {_pos = position _x; _locations findIf {_pos in _x} > -1};
upper lintel
#

Okay, I'll try that. Thanks 😃

#

would _filtered = _houses select {(getPos _x) in _locations}; work too?

#

Yeah that didn't work

#

I am going to try inArea

#

Nope none of that works

tough abyss
#

The code I gave you works for me ¯_(ツ)_/¯

upper lintel
#

Yeah I think it was another issue

#

It works now

#

Although I'm using inArea

still forum
#

@astral dawn what's bad in being able to include something from another .pbo? Nothing. It's a bug.

#

@cosmic lichen I use tortoise git's merge tool, or Araxis Merge cuz I'm so fanceh

thorn saffron
#

is there any way to trigger ragdoll without using setUnconscious true? It kinda breaks quite a bit of stuff, the unit is unable to report that it is injured and player stops being a squad commander with causes AI to give orders with can mess up your tactics, even if you trigger the Unconscious just for a moment.

digital jacinth
#

attach a can to the unit, set the mass of the can really high and setvelocity on it.

thorn saffron
#

This seems to break the damage handling drom another script and units die inatantly.Needa further testing though.

cosmic lichen
#

@still forum Thanks for the tip, gonna try that.

brave jungle
#

For some reason, my serverCommand wont kick clients. I have ensured the password is the same as defined, check error logs but nothing is showing a problem
Here is my code:

'serverCommandPassword' serverCommand format ['#kick %1', name (objectFromNetId (netId player))];
```The name is returned by that code and it's correct, however nothing seems to happen in-game.
still forum
#

(objectFromNetId (netId player)) wat?

#

why

#

player is already an object

#

why turn it to netid and back

#

have you checked that the string you are sending it looks correct?

brave jungle
#

Yes it is correct, in terms of why I used that, I tried the normal name player but I had the same error as above, it not kicking, so I saw somewhere to use that

#

basically, it's there just from a random try

still forum
#

well if name player returns the correct data, why would the other thing then return different data, and why would the different data be correct if your current data is already correct. That doesn't make sense 😄

brave jungle
#

Man

#

I dunno

still forum
#

And you are 100% sure that command password is right?

brave jungle
#

Yes

still forum
#

its different from serverpassword and admin password

#

where do you execute that code?

brave jungle
#

Yeah I know that

#

Via a dialog button onButtonClick event

still forum
#

Servers don't have dialogs

brave jungle
#

The client is actually executing it tho

still forum
#

Ah.

brave jungle
#

via a button click

still forum
#

The wiki says in multiple places that the command only works on server.
But you are exectuing it on client. What does that tell us?

brave jungle
#

We instead need to send it to the server right

#

remoteExec it and be done with it?

#

Cheers 👍

tame portal
#

Or use the overload that doesn't accept a password and which works on the client 😬

#

But I guess that's more tedious and restrictive as you need to be logged in as admin

brave jungle
#

Yeah trying to avoid the logged in admin approach

queen cargo
#

do not forget to avoid the "ohh my allowed player UIDs is hardcoded into the missionconfig / is softcoded in a simple array inside the mission serverside" 😉

tough abyss
#

Is there anybody that'd like to help me out with some scripting?

queen cargo
#

🔮

#

ask your question and you may receive an answer my child

tough abyss
#

Aight! I've been trying to get boxes to trigger a trigger once they're inside. I tried (box1 in thislist) and for some reason that didn't give any results what-so-ever. The ideal set-up would be where players load up a truck with crates/ammoboxes ect (Using ACE) then when they arrive they unpack the supplies and bring them to a drop-off point which will only trigger if all the items are inside the trigger. Basically I'm trying to figure out how to do that, and if its possible taking ACE logistics into account (As I think the items are despawned and respawned when loading them in and out of a vehicle)

still forum
#

"As I think the items are despawned and respawned" not ammoboxes no

#

ammoboxes are attached 100m below the vehicle and made invisible

tough abyss
#

Oh, that's interesting.

queen cargo
#

another question is: what does your trigger configuration look like, what does didn't give any results what-so-ever mean
what exactly right now is the problem? Trigger not firing or not the expected outcome results from that trigger firing?

tough abyss
#

The trigger won't fire. I had it set the same as you do when using (!alive box1) && (!alive box2) in its condition, with no type, activation and activation type selected.

#

... I think I fixed it myself. I never realized I needed to have Activation anyone present

queen cargo
tough abyss
#

I'm new to the entire ArmA missionmaking.. Bound to happen. Thanks for the help though. 😛

brave jungle
#

Still can't get this fcking kick to work 😠

_password = "aPassword"; //EXACTLY the same as the server.cfg entry, changed to show an example here.
_client = lbData [1500, ( lbCurSel 1500)]; //grabs currently selected user, this returns the name of the player. this works.
format ["[%1, '#kick %2'] remoteExec ['serverCommand, 2]", _password, _client]; //Exec on server and uses the kick playerName param.
thorn saffron
#

Just for giggles I tried making an animation with ragdoll = 1; but it didn't work

still forum
#

You can see your error right in the syntax highlighting

#

first format, then remoteExec

#

not half-format half-remoteexec

brave jungle
#

Oh fuck me sideways

#

How did I miss that

#

xD

#

Still doesn't kick.

cosmic lichen
#

_client = lbData [1500, ( lbCurSel 1500)]; Does this return a value?

queen cargo
#

uhm ... better question actually to me is: is that your real code?

format ["[%1, '#kick %2'] remoteExec ['serverCommand, 2]", _password, _client]; //Exec on server and uses the kick playerName param.```
#

because this obviously will not work for multiple reasons

brave jungle
#

Format returns a string...

queen cargo
#

yup

#

and not even the correct one as this is the outcome currently:

[whateverisinpassword, '#kick whateverisinclient'] remoteExec ['serverCommand, 2]
brave jungle
#

If i'm honest, been away from arma for a while, I keep answering my own questions here xD

#

i need to be putting format where the client part is

#

then taking from that

queen cargo
#
// Fixed format for ya
format ["[%1, '#kick %2'] remoteExec ['serverCommand', 2]", str _password, _client];
brave jungle
#

I'll give it a try 😃

#

Ended up working with sqf [_password, format ["#kick %1", _client]] remoteExec ['serverCommand', 2];

#

ty for helping 👍

delicate lotus
#

Having lots of units each in their own group, so one group per unit is quite a waste of resources.
But if I want to make civilians walk around, all in a different direction to different positions I would have to put each civilian in their own group.
Is it advisable to just use agents instead, even though they apparently use the same collision model as players and therefor cost more resources then normal AI? (https://community.bistudio.com/wiki/createAgent; second comment)

delicate lotus
#

Wow okay. I am totally going to save that for later use so I always know what is more resource expensive.
I sure have the time and ability to do that and I will. I want my mission to run as smooth as possible after all.

delicate lotus
#

Can I spawn cars as a simple object?

#

Checking the Simple object box for the object in 3den seems not to work

spice axle
#

It work

#

But you have to lock them because if you wanna get in you will stuck there and have to respawn

delicate lotus
#

well it gets reset to unchecked after I reload the mission...

spice axle
#

Hmm ok

delicate lotus
#

probably because they are modded vehicles

spice axle
#

Should not be a problem if there are modded good. But could be the reason. Try a vanilla vehicle

delicate lotus
#

jup its because its a modded vehicle. Guess I have to iterate over all my prop vehicles and turn them into simple objects upon mission init.

spice axle
#

If you have enough time you could spawn the model and not the vehicle itself. But I have no idea how and i‘m not sure if this really works

#

But google or another person here is your answer

round scroll
#

@tough abyss so creating agents instead of units in a off-combat-limits base for atmospheric reasons makes sense?

#

do you know if the agents can do animations?

#

yeah, for my khe sanh helo transportation mission I have up to 400 AI mostly idling around. Replacing most of them with agents might make it actually playable without HC 😃

#

ok

still forum
#

That stuff is not well known enough

#

that these things work, and are good for performance

hollow thistle
#

Maybe some chapter on optimization page on wiki could help with spreading the knowledge?

still forum
#

Just need to find someone with enough time to write such

hollow thistle
#

😬

delicate lotus
#

@tough abyss is it still possible to make agents shoot and aim with the correct commands? For shooting like forceWeaponFire

#

@tough abyss on the BIKI page of BIS_fnc_replaceWithSimpleObject it says this:
"Use with caution as this technique is not very clean - should not be used for many objects and definitely not in MP games.". Well my mission is a COOP MP mission...

#

But if it just replaces the object with a simple object, why should it not work in MP?

hollow thistle
#

I don't see any reason why it could not work in MP.

#

Bear in mind that some notes on BIKI can be pure bullshit or speculation.

delicate lotus
#

lol

hollow thistle
#

However you never know with bi functions. The best you can do is to take a look inside with functions viewer.

delicate lotus
#

yep. I usually do that with all BI function to just learn. Though its not always good practice since some functions are... well... meh in terms of efficiency

#

Apparently just the model is used instead of the class and the position is additionally adjusted. Not sure what that has to do with being a superior simple object...

hollow thistle
#

It has minor performance advantage, but I think you can't animate it etc. 🤔

delicate lotus
#

Okay I made my vehicles a simple object but there is a problem with vehicles that have guns.
They now have the muzzle flash as if they would fire...

#

Also they got a weird symbol attached to them...

tough abyss
zinc sorrel
#

so i'm trying to work out the set velocity script for the Virtual Combat support module with a plane, currently i have it as _this setvelocity [0,0,500]; for it to spawn at a height, but i need to give it speed so it spawns with the engine on. I had it as _this setvelocity [200,0,500]; but it just seemed to flip. Any idea's?

round scroll
#

and don't forget to give it a crew 😃

shut finch
#

we really need eventhandler that runs when player is changing his view. Already got 2 quite heavy loops due to lack of it:(

cloud thunder
#

@shut finch There already is one "PlayerViewChanged"

shut finch
#

@cloud thunder
No. it's not what it sounds like.
Fired on player view change. Player view changes when player is changing body due to teamSwitch, gets in out of a vehicle or operates UAV for example.
it's the most misleading EH name, unless I don't know something.

#

In other words: does it trigger when I change view from 3rd person to 1st person? Doesn't sound like it is.

cloud thunder
#

hmm, i've only tried it on UAV.

#

what are you trying to do?

shut finch
#

what are you trying to do?
I've written a script that checks zoom when the player is using his scope and adjust shadow draw distance depending on the given zoom, so when you look into the scope you can see shadows at high distances. Unfortunately it has to be run in a loop forever, since there is no eventhandler.. also the bug with getshadowdistance command doesn't help either, it never returns value below 100.
Also I use another script that forces 1st person in specific vehicles.. and again, when player is in the vehicle it has to run in a loop (I already use getin vehicle EH at least)
I also see other great possibilities using this eventhandler, including draw distance optimization depending on the view, but again, it's not here.

cloud thunder
#

You don't need to have a loop to restrict view for some vehicles you can use handler keydown and getoutman. You may also be able to avoid aloop for gunner and draw shadows with right mouse click for holding breath or zooming while in optic with key handler as well. here is an example of a BMR Insurgency exert for limiting 3rd person view when not in vehicles. It needs to be modified for your requirements ofcourse.

    0 spawn {
        waitUntil {!isNull (findDisplay 46)};
        if (lobby_parameter_limitPOV isEqualTo 1 && {(difficultyOption "thirdPersonView") isEqualTo 1}) then {
            player switchCamera "INTERNAL";
            JIG_3rdPersonVeh = (findDisplay 46) displayAddEventHandler["KeyDown", {
                _keyOver = false;
                params['_display','_key','_shift','_ctrl','_alt'];
                if (inputAction 'personView' > 0 && {isNull objectParent player}) then {
                    player switchCamera 'INTERNAL';
                    _keyOver = true;
                };
                if (_key in [DIK_NUMPADENTER, DIK_DECIMAL, DIK_ABNT_C2] && {inputAction 'personView' isEqualTo 0} && {isNull objectParent player}) then {
                    player switchCamera 'INTERNAL';
                    _keyOver = true;
                };
                _keyOver
            }];
            player addEventHandler["GetOutMan", {if (cameraView isEqualTo "EXTERNAL") then {player switchCamera "INTERNAL"};}];
        };
    };
#

you can add this to "KeyDown" to find out the output of right click if any

[_key] spawn { hint format["%1", _this]; uiSleep 1; hint "" };
shut finch
#

I already use GetInMan to start a loop when player is inside vehicle.
Well, I still see you're using waituntil loop, but didn't know about inputAction command, that will help a little.
As for keydown, it's more complicated, but better than nothing, I'll try it, thanks,

cloud thunder
#

the waituntil just happens once momentarily at the begining of mission. Once it gets past this waituntill then loop is forever over and it should be safe to add these handlers..

shut finch
#

inputAction 'personView' shall help me get rid of loop, I didn't see that at first, thank you

cloud thunder
#

np

exotic tinsel
#

Need some advice on how to prevent player from using client side mods on our server. We have a server side only mod and no client side mods. We changed the verifySignatures to =1 but it keeps giving a message on connect
"session lost - File 'addons\air_f_rtd.pbo' not found". what am i doing wrong

still forum
#

File 'addons\air_f_rtd.pbo' not found have you checked if that file is.. there?

exotic tinsel
#

should i look on the server or the client?

still forum
#

both

exotic tinsel
#

it exists on the server but not on my client. is it like a dlc thing or something? We dont require any dlcs on the server.

still forum
#

no it's not dlc

#

verify files on your client

#

maybe it shouldn't exist on the server, if so delete there.
If the client is really missing it, add it.

#

One of them is wrong

exotic tinsel
#

im concerned that other players may run into this. the goal is only to require basic arma 3 addons and prevent client side addons.

still forum
#

If multiple players have the same issue, then the pbo on the server probably shouldn't be there

#

maybe steam forgot to delete something

exotic tinsel
#

will we have issues if we have a server side only addon with out a signature? if use verifySignatures = 1;

still forum
#

if you load it via -serverMod then it shouldn't be an issue

exotic tinsel
#

ok

still forum
#

verifySignatures = 1 doesn't exist

#

only 0 and 2 are valid

exotic tinsel
#

its saying that this is not found "missions_f_epa_data.pbo" but its on both the client and the server.

#

nvm

exotic tinsel
#

in the server browser, when i select our server it says "Time until mission ends: 15min left". how do i get rid of that? the mission is continuous.

thorn saffron
#

Is there any vanilla fired even handler that I can plug myself into or do I have to add new fired EH to do my stuff?
I want to start a script every time any player throws a smoke grenade

queen cargo
#

Could somebody please provide me with the output of theese:

systemChat format ["%"];
systemChat format ["%1"];
systemChat format ["%2", 1];
systemChat format ["%%"];
systemChat format ["%%%"];
systemChat format ["%1", true];
systemChat format ["%1", false];
systemChat format ["%1", 1];
systemChat format ["%1", []];
systemChat format ["%1", [1,2,3]];
systemChat format ["%1", [[]]];
systemChat format ["%1", "test"];
systemChat format ["%1", player];
queen cargo
#

currently at work (and no arma installed at home because i needed those 120GB for something else)

winter rose
exotic tinsel
#

@winter rose thanks. But why is it showing up at all? is there something i can do in the description or server file so i dont have to script it in?

winter rose
#

I don't know much more about this issue, I am sorry - it seems 15 minutes has always been the default value since OFP

exotic tinsel
#

what value must i assign to get it to go away? the wiki doesnt say

queen cargo
#

chances are either 0 or -1

exotic tinsel
#

estimatedTimeLeft 0; and estimatedTimeLeft -1; sets the server browser Time until mission ends: 1 min

queen cargo
#

well ... then i am not really able to help ya sadly
why not just ignore that number? not like anyone would have ever cared in the history of arma about it

exotic tinsel
#

worried players will see the server is about to restart in 15min and since it says that all the time they may not join

#

@queen cargo sure i can do that

queen cargo
#
// initserver.sqf
[] spawn
{
    while {true} do
    {
        estimatedTimeLeft 36000; // Set to max (10 hours)
        sleep 3600; // Sleep for 1 hour
    };
};
#

well ... you can always just use this workaround, unless somebody is actually capable of telling you how to disable this

exotic tinsel
#

how do you want me to capture these results? screen cap? or would you rather i write them to log file and paste here?

queen cargo
#

do not really care

#

just need the outputs so i can create test cases for sqf-vm

hollow thistle
#

replace systemChat with diag_log and send him the RPT :d

queen cargo
#

we did already

winter rose
#

by the way, there is no way to show the % character from the left format argument? you have to "trick" with format ["%1" , "%"] ?

ornate sky
#

Does anyone have some kind of script for dumping ALL arsenal class names into a variable, the clipboard or something.

#

but i can't decipher how to use it to get the names

still forum
#

uiNamespace getVariable "ace_arsenal_configItems"

compact maple
#

@queen cargo did someone gave you the output ?

ornate sky
#

I solved it by adding stuff to a box with the Ace thing and then querying ace_arsenal_virtualitems

#

with getVariable

queen cargo
#

@compact maple yes
@winter rose no, only using that Trick percentage is possible as char

ornate sky
#

@still forum Your thing works too, but returns an array of arrays

#

nwm, the other thing does too

winter rose
#

thankie! I always wondered if there was a hidden trick of some sort ^^

lavish ocean
thorn saffron
#

can you put a condition when adding an XEH in config, I want to add EH only to players, right now I'm adding it to every one, but I realize its not optimal. It looks like this right now:

#

class Extended_Fired_EventHandlers
{
    class Man
    {
        class LZ_smoke
        {
            fired="_this call LZ_smoke_fnc_markLZ;";
        };
        
    };
};```
still forum
#

you can add it in script

#

No there is no "players only" config condition

thorn saffron
#

I see the issue now. Thinking about it removing the EH could break team switch, not sure how remote control is handled

lavish ocean
ebon ridge
#

How can I put newline only in string? endl is \n\r, but I want \n only.

#

Putting \n in directly is having the effect of just printing \n in my case (using an intercept plugin)

winter rose
#

\r\n?

ebon ridge
#

?

winter rose
#

I am not sure that I got your problem

#

iii think I get it now 😄

ebon ridge
#

I am sending a string to an intercept plugin which writes it to a file, and I want to put newlines in the file. If I send the string "\n" it just prints litereally "\n" into the file.

#

If I send endl I get two newlines

winter rose
#

funny

ebon ridge
#

Dunno if this is an sqf thing or an intercept thing

winter rose
#

Intercept

ebon ridge
#

So normally \n should be newline?

winter rose
#

When used in Arma, yes
But not in a dll

ebon ridge
#

Okay thanks

#

grrrr :/

#

but "\" doesn't need escaping to "\\"?

#

lol it does in discord tho

#

there is literally a wiki page for string but it doesn't explain any of this wtf. The words escape character aren't even on there :/

#

it must need escaping to \\ or how would you write \ and then n?!

winter rose
#

Test and see (-:

ebon ridge
#

i prefer explicit documentation I dunno if my test cases are universal or not

ruby breach
#

Sounds like it an issue outside of Arma though

ebon ridge
#

my original issue is

#

right now i am just asking about escape characters IN arma though

#

at least i can exclude one variable if i can understand that

#

but i don't see any documentatio and google isn't helping

#

seems like the string "\n" is not a new line to me

#

or i guess it probably is when you pass it to certain functions or something..

ruby breach
#

I mean, I'm pretty sure that in Arma a string is just one unbroken line of continous text.

#

Pass a string containing /n to something like hint, and it'll display a line break

#

Or use parseText and then <br> works

ebon ridge
#

yeah but pass it to diag_log or whatever and you just get "\n"

ruby breach
#

Because diag_log just prints a string

ebon ridge
#

yeah that is what i mean it is interpreted by the function and itsn't actually putting control chars into the string

#

"just prints a string" isn't a definition of behaviour though

#

anyway thanks for help it is clearer to me now

ruby breach
#

Could always just ```sqf
_yarp = _stringIWantToSplit splitString "\n";
_yarp apply {diag_log _x};

ebon ridge
#

yeah in that case but i'm trying to pass string to an intercept plugin

#

i am using splitString/joinString to try and do my own char escaping though