#arma3_scripting

1 messages ยท Page 268 of 1

tough abyss
#

so basically replace player with _player?

paper rain
#

yes

#

why are we waiting?

tough abyss
#

to make sure the player is in-game and not loading in mods or something

paper rain
#

this script shouldn't run until then

tough abyss
#

okay haha

#

the if-statement, do I need to put extra brackets for the !_auth_result && (player in _reserved_units) and (player in _reserved_units_admin)&& !(_uid_admin in _reserved_uids_admin)? due to the OR

#

(!_auth_result && (player in _reserved_units)) or ((player in _reserved_units_admin)&& !(_uid_admin in _reserved_uids_admin)) Like I did here

paper rain
#

hqSideChat also needs a _player

#

AND is higher in order of operations than OR. At least in most other programming languages

#

but, more parens can't hurt

tough abyss
#

alright

#

for the servercommand, if it requires a password

#

"Password" serverCommand format ["#kick %1",name _player]; or Password serverCommand format ["#kick %1",name _player];

paper rain
#

quotes

tough abyss
#

copy that

paper rain
#

ugh, this means that your server password will be in the mission file ๐Ÿคฆ

tough abyss
#

yeah I don't really like it either...

#

is there no function to retrieve it? xD

paper rain
#

It would seem that serverCommand should run on the server without need for the password.

#

But all the docs seem to indicate that the server still needs it

tough abyss
#

well I know infistar needs it to kick people...

#

but it's working local for admins I believe

#

does playMove work on arma 3?

#

how could one make a message appear in the arma 3 server window?

#

for some reason the dancing animations are not working

#

p1 switchMove"ActsPercMstpSnonWnonDnon_DancingDuoIvan";

rancid ruin
#

rather than putting your server password in the mission file, couldn't you just load it from a file which is only on the server?

runic spoke
#

@tough abyss have you replaced p1 with player?

tough abyss
#

@paper rain unfortunately doesn't work. Spawning in without Authentication assigned

#

I tried both on a unit named p1 and on my self

paper rain
#

We're not using Authenticated anymore?

#

Hmmm @tough abyss I cannot find that animation in the animations browser

runic spoke
#

iirc that's a arma 2 animation?

tough abyss
#

I couldn't either but I saw videos with the dancing concept in arma 3

runic spoke
#

it uses that mod ^

tough abyss
#

lol right in was in the description ><

runic spoke
#

yep

tough abyss
#

pft silly me

#

params ["_player", "_didJIP"];

auth_check = {
_infoArray = squadParams _player;    
    _infoSquad = _infoArray select 0;
    _squad = _infoSquad select 1;
    _infoName = _infoArray select 1;
    _name = _infoName select 1; 
    _email = _infoSquad select 2;

    //--------------------- Reserved Slots
    
    private _authenticated = false;
    if (_email == "XXXXXXXX") then {
        _authenticated = true;
    };
    _authenticated
};

private ["_reserved_units_admin", "_reserved_uids_admin", "_uid_admin"];
private _auth_result = [] call auth_check;

_uid_admin = getPlayerUID _player;

_reserved_uids_admin = ["XXXXXXXX"/* TheNightstalk3r */];

// Variable Name of the Player Character to be restricted. //
_reserved_units = [s22,s40,s44,s42,s41,s46,s43,s45,s47,s32,s34,s38,s39,s35,s37,s36,s33,s3,s4,s2,s5,s6];
_reserved_units_admin = [s1];


if ((!_auth_result && (player in _reserved_units)) or ((player in _reserved_units_admin)&& !(_uid_admin in _reserved_uids_admin))) then {
        hqSideChat = format ["Player '%1' tried using a locked slot! He will be kicked off this server.", name _player];
        [hqSideChat] remoteExec ["AW_fnc_globalSideChat",0,false];
    serverCommand format ["#kick %1",name _player];
    } else {
    if(_auth_result) then {
        _GlobalHint = format["<t align='center' size='2.2' color='#FF0000'>%1<br/></t><t size='1.4' color='#33CCFF'>%2</t><br/>has joined the server. To get involved, visit TS.JSFAR.COM</t><br/>",_squad,_name];
        [_GlobalHint] remoteExec ["AW_fnc_globalHint",0,false];
        };
    };```
#

@paper rain

paper rain
#

@tough abyss Personally, I'd recommend Acts_EpicSplit

tough abyss
#

oh woops

runic spoke
#

@tough abyss couldn't you just _globalMessage remoteExecCall ["hint", 0];

tough abyss
#

what do you mean?

runic spoke
#

What is your globalHint doing? just litreally what it says?

tough abyss
#

yea

runic spoke
#

you should just be able to remoteExec the hint command

tough abyss
#

but I doubt that keeps the script from running

runic spoke
#

oh it's not running sec.

#

reserved units are objects yes?

tough abyss
#

yeah

#

it's simply not assigning authenticated

paper rain
#

named in the editor, i assume

tough abyss
#

yeah

#

oh wait a sec..

runic spoke
#

does it global-side chat?

paper rain
#

Can you paste the exact error?

#

line numbaer and all?

tough abyss
#

can I make an authenticated that is local too?

#

there's no error

#

there's lack of kick ๐Ÿ˜›

runic spoke
#

serverCommand format ["#kick %1",name _player];

#

"password" serverCommand format ["#kick %1",name _player];

paper rain
#

ius there anything in the RPT?

tough abyss
#

nah I didn't get any notification from another script cause that's based on a global Authenticated xD

paper rain
#

oh

tough abyss
#

lemme check that first

paper rain
#

that's why it was global

tough abyss
#

it's fine. Just added the same check in local

runic spoke
#

try adding the serverCommandPassword before serverCommand

tough abyss
#

just 2 lines

#

no big deal

paper rain
#

well, after the auth_check = {} close-bracket, _authenticated will be gone, which is why we're returning it and storing it seperately

runic spoke
tough abyss
#

that'll work?

runic spoke
#

haven't tried it.

tough abyss
#

looks cleaner than my version

runic spoke
#

๐Ÿ˜›

tough abyss
#

but it seems servercommand does need the password ๐Ÿ˜ฆ

#

cause I get the sideChat that I am in a forbidden slot but it doesn't kick me

runic spoke
#

You also might want to put a if (_infoArray isEqualTo []) exitWith { false }; in your auth_check so it does not get zero devisor.

tough abyss
#

with password I was just kicked

runic spoke
#

๐Ÿ˜ƒ

tough abyss
#

but that means that the password in available in the mission file itself...

runic spoke
#

create a server-side PBO

rancid ruin
#

you could just use a file i think

#

and load it's contents from sqf

tough abyss
#

how?

rancid ruin
#

loadFile or something, can't remember the name

#

for files, images etc, the game looks first in your mission directory, then elsewhere for the file

#

addons folder and main game folder are checked i think

runic spoke
#

loadFile is preprocesFileLineNumbers

#

well, close

#

[] call compileFinal preprocessFileLineNumbers "some\random\code.sqf";

tough abyss
#

but that's still in the missionfile itself isn't it?

runic spoke
#

"SM_Server\random\code.sqf"; SM_Server is a server-side pbo with the prefix SM_Server.

#

compileFinal expects a string, and putting a "" in a string will break up the string the only way to do that is to double quote something you want to put in that string, or use ' '

#

""xxxx""

noble juniper
#

' excape taht rule

tough abyss
#

I tried to get the dancing animation from the mod but it doesn't.
All I get is the weapon pulling out animation. Other animations like "HubBriefing_think" works fine.

noble juniper
#

' bla ' still counts as a string

runic spoke
#

" or use ' ' "

tough abyss
#

okay, I'll not change it then

runic spoke
#

using 'xxx' does not break up the string using ""

noble juniper
#

yes use ' to make a string in a string

runic spoke
#

"xxx" does not break up a string using ' '

tough abyss
#

if you use " " as string marking and inside the marking you use the " mark again it will break the string so you have to you ' inside it

#

or the opposite use ' and inside it use "

tough abyss
#

so I have now a folder @160th/addons/SM_160th.pbo -> SM_160th/Prefix.txt, $Prefix$ and commandpass.sqf

#

that about right?

runic spoke
#

SM_ is my prefix for StokesMagee ๐Ÿ˜›

tough abyss
#

oh... xD

#

now I get the SM_zombz xD

runic spoke
#

yep

#

and prefix.txt is all you need

tough abyss
#

not the sqf?

runic spoke
#

of course that is a must ๐Ÿ˜›

tough abyss
#

hahaha

#

need a bisign?

runic spoke
#

not for server-sided pbo's

#

only mods.

tough abyss
#

copy

runic spoke
#

-servermod=@160th

tough abyss
#

now how do I call the _commandpass = "xxxx"; from the commandpass.sqf?

runic spoke
#

"xxx" serverCommand format ["#kick %1",name _player];

tough abyss
#

I don't fully understand..

runic spoke
#

i'm still confused on how to do a code block like that on discord, teach meh.

tough abyss
#

`

