#arma3_scripting

1 messages ยท Page 412 of 1

subtle ore
#

@inner swallow Well it would just throw generic "missing ;"

still forum
#

The waitUntil is nowhere in that code snippet

inner swallow
#

Yeah couldn't see it either

little eagle
#

@peak plover You can use call Extended_DisplayLoad_EventHandlers in description.ext too, but obviously it will do anything without CBA.

subtle ore
#

commy2 has been typing for several minutes

little eagle
#

CBA_fnc_addDisplayHandler is for adding ui eventhandlers to the main display... The benefit is, that those are removed if you restart the mission, and reapplied when you load a savegame, and also addded correctly even if the display doesn't exist yet. The point is to make ui events very easily addable at pre/postInit, and therefore compatible with SP and local host savegames, weird restarts, #missions etc.

#

Yeah, sorry. I'm not feeling well, and that slows my thoughts and typing.

still forum
#

I'm ill and awake for 29 hours now.

#

I feel fine tho

little eagle
#

@lone glade What do you mean I don't do the functions header documentation correctly? I skipped a few inlined scripts tbh, but those aren't really functions anyway I think.

subtle ore
#

Sorry to hear that commy, get well!
Quick question: would that be possible to apply this cba display handler add similarly in a vanilla environment?

lone glade
#

it was a troll commy

#

because you do headers CBA style ๐Ÿ˜„

little eagle
#

Well, it would require a constant loop that has serialization not disabled (seen a few which do that, not savegame compatible) and you have to do the "data managing" yourself.

subtle ore
#

Hmmm, seems feasible

little eagle
#

With addon like CBA, it doesn't need a constant loop, because you can append the config with load events and manage stuff from there.

#

It used to be a trigger that checked every 0.5s before I rewrote it to use config events and therefore have 0 impact. ๐ŸŒ

subtle ore
#

So, CBA = performance effective,
Vanilla = Costly but possible?

rancid ruin
#

anyone know how map brush marker alpha works? 100% alpha would, you'd think, cover anything below it. but you need at least 6 by my experiments.

#

any way to make a 100% alpha marker actually opaque?

little eagle
#

I think it's fine for missions (therefore vanilla), but if you start making loops for every addon you have lots of duplicate work chipping away from the already scarce scheduler time.

#

And imo it's unacceptable if an addon has like 3 loops checking the same thing all the time. That's just sloppy.

#

@lone glade I completely missed your reply... I always thought CBA and ACE have basically the same function headers... All that matters is, that it looks reasonable after tabler is done with it.

lone glade
#

You betrayed ace commy, from now on all your headers should be reverted to // By commy2 ๐ŸšŽ

little eagle
#

Small "by", but I agree.

#

Is "small" acceptable for "lower case" in English?

rancid ruin
#

english people aren't too stupid, we'd understand what you mean

#

you'd sound like a kid though

little eagle
#

OK. That's just how they're named in my mother tongue.

lone glade
#

everyone knows germans don't use words

little eagle
#

Habit hard to get rid of.

lone glade
#

they use sentences mashed together

still forum
#

washassudajesachtduschnegge?

lone glade
#

๐Ÿ‘Œ

still forum
#

"What did you just say you snail?"

little eagle
#

"Schnegge"

#

Fitting for alganthe.

meager heart
#

Esistzeitfurinternationalewitze

peak plover
#

What was the force loading screen command?

lone glade
#

it's not a command

#

it's a goddamn func

#

and that's why it can get stuck .... ๐Ÿ˜ญ

queen cargo
#

there are all three commands that are required for this to work

peak plover
#

Thanks

quartz coyote
#

Hello Scriptors could you help me understand what I did wrong ?
put that in initServer.sqf

[
    Intel2,
    "Capture Data",
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
    "_this distance _target < 4",
    "side group _caller == WEST",
    {},
    {},
    {[_obj,1] call BIS_fnc_dataTerminalAnimate; Sleep 2;},
    {},
    [],
    5,
    0,
    true,
    false
] remoteExec ["BIS_fnc_holdActionAdd", -2, Intel2];
lone glade
#

remove that sleep

quartz coyote
#

it's ment to be there cuz i'm gonna put stuff after that

lone glade
#

remove it.

#

jesus christ that BI func...

#

I think @still forum would have an ulcer reading it

quartz coyote
#

why ?

lone glade
#

eeeeh, hard to explain

quartz coyote
#

BI shit ?

lone glade
#

also the "debug" stuff in it... wow

subtle ore
#

unscheduled...?

lone glade
#

yes unscheduled midnight ๐Ÿ˜„

subtle ore
#

HA

#

I'll give myself two cookies for that one

quartz coyote
#
[
    Intel2,
    "Capture Data",
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
    "_this distance _target < 4",
    "Side _caller == WEST",
    {},
    {},
    {[_obj,1] call BIS_fnc_dataTerminalAnimate;},
    {},
    [],
    5,
    0,
    true,
    false
] remoteExec ["BIS_fnc_holdActionAdd", -2, Intel2];
lone glade
#
//increment progress
_frame = _frame + 1;