#

but then 3x

runic spoke
#

"serverCommandPassword here" serverCommand format ["#kick %1",name _player];

tough abyss
#

and on the end xD

runic spoke
#

lol

tough abyss
#

both start and end I meant haha

#

there you go

runic spoke
#

yay!

tough abyss
#

but how do I extract the _commandpass from the mod?

runic spoke
#

the serverCommandPassword is defined in the server.cfg

tough abyss
#

yeah I know ๐Ÿ˜›

runic spoke
#

take that password and put it "here" serverCommand format ["#kick %1",name _player];

tough abyss
#

but for security reasons it's not in the ArmA 3 installation

noble juniper
#

best way ist through macros

tough abyss
#

yeah but I don't want it INSIDE the mission pbo

#

as everyone that opens it knows the servercommandpassword

runic spoke
#

inside the 160th.pbo

#

add a file called dodacode.sqf

tough abyss
#

have it, called commandpass.sqf

runic spoke
#

alright

tough abyss
#

then inside it's only _commandpass = "serverpassword";

runic spoke
#

pack the pbo, enable it as a server-mod and in initPlayerServer do _this call compile preprocessfilelinenumbers "160th\commandpass.sqf";

tough abyss
#

okay then _commandpass serverCommand format ["#kick %1",name _player];?

runic spoke
#

yes

tough abyss
#

cool

#

gonna try it out

#

02:08 *shite I have to get up at 06:00 >.<*

noble juniper
#

xD

#

i know that problem

tough abyss
#

unit leader and mission developer takes dedication ๐Ÿ˜›

runic spoke
#

heh

tough abyss
#

??

tough abyss
#

I got the animations working for AI with adding disableAI "ANIM" to the init of the unit but I can't get it working for players

#

is there something similar for players?

#

@runic spoke ```2:38:55 Error in expression <
_email = _infoSquad select 2;

//--------------------- Reserved Slots

2:38:55 Error position: <//--------------------- Reserved Slots

2:38:55 Error Invalid number in expression
2:38:55 Error in expression <
_email = _infoSquad select 2;

//--------------------- Reserved Slots

2:38:55 Error position: <//--------------------- Reserved Slots

2:38:55 Error Invalid number in expression
2:38:55 Error in expression <PlayerUID _player;

_reserved_units = [s22,s40,s44,s42,s41,s46,s43,s45,s47,s32,>
2:38:55 Error position: <s22,s40,s44,s42,s41,s46,s43,s45,s47,s32,>
2:38:55 Error Undefined variable in expression: s22
2:38:55 File mpmissions__cur_mp.Altis\initPlayerServer.sqf, line 29```

runic spoke
#

remove the reserved slot comment.

#

and your global variable s22 is not defined.

#

i would imagine it's the same for all the others, and my question is, why are you doing this? why not just put a password on the server.. lol

tough abyss
#

because I have two fireteams called Raptor and Sandstorm that are reserved for the members of the fireteam in the 160th

#

for the rest it's public

#

s22 is undefined because there is no player in it

runic spoke
#

s22 = objNull;

#

initilize it like that ๐Ÿ˜›

#

and then it will get defined when a player get's there

tough abyss
#

well I get the error often but it never stopped a script from running

runic spoke
#

no errors are better than errors ๐Ÿ˜›

tough abyss
#

true xD

#

but now just trying get kicked off

#

nohing in the RPT

runic spoke
#

start diag_logging stuff.

#

diag_log "i'm here";

#

diag_log "i'm this far";

#

or you can diag_log varibles

#

add some debugg ๐Ÿ˜ƒ

#

i'm going to sleep ttyl

tough abyss
#
params [["_player",objNull],"_reserved_units_admin", "_reserved_uids_admin", "_uid_admin", "_auth_result"];

auth_check = compileFinal
"
    _infoArray = squadParams _this; 
    if (_infoArray isEqualTo []) exitWith { false };    
    _infoSquad = _infoArray select 0;
    _squad = _infoSquad select 1;
    _infoName = _infoArray select 1;
    _name = _infoName select 1; 
    _email = _infoSquad select 2;
    
    private _authenticated = false;
    if (_email isEqualTo 'XXXXXXXXXX') then 
    {
        _authenticated = true;
    };
    _authenticated
";

_auth_result = _player call auth_check;

_uid_admin = getPlayerUID _player;

// Variable Name of the Player Character to be restricted. //
_reserved_units = [s22,s40,s44,s42,s41,s46,s43,s45,s47,s32,s34,s38,s39,s35,s37,s36,s33,s3,s4,s2,s5,s6];
_reserved_units_admin = [s1];


if (!_auth_result && (player in _reserved_units)) then 
{
    hqSideChat = format ["Player '%1' tried using a locked slot! He will be kicked off this server.", name _player];
    [hqSideChat] remoteExec ["AW_fnc_globalSideChat", 0, false];
    "Caelum" serverCommand format ["#kick %1",name _player];
} 
else 
{
    if(_auth_result) then 
    {
        _GlobalHint = format["<t align='center' size='2.2' color='#FF0000'>%1<br/></t><t size='1.4' color='#33CCFF'>%2</t><br/>has joined the server. To get involved, visit TS.JSFAR.COM</t><br/>",_squad,_name];
        [_GlobalHint] remoteExec ["AW_fnc_globalHint", 0, false];
    };
};``` Doing something wrong?
#

goodnight!

runic spoke
#
{ ```
noble juniper
#

no syntax errors that the Intell J lexer can detect

runic spoke
#

you have player, it should be _player ๐Ÿ˜›

tough abyss
#

... I feel so stupid right now

#

last test, then I'm gonna call it a day

#

well.. more like 2 hours of sleep

noble juniper
#

good luck

tough abyss
#

so f*ck that

#

where's my coffee

noble juniper
#

where is your coffe

tough abyss
#

right here next to me now

#

03:19 now

#

one working version now with password inside the script

#

thank God finally... doing the servermod option tomorrow. Thanks guys @noble juniper and @runic spoke !!

#

and of course @paper rain ๐Ÿ˜‰

noble juniper
#

question

#

is the script in the mission ?

tough abyss
#

The script is currently in the mission, although I could of course add it to the @160th mod

noble juniper
#

because you obviously don't want the password in plaintext somewhere in your mission.

tough abyss
#

Moving essential scripts to a serverside mod

noble juniper
#

im just repeting this, that you don't forget that

tough abyss
#

It's my next step, no worries

#

Gonna sleep for two and a half hours now :p

#

It really should save the admins on the server time to sort these people out

tough abyss
#

I got the animations working for AI with adding disableAI "ANIM" to the init of the unit but I can't get it working for players
is there something similar for players?

dim owl
#

hey any ideas how i can pushback a varialb for all clients and JIP ? i tried it with remoteExec and target -2 but if i rejoin the variable was any :/

runic spoke
#

-2 is server only -1 is all but server.

dim owl
#

oh... okay try it

#

but my command is right or is there an error ?

[name player, position player] remoteExec ["pushback", -1];
runic spoke
#

what are you even using pushback for?

dim owl
#

i want to pushback the dispatches for the police (roleplay)

#
dispatches = [];
dispatches pushback [name player, position player];
runic spoke
#

I'm till trying to rap my head around what you're going to use that for lol

dim owl
#

i want a dialog where all dispatches are listed and i need to fill it with the global var dispatches

#

i tried publicvariable but thats not working right for me

runic spoke
#

on the server just publicVariable "dispatches"; and clients can access the variable dispatches.

dim owl
#

okay

#

so i need it happend on the server ?

runic spoke
#

you're able to do it on clients, but it's not very sercuirty friendly.

#

you can also do missionNamespace setVariable ["dispatches", dispatches, true]; and to get it just do, _dispatches = missionNamespace getVariable ["dispatches", []];

dim owl
#

okay try it

dim owl
#

@runic spoke Now it works but if i rejoin the variable is []; because i defined it in the init of the server so it will reset it every time i rejoin. any ideas where i can define it in the server ?

runic spoke
#

publicVariables, and missionNamespace variables shoud be persistant, if the mission is persistant.

dim owl
#

so the server loads just one time the server mod ? because i think he is loading the server mod every time i join the server. and yes the mission is persistent

#

in my serverside addon i have

dispatches = [];
publicVariable "dispatches";
runic spoke
#

then it will be []; until you pushback new data and publicVariable it.

dim owl
#

thats in my server init so the server can fill it

tough abyss
#

@runic spoke Would it be possible to move files like init.sqf, initplayerlocal.sqf, initplayerserver.sqf and initserver.sqf to @160th mod?

#

I think Domination has something similar

#

Where the files required to run the mission are contained in a serverside mod?

tough abyss
#

does _auth_result = _player call auth_check; work if auth_check is in the script contained by the mod?

#

ah seems I can't put the servercommandpassword in a mod and then compile the lines. The servercommand simply will not do anything whatsoever

#

I use in the pbo script _serverCommand = "Password"; and in playerinitserver _serverCommand serverCommand format ["#kick %1",name _player];. Does nothing whatsoever

little eagle
tough abyss
#

The whole problem described above was solved by making _serverCommand -> serverCommand

tough abyss
#

Situation: one client create a simple object in [0,0,0] and then move it to another position. It's expected to the simple object only move on the client it was created because it have simulation off, but it move on all clients. Not obstant, if i continue moving it with setPos, it will move only on the client that created it.

tough abyss
#

@little eagle UI EH worked perfectly. I will also use then to cancel open/close doors on protected houses. And this will work in ANY map!

#

My actual implementation of protected doors only works on vanilla maps.

little eagle
#

yeah. the A2 ports don't support that door lock variable method

tough abyss
#

@little eagle don't you know about my above question about simple objects? ๐Ÿ˜„

#

(sorry for my english)

#

Seens the first few setPos on simple objects are transmited though the network but subsequents setPos dont.

runic spoke
#

@little eagle i don't use CBA for anything, so wouldn't know. and i was thinking of allowedTargets = ;;

proven crystal
#

i guess it is not beautiful, but: I have a unit in the editor, that has a name that is combined of the the word "bla" and a UID. in a script i am finding a UID and need to check whether this is the correct unit. so could i combine that UID and the word "bla" in a script (which would be a string) and check whether its the required unit by call compile (format ["bla%1", _uid]) == _unit

#

i think in some other script i generate a bit of code and thereby also name a variable in a similar way

#

yeah here i did that something like that.

_string = format ["%1markers = _arrays;",_uniquename];
_code = compile _string;
call _code; ```
indigo snow
#

if (_uid in str(_unit))

runic spoke
#

^^

proven crystal
#

of course that might also be a way :D

indigo snow
#

oh wait in doesnt support strings in arma

proven crystal
#

no but there i also have something for

runic spoke
#

use find ๐Ÿ˜›

proven crystal
#

it returns a number though

indigo snow
#

if ((str _unit) find _uid >= 0 (fixed)

proven crystal
#

exactly find

indigo snow
#

never ever use call compile in arma

#

theres always a better way

proven crystal
#

yea its an old script ^^

runic spoke
#

if ((_uid find (str _unit)) >= 0)

proven crystal
#

just wanted to get this dobe quickly but find is good. no idea why i didnt look up in the string operators

indigo snow
#

i managed to switch _uid and str(_unit), watch out for that too

runic spoke
#

The arma update has broken so much..... player spawned in-game. If you die, onPlayerKilled does not fire. Click respawn, you get booted for no UID. You re-join and select a spawn, you get stuck in debug and server side logs that there is no PUID. onHandleDisconnect doesn't fire at all. was something changed that i didn't know about? lol

little eagle
#

never ever use call compile in arma
O.K.

halcyon crypt
#

@runic spoke they did touch that area: "Fixed: The "onPlayerKilled.sqf" and the "Killed" Event Handlers were not fired when players would bleed out in Revive"

runic spoke
#

@halcyon crypt and handleDisconnect is completly broken. ๐Ÿ˜›

little eagle
#

In the RC I couldn't use my LMB to fire or to use the action menu.

#

We'll see....

warped thicket
#

all those EHs seem to work fine here

tough abyss
#

@little eagle why "O.K." about "never ever use call compile in arma"?

vague hull
#

unless you are very sure about what you are doing

little eagle
#

You shouldn't use it for that example

#

But it's used thousands of times in ACE. Every function has to be precompiled

vague hull
#

Just ask yourself: Is there a way to manipulate that String from the outside to get malicious code executed

#

if the answer is no, then its fine

#

if you use it with profile names i.e. a user could name himself "execVM 'test.sqf'; bla" or something and bam you are done

tough abyss
#

@vague hull i use "call compile preProcessFileLineNumbers '[file path]';" but i don't use "_maFunc = compile preProcessFileLineNumbers '[file path]';"

#

Edited 10 times! Ouch ma brain!

vague hull
#

as long as the filepath is static this is safe to the point where you can secure it

little eagle
#

execVM 'test.sqf'

#

this is my new nickname

#

apparently I need a new profile anyway after this update

#

player names are a bitch anyway with ui. you have to sanitize "<>" and all other html tags if you want to convert it to structured text for something

vague hull
#

just kick them asap when they use them

#

that simple

tough abyss
#

Why can i use setPos in a simple object and it change position on all clients?

vague hull
#

there is no point in having special characters in your name

#

simpleobject still broadcast positionchanges afaik

little eagle
#

some people use <> for clan tags

vague hull
#

why would you even want to change the position of a global object locally

little eagle
#

we have a function in ACE to sanitize those names

vague hull
#

clan tags == units

little eagle
#

Not everyone uses that thing

vague hull
#

its all covered

little eagle
#

Also it was made before that was made

vague hull
#

if they done want to use that, they may as well dont need to play on your server

#

its not 2008 COD MW2 anymore

little eagle
#

they may as well dont need to play on your server

#

I think you're misunderstanding. It's not a server. It's a mod on many servers

tough abyss
#

@vague hull simple objects have simulation off, but you can set pos on it, with simulation on, for some time after it creation. This is causing problem.

vague hull
#

yeah, but not allowing special chars can be done by your serversettings

#

i.e. battleye, rcon, onplayerconnected or whatnot

little eagle
#

that is no option for me

vague hull
#

so setpos activates the simulation/uses it

tough abyss
#

it active the simulation only if you use it imediatly after the creation

vague hull
#

well you always have the option of not using the name command and instead just creating a name variable which fits your needs on player object creation

#

does that apply for setPosASL too?

tough abyss
#

i'm not sure what i need to do to force simulation off

#

i'm using setPosWorld

vague hull
#

Samatra ones told me that setPos does alot of manipulating, maybe that causes it

#

try it with setPosASL maybe that helps

timid niche
#

Hello there friends! ๐Ÿ˜„

#

Anyone that knows shit about sqf?

vague hull
#

you could also try spawning a sleep of a second and setPos again after that sleep

little eagle
#

Anyone that knows shit about sqf?

vague hull
#

noone

timid niche
#

lmao

little eagle
#

SQF , who?

vague hull
#

not even BI

timid niche
#

Great banter

vague hull
#

what do you want to know

timid niche
#

Well

#

Getting one great error

meager granite
#

Tweaked: The InventoryOpened Event Handler now provides more Intel on what containers were opened

#

Finally, after two years!

buoyant heath
#

Yiiis, now I can finish my inventory actions code

little eagle
#

by container they mean rucksack/uniform/vest?

#

If you get an error, you should fix it

buoyant heath
#

It returns the ground container and the secondary container now

little eagle
#

I thought it always did that and what is a secondary container?

meager granite
#

It was returning only single container since introduction of the command

vague hull
#

if you select the inventory of a box a groundcontainer is provided too

#

which is the ground tab so to speak

#

if you however select a weaponholder it could happen that a nearby box is selected as the Crate tab

little eagle
#

My only problem was that the player was reported sometimes and not the uniform/vest/backpack

vague hull
#

thats the single big issue with it

little eagle
#

so this issue persists?

vague hull
#

should be fixed with that

#

since you can only open 2 containers with that system

little eagle
#

I wonder what it reports if you take attachments from weapons on the ground

vague hull
#

nothing

#

weapon != weaponholder

little eagle
#

well you still take something

vague hull
#

yeah you take it from the initial weaponholder

buoyant heath
#

It only returns what's opened when you open the inventory. AFAIK, whatever you open from inside the inventory (eg: backpack on ground) isn't reported. Maybe by "Take"?

vague hull
#

the only thing you can select is the top most parent

timid niche
#

Can anyone help me out?

#

I am getting an error saying: The server-side extension extdb was not loaded into the engine

noble juniper
#

Altis life ?

timid niche
#

Well

#

Lakeside

#

Anyone?

noble juniper
#

well

#

0815

#

Look for the same problem related to Altis life or Exile

#

shit ton of stuff out there.

little eagle
#

1.66 change:

// fn_selectRespawnTemplate.sqf
- if (_isDeath && alive player) then {
+ if (_isDeath && {alive player} && {!unitIsUAV cameraOn}) then {
#

behind that if is:

    if !(_respawnOnStart > 0) then {
        _isDeath = false;
    };
#

later in the function:

_scriptName = if (_isDeath) then {"onPlayerKilled"} else {"onPlayerRespawn"};
#

I think this broke onPlayerKilled.sqf

noble juniper
#

can't tell / confirm, but thx for showing me that i need to put a hole server into git.

little eagle
#

Exile tweeted about this problem and this is the only diff in the game side files

#

dunno why, but maybe they have a spectator script that is considered a UAV by the new command

#

or the new command is b0rked

meager granite
#

Why would anyone want to use these scripts anyway?

tough abyss
#

The missing image error when loading the mission was fixed?

#

On dedicated servers.

zealous solstice
#

@little eagle we found a other problem in the direction with select player and the respawn system

little eagle
#

yeah. I might know why this is

#

the respawn thing depends on a respawn event handler that is added to the player

zealous solstice
#

it worked befor this update today

little eagle
#

ok, it's not what I was thinking of

#

but check out this shitcode:


    //for reseting all PP when player respawned in MP
    BIS_respawned = false;
    if (isNil {player getVariable "BIS_fnc_feedback_respawnedHandler"}) then {
        player setVariable ["BIS_fnc_feedback_respawnedHandler", true];
        player addEventHandler ["respawn", "BIS_respawned = true"];
    };
    //player addEventHandler ["respawn", "debugLog 'FSMPP-EventHandlerTriggered' "];  //TEST if event handler is destroyed when player dies

    //for reseting all PP when Team switch is done (player switched to another unit)
    BIS_teamSwitched = false;
    onTeamSwitch "BIS_teamSwitched = true";
    BIS_teamSwitched = false;  //to avoid team switch that occurs when player is created
#

fn_feedbackInit.sqf

#

this doesn't work either with team switch

#

/ selectPlayer

#

can't stack those onTeamSwitch. also race conditions due to the loop running scheduled

#

maybe it's related. dunno what else they use BIS_respawned for. variable name sounds pretty generic and could cover your problem too

kindred kayak
#

Right now I'm seeing bodies stick around and still alive, even when a player DCs.

noble juniper
#

time to @..... a BI Minion or Dwarden

kindred kayak
#

I'm basically seeing disabledAI not work.

runic spoke
#

How would i go about doing a initEventHandler on a Agent, that executes globaly when it spawns without having to do a network message? because the

    {
        class Ryanzombies
        {
            init = "if (hasInterface) then {(_this select 0) call SM_SetZombieVariables };";
        };
    }; ``` only fires on the controller that spawnd it (in my case the server). and i want it to fire on all clinets.