//execute supplied 'completed' action code
if (_frame == FRAME_MAX_PROGRESS) then
    {
#

beautiful

subtle ore
#

Oh my god

quartz coyote
#

is my script correct ?

lone glade
#

yes it is

#

guess what FRAME_MAX_PROGRESS is @subtle ore ๐Ÿ˜„

quartz coyote
#

then why isn't it working ?

lone glade
#

:/ no idea

subtle ore
#

The little spinny thingy to update paa progress @lone glade

lone glade
#

it's 24

#

the number is 24

subtle ore
#

What...

#

Oh, wait a sec. i understand your question now

#

wtf lol

dusk sage
#

Whats wrong with 24

halcyon crypt
#

it's only wrong if you're trying to be salty

subtle ore
#

"Trying to be salty" thankong

lone glade
#

the spawned code wait 24 frames before running

#

it evaluates that if until it's 24 frames later

#

what could go wrong.....

#

oh, no it's even better

halcyon crypt
#

do you mind pastebin-ing it so that we can all take a look? ๐Ÿ˜›

lone glade
#

going to gist' it

halcyon crypt
#

ty

#

the frame thingy seems fine to be

#

it's all time based

lone glade
#

at least it explains why it breaks so easily....

halcyon crypt
#

I'm still saying salty ยฏ_(ใƒ„)_/ยฏ

lone glade
#

I just realized CBA / ACE3 has better debug logging than BI

halcyon crypt
#

BI can do actual debugging though ๐Ÿ˜›

lone glade
#

eeeeeeeeeeeeeeh

drowsy axle
#

Anyone know of how to wildcard a variable check e.g: sqf aaf_* nato_* csat_*

jade abyss
#

uhm, what?

tough abyss
#

Really can't think of valid reason for this, except for some hack script trying to detect random generated variables

drowsy axle
#

"detect random generated variables" ๐Ÿ˜› SPOT ON

#

it's more geared towards mission maker markers.

tough abyss
#

Store the names in an array then

drowsy axle
#

How would I make it storage all aff_* variables to infinite number?

tough abyss
#

by adding the variable names when you create them and you can remove them when the marker is deleted etc

drowsy axle
#

Well. I wont be creating them... think of the check as like a parent class to all aff_ markers.

lone glade
#

you mean any var that contains aff ?

drowsy axle
#

Yeah

tough abyss
#

honestly it really sounds you are trying to script a crappy hack script

lone glade
#

toLower + in

drowsy axle
#

How would I utilise the toLower command, to achieve my goal?

lone glade
#

I'll let you figure it out

drowsy axle
#

Lowering the case sensitiveness?

lone glade
#

yes.

drowsy axle
#

Right.. hmm

#

in being within an array or within the mission?

lone glade
#

O.o, I just realized the STRING in STRING syntax for in isn't on the alternative syntaxes

#

just in the examples, wow

#

oh nevermind, I meant find

#

goddamn I keep mixing them around

drowsy axle
#

What now??

lone glade
drowsy axle
#

oh

lone glade
#

both commands work so similarly I confuse them ๐Ÿ˜„

drowsy axle
#

lol but yet differently.

#

in is only for an array?

lone glade
#

yes

drowsy axle
#

find is for both array and string

#

and a variable is a string?

lone glade
#

nope.

drowsy axle
#

or atleast entered as a string

#

anyway

#

My whole check is to make it so that any marker that has a sqf aff_car_mrap_* getPos _marker then create vehicle then setPos of vehicle to _marker

tame portal
#

in checks if something is in a collection and find attempts to find the index of an element in a collection

#

besides that, your avatar is mesmerizing

drowsy axle
#

basically and in it's simplest form allowing anything to place a marker (globally/server exec) and have a * spawn.

#

thanks @tame portal

lone glade
#

for what you want you'd do:
markerArray select {tolower _x find "aff" > -1}

drowsy axle
#

markerArray is what ?

#

all markers ingame?

lone glade
#

it's not a command

drowsy axle
#

var?

#

kk

lone glade
#

I can't remember how to retrieve all markers ๐Ÿ˜„ on the top of my head

drowsy axle
#

lol

#

I'll be looking into this for the past few days.. to no success

lone glade
#

allMapMarkers or entities should work.

drowsy axle
#

Would that include player created ones?

lone glade
#

yes

drowsy axle
#

Then I would have to only check variables...

#

variablesList pls

#

๐Ÿ˜„

lone glade
#

allVariables exist

drowsy axle
#

WHAT!

lone glade
drowsy axle
#

missionNamespace YES boii!

#

fuck yes

#

!!! wooop

tame portal
#

@lone glade p

drowsy axle
#

see you guys in three months with a series of RGM that are modular... bieeee

tame portal
#

whoops

lone glade
#

yes, but those aren't the vars :/

tame portal
#

oh

drowsy axle
#

Yeah

#

Just mapmarker

tame portal
#

oh right i missed out on the conversation a bit xD

drowsy axle
#

Yeah you did ๐Ÿ˜›

#

im sooo happy. I can continue with my life now

#

always something so simple yet hard to find...

lone glade
#

the biki search function S.U.C.K.S

tame portal
#

it does

drowsy axle
#

Requested variable is either undefined or nil

#

So that I would have this:

#

if (_varcheck isNill) exitWith{}; {true};

lone glade
#

wrong syntax

#

(isNil "_myVar")

drowsy axle
#

Variable name that was defined in setVariable

#

noooo

#

Pls

#

no

lone glade
#

?

drowsy axle
lone glade
drowsy axle
#
_varcheck = allVariables missionNamespace;
if ( "aff" isEqualTo "_varcheck") then {_varcheck = 1} else {_varcheck = 0};```
jade abyss
#

_pokus = 0 is not in the right scope

lone glade
#

you dishonored your family dscha

#

what is this name, you can do better than this

jade abyss
#

Nah, it's fine

tame portal
#

_pokus = if (isNil "_pokus") then {0} else {_pokus};

#

huehue

lone glade
#

I hate you optix

drowsy axle
#
_varcheck = allVariables missionNamespace;
if ( "aff" isEqualTo "_varcheck") then {1} else {_varcheck = 0};```
lone glade
#

the worst is that it's valid

tame portal
#

whyyyyy? ๐Ÿ˜„

#

omg

#

that reaction

jade abyss
#

Wich one?

lone glade
#

the if then after =

tame portal
#

๐Ÿ˜„

lone glade
#

and no, it's an array jack

#

you have to use select

drowsy axle
#

The allvariable

#

select {tolower _x find "aff" > -1}

#

How would I mix that in?

#

_varcheck select {tolower _x find "aff" > -1}

lone glade
#

_pokus = (allVariables missionNamespace) select {toLower _x find "aff" > -1}

drowsy axle
#
_varcheck = (allVariables missionNamespace) select { toLower _x find "aff" > -1};```
lone glade
#

yes.

drowsy axle
#
_varcheck = (allVariables missionNamespace) select { toLower _x find "aff_car_mrap" > -1};
_varcheck = (allVariables missionNamespace) select { toLower _x find "fia_car_offroad" > -1};
_varcheck = (allVariables missionNamespace) select { toLower _x find "nato_car_mrap" > -1};```
#

would I have the _ at the end or not?

lone glade
#

not necessary

drowsy axle
#

Yeah true

#

I see that

lone glade
#

it will match anything that has aff_car_mrap_in it

#

so derpsqgdjaff_car_mrap_dqfdsqfdqsf is valid

drowsy axle
#

oh okay so it works not absolute

#

either way can be changes..

#

shouldn't matter that much

#

so long as I specific at this point. Shouldn't mess it up.

#
_varcheck = (allVariables missionNamespace) select { toLower _x find "aff_car_mrap" || "fia_car_offroad" || "nato_car_mrap" > -1};```
lone glade
#

use ||

#

no need to retrieve the list of vars 3 times

drowsy axle
#

Oh true

lone glade
#

also _varcheck would end up being the last one ignore the 2 above

drowsy axle
#

Yeah

tame portal
#

shivers, i say your avatar is mesmerizing me

#

2 seconds later in PUBG

#

sPoOkY

lone glade
#

baader meinhof effect

drowsy axle
#

lol

#

So how would I foreach each of the vars(strings)

lone glade
#

?

unborn ether
#

@drowsy axle Do you need one result or many?

drowsy axle
#

Many

#

Wait hang on

lone glade
#

wut, what are you trying to do?

drowsy axle
#

One??

lone glade
#

run a foreach on what varcheck returns?

unborn ether
#

@drowsy axle Well the first to find, or find all that you define, because i've seen at least 3 strings.

drowsy axle
#

I want to after finding the variables in missions that have that name. to get the pos and create a Vehicle.

#

run a foreach on what varcheck returns? yes

lone glade
#
{
    _x = missionNamespace getVariable _x;
} foreach _varcheck;
drowsy axle
#

sweet

#

I thought it would need the getvariable

#

I just didn't know how to go about it

#

I have all the pieces... just cannot put them together correctly.

#

after that then what?

lone glade
#

do whatever you inteded to do?

drowsy axle
#
{
    _x = missionNamespace getVariable _x;
    _x getPos = _position;
    _x createVehicle position _position;
    _x createVehicleCrew;
} foreach _varcheck;```
lone glade
#

wrong way around for =

inner swallow
#

so... a question

objArr = [];
objArr resize 6; //6 objectives
objArr apply {false}; //init all 6 to false```
when run on init (execVM'd a script from init.sqf) it doesn't seem to apply anything - all values remain null. Works fine if i do it from debug.
#

What's up with this?

lone glade
#

resize changes the indexes to nil since they don't exist

unborn ether
#

@drowsy axle is that vars objects actually?

lone glade
#

try apply {_x = false}

unborn ether
#

@drowsy axle or just positions?

lone glade
#

they're vars

#

which reference markers in this case

drowsy axle
#

^

unborn ether
#

oh markers ok

inner swallow
#

nope, that didn't work either alganthe

lone glade
#

oh shit

drowsy axle
#
 _varcheck = (allVariables missionNamespace) select { toLower _x find "aff_car_mrap" || "fia_car_offroad" || "nato_car_mrap" > -1};
{
    _x = missionNamespace getVariable _x;
} foreach _varcheck;
``` @unborn ether all of it
lone glade
#

I know why suicide ๐Ÿ˜„

#

apply returns the array, it doesn't modify the existing ref

#

forgot about that

inner swallow
#

ahhhhhhh

#

i missed that in the wiki

#

thanks for catching that ๐Ÿ‘๐Ÿฝ

unborn ether
#
private _collection = ["aff_car_mrap","fia_car_offroad","nato_car_mrap"];
{
    _x = missionNamespace getVariable _x;
    if (!isNil "_x") then {
        private _position = getMarkerPos _x;
        private _vehicle = "somevehicle" createVehicle _position;
        createVehicleCrew _vehicle;
    };
} foreach _collection;
#

then

lone glade
#

... no

#

that's extremely unefficient

unborn ether
#

correct me, might be wrong?

inner swallow
#

(yeah now it works. lol)

drowsy axle
#

the find is finding all variables within the mission (all markers with that name) it not a "static" array.

lone glade
#

that contains those strings^

unborn ether
#

oh

#

Well just use the vehicle part then

drowsy axle
#
_varcheck = (allVariables missionNamespace) select { toLower _x find "aff_car_mrap" || "fia_car_offroad" || "nato_car_mrap" > -1};
{
    _x = missionNamespace getVariable _x;
    _position = getPos _x;
    _vehicle = "somevehicle" createVehicle _position;
    createVehicleCrew _vehicle;
} foreach _varcheck;```
lone glade
#

wrong use of the ||

drowsy axle
#

?? huh?

#

I thought that was right... lol

lone glade
#

you need toLower _x find there too

drowsy axle
#

Could I have a var with all the sqf toLower _x find "markervar" inside?

unborn ether
#
 (allVariables missionNamespace) select { toLower _x find ("aff_car_mrap"|"fia_car_offroad"|"nato_car_mrap") > -1}; 
drowsy axle
#

just one |

lone glade
#

nope and nope unfortunately

drowsy axle
#

oh the brackets

#

lol

lone glade
#

yes that's what I meant ^

drowsy axle
#

instead of: sqf toLower _x find "aff_car_mrap" || toLower _x find "aff_car_mrap" || toLower _x find "aff_car_mrap" || toLower _x find "aff_car_mrap" || toLower _x find "aff_car_mrap" || toLower _x find "aff_car_mrap" || toLower _x find "aff_car_mrap" ||

#

and array. of those

lone glade
#

yes, hopefully with highlighting ๐Ÿ˜„

drowsy axle
#

but then it would be a string not code... hm

lone glade
#

aaaaaaaargh

drowsy axle
#

arma why you be so hard xD

lone glade
#

wait a second, i'll type it

drowsy axle
#

changed the above ^^^^^^^^

lone glade
#
 _varcheck = (allVariables missionNamespace) select {
    toLower _x find "aff_car_mrap" > - 1 ||
    { toLower _x find  "fia_car_offroad" > -1} ||
    {toLower _x find  "nato_car_mrap" > -1}
};
drowsy axle
#

ah okay

#

I see

#

-1

unborn ether
#

Its just better to know that markernames seriously ๐Ÿ˜„

drowsy axle
#
_varcheck = (allVariables missionNamespace) select {
     toLower _x find "aff_car_mrap" > - 1 ||
     { toLower _x find  "fia_car_offroad" > -1} ||
     {toLower _x find  "nato_car_mrap" > -1}
};```
lone glade
#

he want markers that contain those strings

#

so derpdsqfaff_car_mrapdqfdqsfds is valid

drowsy axle
#

or double brackets?

#
_varcheck = (allVariables missionNamespace) select {
     toLower _x find "aff_car_mrap" > - 1 ||
     { toLower _x find  "fia_car_offroad" > -1} ||
     {toLower _x find  "nato_car_mrap" > -1}
};;```
lone glade
#

no code block on the first one

#

BOOL || {BOOL} || {BOOL}

drowsy axle
#

ah okay

#

get ya

lone glade
#

nested it looks like this:
BOOL || {BOOL && {BOOL}}

drowsy axle
#

&&?

#

it's just || || || || because it's looking for all "sides"

lone glade
#

&& is and, || is or

drowsy axle
#

I knew that ๐Ÿ˜›

lone glade
#

I just used && for my example :p

drowsy axle
#

oh okay

#

๐Ÿ˜„

lone glade
#

I should have a var with a shitload of lazy eval around wait one

drowsy axle
#

the ||'s are like commas

lone glade
#

erf, I put them in macros, woops

thorn saffron
#

I'm trying to get the vest items array for several filled vests in a box. "vestItems" works for the player unit, but not for the box

lone glade
#

afaik you can't retrieve those in a box taro

#

double ; jack

#

remove one

drowsy axle
#

do it the other way.. Can you take the vests out and back in (with code)?

#

out (find internal shit) in (still in box when player looks in)

lone glade
drowsy axle
#

thanks. I got it ๐Ÿ˜›

lone glade
#

you can actually taro

#

there

#

didn't knew this thing existed until now ๐Ÿ˜„

drowsy axle
#

lol

lone glade
#

you can then use cargo commands on the container @thorn saffron

#

containerCeption ๐Ÿ˜„

drowsy axle
#

going to test this: sqf _varcheck = (allVariables missionNamespace) select { toLower _x find "fia_car_offroad" > -1 //toLower _x find "aff_car_mrap" > - 1 || //{ toLower _x find "fia_car_offroad" > -1} || //{toLower _x find "nato_car_mrap" > -1} }; { _x = missionNamespace getVariable _x; _position = getPos _x; _vehicle = "C_Offroad_f" createVehicle _position; createVehicleCrew _vehicle; } foreach _varcheck;

#

containerCeption that a command ๐Ÿ˜›

thorn saffron
#

I does not seem to get the rifle. I guess having some dummy unit I put all of the shit from the box and go through it one-by-one to get whats inside backpacks, on weapons etc. is something that might be needed to be done.

#

nasty, crude, but it might do the job

lone glade
#

rifles aren't containers

tough abyss
lone glade
#

only uniforms vests and backpacks should be returned afaik

thorn saffron
#

say you have 10 rifles with attachments and shit in a box, how would you check whats on each one of them, disassemble them and put weapons and detached items in a box? I would use the dummy unit idea

tough abyss
#

The only thing you cant do script wise, is add a weapon into container with attachements, need to add the attachments seperately into the container
Unless you have AI unit do it for you (kinda hacky), or got a weapon config for every posssible combination of attachments (way to much work/hacky)

unborn ether
#

The most thing i don't like about managing a container is that you cant actually have remove*CargoGlobal and only go through clear*CargoGlobal

#

"Stash & Pop" is the only scheme around this.

thorn saffron
#

You know, maybe I could kinda skip all of it if I could do something like this: open the shop box inventory (as normal), save the current gear on player, let player take stuff from the box, check what changed and charge him based on that.
would save a lot of work with UI and stuff

unborn ether
#

Still will force you to do a lot of job anyways, like what magazine with what count he did put in his backpack

lone glade
#

... taro

#

hide him and place a dummy unit

#

then use get / setUnitloadout

unborn ether
#

@lone glade but what about gear splicing?

thorn saffron
#

there is still an issue of actually showing player how much stuff costs

#

For now I'm focusing on a "sell box" where you can dump all of the stuff you want to sell in one go.

#

right now its just moving stuff from box to box

vapid frigate
#

is there a way to read data from the web in arma into an sqf string? I can see the data in a RscHTML with htmlLoad, but is there a way to get the text out of that control? (ctrlText is "")

barren magnet
#

@vapid frigate not possible

vapid frigate
#

k ๐Ÿ˜ฆ

river meteor
#

I'm running into an issue where if I try to pass a 6 digit number via remoteExec it works fine, but if that same remoteExec is located inside of a ctrlAddEventHandler, it passes nil. Anyone know what's up here?

indigo snow
#

Variable probably doesnt exist in uiNamespace does it?

river meteor
#

I didn't put it there. I don't really know how Namespaces work though.

#

I suspect the problem lies in the variable I'm trying to use within the ctrlAddEventHandler is not holding the value it is supposed to be or cannot be accessed for some reason

indigo snow
#

Yea, pass it using missionNamespace getVariable ["varname",defaultvalue] instead then

pliant stream
#

@vapid frigate use an extension

drowsy axle
#

@lone glade Doesn't work: https://gyazo.com/f0f1fbf411a02e2a2ea6ad11c3eb3df6 ingame hint for: ```sqf
_varcheck = (allVariables missionNamespace) select {
toLower _x find "aff_car_mrap" > - 1 ||
{ toLower _x find "fia_car_offroad" > -1} ||
{toLower _x find "nato_car_mrap" > -1}
};
hint format["%1",_varcheck];
{
_x = missionNamespace getVariable _x;
_position = getPos _x;
_vehicle = "C_Offroad_f" createVehicle _position;
createVehicleCrew _vehicle;
} foreach _varcheck;

indigo snow
#

Those are classnames of objects arent they?

lone glade
#

nah

#

do you have placed markers ?

drowsy axle
#

Yes

#

fia_car_offroad + (_1,_2,_3)

indigo snow
#

Why not check allMapMarkers?

drowsy axle
#

can I pin the above @lone glade ๐Ÿ˜„

#

Its just better to know that markernames seriously ๐Ÿ˜„

#

he want markers that contain those strings
so derpdsqfaff_car_mrapdqfdqsfds is valid

indigo snow
#

Yea but that script is checking allVariables? Why not check the allMapMarkers array directly and filter that?

drowsy axle
#

Because that has player markers

indigo snow
#

I havent read up too much, sorry

lone glade
#

use allMapMarkers

indigo snow
#

Ah, those are hard to filter? Cant you cache at missionstart?

lone glade
#

allVariables somehow doesn't contain those

indigo snow
#

Well yea markers arent variables

#

Theyre strings

#

Like weapons

lone glade
#

their varnames are

drowsy axle
indigo snow
#

Markers dont have to have varnames do they?

lone glade
#

which you would expect them to be stored in missionNamespace

#

they do

indigo snow
#

Dont trust eden terminology

lone glade
#

how the fuck are you supposed to reference them otherwise ? ๐Ÿ˜„

drowsy axle
#

There might be a difference for Variable and Variable Name?

lone glade
#

nope

indigo snow
#

Theyre type string

#

If you know the string thats the marker

drowsy axle
#

no there isn't

indigo snow
#

If you createMarker it returns a string

drowsy axle
indigo snow
#

Eden just reuses those controls

drowsy axle
#

The whole is that the mission maker (after me) can make _x of aff_mrap_x and have _x of the mrap's spawn

lone glade
#

huh, TIL, markers aren't entities

indigo snow
#

Yea instead of checking allVariables

#

Check allMapMarkers

lone glade
#

just use allMapMarkers

drowsy axle
#

ill test thjat now

indigo snow
#

If youre concerned about players cache it at missionstart

lone glade
#

you'll have to change the script a bit tho

drowsy axle
#
_varcheck = ( allMapMarkers missionNamespace) select { 
    toLower _x find "aff_car_mrap" > - 1 ||
    { toLower _x find  "fia_car_offroad" > -1} ||
    {toLower _x find  "nato_car_mrap" > -1}
};
hint format["%1",_varcheck];
{
    _x = missionNamespace getVariable _x;
    _position = getPos _x;
    _vehicle = "C_Offroad_f" createVehicle _position;
    createVehicleCrew _vehicle;
} foreach _varcheck;
indigo snow
#

Nooo

lone glade
#

nope

indigo snow
#

Read how to use the command

#

It directly returns an array

lone glade
#
_varcheck = allMapMarkers select { 
    toLower _x find "aff_car_mrap" > - 1 ||
    {toLower _x find  "fia_car_offroad" > -1} ||
    {toLower _x find  "nato_car_mrap" > -1}
};
hint format["%1",_varcheck];
{
    _vehicle = "C_Offroad_f" createVehicle (getMarkerPos _x);
    createVehicleCrew _vehicle;
} foreach _varcheck;
drowsy axle
#

<MarkerID> - a marker counter id

indigo snow
#

Check what alganthe did

drowsy axle
#

testing

indigo snow
#

Dont blindly test but also examine the changes in the code

drowsy axle
#

im not not worry

#

dont worry

#

welp

#

fuck that ๐Ÿ˜„

#

Broke my mission in the process.... why is the USS freedom so buggy ๐Ÿ˜„

indigo snow
#

gg

drowsy axle
#

but no vehicles

indigo snow
#

Dont think its a valid classname

#

(It isn't)

drowsy axle
#

C_

#

you mean?

#

ah I forgot the 01

#

works. Thanks @indigo snow

lone glade
#

๐Ÿ˜ฆ

drowsy axle
#

what?

#

How would I format sidechat?

unborn ether
#

@drowsy axle Well @lone glade did the most job, kinda thanks him i think ๐Ÿ˜„

#

@drowsy axle by format you mean send it, because format is a text formatter?

drowsy axle
#
_varcheck2 = allMapMarkers select { 
    toLower _x find "nato_car_mrap" > - 1
};
sideChat format["%1",_varcheck2];``````sqf
hint format["%1",_varcheck2];``` works but I have a few hint one after the other.
indigo snow
#

Look up sideChat on the wiki

#

It needs more arguments

unborn ether
#

sideChat only shows result on local machine.

#

so you need to broadcast it

indigo snow
#

True but not the current issue

#

As an aside, kina interesting that - 1 is a number, with the space

drowsy axle
#

yeah

#

got a problem...

#

ffs i only want to this one thing why is it sooo hard....

#
/* ///////////////////////////////////

NATO Forces
MarkerName Key:

b_mrap_01 = "B_MRAP_01_F"
b_mrap_01_hmg = "B_MRAP_01_HMG_F"
b_mrap_01_gmg = "B_MRAP_01_GMG_F"


/////////////////////////////////// */
_var1 = allMapMarkers select { toLower _x find "b_mrap_01" > -1 };
{ _vehicle = "B_MRAP_01_f" createVehicle (getMarkerPos _x); createVehicleCrew _vehicle; } foreach _var1;

_var2 = allMapMarkers select { toLower _x find "b_mrap_01_hmg" > -1 };
{ _vehicle = "B_MRAP_01_HMG_f" createVehicle (getMarkerPos _x); createVehicleCrew _vehicle; } foreach _var2;

_var3 = allMapMarkers select { toLower _x find "b_mrap_01_gmg" > -1 };
{ _vehicle = "B_MRAP_01_GMG_f" createVehicle (getMarkerPos _x); createVehicleCrew _vehicle; } foreach _var3;```
lone glade
#

what's the issue?

drowsy axle
#

double spawning

lone glade
#

ofc

drowsy axle
#

yu

#

p

lone glade
#

var2 has var1

drowsy axle
#

yup

lone glade
#

b_mrap_01 also includes b_mrap_01_hmg

drowsy axle
#

yup

#

quite funny tbh

lone glade
#

no?

#

it's normal

drowsy axle
#

yeah

#

ik

#

how else would you solve this problem. of

#

markers names and spawning

#

I'd said remoteexec

#

with params

lone glade
#

wat

drowsy axle
#

i've tried this so many ways

lone glade
#

this works perfectly fine, just name them something else

drowsy axle
#

how can I?

lone glade
#

change the name of the markers ?

drowsy axle
#

....

#

I wouldn't be ablke to]

#

because I can only use each letter/number once

lone glade
#

no?

drowsy axle
#

nato is the same as otan

lone glade
#

just call them "marker_mrap_1", "marker_mrapHMG_1"

drowsy axle
#

marker_mrapHMG_1 would spawn both

lone glade
#

no

drowsy axle
#

how

lone glade
#

because they are different strings

#

it doesn't contain the first one

drowsy axle
#

true

#

so it reads the whole string

#

as a whole

#

not seperate

lone glade
#

no

#

find checks for a matching string

#

"dsqfdsqfdsqfds_this_worksdsfsdqfdsqf" find "this" would work

#

anything containing "this" in it would match, but for example, "tHis" wouldn't

drowsy axle
#

right

#

im gunna take a break.

little oxide
#

Or use equalto, if you know the exact name

lone glade
#

wat

#

someone didn't read the whole conversation, again

tough abyss
#

to be fair am amazed its still going on

drowsy axle
#

lol xD

little oxide
#

I don't know, why it's so difficult you use allmapmarkers select find

#

and here we go

rancid ruin
#

use execVM

little oxide
#
  switch (true) do {
    case (toLower _x find "b_mrap_01_gmg" > -1): { 
      _vehicle = "B_MRAP_01_GMG_f" createVehicle (getMarkerPos _x);
      createVehicleCrew _vehicle; 
    };
    case (toLower _x find "b_mrap_01_hmg" > -1): { 
      _vehicle = "B_MRAP_01_HMG_f" createVehicle (getMarkerPos _x);
      createVehicleCrew _vehicle; 
    };
    default { 
      _vehicle = "B_MRAP_01_f" createVehicle (getMarkerPos _x);
      createVehicleCrew _vehicle;
    };
  };
} forEach (allMapMarkers select {toLower _x find "b_mrap_01" > -1}); ```
#

It's sooo difficult

#

This take me 1 hour to find a solution ho my god

lone glade
#

I wish i was stupid enough to post something wrong and act like this

indigo snow
#

Welcome to learning how to code haha

rancid ruin
#

(edited) incoming

indigo snow
#

Ive spent hours on typos

unborn ether
#

 {
  _x = toLower _x;
  switch (true) do {
    case (_x find "_gmg" > -1): { 
      _vehicle = "B_MRAP_01_GMG_f" createVehicle (getMarkerPos _x);
      createVehicleCrew _vehicle; 
    };
    case (_x find "_hmg" > -1): { 
      _vehicle = "B_MRAP_01_HMG_f" createVehicle (getMarkerPos _x);
      createVehicleCrew _vehicle; 
    };
    default { 
      _vehicle = "B_MRAP_01_f" createVehicle (getMarkerPos _x);
      createVehicleCrew _vehicle;
    };
  };
} forEach (allMapMarkers select {toLower _x find "b_mrap_01" > -1}); 
little oxide
#

Thanks for the correction demellion

unborn ether
#

np, just less to read like this.

little oxide
#

It's just take me 10 seconds to take over a solution, not search too much

lone glade
#

shitting out a half baked solution isn't the point, it's to make him get there

little oxide
#

๐Ÿค”

#

If he want to learn, he look at this solution, and learn about it, if he want to do an solution, he can do one too

rancid ruin
#

not really

#

better to tell someone where their solution went wrong rather than to write your own solution they don't understand

#

literally just leads to copy/paste tyvm cya later

#

teach a man how to fish

little oxide
#

If the person is willing to learn, he will learn my solution, and create a new one

#

i'm here to put a solution, if he want only copy paste

#

it's his problem, and not mine, because giving him a solution

rancid ruin
#

spoken like a prodigal teacher

#

๐Ÿ‘๐Ÿฟ

#

and anyway your shit was broken lol

unborn ether
#

@little oxide Well by my experience - they are at the right point. Its better to give a fishing rod instead of fish.

rancid ruin
#

if he can't debug his own script he can't debug yours

little oxide
#

I know why i'm only go terrain makers channel now

#

oneoh have you tested my "shit"

#

i don't think so

unborn ether
#

Dude, just stop, I've tried that recently - there's always some dudes saying something against you.

#

Just be a wave, be a water, be a wind, whatever

#

๐Ÿ˜„

little oxide
#

I feel like I'm being told how to teach people the script, but I'm not here to teach people

unborn ether
#

Well, thats his point of view, thats yours. Just leave it like this.

rancid ruin
#

i don't have points of view i have objective facts

unborn ether
#

@rancid ruin well thats subjective, because there are different ways to teach. Whatever bad or good.

rancid ruin
#

objective fax

unborn ether
#

fax ๐Ÿ˜„

#

well yep the fax is the fax, it is objective ๐Ÿ˜„

rancid ruin
#

i'm a facts machine

unborn ether
#

fax machine ๐Ÿ˜„

still forum
#

Wow.. On windows its 3:11AM and on Linux it's 9:11PM although both are in the same time zone.. Weird stuff discord.
@lone glade When I saw the hold action in the apex campaign I already knew I don't want to see the code for that.

tough abyss
#

Hello guys, i'm having some issues with an Headless client on my server. Therefore, I wanted to know if it is possible to find logs for it, can you guys help me ? ๐Ÿ˜ƒ

#

Wrong chan maybe

#

didn't saw Headless client chan

unborn ether
#

@tough abyss It has own instance folder like your server does.

still forum
#

Also important if windows/linux

tough abyss
#

Windows, and ok I change, thx for ur help ๐Ÿ˜‰

snow raft
#

Me again ๐Ÿ˜„
is there a way to force the respawn in the RespawnMenu after the counter run out?

still forum
#

What RespawnMenu?

snow raft
#

this new one that came with apex(?)

still forum
#

Didn't hear about that. #arma3_scenario might know more. I don't think you can script that. Either you get always to the menu or not which is probably controlled by config

snow raft
#

this one

#

there should be a way to modify what is executed when pressed that respawn button but where? ๐Ÿ˜„

still forum
#

The screen is shown only if respawn templates MenuPosition and/or MenuInventory are used in a mission! For more info see Respawn documentation.

#

I guess you could look into the UI config for the respawn screen

snow raft
#

read it all more than once

#

where? ๐Ÿ˜„

still forum
#

Debug console -> config viewer -> search manually through all UI classes till you find it

snow raft
#

kk

still forum
#

If that calls a script function then you have to read that script function and check if you can inject your code somewhere in there. If not then you need a mod to edit the UI. If that is in-engine though you are out of luck

peak plover
#

Can someone contact any of the enscript people and tell them to build more EHs ?

#

So many things would be possible if there were more EHs ๐Ÿ˜ฆ

#

Actually I guess that's also security risk so....

#

I just realized when doing a few functions that I need to add my own EHs ๐Ÿ˜

unborn ether
#

I dream of an actual suppression EVH with engine based calculation with indirectHit involved.

peak plover
#

Hmm

#

If I'd make a onEachFrame and instead of calling new functions I add them to an array, and maybe allow only a few ms of functions to run per frame :|
Wait a minute

#

This is basically normal scheduler

still forum
#

Intercept could add EH's if you want

#

No EH's aren't really a security risk

#

What EH's would you need?

#

Creating EH's that fire when someone calls some script function takes literally 2 minutes

#

What you said is basically CBA PFH.

#

Just it doesn't limit runtime

peak plover
#

everything. I've ran into that all the time

#

ohh yeah..

#

nothing on my mind right now. But so many things...

still forum
#

If you're willing to require two mods and don't use Battleye then.. ez

peak plover
#

:]

#

I thought about doing the onframe and then have a check before running the code for EH, which would be like if _function isEqualTo EH. and the one after

still forum
#

CBA also has player eventhandlers

#

which is basically that for some things about the player

cedar kindle
#

will intercept ever be BE accepted you think ?

#

also linux support ?

still forum
#

linux already there

#

And yeah.. I think BE will happen

#

As Intercept core doesn't do anything bad and plugins also need sign

candid jay
unborn ether
#

@candid jay Haven't seen it not working, besides they are getting re-enabled scripted https://community.bistudio.com/wiki/enableChannel. Also according to a notes, global channel is always enabled for arma admin. So all of your channels are enabled, or just few of them?

candid jay
#

if I use enableChannel everything works.

#

the issue is with disableChannels in description.ext

unborn ether
#

Well the source might be any script, even ones coming from addons you launch. Since enabledChannel is working fine for you, stay with it.

candid jay
#

ok

meager granite
#

Are you sure you fully reload the mission?

#

getArray(missionConfigFile >> "disableChannels") to double check

peak plover
#

Anyone here use scripted lobby yet?

candid jay
#

yes iโ€™m sure

#

one question on EH: in MP, is there an event when game starts, i.e. when players first enter the game after seeing the map?

#

is that PreloadFinished?

peak plover
#

Hmm looks like it

#

Didn't even know

#

That's cool to know

unborn ether
#

If im right on that you try to catch the briefing start/end

peak plover
#

Whoa

#

Never seen that

#

Coool

candid jay
#

that doesnโ€™t give an event when playing starts though

#

briefing end just means that it has been read, not that mission has started

unborn ether
peak plover
#

What is your goal?

#

Anyway

river meteor
#

does anyone know why I get a bunch of errors and issues when trying to select a bit type sql datatype using extdb3?

peak plover
river meteor
#

I just changed it from bit to int, I don't think extdb3 supports bits

ocean hare
#

question: how the hell does publicVariable work?

#

I need to use it to turn off the Unsung voices but I have no idea how it works and wiki doesn't really explain it well

river meteor
#

What part about it are you specificially confused about? Do you understand that it takes a variable and sends it to all clients?

ocean hare
#

I understand that

#

I just don't undertsand how I set it up

#

like, where to put it and shit

#

I know I need to use pubvariable to set RUG_DSAITerminalDistance = -1;

#

I just dont understand where I would do that or the exact proper syntax

river meteor
#

RUG_DSAITerminalDistance = -1; to set it and then publicVariable "RUG_DSAITerminalDistance"; to broadcast it

ocean hare
#

alright, and would I put that in an init.sqf?

lone glade
#

.....

#

you don't need to pubVar then

river meteor
#

I'm not really sure what Unsung voices are, but does your system have multiple clients, or is this a singleplayer mission?

lone glade
#

doesn't matter, if he want to put it in init.sqf he doesn't need pubVar

river meteor
#

He doesn't know where to put it

bitter bough
#

It's multiplayer
Unsung has voices it plays ambiently through zeus and such
However they EXPLICITLY required them to use pubVar.
However not where to place it.

lone glade
#

with how terrible unsung was made I'd say the instructions to use pubVar are wrong

#

just set the var in initPlayerLocal or init and you're done

#

unless they have a PVEH for it

bitter bough
#

they've recently added a module in their dev build that fixes the issue. However others have gotten it to work.
However the details have been fairly obscure ยฏ_(ใƒ„)_/ยฏ

ocean hare
#
If you're just looking to disable the rug_dsai voices (Vietnamese, American and ARVN voices) in your mission because it's driving you crazy then go ahead and do this simple task!

Put this in your mission:
RUG_DSAITerminalDistance = -1;
( variable / publicVariable )

An example of how we turned them off in Arsenal:
__

if (missionName isEqualTo "Arsenal") then {
    RUG_DSAITerminalDistance = -1;
};

true
__

Hope this handy dandy trick works!
Have a good night or day!```

^the message from them exactly
lone glade
#

yeah, just set the var in an init.....

#

what do they mean by "drive you crazy" ?

ocean hare
#

regular var would work with JIP?

lone glade
#

ofc

#

init and initPlayerLocal run on JIP too

ocean hare
#

I'lll explaint he voices a bit

river meteor
#

@ocean hare Have you already tried just putting RUG_DSAITerminalDistance = -1; in init.sqf?

ocean hare
#

so what they did was add an extra ambiant thing where it would force voice lines over any unit for the particular side, aka BLUFOR units always have these ambiant voice over them no matter what the actual voice is set to. Even when not in combat they say things like "gimmie a smoke" or some other shit.

The problem is, Unsung made no way to turn this off (at first) and when you're in Zeus you hear every AI all at the same time as if they were arround you. Meaning at a certain point you cant hear anything other than the voices endlessly.

#

@river meteor I think so? I'll try again though

lone glade
#

oh god my sides

#

wait, what happens if you try switching voices mid mission?

#

does it spam it twice as much ?

ocean hare
#

it's not affected by the normal voice thing

#

it's seperate audio lines played via the effects track

bitter bough
#

Basically Faces of War does the same but you need a module to start the voices rather than turn them off

ocean hare
#

I'm pretty sure iot's meant for cinematic videos or ambiant AI around bases

#

all i really know though is that's annoying af

bitter bough
#

Mid op it's very distracting

#

and causes the odd illusion of thinking there are enemies around you

ocean hare
#

@river meteor tried it again, can confirm that doesn't work

river meteor
#

@ocean hare Sounds like there may be an issue with Unsung. Those instructions are relatively straightforward and I can't think of a mistake on your end. Maybe @bitter bough knows more

lone glade
#

I love that random true in the instructions too

bitter bough
#

I'm also one trying to figure out how to help him
We are in voice chat together trying to figure this out

river meteor
#

Didn't you say it's a known issue with Unsung? Were those instructions recently released, or are they old and possibly outdated?

ocean hare
#

oh no, they are new

#

they didn't think about releasing these instructions until I went on their discord and said something

#

it's been an issue since their first Arma 3 release and apparently has been brought up to them before according to their PR guy but none of them thought to tell anyone the solution publically

#

they are working on adding a module to do this for people in next release but in the mean time, I have to do this for all our missions

river meteor
#

Could you ask them on their discord where to put it? The only thing I could think of is that they set that variable in their code base somewhere after init.sqf is ran

lone glade
#

it's in an init

ocean hare
#

yea, I was about to go there next

lone glade
#

but then again, it not working wouldn't surprise me in the slightest

chrome mason
#
if (typeOf _crate not in _crateList)
``` would work, right?
tough abyss
#

@chrome mason or just

if !((typeOf _crate) in _crateList) then {code}```
chrome mason
#

Ah, cheers cloudy boy!

tough abyss
#

๐Ÿ‘ monkey

chrome mason
#

I'm tired ๐Ÿ˜ด

#

Someone did something stupid with my script today, so i'm idiot proofing it... which is why i'm up at 1:40am ๐Ÿ˜ƒ

pliant stream
#

there's no need for parentheses around typeof _crate

tough abyss
#

@pliant stream who cares

#

its cleaner

#

its also preference

pliant stream
#

yes whether or not it's better is entirely subjective, however whether or not it's required is not

lone glade
#

you can't use ! before in

#

just FYI

peak plover
#

deleteVehicle caching with zeus

ocean hare
#

@lone glade @river meteor Hey guess what? Found the issue with the Unsung voices. They forgot an underscore in their command. was supposed to be RUG_DSAI_TerminalDistance = -1; not RUG_DSAITerminalDistance = -1;

river meteor
#

@ocean hare Glad you found the issue!

still forum
#

A !in command would be neat I guess? ^^

lone glade
#

meh

#

case insensitive arrayIntersect first pls

still forum
#

arrayIntersectCI

lone glade
#

gib

still forum
#

Make PR :u

lone glade
#

๐Ÿ˜ฆ

#

I didn't do what we talked about for mags, the second array is 10 indexes large at best, not worth it

lone glade
#

(also lazy and forgot about it)

still forum
#

What is second index?

#

I thought it was all mags or smth

lone glade
#

yeah

still forum
#

all mags are not 10 though

lone glade
#

yeah but meh

still forum
#

The problem was toLowering the global magazine array with a forEach

lone glade
#

apply ^

still forum
#

no big diff :u

lone glade
#

but yeah, pretty much the same

#

I fucking hate that config / commands have such a disrepancy

still forum
#

I guess I'll PR that fix later then :u

lone glade
#

it's beyond stupid and should've been fixed by adding more case insensitive stuff

#

or make the returns consistent....

still forum
#

what do you need? inCI?

lone glade
#

yep

still forum
#

I can easily remake the important Arsenal functions in Intercept.. I wonder how that will change the perf :3

#

But.. I need devenv for that :/

lone glade
#

tbh it's not really slow, the change would be imperceptible

still forum
#

Not imperceptible to my profiler though

errant jasper
#

Anything that makes Arsenal faster is good. When playing with TFAR I get dropped out of the TS3 channel because of the performance-lag.

lone glade
#

not arsenal

#

ACE Arsenal

#

which is already stupidly fast compared to BI Virtual Arsenal, also TFAR 0.9 has perf issues

errant jasper
#

Does the new ACE Arsenal "overwrite" the default?

lone glade
#

which are fixed in the dev / 1.0 version

#

it's completely apart from BI VA

errant jasper
#

Alright. Have to tell some people to switch over.

still forum
#

How is TFAR connected to Arsenal performance? It isn't at all related

#

And Arsenal load is scheduled. That doesn't stop the TFAR updates

lone glade
#

WER IS TFAR 1.0 DED

#

GIB

still forum
#

Right there. On github

errant jasper
#

When entering BI Arsenal, occasionally the game will freeze for up to 3~5 seconds, making TFAR move my channel

lone glade
#

on top of the loading screen?

still forum
#

Don't have that even on my modset. In 1.0 you can configure the timeout to up to 10 seconds

errant jasper
#

It is different alganthe. Even after you preloaded, it would occasionally happen.

lone glade
#

jesus

errant jasper
#

Maybe some mods is influencing it.

lone glade
#

oor, or it's just it sucking

errant jasper
#

But I am part of multiple squads and it is beyond my control what mods are used.

lone glade
#

I have seen bis_fnc_arsenal, I am a changed man

still forum
#

Power to the little! Boycott the establishment

peak plover
#

> In 1.0 you can configure the timeout to up to 10 seconds
Amen

still forum
#

Or up to infinite if you run a script manually in debug console

peak plover
#

New update wheeeen ? ๐Ÿ˜„

#

fix #1366 ๐Ÿ˜ฆ

#

Tired of telling people to restart plugin

still forum
#

What is 1366?

still forum
#

Yeah

#

working on that for atleast 3 months

peak plover
#

Thanks

inner swallow
#

#1366 > #350

peak plover
#

Well, It's weird because it didn't happen a few months ago (i think)

#

before TS3.1.7, not sure what tfar v.

still forum
#

I'm still on TS 3.0.19.3

#

Also have it

peak plover
#

The TFAR version in like september I think was fine

#

OR not as often atleast

#

If I didn't notice it then it must not have excited

#

If I didn't notice it then it must not have excited

inner swallow
#

question

#
_caller playaction "putdown";
for "_i" from 0 to 1 do {
_state = animationstate _caller;
waituntil {_state != animationstate _caller};
};
#

this is BI code

#

curious why they need a for loop with one iteration

indigo snow
#

thats 2

#

for is including on both limits

inner swallow
#

oh

#

by why two?

indigo snow
#

maybe they wanted to loop it even more times at a different point in time

inner swallow
#
//--- Play taking animation and delete the object afterwards
        _caller playaction "putdown";
        for "_i" from 0 to 1 do {
            _state = animationstate _caller;
            waituntil {_state != animationstate _caller};
        };
        deletevehicle _object;
        [[_var,"diary"],_fnc_scriptName,_recipients,_persistent] call bis_fnc_mp;```
indigo snow
#

the usage of bis_fnc_mp tells you everything you need to know, haha

inner swallow
#

lol

#

i mean its old yeah

peak plover
#

sooo

#

getpos alternative syntax

#
origin getPos [distance, heading]   
#

It seems very easy to do things similar to ALIVE, where cached(deleted) units move towards their waypoints

#

Anyone other than ALIVE do that ?

vivid locust
#

Is there a way to execute files in a scheduled environment? Let's say I execute a config where a lot of variables are set and before the next file is executed, the script waits until the config is done. I thought 'call' does that. That's how I did it:

call compile "scripts\test_config.sqf";
call test_start;

test_start is a function defined in my compiles so it should be fine.

still forum
#

execVM

#

Or just spawn compile "script"

#

or spawn test_start

#

And.. yes.. call does that.. What was the question again?

vivid locust
#

I want the config to be fully loaded first before the test_start function starts

still forum
#

The code you posted does that

vivid locust
#

I thought so too but it doesn't, the function gives me the error undefined variable of a variable that is set in the config

peak plover
#

preprocessfilenumbers or sth

vivid locust
#

You mean that

call compile preprocessFileLineNumbers
#

Tested aswell, doesn't work either

still forum
#

If the path is correct then.. it does that

vivid locust
#

Hmmm, ArmA wants to troll me again I guess

peak plover
#

jsut use functions library

#

private ["_ctrl", "_fileExists"];
disableSerialization;
_ctrl = findDisplay 0 ctrlCreate ["RscHTML", -1];
_ctrl htmlLoad _this;
_fileExists = ctrlHTMLLoaded _ctrl;
ctrlDelete _ctrl;
_fileExists
// killzonekid
stable wave
#

what effects does disableSerialization have to the code following it?

still forum
#

It disables serialization

stable wave
#

What is serialization?

still forum
#

If you save the game. and load it again the variables will be nil

#

instead of the value that would've been saved

#

so if the script suspends at htmlLoad and you save the game at exactly that time

#

when you load it again _ctrl will be nil and you'll get a script error

stable wave
#

So disabling serialization prevents such things from happening?

still forum
#

disabling serialization disables serialization

#

Which causes the game not to serialize(save) things

stable wave
#

Then why a lot of scripts deal with displays after disabling serialization?

#

What's the benefits?

still forum
#

Because you can't serialize displays

#

So if you try to serialize them but can't -> error

stable wave
#

But as far as I know the MP mission doesn't impletement game saving

still forum
#

It does

#

saving in MP is possible

#

game doesn't care if you disabled saving

stable wave
#

how to debug ctrlDelete? There weren't any errors but the control could not be deleted

lone glade
#

is it part of a control group?

stable wave
#

yes

#

I want to delete it after it is created

#

But it doesn't work

peak plover
#

do a systemChat str _control; bfore deleting

lone glade
#

try to put the ctrlgroup instead of display in ctrlDelete

vivid locust
#

How long does a cutRsc need to create a display before i can store the uiNamespace in a variable?

still forum
#

You can't store a namespace in a variable

lone glade
#

that's the countrary

still forum
#

You can store a reference to it.. I guess.. but why

lone glade
#

or you're a mage.

#

you store refs in vars, which in turn are stored in namespaces

vivid locust
#
_layer cutRsc["_style_" + str(_style), "PLAIN", 1];
_display = uiNamespace getVariable["_style_" + str(_style), displayNull];
#

That's what I mean

lone glade
#

wut

#

displays created via cutRsc are stored in uiNamespace now?

vivid locust
#

I do that in my display. in the onload line:

onLoad = "uiNamespace setVariable ['rlnt_weaponhud_style_1', _this select 0];";
still forum
#

Ah..

lone glade
#

ooooh,

vivid locust
#

:D

still forum
#

so you set rlnt_... variable and expect it to magically appear in _state_... variable?

lone glade
#

so, why not run said func in onLoad ?

#

open it in one, continue in onLoad ?

vivid locust
#

What do you mean? I always did it like that and it works. I am just wondering if I need to place something like a sleep before I can store it into the _display variable.

lone glade
#

you need to disable serialization if it's scheduled

vivid locust
#

I did

lone glade
#

but, that's not your issue right now...

#

the var you set and the var you get are different if you didn't notice

vivid locust
#

Copy pasta mistake

_layer cutRsc["rlnt_weaponhud_style_" + str(_style), "PLAIN", 1];
_display = uiNamespace getVariable["rlnt_weaponhud_style_" + str(_style), displayNull];
#

So between those two lines, do I have to place a sleep?

lone glade
#

yes, but separating the func that opens the display and the one that handles what happens after onload would be even better

stable wave
#

systemChat str _ctrl returns "Control #8811"

#

But I still can't delete it

vivid locust
#

I use the _display variable to edit elements of the display, that's why I do it like that

#

something like that:

(_display displayCtrl 1207) ctrlSetText(getText(configFile >> 'CfgWeapons' >> (primaryWeapon player) >> 'picture'));
lone glade
#

stop the func at cutRsc and continue it in the onLoad EH

vivid locust
#

I tested it. When I place a uiSleep or a sleep with 1 second between the lines I get error in expression

lone glade
#

yes, that's normal

vivid locust
#

That's normal?

lone glade
#

wait, nevermind it's not

#

are you sure your func is scheduled ?

vivid locust
#

It's called

lone glade
#

add systemChat str canSuspendand check what it returns

#

if it's false it's unscheduled and you can't sleep it.

stable wave
#

@lone glade what do you mean by putting the ctrlgroup instead of display in ctrlDelete?

#

My code is ctrlDelete ((_this select 0) displayCtrl 8811)

lone glade
#

ah, right, different syntax

meager heart
#

maybe his control created not with ctrlCreate

lone glade
#

shouldn't matter

#

it's possible it's one of ctrlGroup child control weirdness

vivid locust
#

Okay, ty @lone glade I was able to fix it. It really was a scheduler error.
Now my last problem is the switch. I currently do it like that:

if !(isNull findDisplay 7211) then {
    [] spawn startSetup;    //sets up the display
} else {
    1300 cutRsc["DEFAULT", "PLAIN", 1];
};

I read on the wiki that setting the display to default will remove it (which works) but when I trigger this if condition again it will not show up again, it goes in the else again and I don't know why.

#

Is there something else than using findDisplay to check whether the display is gone or not because i have the feeling the even if i set it to default findDisplay gives the result that it's still active.

lone glade
#

findDisplay should return displayNull if the display isn't found

vivid locust
#

Nevermind, I used a variable for it. Thanks for your help :)

stable wave
#

Is it possible to make showing a control conditional at the time of defining it?

still forum
#

if you create via script sure

#

config no

#

you can just hide it again though

tough abyss
#

nearestObjects for the types i can put ["Plane", "Tank", "Ship", "LandVehicle", "Air"] right?

lone glade
#

any class

#

for man use CAManBase to avoid getting bunnies and sneks

tough abyss
#

sneks

stable wave
#

I use classes and createDialog to create it

#

How to hide a control?

lone glade
#

ctrlShow

tough abyss
meager heart
#

@stable wave > I use classes and createDialog to create it
Then you need ctrlShow false or ctrlEnable false, ctrlDelete works only with controls created with ctlrCreate...

lone glade
#

ctrlEnable != ctrlShow

meager heart
#

he want delete it or hide ?

#

thought he need just remove it anyhow

lone glade
#

ctrlShow then

#

ctrlEnable false controls are still clickable ๐Ÿ˜ฆ

#

same for faded controls ๐Ÿ˜ญ

peak plover
#

whut

river meteor
peak plover
#

You can send it to the back and disable, pretty sure I've disabled controls before

meager heart
#

also was same with ctrlShow... but i think its fixed (right click)

peak plover
#

especially buttons

lone glade
#

they're passed as _this

river meteor
#

Ok, thanks

stable wave
#

the second syntax of ctrlShow worked. Thanks a lot

unborn ether
#

@river meteor

_myControl ctrlAddEventHandler["LBSelChanged", {
    params ['_ctrl','_index'];
}];
#

@river meteor and ctrlAddEventHandler instead of addEventHandler

#

@river meteor Notice that ctrlAddEventHandler stacks an UI EVH, so if you willing to override anything before use ctrlSetEventHandler

river meteor
#

@unborn ether Thanks for the advice.

river meteor
#

Can someone help me understand the merits of ctrlSetEventHandler over ctrlAddEventHandler?

still forum
#

setEH set's it. AddEH add's one onto the list

#

You usually want ctrlAddEventHandler

#

If you want the set variant you'll know that you want it

twin steppe
#

Using the createvehicle and attachto commands to create a vehicle attached ontop of a vehicle in Zues with the debug console. My problem is that the vehicle I created and attached has no collision with vehicles that drive into it. Is there a fix to this?

#

Here is the code so far: this setObjectTextureGlobal [1, ""];
this setObjectTextureGlobal [0, ""];
veh = createVehicle ["B_APC_Wheeled_01_cannon_F",getPosATL this,[],0,"FLY"];
veh attachTo [this, [0, -1, -1], "Pelvis"];
veh setObjectTextureGlobal [2, ""];
veh lockturret [[0,0],true];
veh lockturret [[0],true];
veh setObjectTextureGlobal [0, "A3\Data_F_Tacops\data\APC_Wheeled_03_Ext_IG_02_CO.paa"];

rancid ruin
#

attached objects never have collision

#

i think it even says that on the command page

lone glade
#

yes it does

rancid ruin
#

it do?

twin steppe
#

Odd how it has collision with players, but not with other vehicles.

lone glade
#

it says on the page that they don't have collisions

rancid ruin
#

they didn't in arma 2

#

shit's changed

lone glade
#

players aren't physX objects

#

that's why

twin steppe
#

So is there a command to change that?

lone glade
#

nope

twin steppe
#

Well thanks for the help, saved me allot of time trying to get it to work.

rancid ruin
#

just ran an eachFrame EH for every vehicle in the server, checking if it's bounding box collides with any attached object

#

should be very performant

lone glade
#

you dropped this /s

rancid ruin
#

no i'm being serious

#

i do it on my life server and nobody complains

#

they say it runs very well

jade abyss
#

*triggered*

still forum
#

pulls the trigger

lone glade
#

considering the usual framerate on life servers I don't think they'd notice

#

or the desync, jesus christ the desync

jade abyss
#

Wich desync?

#

That's part of the game

lone glade
#

it's like watching a bunch of mages with guns

rancid ruin
#

it's easy to bait people with life in here

#

gotta love it

lone glade
#

shhh

#

we all knew what you said was false oneoh

#

it's like nigel suddenly saying that scheduler is superior

rancid ruin
#

if you died (from old age or something) i bet you could be revived by someone saying "can any1 help me with this arrest script for my life server?" at your funeral

still forum
#

I like how you can easily detect life guys. Please don't tell them that their idiocy is unmasking them

lone glade
#

some of them are harder to spot

#

but usually they PM you their masterpiece

rancid ruin
#

i'm still amazed that nobody's just made a fucking life game yet. see how many dayz rip-offs/inspired-bys there are

#

if someone just made a life game it'd make them rich and fix arma

lone glade
#

THEY DID

rancid ruin
#

they did?

lone glade
#

a bunch of people made an attempt at a cash grab a while ago

#

a UE4 (demo)

rancid ruin
#

oh that Identity thing on kickstarter?

lone glade
#

yes

#

it's hilarious

rancid ruin
#

yeah that didn't look real lol

#

i mean an actual game

lone glade
#

nah, don't think so

#

the gameplay loop is flawed it would never work

rancid ruin
#

their feature list was like

  • impossible thing
  • thing that would require AAA budget
  • stupid thing
  • literally nobody wants this thing
  • AAA budget thing
    ...
lone glade
#

and the video.... beautiful

#

never laughed so hard at youtube comments

rancid ruin
#

he probably thinks all his players are retards too

lone glade
#

weeeeeeeeelllll

rancid ruin
#

that should be added to the Great Quotes From Arma Discord book

lone glade
#

okay, time to make my quote list

rancid ruin
#

you'd much rather play a dedicated Life game rather than play on a shitty server for arma 3 right?

#

no life server has devs that know sqf very well i'm pretty sure, don't worry about that

jade abyss
#

Some do have some skilled guys, but... thats maybe 0.5%

still forum
#

Arma ยฏ_(ใƒ„)_/ยฏ

rancid ruin
#

those skilled devs should just make the Life game

#

$$$$$$$$$$$$$$$

meager heart
#

not enough skilled for make it standalone, they just skilled...

subtle ore
#

@rancid ruin One of them are...

rancid ruin
#

if you can figure out how to write good SQF then you can definitely figure out how to write good C#

#

therefore you could make a game

#

although i guess the networking aspect is not a walk in the park

still forum
#

C# ๐Ÿคข

rancid ruin
#

unreal is probably a better fit yeah

#

but c++ is way more work than c#

queen cargo
#

in regards of creating a game: i currently think of creating a top down RPG

#

like the old baldurs gate games on PS2

#

simply because there is non of those today

#

but i am horrible with UE simply because i never worked with it

still forum
#

Well... Wouldn't that be a good reason to get started with working with it?

rancid ruin
#

@queen cargo try godot engine

#

it's perfect for that kind of thing, and open source

river meteor
#

You lose a lot that ArmA gives you when you try to make a standalone. It's not as simple as knowing sqf vs knowing C++ or any other mainstream language

#

There is a good reason why identity doesn't have any aircraft for example

rancid ruin
#

using unreal for an RPG doesn't make sense at all imo

river meteor
#

Also, isn't identity the Asylum team?

lone glade
#

it's not a game, it was a demo with stolen market modules

#

or they're incredibly stupid and actually paid for them

river meteor
#

I think they got inspired by the star citizen model

queen cargo
#

@still forum yes ... but it is a hell lot of work and stuff is not easy and straigth forward : /
would even be more temted using a c++ graphics library and doing all myself but that requires actually hell of complicated math

lone glade
#

getting to learn bullet will be helpful for arma 4

queen cargo
#

@rancid ruin looks like a good engine
but ... want to try unreal engine (and use the asset store simply because i am a horrible designer ... but i can code <3)

lone glade
#

since BI is dropping physX ๐Ÿ˜ญ

rancid ruin
#

imo the days of using asset store stuff is over

#

the general public have got wise and will shit on your game regardless of how good it is