kindred kayak
#

Anyone else not seeing HandleDisconnect fired correctly on the server?

runic spoke
#

@kindred kayak it's broke.

kindred kayak
#

How broke? ๐Ÿ˜ƒ

runic spoke
#

does not fire at all broke.

#

same with onPlayerKilled

kindred kayak
#

Ah, so that's why I have AI bodies littering my lobby.

runic spoke
#

yes

#

sure

kindred kayak
#

Didn't see mention of HandleDisconnect in that one, but assume it's related.

#

(the tracker issue of onPlayerKilled)

open vigil
#

@noble juniper No, we don't @ D or minions, we file a ticket on the Feedback Tracker.

weak tiger
#

setTimeMultiplier 4;

#

this will make footsteps go 4 x as fast in 1.66

#

๐Ÿ‘Œ

weak tiger
#

well it might not be timemultiplier but I sound like im sprinting everywhere

#

im running mods so better unload them first

nocturne iron
#

Having some trouble with setting a variable to false

weak tiger
#

yep seems to be enhanced movement ignore me

nocturne iron
#

Calling it via [var1,var2] execVM "Script.sqf";
Where script.sqf is
_locvar1 = _this select 0;
_locvar2 = _this select 1;

_locvar1 = true;
_locvar2 = false;

tough abyss
#

@lavish ocean much appreciation. Loving the new scripting commmands

#

diag_codePerformance!

nocturne iron
#

Where the intention is to make var1 true and var2 false

tough abyss
#

My christmas is complete ๐Ÿ˜„

nocturne iron
#

Any help anyone? I think I'm missing something obvious

#

and no, I can't just use var1,var2 in the script because there's like 300 different vars it needs to be called on

tough abyss
#

Are they sequential variables?

#

numbered from 0 to some value?

#

I'd advise against this but you could use a for-loop and compiled string values

nocturne iron
#

No strings like v_i_Town1

tough abyss
#

if the numbers are sequential.

#

Loop it then.

nocturne iron
#

That's not the problem

#

They're being called to switch a capture point, and I'm using the same script to handle every point

#

of which there is like 200

#

sorry for the confusion

#

I need the script to be able to fetch the global variable inputted and set it to true/false

tough abyss
#

Got some code I can look at to better understand this?

nocturne iron
#

Sure

#

//This is to be activated when BLUFOR captures an INDUSTRIAL area
//
//Example: _handle = ["l_i_VyborDepot",2,"Vybor Depot",cB_i_VyborDepot,cO_i_VyborDepot] execVM "b_cap_industry.sqf";

_mkr = _this select 0;
_avalue = _this select 1;
_aname = _this select 2;
_truecon = _this select 3;
_falsecon = _this select 4;

//Reward BLUFOR and change marker status
_mkr setMarkerColor "ColorBLUFOR";
_reward = (_avalue * 100);
vblue_i = vblue_i + _avalue;
vblue_money = vblue_money + _reward;

//Message for BLUFOR (Executed only on West clients)
strb_1 = "<t font='Zeppelin33'>";
strb_2 = _aname;
strb_3 = "</t>";
strb_4 = " has been captured!";
strb_5 = "<br />";
strb_6 = "<t color='#33FF33'>";
strb_7 = str _reward;
strb_8 = "</t>";
strb_9 = " has been added to the treasury";

_handle = {hint parseText (strb_1 + strb_2 + strb_3 + strb_4 + strb_5 + strb_6 + strb_7 + strb_8 + strb_9);} remoteExec ["bis_fnc_call", west];

//Message for OPFOR (Executed only on East clients)
stro_1 = "<t font='Zeppelin33'>";
stro_2 = _aname;
stro_3 = "</t>";
stro_4 = " has been lost!";

_handle = {hint parseText (stro_1 + stro_2 + stro_3 + stro_4);} remoteExec ["bis_fnc_call", east];

//Exiting script and enabling OPFOR capture trigger
_this select 3 = true;
_this select 4 = false;

#

I tried _truecon = true; _falsecon = false; previously

tough abyss
#

Okay so you are clearly making somekind of hinting data messager.

#

Thats a lot of variables...

#

Couldn't you do that a better way?

nocturne iron
#

Yeah, I'm just prototyping

#

It's just announcing an area has been captured

tough abyss
#

This

#

strb_1 = "<t font='Zeppelin33'>"; strb_2 = _aname; strb_3 = "</t>"; strb_4 = " has been captured!"; strb_5 = "<br />"; strb_6 = "<t color='#33FF33'>"; strb_7 = str _reward; strb_8 = "</t>"; strb_9 = " has been added to the treasury";

#

Considered sticking all the data in an array?

nocturne iron
#

the bit in question is changing the state of the global variables cB_i_VyborDepot and cO_i_VyborDepot

#

Yeah

tough abyss
#

Changing state of global variables?

#

Global or Public?

nocturne iron
#

Just getting it to work rn, I've got a shitload of scripts to plough through so I'm leaving optimisation to later

#

Globals

#

Only needs to be server exec'd

tough abyss
#

any reason you are using bis_fnc_call

#

vs straight command call?

nocturne iron
#

Using a straight command call didn't let me compound use hint and parseText

#

tried converting the parseText section to a string and then hinting that but it wasn't working

#

Call is fine anyways, as it's a client execution and the hint isn't time-critical

tough abyss
#

Okay what doesn't it do?

nocturne iron
#

Doesn't change the boolean state of the last two arguments

#

cB_i_VyborDepot and cO_i_VyborDepot

tough abyss
#

Might be because you didin't assign your parameters to anything...

nocturne iron
#

They are

tough abyss
#
//Exiting script and enabling OPFOR capture trigger 
_this select 3 = true; <--- ?
_this select 4 = false; <--- ?
nocturne iron
#

Yeah I posted a correction

#

_truecon = true;
_falsecon = false;

#

where truecon is cB_i_VyborDepot and falsecon is cO_i_VyborDepot

tough abyss
#

You do know that local variables are local to their scope?

nocturne iron
#

Yeah

tough abyss
#

when you declare locals they can't be accessed outside of the function

#

unless the function performs a return

nocturne iron
#

I'm not sure how to express the desired globals as a dynamic variable

#

if that makes any sense

tough abyss
#

Not really because to me a global variable is

#

just this.

#

MyGlobal = false;

#

Variables global / missionNameSpace

nocturne iron
#

Yeah

#

I'll try drawing something ๐Ÿ˜›

tough abyss
#

Have you tried adding diag_log format ["%1",somevar]; ?

#

To see whats going on?

nocturne iron
#

Not sure what that is

#

Oh, I've checked if the variable has changed after the script fires

tough abyss
#

diag_log format ["%1",somevar]; logs a value to the arma 3 .rpt file

nocturne iron
#

Ah

tough abyss
#

I am wondering how you expect these values ```
_truecon = true;
_falsecon = false;

#

to change when they are local.

#

Not global.

#

When this script finishes running

nocturne iron
#

I didn't :p I'm not sure how to do it

tough abyss
#

The variables are destroyed.

#

They are local to this script

#

Just use truecon = true;

#

and falsecon = false;

#

They need to be global vars if you are going to manipulate them outside a script

#

Otherwise locally defined variables just get destroyed.

#

They effectively won't exist after you run the script and it finishes

#

And this can help you immensely

nocturne iron
#

I know

#

I'm trying to figure out how to explain it :p drawing a flowchart rn

tough abyss
#

:/ First rule of programming

#

Number 1 rule.

#

Understand the problem.

nocturne iron
#

Yeah

tough abyss
#

Wait.

tough abyss
#

do this at the top of your script.

#
private ["_truecon","_falsecon"];
nocturne iron
#

Okay'

#

for the second operand in the flowchart change it to 'dynamic variable = false'

#

Having a real brain fart today

tough abyss
#

Me personally, I feel you don't completely understand the problem yet.

#

You want to dynamically create variables from some piece of code?

nocturne iron
#

Okay

tough abyss
#

What do you want to assign those variables?

nocturne iron
#

No no no

tough abyss
#

Because this is how I'd do it.

nocturne iron
#

The dynamic variable is what's being set to false

#

and I want that operand to effect the global it's bound to

tough abyss
#

So you want to feed a variable into your script that has a value, then globally change it when the script is done?

nocturne iron
#

YEah

#

Sorry for the confusion

tough abyss
#

Actually pretty simple.

dusk sage
#

@tough abyss diag_codePerformance has been here awhile before 1.66 ๐Ÿ˜›

tough abyss
#

Yeah but it didn't work in MP

#

Now it DOES!

dusk sage
#

๐Ÿ˜‰

tough abyss
#

How many dynamic variables are you needing Madopow2110 ?

nocturne iron
#

Around 200

#

It's got to be enough for 3x every settlement in Chernarus

#

Incl subdivisions of cities, petrol stations that sort of thing

tough abyss
#
for "_i" from 0 to 200 do {
    MissionNameSpace setVariable [compile format ["dynamicVar%1 = %2,_i,_value]; 
};
#

I don't know if it would work.

nocturne iron
#

Gotta do lookup of it though

#

I've manually set all of the variables

#

I just need to look them up and change them without having 200 if statements in every script

tough abyss
#

Oh well that makes it fairly easy.

#

200 IF statements

#

Grosss....

nocturne iron
#

Exactly

tough abyss
#

Well if you use my method

#

You can create an array

#

within an array

#

And assign all the array true / false values

#

at once.

nocturne iron
#

Ah

tough abyss
#

And just run a check every so often when you activate a zone.

nocturne iron
#

I was thinking I could maybe check truecon against an array

#

get the entry in the array that matches

#

and set it to true/false

tough abyss
#

@dusk sage We got bitwise functions ๐Ÿ˜„

#

@nocturne iron This reminds me so much of bitflags

#

the guys here were discussing

nocturne iron
#

Nice

#

Found a janky workaround it's alright

#

It's not inefficient, just a pain in the ass

tough abyss
#

Whats the work around?

nocturne iron
#

The script is called via trigger

#

manually going in and setting a var=true,var2=false on deactivation

tough abyss
#

Set an eval timer

nocturne iron
#

I've got like 300+ triggers so it'sa dick but yeah

tough abyss
#

Triggers will try to evalulate more than every frame

nocturne iron
#

Okay

tough abyss
#

Will tank your FPS pretty bad.

nocturne iron
#

How do I do that?

#

Yeah

tough abyss
#

Timeout and Countdown settings

#

Your want of setting a value outside a script

nocturne iron
#

Oh already got that

tough abyss
#

when a value is set inside presents 2 problems.

nocturne iron
#

set on 2 mins

#

For timeout that is :p

tough abyss
#

One problem is, keeping track of the Global variables

#

When a single global variable is assigned being global defined

#

If you don't have another unique variable

#

you will over-write the previous

#

Thats why
compile format ["dynamicVar%1 = %2];

#

That is used

nocturne iron
#

yeah

#

I'm using manually set globals checked against a spreadsheet so it's all good

tough abyss
#

It creates a globally defined value with an incrementing value

#

This ensures you've got all 200 unique global vars

nocturne iron
#

Thanks!
I've been wondering how to do that

#

I'll need it later

tough abyss
#

Some advice.

#

compileFinal it.

#

Especially if you are using this for MP

nocturne iron
#

Planning to dynamically apply that to all the houses on the map

tough abyss
#

And this.

#
_handle = {hint parseText (strb_1 + strb_2 + strb_3 + strb_4 + strb_5 + strb_6 + strb_7 + strb_8 + strb_9);}
#

Bad practice very slow.

#

Better option.

nocturne iron
#

?

#

How do I remoteExec that?

#

oh I get it dw

tough abyss
#
_handle = {hint parseText format ["%1 %2 %3 %4 %5 %6 %7 %8 %9,strb_1,strb_2,strb_3,strb_4,strb_5,strb_6,strb_7,strb_8,strb_9];}
#

format is several orders faster than operator based concatonation.

nocturne iron
#

Thanks

#

I've never really dabbled in formatted text

#

Too lazy to bother doing it for mission's I'll never release

tough abyss
#

I'm a coder for a group

#

So script cleanliness is required

nocturne iron
#

Yeah

tough abyss
#

We work with ALiVE

nocturne iron
#

Nice

#

I've got a couple nifty scripts for actual unit optimisation

#

nothing ALiVE level

#

just dynamically spawning targets for CAS missions

#

setting simulaton zones

#

that sort of thing

tough abyss
#
hint parseText format ["%1 %2 %3 %4 %5 %6 %7 %8 %9",strb_1,strb_2,strb_3,strb_4,strb_5,strb_6,strb_7,strb_8,strb_9];
#

To correct my wrong code.

nocturne iron
#

Thanks

tough abyss
#

Madopow2110 I am currently working on my groups I&A mission

nocturne iron
#

Nice

tough abyss
#

Everything is being EVENT driven.

nocturne iron
#

Sick

#

Best way to do it imo

tough abyss
#

Radio tower blows up runs some code to say yes towers dead.

#

WaitsUntil unit count < 4

#

Runs the GC after the event handle completes it run

#

Next AO spawns

#

Tower is created handler added

nocturne iron
#

Try applying an EH that runs an if unit count < 4 on the death of each enemy unit in the AO

#

saves a ton of compute time when hundreds of units are on the field

tough abyss
#

No point.

#

My system completely eliminates the need for triggers ๐Ÿ˜„

nocturne iron
#

No I mean instead of the WaitUntil you've got going

#

make it an EH

#

because the WaitUntil checks every couple frams

tough abyss
#

waitUntil is cheaper as it evaluates once per frame.

nocturne iron
#

OnDeath should be cheaper shouldn't it?

tough abyss
#

Counting the dead AI?

nocturne iron
#

Yeah

#

but you only count when one dies

tough abyss
#

Hmmm maybe.

nocturne iron
#

I'll show you a script I did that does something like that

#

/*

USAGE:
_handle = [unit] spawn fnc_act3_unitspawn_blufor_eh
OR
{
if ((side _x) == West) then
{
_handle = [_x] spawn fnc_act3_unitspawn_blufor_eh
};
} forEach allUnits;

*/

_unit = this select 0;

_unit addEventHandler ["Killed",{

_totWest = WEST countSide allUnits;
if (_totWest < 100) then {

_reinforcementChopper = selectRandom ["B_Heli_Transport_01_F","B_Heli_Transport_03_unarmed_F"];
_reinforcementPoint = selectRandom [[6895.02,7329.84,0],[7855.58,7702.19,0],[7277.63,7893.46,0],[7046.4,7845.28,0],[8584.05,7689.91,0]];
_reinforcementLZ = selectRandom [lz_b_reinforce_1,lz_b_reinforce_2,lz_b_reinforce_3,lz_b_reinforce_4];

_grpCargo = [[0,0,0], WEST, (configfile >> "CfgGroups" >> "West" >> "BLU_T_F" >> "Infantry" >> "B_T_InfSquad")] call BIS_fnc_spawnGroup;
_grpHelicopter = createGroup WEST;
_helicopterarray = [[7323.4,6227.24,50], 0, _reinforcementChopper, _grpHelicopter] call bis_fnc_spawnVehicle;
_helicopter = _helicopterarray select 0;
{_x moveincargo _helicopter; _nul = [_x] spawn fnc_act3_unitspawn_blufor_eh;} foreach units _grpCargo;

_wpgrpCargo_1 = _grpCargo addWaypoint [_reinforcementPoint, 0];
_wpgrpCargo_1 setWaypointType "SAD";

_wpgrpHelicopter_1 = _grpHelicopter addWaypoint [(getpos _reinforcementLZ), 0];
_wpgrpHelicopter_1 waypointAttachObject _reinforcementLZ;
_wpgrpHelicopter_1 setWaypointBehaviour "CARELESS";
_wpgrpHelicopter_1 setWaypointType "TR UNLOAD";

_wpgrpHelicopter_2 = _grpHelicopter addWaypoint [[5600.95,9802.29,300], 100];
_wpgrpHelicopter_2 setWaypointSpeed "FULL";
_wpgrpHelicopter_2 setWaypointType "MOVE";
_wpgrpHelicopter_2 setWaypointStatements ["true", "{deleteVehicle _x} foreach units _grpHelicopter;"];

sleep 10;

};
}];

#

applies itself to the spawned units

tough abyss
#

I function the crap out of everything.

nocturne iron
#

so you never need to have a loop running

#

Good man

tough abyss
#

Waypoint functions are given their own folder etc.

nocturne iron
#

yeah

tough abyss
#

Half of the functions I've written have been execeptionally helpful.

#

Particularly with group mission development

nocturne iron
#

yeah

#

It really helps to make yourself a framework

tough abyss
#

I even created a crude prototype of datastructure

#

aka a Queue.

nocturne iron
#

makes the next mission development really speedy

#

Nice!

#

Do you do much caching?

tough abyss
#

ALiVE does it ๐Ÿ˜„

#

I can just hook alives stuff and create my own virtual profiles from within alive

nocturne iron
#

Ah, so you always run ALiVE?

#

That works

tough abyss
#

Works very well

#

As it uses a C++ native DLL

#

to do a lot of what it does.

nocturne iron
#

Yeah

#

What sort of AI count do you usually work with?

tough abyss
#

I can make the mission run with thousands of AI

#

but they're not spawn'd in.

#

ALiVE calls them virtualised units

nocturne iron
#

Yeah, I'm familiar with ALiVE

tough abyss
#

They're AI that basically emulate AI.

#

But are mere markers that update.

nocturne iron
#

The virtual war system is excellent

tough abyss
#
params [
    ["_queuedArray",[]],
    ["_toBeQueued",[]]
];

private _addedToQueue = _queuedArray pushBack _toBeQueued;
_addedToQueue;
#

Thats the prototype of the queue

#

For adding data to it

nocturne iron
#

Ooh

#

Nice

tough abyss
#
//Flush queue

params [
    ["_queuedArray",[]]
];

_queuedArray deleteRange [0, count (_queuedArray)]; 
#

Purges the queue array

#

for example I&A uses a queue with no explicit queu

#

queue*

#

I can actually use this for pretty much anything.

#
//Adapted from killzone kids array pop
params [
    ["_queuedArray",[]]
];

_queuedArray deleteAt (count _queuedArray - 1)
nocturne iron
#

Nice

#

How do you do scriptboxes in discord? I don't often visit :p

tough abyss
#

tripel ` or backticks tild key

nocturne iron
#

\so

#

`d

#

:p

tough abyss
#

Stuck to gether

nocturne iron
#

Cool

#

I'm reading up on optimising script at the moment pretty hard

#

because I'm trying to do a more realistic version of Warfare

#

based around the War in the Donbass with Chernarus as an analogue

#

going to have public relations simulation (ie how much of your territory is in ruins) etc

tough abyss
#

BI will be releasing dynamic simulation soon I hope.

nocturne iron
#

Going to be entirely zeus based so it plays like an RTS

#

Yeah I'm super super keen

#

Includes a fog of war and everything

#

Going to add a feature later where a squad of players can play as NAPA while the two main players (CDF and Chedaki) fight

#

NAPA won't be able to capture territory but will gain units and supplies by capturing them, blowing up buildings in controlled towns etc

tough abyss
#

I don't know anything about that I am apart of a MEU

#

So we're semi-realistic.

nocturne iron
#

Did you play much A2?

tough abyss
#

No not really.

nocturne iron
#

Ah, makes sense :p

tough abyss
#

Domination 2 was what I got into.

#

For a while then DayZ

jade abyss
#
_queuedArray deleteRange [0, count (_queuedArray)]; ```
??? Why?
tough abyss
#

@jade abyss Groups you know AI groups yeah?

#

When you assign them into an array

#

and delete the group

#

and the array still exists

jade abyss
#

Var = [];

tough abyss
#

you get NULLGROUP

#

That was the biggest issue I had

nocturne iron
#

Var = nil; preferably

jade abyss
#

Or that

tough abyss
#

Well.

#

That makes it easy.

jade abyss
#

What you did was overkill ^^

tough abyss
#

Appreciate it.

#

I based off a data-structure algorithm?

#

xD

jade abyss
#

Don't think in SQF

#

or at least... ignore almost everything you knew from other languages

tough abyss
#

๐Ÿ˜ฆ

nocturne iron
#

SQF is odd as hell

#

Biki is your friend

jade abyss
#

As @nocturne iron mentioned:
Var = nil; //Var doesn't exist anymore.
and
Var = []; //Var = Empty array

nocturne iron
#

Also that script speed tester they include in the dev version of the editor is delicious

jade abyss
#

A new one?

nocturne iron
#

Nah it's been there forever

#

I've just been playing since A2 so it's a godsend

#

not that I have anything on the OFP chaps

jade abyss
#

Its not only in DevVersion then. Also in regular.

nocturne iron
#

Oh :p

jade abyss
#

Editor -> Esc -> There is a clock somewhere ๐Ÿ˜„

tough abyss
#

Yeah

#

Merry Christmas ๐Ÿ˜„

nocturne iron
#

Haha

#

Also @tough abyss if you ever want to retain 'scenery' from old scenes you can convert all the objects to simpleobjects

#

takes the performance hit down to 0

#

and you can do super detailed towns

jade abyss
#

As long as you don't want to interact with them.

nocturne iron
#

and reconvert them to normal objects when the player approaches etc

#

Yeah

tough abyss
nocturne iron
#

It's why I recommend you shouldn't depend on the ALiVE caching

tough abyss
#

New command to deal with decimal values

#

and string conversions

#

that retain their accuracy

nocturne iron
#

it misses some things you can do with disable commands that are quick and very powerful

#

Nice

jade abyss
#

Yep, KKs Fnc (KK_fnc_positionToString ) is obsolete now.

tough abyss
#

ALiVE massively improved my performance

#

It has a lot of functions to hook into

nocturne iron
#

Try doing what it does yourself

#

Indeed

#

It'll end up quicker due to less variables

#

less baggage really

tough abyss
#

ALiVE also supports HC's out of the box now

#

Any number of HC's

nocturne iron
#

Yeah

tough abyss
#

I wrote a small script to transfer AI from server to HC

#

that didn't go down too well.

#

So ALIVE just spawns directly onto the HC's

#

No transfer time.

nocturne iron
#

Yeah

halcyon crypt
#

[11:10 AM] Madopow2110: Try doing what it does yourself

#

good luck ๐Ÿ˜„

nocturne iron
#

Haha

#

I try to specialise my scripts per use case

#

as you can get teeny bits of perfomance boosts

#

it doesn't work outside of the box neccesarily

#

but if you've got time and a shit pc I've managed to get a 400+ ai battle in tanoa with hundreds of little tidbits and fully furnitiured houses run at 40fps

tough abyss
#

I generalise all my code into functions

#

If I can take 4 , 5 operations

#

and pack them into 1 function that does it all

#

It makes it like a swissarmy knife kit

nocturne iron
#

Yeah

#

jack of all trades, master of none though

#

Which can be good for functions certainly

#

but if you can separate rarely used operations you'll shave off a couple ms here and there

tough abyss
#
params [
    [["_group",grpNull],
    [["_behaviourMode","CARELESS"]],
    [["_combatMode","GREEN"]],
    [["_formationMode","LINE"]],
    [["_speedMode","NORMAL"]]
];
    _group setBehaviour _behaviourMode; 
    _group setCombatMode _combatMode;
    _group setFormation _formationMode;
    _group setSpeedMode _speedMode;
private _ret = if (isNil "_group") then {false} else {true};
_ret;
#

As an example.

nocturne iron
#

Yeah

tough abyss
#

yes I know the ```
private _ret = if (isNil "_group") then {false} else {true};

#

can be replaced by this

private _ret = isNil "_group" select [false,true]; 
nocturne iron
#

That works but the params fire repeatedly

#

Try making them globals in the init

#

It's all good to optimise how you define the variables

#

but check if you need to define them in the first place

tough abyss
#

Yeah I know

#

Wonder if isNil returns true

#

if it contains _group = grpNull

nocturne iron
#

It'll be on the biki

halcyon crypt
#

it won't

#

isNil is for undefined vars

#

isNull will though

thin pine
#

^

tough abyss
#

Oh well I can get rid of that entire isNil group then

nocturne iron
#

๐Ÿ˜„

tough abyss
#
params [
    ["_group",grpNull],
    ["_behaviourMode","CARELESS"],
    ["_combatMode","GREEN"],
    ["_formationMode","LINE"],
    ["_speedMode","NORMAL"]
];
    _group setBehaviour _behaviourMode; 
    _group setCombatMode _combatMode;
    _group setFormation _formationMode;
    _group setSpeedMode _speedMode;
#

There we go

#

Universal group setting function

nocturne iron
#

Indeed

little eagle
#

@tough abyss
It's

private _ret = [true, false] select isNil "_group"; 

and tbh, it can be simplified to just:

private _ret = !isNil "_group";
runic spoke
#

lol, i've seen it done the above way a few times, and i coudn't figure out why people did it that way.

hallow spear
#

is there any way to disable groundweaponholder inventory? I tried enablesimulation false, but it did not work

jade abyss
#

?

#

What are you trying to achieve?

hallow spear
#

looking at a weapon, but not being able to pick it up

meager granite
#

inGameUISetEventHandler

jade abyss
#

createSimpleObject <- Alternative?

#

Just create the .p3d obj

tough abyss
#

If no one is suposed to get the weapon ever so createSimpleObject.

#

Hey! On my simple object adventure i dont create buildings with doors as simple objects because they will have doors closed forever. But i liked the idea of create then as simple objects and change then to normal objects when a player is near. May be i can store doors state with animationNames function plus a state function for each animation.

#

Also... HandleDamage is triggered in simple objects. So you can do some fake damage manipulation, delete it with fake explosion and even change the model to the ruins version if present.

#

Just cant remember what is the damage value send to the HandleDamage EH. If it is zero you can process damage due to the ammo type.

#

Or do something really simple like 5 shots on a chair kills it.

hallow spear
#

ok thanks

rotund cypress
#

Hey is there a command for checking if a player is in a group?

little eagle
#

_unit in units _group

rotund cypress
#

Could it be player in units group player?

little eagle
#

the player is always in the players group

#

you can use units _object. so need for group

rotund cypress
#

I dont understand what you mean with _object

#

The object would be the player wouldnt it?

halcyon crypt
#

seems like you're looking for if ({isPlayer _x} count (units _group) > 0) then {};

rotund cypress
#

@halcyon crypt thanks looks a lot like it, but what do I define _group?

halcyon crypt
#

_group is the group that you want to check for a player

rotund cypress
#

So that could be group player?

halcyon crypt
#

like @little eagle said, group player has always a player

rotund cypress
#

ah ye

runic spoke
#

player in units group player will always return true.

rotund cypress
#

i see

#

hmm

halcyon crypt
#

maybe tell us what you want to do exactly ๐Ÿ˜›

rotund cypress
#

Its a gang

#

I want to check if a certain player is in a gang

#

For the official life framework

runic spoke
#

cursorTarget in units group player

#

could do that ๐Ÿ˜›

rotund cypress
#

but @runic spoke that would always return true?

runic spoke
#

cursorTarget is not player.

rotund cypress
#

i want to check a player

runic spoke
#

you first have to figure out how to fetch the player you want to check.

rotund cypress
#

I want to check the player who is executing the script

runic spoke
#

do you want to check if he is in a gang?

rotund cypress
#

yes

halcyon crypt
#

if (group player in _listOfGangs) then {};

#

I guess ๐Ÿ˜›

rotund cypress
#

ok I'll try that

halcyon crypt
#

does Life have a gang system by itself?

rotund cypress
#

yes

halcyon crypt
#

If so, they'll probably have a function to check all that

rotund cypress
#

Ye but it seemed like it just check if (unit in units group player)

#

Im checking right now

runic spoke
#

_group = groupPlayer; _members = _group getVariable ["gang_member", []];

#

if it's [] then the player is not in a group

rotund cypress
#

ok so if (_group isEqualTo []) then { hint "you are not in a gang";}; ?

runic spoke
#

sure

rotund cypress
#

Ok thanks a lot!!

somber skiff
#

@nocturne iron "but if you've got time and a shit pc I've managed to get a 400+ ai battle in tanoa with hundreds of little tidbits and fully furnitiured houses run at 40fps"
How many MP players you got running around in that mission?

rotund cypress
#

Is it possible to remoteExec something on everyone except for your own group?

halcyon crypt
#

the targets param

rotund cypress
#

!group player?

#

Would that work as a param?

nocturne basalt
#

Hi. I'm learning arma 3 modding by using the arma 3 sample files. The Test_Tank_01 has a "pos driver", "pos driver dir", "pos gunner", "pos gunner dir" and "pos commander", "pos commander dir".

For some reason the "pos driver does not work. The only way to drive is to spawn inside the vehicle, and Im not able to get back in if I exit the tank.

Anybody seen this issue before? Whats wrong?

halcyon crypt
#

@rotund cypress more like allGroups - [group player] I think

rotund cypress
#

so that is just allGroups minus your own group?

halcyon crypt
#

yes

rotund cypress
#

ok

#

thanks

halcyon crypt
#

@nocturne basalt you should probably try in #arma3_config or #arma3_model to target the people that know about that stuff ๐Ÿ˜ƒ

nocturne basalt
#

ok thanks

timid niche
#

Hello?

#

Anyone

#

Im getting a problem with my db

halcyon crypt
#

congrats ๐Ÿ˜›

#

(jk)

timid niche
#

Can u help me?

halcyon crypt
#

no, because you're not telling us what your problem is ๐Ÿ˜ƒ

timid niche
#

Haha, i am getting the "server-side extension extdb is not loading report this to an admin

halcyon crypt
#

no clue, maybe @tough abyss can help you ๐Ÿ˜ƒ

tough abyss
#

There should be an extDB logs directory that if created will contain more info on error (assuming the extension loaded correctly)

If there is no logs directory.
Then the chances are that either

  1. extDB files aren't in correct place
  2. You didn't install the requirements i.e vc2013/vc2015 (x86) depending on which version of extDB/2/3 you are using.
  3. Or you didn't place tbbmalloc.dll in your arma3server root directory.
  4. Dll is blocked / file permission issue

But you are best off to ask for support for Exile/Wasteland/Life in thier forums for support.

timid niche
#
  1. No
#
  1. Ill check now
#

Got number 2

#
  1. Done
#

4)Check now

#

Where can i check perms?

#

@tough abyss

halcyon crypt
#

google windows unblock files

timid niche
#

Say what

halcyon crypt
#

โค

timid niche
#

Nope thats not it ๐Ÿ˜ฆ

tough abyss
#

Did you restart the server after the vc 2015 install

dusk sage
#

That shouldn't affect it, but hey, anything is worth a shot

tough abyss
#

You have to restart server 2012 when you change core modules. Vc is has always been that way.

#

@runic spoke so I've openend the RPT log and check the number of hits on 'diag_log "Player as kicked for slot"'. About 30 times

#

The functions is a life saver ๐Ÿ˜›

pale ingot
#

anyone getting problems with respawn after the update?

tough abyss
#

Negative

rotund cypress
#

Is there a scripting command for limiting vehicle speeds?

little eagle
#

no

rotund cypress
#

So say if I do a command I can go no more than 60 km/h

#

Ok

nocturne iron
#

@somber skiff none :p was giving it as an example of smart caching of AI/scenery

tough abyss
#

@rotund cypress you can make a script that monitors the speed of the vehicle and manipulate the control of the vehicle if it breaches speed limits.

jade abyss
#

setVelocity... meh

tough abyss
#

I have my own BRPVP_getShitOnCrosshair function that is ultralight and works with everything!

#

Why, because i did what probably BI did with cursorObject, but for me, 8 meters foward is enough, while BI function even return objects kilometers away!

#

Works even with simple objects

#

Thankyou mister lineIntersectsSurfaces, you are great!

little eagle
#

profanity in function names ๐Ÿ‘

rotund cypress
#

Ah thanks @tough abyss

#

I'm trying to find the display number of the debug console in splendid camera in the config viewer but I can't find it there. Does anyone know what it's called?

#

Ah so RscDisplayDebug is the same for the splendid camera and the normal debug?

#

Yeah but then you press F1 in the camera and you get up the debug

#

So I guess it's just calling RscDisplayDebugPublic?

#

Ah ok thanks

#

Yeah ok

#

What is the difference between Non public and public one?

#

Ye

#

Yeah

#

I was checking in there, but I thought the splendid camera had a different debug that I was checking the idd off

#
 }];```
#

I did that to close the display

#

So as soon as someone opens it it would close but that doesn't work

#

When the debug console is open, it will close

#

So as soon it gets open it will close and this is becuase I want people to be able to use the camera but not the debug console

#

Yes

#

But do you see why it wouldn't work?

#

ah thanks

#

ah yeah

#

I did this but it isn't working private _missionEVH = addMissionEventHandler ["EachFrame",{ if (!isnull finddisplay 316000) then {316000 closeDialog 0;}; }];

#

Got this error 13:21:21 Error in expression <isnull finddisplay 316000) then {316000 closeDialog 0;}; }];> 13:21:21 Error position: <closeDialog 0;}; }];> 13:21:21 Error Missing ;

#

private _missionEVH = addMissionEventHandler ["EachFrame",{ if (!isnull (finddisplay 316000)) then {316000 closeDisplay 0;}; }];

#

Did that

#

Didnt work

#

Generic error in expression

meager granite
#

closeDisplay needs display, not number

#

Also closeDisplay simply sets flag for closure, it doesn't close it right away, if display is inactive dialog it will not be closed until other dialogs let it simulate.

rotund cypress
#

But @tough abyss that doesnt find the specific display

#

private _missionEVH = addMissionEventHandler ["EachFrame",{ {if (dialog) then {closeDialog 316000;};}; }];

#

Should it be like that?

#

it doesnt work

tough abyss
#

There is a way to disable mouse look?

#

Just temporary.

rotund cypress
#

You mean until they press escape or something?

tough abyss
#

Yes!

rotund cypress
#

How?

tough abyss
#

disableGlobalSimulation?

rotund cypress
#

Ok so you mean like if findDisplay bla then disableglobalsimulation?

tough abyss
#

I need to freeze the player for some time

#

i already make then unable to move with w s a d

#

But need to avoid mouse movement now

rotund cypress
#

oh

tough abyss
#

and i don't want to use disableInput

rotund cypress
#

I thought you were talking about my problem ๐Ÿ˜„

tough abyss
#

Ah sorry

rotund cypress
#

Why dont you want to use disableInput?

tough abyss
#

because input will be needed while the player is freeze

rotund cypress
#

ok

#

But so you need to only lock their mouse?

tough abyss
#

Yes

rotund cypress
#

ah ok

#

Afraid Im not your guy

tough abyss
#

ok

#

thanks

livid wraith
#

can isNil be used to check if a function is defined ?

tough abyss
#

A user function?

livid wraith
#

yeah, something defined in CfgFunctions, if (!isNil "TAG_fnc_AwsomeFunction") then {};

dusk sage
#

yes

livid wraith
#

ty

tough abyss
#

Sorry, i was away. Yes.

rotund cypress
#

Can I get access to for example the code for the debug console in a PBO?

indigo snow
#

RscDebugConsole

#

it's in ui_f

rotund cypress
#

thanks

rotund cypress
#

Is it possible to script apex object on the map so people that doesnt have apex still can join?

little eagle
#

Obviously no

rotund cypress
#

but you can place objects through for example zeus but people can still join

little eagle
#

but they wouldn't see the objects and I'm pretty sure they get an error message "class not found"

rotund cypress
#

Ah ok I see

#

I guess that is because they don't have the downloaded content

#

Btw I'm getting this error 23:46:40 Warning Message: Resource title RscStatusTextFr not found

#

But I have that in a dialog

#

Think I figured it out

#

Yep fixed it ๐Ÿคฃ

tough abyss
#

Is there anyway to interface with the dynamic simulation system?

#

@little eagle Do you know of being able to do this?

rancid ruin
#

what's the best way to intercept the exit mission button? e.g to prompt the player to save before exiting

tough abyss
#

Find the IDC for it

#

And a keydown handler

rancid ruin
#

like, the IDC for the existing exit prompt?

#

do you know of any mods which do something similar that i could have a look at?

tough abyss
#

You'd have to look at the root IDCs

#

That the EXIT button uses

rancid ruin
#

god damn

tough abyss
#

it's bin.pbo