#arma3_scripting

1 messages ยท Page 411 of 1

dusk sage
#

This needs to be pinned

lone glade
#

I should keep a gist with quotes like that

dusk sage
#

sounds like something you'd read on r/iamverysmart

still forum
#

That's reasonable. But onEachFrame also uses string interally even if you give it CODE

jade abyss
#

Rly?

#

Then compiles it on each call/Cycle?

still forum
#

Yes. It's a eventhandler

#

Just like every other EH

jade abyss
#

Oh my

#

explains why putting a function is better

unborn ether
#

onEachFrame is persistant on a death if (findDisplay 46)

lone glade
#

one day the 400ms of EHs will get reduced

unborn ether
#

Study that a bit

still forum
#

Function also doesn't work. If you do onEachFrame fnc_func that's just as bad

#

You have to onEachFrame {call fnc_func}

dusk sage
#

Sounding shocked when you're told everything is garbage

#

Shocker

jade abyss
#

addEventhandler ["Type","call fnc_bla"];

unborn ether
#

Where do you add that EVH dude?

dusk sage
#

๐Ÿค”

unborn ether
#

Since any source of EVH is an entity that is deinitialized after mission death.

still forum
#

"entity" "source".. What?

dusk sage
#

Pin it

unborn ether
#

player addEventhandler ["Type","call fnc_bla"];

still forum
#

Each eventhandler is a string in an array of strings.

unborn ether
#

player is an entity

lone glade
#

and EHs aren't entities

#

unless you use gameLogics init fields....

still forum
#

Did you know there are other types of eventhandlers? Besides ones on entities?

unborn ether
#

But they fire only when the entity it attached to is present, m?

lone glade
#

don't tell him about UI EHs yet

unborn ether
#

And where goes your player or display, or whatever since mission is dead?

still forum
#

addMissionEventHandler which is EachFrame doesn't have an entity

unborn ether
#

Yes, because the source is the missionNamespace itself

#

missionNamespace dies with findDisplay 46

still forum
#

I don't know how you always manage to change the topic to something completly unrelated

#

No

#

Eventhandlers are not stored in missionNamespace

dusk sage
#

What

still forum
#

and missionNamespace never dies. It only get's cleared. And no it doesn't get cleared at mission end

lone glade
#

hell, you can run stuff before missionNamespace is available

dusk sage
#

I quote, Ok, fudge the wiki, its for downies :smile:

#

๐Ÿคฃ

still forum
#

it get's cleared before mission start.

unborn ether
#

Ok, show me the way of any code being alive in arma main menu, executed from the mission itself

#

not using onEachFrame and parsingNamespace

lone glade
#

fun fact:
Arma actually starts really fast, it's just that the loading screens suck.

#

the main menu is a mission

#

just FYI

unborn ether
#

๐Ÿคฆ

lone glade
#

so is 3DEN

dusk sage
#

That is completely beside the point, Demellion

unborn ether
#

Main Menu is RscDisplayMain, which is IDD=0

lone glade
#

the only time code can be ran before missionNamespace is available is preStart

#

and yes, you can run and store shit in uiNamespace at that point

unborn ether
#

Well, ok ill stop argue and continue connecting between servers inside the servers. Thanks.

#

Just gone to far again

lone glade
#

are you on drugs?

unborn ether
#

I don' treally want to flame anyone

lone glade
#

and continue connecting between servers inside the servers.

#

bad recursion, bad.

unborn ether
#

Yes, I can redirect my client from one sever in-game to another lobby

#

with one click

dusk sage
#

You can read KKs silly release then

lone glade
#

anyone knows what KK is doing now btw?

unborn ether
#

You should pin a guy saying KK's silly release not me

dusk sage
#

Sitting on twitter all day by the looks

#

It is a silly release

unborn ether
#

That dude done more than you, im sure.

#

Because that thing works

#

as intented

dusk sage
#

Yes, that happens when you do work for the company that makes the game

still forum
#

Someone else already made such a thing in Arma 2..

dusk sage
#

It leads to more harm that good, there was no need for it

still forum
#

He works for BI and can add stuff to the engine as he pleases. But instead he decides to do a total hackjob with unintended behaviour

unborn ether
#

Why harm?

dusk sage
#

Script kid joins your server

#

Now you're in another server

#

I thought that'd be obvious

still forum
#

And boom he owns your computer ^^

unborn ether
#

Learn how to use remoteExec from server, and don't perform that on client

dusk sage
#

What?

still forum
#

Wtf?

lone glade
#

wut

still forum
#

And again you somehow managed to just switch to a completly unrelated topic

unborn ether
#

8] BoGuu: Script kid joins your server [16:48] BoGuu: Now you're in another server

still forum
#

Script kid executes the script.
I don't see how that is related to using remoteExec from your server

dusk sage
unborn ether
#

He cant execute it

#

He doesn't have it

still forum
#

wtf?

dusk sage
#

What?

still forum
#

He does.

#

You linked the code above

dusk sage
#

He just needs to press CTRL+C

#

Then execute

unborn ether
#

Oh..

lone glade
#

pasting doesn't work in MP btw

unborn ether
#

There s a thing called Database

#

Which says are you allowed to go there or not

#

Like i need to explain that? really?

dusk sage
#

Pasting works in MP?

lone glade
#

nah

#

it doesn't

little eagle
#

Yes it does.

dusk sage
#

What are you on about

#

Just press CTRL+V ๐Ÿ˜„

lone glade
#

is it just for the debug console then?

dusk sage
#

It works for the debug console

#

Or any box you can input text

little eagle
#

copyFromClipboard doesn't work, but that's just the command.

lone glade
unborn ether
#

And where are you willing to go anyways, just curious ๐Ÿ˜„

lone glade
#

DAMN, FOILED AGAIN

dusk sage
#

Imagine if you needed to use a command to paste

#

That'd be class

still forum
#

puts a foilhat onto @lone glade 's long eyes

lone glade
#

You do to retrieve shit from the clipboard in arma

little eagle
#

The windows clipboard works fine even without the SQF command.

dusk sage
#

Do you play without a keyboard ๐Ÿ™ƒ

still forum
#

No I play with a clipboard

lone glade
#

commy pls

#

no bulli

dusk sage
#

damn

still forum
#

@wraith cloud Arma no support racing wheel. I tried.

lone glade
#

arma """support""" racing wheels and other input devices

still forum
#

Well it kinda does.. but... Not really

dusk sage
#

Quick, add it to intercept

errant jasper
#

The windows clipboard sucks. In general that is, can't even copy null-bytes.

still forum
#

Intercept_CBA already has joystick and other controller support @BoGuu#1044

dusk sage
#

oh god

#

That backfired

still forum
#

You could even control gamepad vibration via script :3 But I didn't implement that yet because I no have vibrating gamepad

lone glade
#

time to make an adult toy for men playing arma

still forum
#

....

#

Bad

#

Bad ๐Ÿ‰

#

(Hidden joke)

lone glade
#

not so hidden

#

you furry horror

dusk sage
#

'Oh please don't shoot me, please!!!'

still forum
#

๐Ÿ˜ง

jade abyss
tough abyss
#

hi, how would i make a script loop on respawn of a player with debug?

still forum
#

onPlayerRespawn.sqf -> while true do {diag_log "debug";}

tough abyss
#

as in the debug console

#

so like player setCustomAimCoef 0; except making that loop on respawn

still forum
#

What does "loop on respawn" mean?

#

You want to start a endless loop at respawn. or you want it to run at respawn

tough abyss
#

As in when they respawn I will not have to execute the script again

#

So they will not have sway when they die

still forum
#

With "when they die" you mean "after the respawned" ? Because those are completly different things

tough abyss
#

After they respawn

still forum
#

addMissionEventHandler ["EntityRespawned", {(_this select 0) setCustomAimCoef 0;}] Put that into init.sqf

#

Will set the custom aim coef on every respawned unit immediately after they respawn

tough abyss
#

Thank you

#

And if there wasn't init.sqf only initPlayerLocal, initBriefing, initPlayerServer and initServer where would i put it

unborn ether
#

@tough abyss If you dont have init.sqf just create it.

#

@tough abyss In the mission root

tough abyss
#

is it necessary tho

#

surely I can just place it in one of these as i see other scripts like fatigue

unborn ether
still forum
#

You could make a description.ext with CfgFunctions and then make a preInit function and use that.. But.. Why?

unborn ether
#

@tough abyss init.sqf is performed both Host/Client, while initServer.sqf and initPlayerLocal.sqf. You got it?

tough abyss
#

ok

unborn ether
tough abyss
#

ty

fossil yew
#

Hi there, have a question. Does conversation system work in multiplayer?

I have (unsuccessfully) tried defining voices.bikb:

class Sentences
{  
    class CarrierOfficerBriefing
    {
        text = "";
        speech[] = {"\cnto\missions\missions\cn-c-ODC_Part-2.Winthera3\voices\briefing_2.ogg", 2, 1, 20};
        class Arguments {};
    };
};

class Arguments{};
class Special{};
startWithVocal[] = {hour};
startWithConsonant[] = {europe, university};

and then in one scripting file:

officer kbAddTopic ["briefing", "voices.bikb"];
officer kbTell [briefing_listener, "briefing", "CarrierOfficerBriefing"];

but units officer and briefing_listener don't do anything. The sound used is in the mod hence the long absolute path.

meager heart
fossil yew
#

@meager heart thank you

winter dune
#

what does WeaponGroundHolder mean?

#

does it return all the objects on the ground if combined with allMissionObjects?

still forum
#

It's a weapon holder. That is on the ground

#

It's a inventory where you can put stuff into

#

If you throw a weapon on the ground then a weaponholder get's created and the weapon get's put into it

meager heart
#

also WeaponGroundHolder >GroundWeaponHolder

winter dune
#

yes, sorry

#

I'm trying to create a cleanup function but I can't understand how can I avoid using the bis function

{
        if (([_x] call BIS_fnc_itemType) in ["Weapon","Magazine","AccessoryMuzzle","AccessorySights"]) then { deleteVehicle _x; };
    } forEach (allMissionObjects "GroundWeaponHolder");
#

and also throws and error: type obj expected string

still forum
#

What?

#

Yeah.. Because that code is bullshit

winter dune
#

well, I tried xD

still forum
#

A weapon holder is always a weapon holder. And fnc_itemType is for items

winter dune
#

what command should I use instead?

#

or if there is something already implemented

#

my main goal is to delete everything on the ground except some items

still forum
#

What are some items?

#

weapon holders are like backpacks or vehicles

#

If you want to go through everything in there inventory you have to do that. Just like with vehicles

winter dune
#

let's say, weapons on the ground

#

I want to keep weapons on the ground, delete everything else

still forum
#

Yeah. Find all groundWeaponHolders like you did.

#

But you have to manually go through the inventory of each of them

#

a weapon holder can hold thousands of items

winter dune
#

and how can I understand that the X weapon holder has a weapon in it?

still forum
#

getWeaponCargo

#

gives you a list of all weapons in it

#

and then you can use bis_fnc_itemType on the classname

winter dune
#

ah ok, thanks for the input

unborn ether
#

@winter dune Keep in mind that you'll have a need to parse content of that weapon holder, because by your logics you gonna delete any weaponholder with litter in it, even if with a gun. Easiest is just not to delete it, if it has at least 1 weapon.. etc.

#

Need a sleep, fuck

still forum
#

What? By his logic he wants to delete everything that doesn't have a weapon.

unborn ether
#

Aha, delete anything with

["Weapon","Magazine","AccessoryMuzzle","AccessorySights"]

winter dune
#

yeah, that was wrong xD

unborn ether
#

oh come on

winter dune
#

wrong logic

unborn ether
#

markup

#

whatever

#

you got @winter dune right?

#

๐Ÿ˜„

meager heart
#

btw its possible like that ```sqf
{clearWeaponCargoGlobal _x} foreach (nearestObjects [_position,["GroundWeaponHolder"],_radius]);

still forum
#

@meager heart No it's not

#

That doesn't make any sense

meager heart
#

Test it

still forum
#

No

meager heart
#

๐Ÿ˜€

still forum
#

He said he wanted to delete everything besides weapons.
And you solved it by.. Deleting weapons but keeping everything else

#

That's bullshit

meager heart
#

No its just an example... put there whatever you whant

#

clearItemCargoGlobal etc

still forum
#

How is that different from the code he had before?

peak plover
#

Kinda not scripted but anyone use imageToPAA?

still forum
#

yes

peak plover
#

incorrect file size error

#

Any clue why?

still forum
#

Ugh. Size not multiple of 2 ?

peak plover
#

aah

#

shit

#

W/H

#

yeah

#

thought it file size

still forum
#

There is a bug where it sometimes completly.. bugs out even though everything is correct. I have a hacked version somewhere that disables that check

river meteor
#

It's a 50/50 whether imageToPAA works for me. Tex view has never failed me though

#

I need some advice on how I set up client & server communications. I was thinking I would remoteExec from the client to tell the server to update a publicVariableClient and then have a listener on the client for that updated variable. I'm trying to fetch data from a database. So I need to have the client request the data from the server, and then the server to give the data to the client. Is this a bad plan? Is there a more effective way to do this?

still forum
#

What? If you use remoteExec one way.. Why not use it the way back too?

#

Why use two completly different methods when you could just use one

river meteor
#

I would like to from within the same sqf file ask the server for data, have the server return, and then act on that data. If I use remoteExec both ways how can I guarantee the server returns before I try to make use of the data?

still forum
#

remoteExec a setVariable back

#

But yeah.. could use publicVariable then.. If you really wanna do such a thing

river meteor
#

It would be perfect if remoteExec could pass a return value from calling a function on the server, but it doesn't so I think I'll try the setVariable method, although it does seem a bit clunky

tough abyss
#

just remoteexec the returned value back

still forum
#

@tough abyss That's what i just said.

#

I'd just make it asynchronous. Instead of
<code1>
wait for answer
<code2>

Just do
<code1> and when answer arrives do <code2>

tough abyss
#

true, but person still seems confused ๐Ÿ˜›

river meteor
#

right, which I would do with the event handler. I don't see how I could be async with a two way remoteExec

still forum
#

A two way remoteExec is async already

#

Instead of using a PVEH just.. Put that handler code into a function and call that via remoteExec

river meteor
#

I see what you are saying now. Makes sense, thanks

viscid marlin
#

Can anyone send an example eden script for someone who has had programming backgrounf but new to Arma's sqf language?

still forum
#

if true then {}

#

There ya go. It's a script and it works in eden

viscid marlin
#

Huh

still forum
#

Not what you wanted? Or... ?

unborn ether
#

WTB 3DEN Scripts, cheap.

peak plover
#

3den script

#

If your script in function library, you don't have to execVM

halcyon crypt
#

any way to align the hint text to the left instead of centered?

still forum
#

If you hint structured text then yes

halcyon crypt
#

oooohh nice ๐Ÿ˜ƒ

tough abyss
#

^^ that was first bit of sqf code i did back in the day for a2 dayz

still forum
#

A completly scriptable remake of the MP lobby?

lone glade
#

what I noticed is that commy doesn't follow ACE func header guidelines

#

TRAITOR

subtle ore
#

How dare he

tough abyss
#

no lol structured hint for debug info so it had label left + value right side, instead of all centered aligned

still forum
#

^^

halcyon crypt
#

mmmm fancy thanks ๐Ÿ˜ƒ

errant jasper
torn juniper
#

Is there a way to view engine commands or anything like it? Or if someone knows a method could they look up something for me?

still forum
#

Define engine commands

#

There are no engine commands

queen cargo
#

biki

still forum
#

biki lists SQF commands

torn juniper
#

Ones that have no documentation and have a fat banner on biki saying engine command undocumented

#

๐Ÿ˜„

queen cargo
#

?

still forum
#

example?

torn juniper
#

removeWeaponCargo

queen cargo
lone glade
#

+= โœˆ

#

huehuehuehue

still forum
#

Doesn't say engine command anywhere

#

@torn juniper enter command in Debug console and press F1

#

A list of all commands: supportInfo or just check Intercepts command list

queen cargo
#

just means it is exported instead of handly added

still forum
#

There is no export script

queen cargo
#

more or less

still forum
#

every command is handly added

inner swallow
#

Returns a random element from the given array. Engine solution to BIS_fnc_selectRandom

queen cargo
#

it is enough to give him an idea

lone glade
#

nah there is ded

still forum
#

I do the same with all commands I add to biki

inner swallow
#

see that dedmen

#

wiki says engine solution ๐Ÿ˜›

still forum
#

engine solution != engine command

#

They are obviously different words

inner swallow
#

pedantic, but fair ๐Ÿ˜›

torn juniper
#

Thanks, Ill take a look when I can get back on arma

peak plover
#

yiss my shit works

queen cargo
#

Released SQF-VM Standalone Alpha 0.1.4 (tool allowing you to run arbitrary sqf code)
highlights this version:

torn juniper
#

On inventory eventhandler, ctrlsettooltip doesnt seem to work where as in the same settings it will work in display 46 versus the inventory 602. Anyone know anything about this? I assume it is because all of the hardcoded portions of the inventory

peak plover
#

๐Ÿ‘Œ ๐Ÿ‘ Good Job and Thanks @queen cargo

queen cargo
#

๐Ÿ˜‰

#

can somebody send me the latest copyToClipboard supportInfo output? (http://pastebin.com or a txt file via pn)

#

((i call it: out of touch development))

lone glade
#

stable or dev ?

queen cargo
#

does not matters

#

its more about having one that is not a year old

lone glade
#

huehuehue

#

you care about formatting or not?

queen cargo
#

nope

#

just plain output

lone glade
#

1sec so I tag it with the proper game version for future ref

queen cargo
#

โค

lone glade
still forum
#

@queen cargo does not matters -> does not matter

queen cargo
#

yyy

peak plover
#

I can't find the open curator event

still forum
#

use the display

peak plover
#

?

still forum
#

CBA XEH displayOpened

#

That's what I and ACE use

peak plover
#

aah okay, that'd work thanks

still forum
#

so I guess there is no easier way

peak plover
#

:\

#

No fps efficent way ๐Ÿ˜ฆ

still forum
#

yes... The CBA XEH displayOpened...

#

that is fps neutral

peak plover
#

Also might be a chance that I have to create buncha game logics or markers or sth instead of locations, because zeus can't edit locations ๐Ÿ˜ฆ

#

Probs markers if I can get those editable, cuz should be less fps impact

#

You used in TFR?

#

TFAR

#

Can't find the line in either of them :S

still forum
#

what what?

#

displayOpened XEH? yes

peak plover
#

but das not CBA

#

load? :S

#

Yeah

#

Load

peak plover
#
[
    "load", {
        systemChat str _this;
        if ((findDisplay 312) isEqualTo (_this param [0])) then {
            systemChat '1';
        } else {
            systemChat '2';
        };
    }
] call CBA_fnc_addDisplayHandler;
#

Does not function

#

returns an id

#

But does not compute ๐Ÿ˜

still forum
#

Wow

#

genius

#

If it returns an ID

#

Then.. Guess which ID

peak plover
#

What

#

ID does not matter

still forum
#

Also... use XEH. That works

#

No idea about the script never used that

#

addDisplayHandler is also a completly different thing

peak plover
#

uhh

#

how do I use xeh for display?

still forum
#

Config

#

Just like I use in TFAR. I even linked it

peak plover
#

#notamod

still forum
#

Well.. I guess you don't then. Don't know if you can add XEH's via script @little eagle will know

peak plover
#

fug

#

[] spawn {while {true} do {}} it is

still forum
#

with a sleep or waitUntil

peak plover
#

JAAS

jade abyss
#

One thing that just came in my mind:
Didn't you need some kind of tiny delay, when loading the display EH?

#

I remember having to add something to the inventory. Then it worked normaly

peak plover
#

hmm

#

lemme try

jade abyss
peak plover
#

lol crashed my game trying to create markers

jade abyss
#

When i loaded that stuff directly in the EH, it wouldn't have loaded all the time

#

lol noob

peak plover
#

ohh here we go

#
count allMapMarkers
//95653
#

map markers proven FPS friendly

#

Just freeze when creating 100k in unscheduled

queen cargo
#

mapmarkers are nothing but strings ...

#

only thing i am wondering is if they are in a map or in some auto-growing array

#

but to sum up: data that is not used cannot impact performance

peak plover
#

ahha, but different from locations, I can use markers with zeus

#

Well

#

the EH does not fire at all

#

addDisplayEH

jade abyss
#

Code?

peak plover
#
[ 
 "load", 
 {
systemChat '0';
 } 
] call CBA_fnc_addDisplayHandler;
jade abyss
#

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

peak plover
#

cooo coo cooo cooo

still forum
#

because what you do doesn't make sense

peak plover
#

wiki suggests keydown inputaction 'curatorinterface'

#

Yeah

still forum
#

as you can't add a display eventhandler to a non-existend display

#

which is what addDisplayHandler does

peak plover
#

Parameters:
    _type - Display handler type to attach. <STRING>
    _code - Code to execute upon event. <STRING, CODE>
#

ยฏ\(ใƒ„)/ยฏ

still forum
#

Why do you post that?

#

Do you read what i write?

peak plover
#

It does not take display as param?

still forum
#

CBA_fnc_addDisplayHandler add's a display handler to a already existing mission display. Not curator or anything else. And after it already exists not before it get's created. So "load" EH doesn't make sense

#

it says <STRING>

#

So.. No??

#

It also says _type and handler type. So... NOOOOO???

jade abyss
#

Oi Dedmen, can you access the ID's of items inside a Container and remove them from it? (without the "removing and readding everything"-workaround)

still forum
#

Theoretically sure.

#

Too much work though

peak plover
#

Both load and unload don't work

jade abyss
#

Ah, "you can't fail, if you don't even try " roll_safe

peak plover
#

Ohh well yeah it's missionDisplay

#

Duuh

still forum
#

Which i already said above....

peak plover
#

Yeah, but I thought even 'tho

#

It would have unload and load, but nah

still forum
#

First thing I said is that it's a completly different thing

peak plover
#

Yeah

#

I thought this is sth else

still forum
#

If you don't even want to listen to what I say why do you ask me then

peak plover
#

I thought at first that it's EH for any display that gets initialized

#

and all of them would have it

still forum
peak plover
#

I did read, was just trying to make sense of it

#

Yeah, I thought it's compleatly different. Gotta get that coffee

peak plover
#

Ahh, thanks

still forum
#

Wait

peak plover
#

I was hoping it would just plug here ๐Ÿ˜ฆ

still forum
#

Wow...

#

Why do you confuse me with you cannot use config

#

ofcause you can

#

description.ext is a config

peak plover
#

Hmmmmm

#

["KeyDown", {
    if (inputAction 'CuratorInterface' > 0) then {
        systemChat '1';
    };
}] call CBA_fnc_addDisplayHandler;
#

wwwwwords

still forum
#

Okey.. I just gave you the solution.. But feel free to just ignore me

peak plover
#

No don't worry. Thanks dude appreciate it. I am gonna use that

#

Just looking through the TFAR exampe and XEH stuff, cuz I never used config for CBA

#

inputAction has been unreliable, but just found out that works

still forum
#

You basically just put a string of the code in there

#

best just _this call nig_fnc_onCuratorOpen or like that

#

That string is always compiled before it's called

subtle ore
#

_this call nig_fnc_sendToJail

#

because we all know nigel is making this for a lifer scenario

peak plover
#

LOL, no I don't ๐Ÿ˜ฐ

subtle ore
#

YES YOU DO NIGEL! We all know it, just give it up now.

torn juniper
#

@still forum how much work is too much work

peak plover
#

eey works, Thanks

still forum
#

5

torn juniper
#

No pls

#

Your response to dscha about inventory IDs

still forum
#

@subtle ore the thought not the though

#

How should I explain that to you?

subtle ore
#

What?

still forum
#

You know nothing about that... It's just too much work

subtle ore
#

didn't see it

#

thanks for being my spell checker

torn juniper
#

I would rather attempt a method or look into it then delete everything and readd it, spewing out attachments and all

peak plover
#

>playing PUBG
lol

still forum
#

He asked for a way to not delete everything. So deleting everything is not part of the solution...

subtle ore
#

Lots of bulli tonight I see

torn juniper
#

Right, that was the method I had. Trying to not do that

#

Since it can create odd attachments and have detached attachments

subtle ore
#

@peak plover At least I'm not as bad as a lifer

peak plover
#

๐Ÿ™„

subtle ore
peak plover
#

Umm

#

Was I dreaming this or is it possible to add markers to zeus?

still forum
#

I think you can add markers in Zeus. And maybe move them too

peak plover
#

Yeah I can do with zeus interface

#

But not with script?

still forum
#

Ace has moveable markers.. soo

#

Probably

fringe yoke
#

Hey guys, quick question. Is there a good way to get a unique id for ai units? I want to track them over time so I need a unique id for each one

still forum
#

yeah..

#

netID Or just.... str

#

or setVariable and generate a ID yourself

#

or the name

fringe yoke
#

netID should do the trick, thanks

snow raft
#

Someone here who can help me with iniDB2 ? I am trying to write a small mission for me and a few mates and I just dont get it to work on every client. Saving is just firing for me and no one else and I just dont get it ^^

barren magnet
#

Is battleye enabled ?

snow raft
#

I think so, its not even a dedicated server^^

#

Nothing too serious, just wanted to learn a few things so I decided to write something thats useable, were playing over internet, I am hosting

#

I figured it has something to do with the locality of the scripts but I dont get what I am doing wrong ^^

barren magnet
#

That might be your problem

#

Let everybody disable battleye on their clients

tough abyss
#

? sounds like he is running the inidb scripts locally on all the clients

viscid marlin
#

Newer to scripting for Arma here, how do I actually get my script to be tested in zeus. The script is supposed to work in zeus but not Eden

cedar kindle
#

what does your script do?

viscid marlin
#

Its a box that removes your items from your inventory then replace it with the kit that a class would have

still forum
#

Scripts working in Eden is still bullshit. Eden is a Editor.

#

There is no player with an inventory in Eden

lone glade
#

weeeeeelllll

#

yes it's bullshit, buut you can "play" in 3DEN ded ๐Ÿ˜„

still forum
#

That is not "in" eden tho

lone glade
#

no, it is

viscid marlin
#

I am with the 501st unit and we are doing some custom scripts for our ops, according to our head scripter I need to get it working in eden so they dont have to zeus it in

lone glade
#

have it working in the editor, as in WHILE TESTING IT IN THE EDITOR

still forum
#

Why does your head scripter not take care of it? Isn't that what he is there for?

viscid marlin
#

Its my test

lone glade
#

its a simple addAction from what I can gather ded

viscid marlin
#

And he is working on mem leaks

viscid marlin
#

I have the script ready

#

I gave tried to get it to work

lone glade
#

jesus, that's the worst format to pass an sqf script i've ever seen, wait a sec

#

there

viscid marlin
#

Better

lone glade
#

also, jesus why do people use comment still...

viscid marlin
#

Thats auto generated and unnecessary

peak plover
#

That's vanilla editor export lol

viscid marlin
#

^

still forum
#

Is that just a couple arsenal exports?

peak plover
#

> 2018
> not ace 3 arsenal

viscid marlin
#

Yep

lone glade
#

setUnitLoadout would be 3 lines at best

#

correction, maybe 5

peak plover
#

Just use ace arsenal instead of vanilla arsenal ๐Ÿ˜

viscid marlin
#

For some reason we dont

peak plover
#

You can use it to export your loadout

lone glade
#

brb, i'll go back to cry myself in a corner

#

tfw people prefer Virtual Arsenal to ACE Arsenal -> ๐Ÿ˜ญ

peak plover
#

I don't understand it either. Vanilla arsenal is ass compared to ACE Arsenal

viscid marlin
#

Good to know

still forum
#

@lone glade They probably use it but don't even know they do

lone glade
#

if there are issues i'd like them reported, or at least told to me.... so i can fix em'

still forum
#

Had just the same situation last week

#

Guy didn't want ACE Arsenal because he didn't like it

#

no reason. Just gut feeling not likeling

peak plover
#

LOL

viscid marlin
#

Its not up to me

#

They want it in vanilla

peak plover
#

Probably the default camera controls

snow raft
#

player addAction ["save", {[] call UN_fnc_savedata;}]; placed in initPlayerLocal, why is that not firing? No action showing up, executed in Debug Console works ..

still forum
#

ACE Arsenal scripts are vanilla

peak plover
#

^^^

viscid marlin
#

I think it has to do with memoey leaks

still forum
#

@snow raft Maybe initPlayerLocal is too soon?

lone glade
#

setUnitLoadout exist FYI

#

nah ded

peak plover
#

memory leaks?

#

I blame asset mods

still forum
#

The only "memory leak" which btw isn't even a memory leak is the container entity bug

lone glade
#

initPlayerLocal is ALWAYS after the player start existing

unborn ether
#

also, jesus why do people use comment still... because there s no Arma SDK besides the console that obviously doesn't support// preprocessing

lone glade
#

might be a syntax error

#

it does

#

just FYI, it does

peak plover
#

> 2018
> complaining about FPS
> gives ai scopes and backpacks
๐Ÿคฆ

snow raft
#

waitUntil {!(isNull player)}; got that one line before @still forum

lone glade
#

snacklemore

#

NEVER, EVER SUSPEND AN INIT SCRIPT

#

EVER

snow raft
#

ah

unborn ether
#

@lone glade some console update recently supporting //?

snow raft
#

ty

lone glade
#

"recently" about 10 versions ago

still forum
#

@unborn ether I think CBA should have fixed that

lone glade
#

oh right I never play without CBA, that might be why ๐Ÿ˜„

unborn ether
#

I just asked, i don't really use default console much.

lone glade
#

going to check

unborn ether
#

And since it has that problem, never tried to even paste a code with // since 0.50

viscid marlin
#

What other consoles are there

snow raft
#

why exactly is it so bad to suspend an init?

still forum
#

@unborn ether that comment comment is bullshit.
Talking about Arma SDK is bullshit too.
But instead of comment "stuff" people can just use "stuff" to get the same effect without the perf problem

viscid marlin
#

I am coming from developmemt using java thats why I use //

lone glade
#

// is what you should use

still forum
#

@snow raft Because you suspend other stuff too that you didn't intend to suspend.

unborn ether
#

@viscid marlin Well you can create your own, if you are experienced enough. It comes in handy especially in places, where you can't get to default arma console.

lone glade
#

you suspend everything waiting for initPlayerLocal to finish

still forum
#

suspending a postinit script for example and waiting for something after postInit will give you endless loading screen

lone glade
#

nope, vanilla also supports //

unborn ether
#

@still forum bullshit bullshit. Explain the reason why comment is so bad?

lone glade
#

afaik that was added by KK 10+ versions ago

#

because it's deprecated

still forum
#

@unborn ether Because it's a SQF command that does nothing

#

Why do something to do nothing if you could just do nothing in the first place

unborn ether
#

@still forum like why you should do \\ or comment both then, it does nothing.. oh.

still forum
#

\\ doesn't work

#

// is preprocess time. comment is runtime

lone glade
#

forward slashes not back :p

unborn ether
#

comment doesn't work you said, what runtime?

still forum
#

I never said it doesn't work

#

// is evaluated once when you preprocess the script. comment is evaluated everytime you run the script.

unborn ether
#

Well you said it doesnt do anything

#

So what runtime?

still forum
#

Yes

lone glade
#

you can literally replace
comment "myComment"; by "myComment";

viscid marlin
#

So @lone glade the script doesnt actually work in game, its supposed to put a bright green box down

still forum
#

That's true

lone glade
#

it's literally the same thing

still forum
#

runtime as in. Time when the script actually runs

lone glade
#

I feel like we already had that discussion ded

unborn ether
#

And if it really does nothing what it takes ?: D

still forum
#

3 microseconds per execution

#

vs nothing at all

lone glade
#

I have a very strong dรฉjร  vu effect.

still forum
#

a infinite performance improvement.

#

Like.. Try yourself

unborn ether
#

Well using Sublime for finding all comments is kinda handy for me

lone glade
#

O.O

#

// bruh

still forum
#

put comment "stuff" in debug console and test performance. Then replace by //stuff and test again

lone glade
#

or do you not have sqf highlighting ?

still forum
#

Why can you search comment but not // ??

lone glade
#

hell, you have regex support in sublime...

unborn ether
#

I dont really like the rainbow of SQF in Sublime

lone glade
#

O.o

still forum
#

if you don't care about the performance then fine. Do whatever you want

unborn ether
#

No, really it just hurts. and whatever comment or \\ just a markup decision. It doesn't really takes it to say not to use its, like its bad.

snow raft
#

Not firing in init too, I dont get it..

still forum
#

Again \\ doesn't work.

#

and no it's not a markup decision

#

it's a measureable performance impact

unborn ether
#

What if i say \ is also a runtime of C++ preprocessing. It checks it and skips it.

still forum
#

Which is really BI's fault

lone glade
#

do you see a rainbow in that image ?

still forum
#

@unborn ether compiletime vs runtime. Google that if you don't understand it

lone glade
#

gne, I didn't add your name on that func ded O.o

still forum
#

huhรŸ

lone glade
#

UMLAUT DETECTED

still forum
#

รŸ is not a umlaut actually

lone glade
#

รŸ

still forum
#

It's a sz

unborn ether
#

@still forum Like did i ask you telling me that at all at the point of some infinite nothing performance

lone glade
#

is german weirdothingy

unborn ether
#

You are not telling huge thing about it dude

still forum
#

What?

unborn ether
#

That

still forum
#

I said everything I needed to say didn't I?

lone glade
#

it's stupid to use comment, that's all there is to it

unborn ether
#

Stupid for you?

still forum
#

3microseconds runtime.
vs 0 runtime.
second one is infinetly as much faster

lone glade
#

it makes it harder to see comments when you have highlighting

unborn ether
#

Well keep that ok

#

Just dont tell people its stupid, because its like discussing pepsi against cola

lone glade
#

because it is

unborn ether
#

the personal decision

lone glade
#

it's stupid

still forum
#

Weren't you just arguing about isEqualTo vs == bullshit just because it's faster by a tiny amount?

lone glade
#

it's a useless command that doesn't highlight properly in an editor

#

it's more chars than //, it's thus longer to type

unborn ether
#

did you know you can actually change your syntax preferences

#

or its also stupid? ๐Ÿ˜„

lone glade
#

there's LITERALLY 0 benefits from using it

indigo snow
#

You can also type 1+1+1 instead of 3

lone glade
#

you can type "comment"; and it'll do the same thing

still forum
#

And if you really really want to you can just "comment stuff" if you still want to find all comments by searching for it

indigo snow
#

I mean ive used it in the past for the hell of it but i recognize its silly. I can do silly things its no big deal.

still forum
#

I would never use it because I use // everywhere else too.. But.. Even if I'd used it. I would stop after I see that by removing it I can get a infinite times performance improvement on that line of non-code

pliant stream
#

it's somewhat useful in the editor where you don't have the preprocessor

still forum
#

Why spend precious runtime on stuff that doesn't do anything

lone glade
#

YOU DO

#

YOU FUCKING DO

#

THE EDITOR SUPPORTS //

pliant stream
#

oh

#

not in arma 2 :D

still forum
#

And again. comment is just a command that does absolutely nothing.

#

It's the same as just writing the string without comment

lone glade
#

it's better to do it without comment ๐Ÿ˜„

still forum
#

If you want to see it you can just "//comment"; that will work without preprocessor too

#

I mean.. That's still a unnecessary stack push and pop.. But...

#

Better than a command call

pliant stream
#

does that allocate

still forum
#

Yes

#

Everything does tho.. sooo...

lone glade
#

inb4 someone starts defending , as line break

indigo snow
#

My ; key is broken

peak plover
#

write code > comment > everything works > remove comments > play

lone glade
#

forget why you did X > cry as you fix it again

still forum
#

remove comments and all whitespace. And make all variables as slow as possible @peak plover

#

Because we know that all matters right?

#

Some idiot showed that in a youtube video so it has to be right

peak plover
#

variable = v1

lone glade
#

case in point:
My scalar that doesn't work as a scalar without converting it to a string and back to a scalar

river meteor
#

do defines not work in strings?

lone glade
#

imagine if i didn't comment that

#

dude who thought he was doing cleanup would've gone fucking mental ๐Ÿ˜„

snow raft
#

ok, did the same now with an object and the action is there and works.. so why not on my player? Im confused..

still forum
#

@river meteor You need to use ' quotes instead of " quotes

river meteor
#

Is that a c thing or an sqf thing?

pliant stream
#

or you could just use stringify...

lone glade
#

.... you realize actions added to yourself can't be used by yourself ?

still forum
#

No. That's the same as " quoted string

unborn ether
#

You know what guys, I actually joined discord just by the lead of one phrase: dude, I better never ask anything there again, i was like feeling being dumb trying to ask, never really had an intention before. And thats a fucking true. There are really a bunch of you trying to bind every person to your local rules. You fucking flame some experienced dudes and in meantime push newbies by your own rules. Because you just argue about whatever that is. Just to argue, because you are fucking better. comment takes NOTHING to process on novadays CPU. Its literally NOTHING. If you wish do it. But calling that markup way silly - well thats your own world.

still forum
#

Just it allows macros. Don't ask why

snow raft
#

and that is why @lone glade?

pliant stream
#

literally nothing

#

i don't think that word means what you think it means

still forum
#

@unborn ether It takes 3 microseconds. Please don't teach people bullshit. Thanks

snow raft
#

because if executed in console I can use them

lone glade
#

@snow raft nevermind it should be available

#

confusion between ace actions and addAction ๐Ÿ˜„

unborn ether
#

@still forum Don't tell people its important to keep that infinite low bullshit values.

pliant stream
#

importance is subjective

still forum
#

Never said that it's important

unborn ether
#

Then stop arguing about it dude

pliant stream
#

@unborn ether don't tell people its not important

still forum
#

It's extremly important for the stuff I do

unborn ether
#

I like comment whatever you say

still forum
#

And I already said if you want it that way then that's okey

lone glade
#

@snow raft do you mind posting the rest of the file / function ?

unborn ether
#

@still forum You should just never talked about that damn 3 microseconds

still forum
#

I wrote it 3 times.

unborn ether
#

Its not important at all

still forum
#

And it might not be for you

viscid marlin
#

// > comment

pliant stream
#

why are you so butthurt about it? important is subjective

indigo snow
#

Theyre only explaining why its a silly command. Its nothing to do with you.

snow raft
#
_dataplayrname = profileName;
_dataplayruid = getPlayerUID player;
_dataplayrpos = getPosATL player;
_dataplayrdir = direction player;
_dataplayrdamage = damage player;
_dataplayrloadout = getUnitLoadout player;
 
 
 
un_database_save = [_dataplayrname,
                    _dataplayruid,
                    _dataplayrpos,
                    _dataplayrdir,
                    _dataplayrdamage,
                    _dataplayrloadout]; 
publicVariableServer "un_database_save";
hint "saveing game";
};
player addAction ["<t color='#38BAFF'>Save Game</t>", {[] call UN_savedata;}];```
still forum
#

We just told people that using comment makes no sense. because it doesn't. And you started arguing about it as if your life depends on it

unborn ether
#

Because i don't really want to listen someones subjectives in a place where is being passed as a superposition

indigo snow
#

Theyre right tho it is silly

#

Nothing bad with being silly

pliant stream
#

well the fact is that there is an objective advantage to using preprocessor comments

#

whether or not there is a subjective advantage is, well, subjective

unborn ether
#

Like you coded engine and you know it? What if i say that // is also processed as it get lint check anyways?

still forum
#

I actually do know. yes.

#

There is no lint check

jade abyss
#

That guy again ๐Ÿคฆ

still forum
#

And if you say that you just show you have no idea

unborn ether
#

Done.

#

Stop

still forum
#

Please stop arguing about pointless bullshit. Thanks

unborn ether
#

preprocessing no lint check

#

learn C++ dude

still forum
#

XD

indigo snow
#

Sqf isn c++

unborn ether
#

Stop

#

just stop

still forum
#

The backend is @indigo snow

indigo snow
#

Sure

lone glade
#

@snow raft and that doesn't work when you execute it outside of the debug console?
where else is it executed and what is the content of said file?

still forum
#

@unborn ether You have no Idea what i do? do you? ๐Ÿ˜„

snow raft
#

Which file?

unborn ether
#

You dudes should really understand whats engine is coded on and how before arguing about SQF processing importance

#

Im done.

still forum
#

Yes. I know that.

pliant stream
#

good?

still forum
#

If you want to know too. Google "Arma Intercept"

jade abyss
#

lmao ๐Ÿ˜‚

snow raft
#

Everything works, just the addAction to player is not working

lone glade
#

the one where this code is executed and doesn't work @snow raft

little oxide
#

There is a way to draw occluder ?

lone glade
#

oooh

#

the addAction is present ?

jade abyss
#

@little oxide afaik not.
There are some other DrawModes in the DebugVersion

unborn ether
#

@jade abyss Emotes dude, hello

pliant stream
#

i thought you were done

still forum
#

@little oxide not really no. You could make a custom model I guess

#

Or.. What do you mean exactly @little oxide ? Diag drawmode?

lone glade
#

only available on the diag branch btw. ^

still forum
#

And most of them are disabled

#

although they work ^^

jade abyss
#

Still?

little oxide
#

I don't know, want to know if it's possible to draw occluder in arma

lone glade
#

yes dscha

jade abyss
#

I thought they were enabled now @still forum

still forum
#

What do you mean by that? @little oxide

#

You want to create a occluder?

little oxide
#

Thinking that's have something in Diag drawmode can draw occluder

still forum
#

Or you want to show how the occluding part of a existing model looks like

jade abyss
#

occluder are parts of the Model, dedmen

lone glade
#

I'll check dscha, might as well be fixed.

still forum
#

I know

snow raft
#

yes its in the initPlayerLocal, if I do the same with an object its working just fine, replacing that object with player and nothing happens when executed through init... No ideas left now...mh

jade abyss
#

kk

#

rgr @lone glade

little oxide
#

I want to show how the occluding part of a existing model looks like

still forum
#

Maybe he wants to create a dummy occluder to hide something

#

Yeah. I guess you need the disabled diag drawmodes for that

#

So.. No. not really possible for you

lone glade
#

@snow raft how do you know it doesn't work considering you don't have logging in that function?

snow raft
#

cause there is no action displayed when scrolling?

lone glade
#

then the addAction isn't added, so can you post the entirety of initPlayerLocal.sqf (pastebin or gist preferably)

indigo snow
#

Might be editing in the wrong folder/forgot to save, too

lone glade
#

and no, no drawModes available

jade abyss
#

kk

#

I thought i read something about them

#

nvm, was the lighting stuff

still forum
#

Well I have all the draw modes

#

maybe you read that

jade abyss
#

nah

tough abyss
lone glade
little oxide
#

DrawModes was a command anyway

#

But thanks Torndeco

lone glade
#

yes, a diag command

#

which does nothing right now

#

because all it's modes are disabled

snow raft
still forum
#

I better say nothing about the private in there ๐Ÿ˜„ Keep that for after the problem is solved

snow raft
#

not my code, get it somewhere from armaholic forum I think the author was Mr.jizz or somethin

lone glade
#

add a diag_log after the addAction and check if it runs

#

or a systemChat

still forum
#

Author name fits

snow raft
#

it does run, added one at script start and one just after the addAction

#

but the addAction is still not there

#

its just getting ignored, but why the heck?

lone glade
#

do you have a script running removeAllActions by any chance ?

snow raft
#

mh

#

no, one removeAction on an object after that action is executed

#

but that shouldnt interfere with my player

#

not even working when placed in the init field of that unit

#

Im done

lone glade
#

obviously....

still forum
#

Any errors in log or anything?

lone glade
#

your func is defined after the init field runs

snow raft
#

nothing in logs checked that at the beginning

#

but even if that func is defined after the init field, shouldnt it come up with an error or something?

jade abyss
#

Calling a not defined Fnc will end up in: nothing

#

No error msg etc

#

but, no clue what @lone glade meant

lone glade
#

init fields are evaluated before initPlayerLocal

#

also if the interaction isn't here it's getting removed by something

snow raft
#

doesnt matter, the addAction should still go through even with an undefined func in it

jade abyss
#

You also can remove lines 74-79 and put it directly in the un_database_save

#

No need to define _dataplayrname and then access it right after it (and not beeing used again afterwards)

#

So instead of:
un_database_save = [_dataplayrname,
->
un_database_save = [profileName,
etc

#
un_database_load = nil;
publicVariable "un_database_load";```

Out of pure interest: Do you know what that does?
snow raft
#

setting a publicVariable with an publicVariableEventhandler attached to it

#

want to see the initServer?

jade abyss
#

Nah, just wanted to know if you know it.

#

You basicly reset that var on every client to Nil

#

(for whatever reason)

unborn ether
#

@jade abyss are you a CUP developer?

knotty mantle
#

{[_vehicle, 0] remoteExec ["lock", 2];} AFAIK This should unlock the _vehicle as long as it had no driver previous to this command... Can someone explain to me why it isnยดt working? I am testing in local MP (3den) and i tried without the ,2 aswell ๐Ÿ˜ฆ

lone glade
#

2 is locked

jade abyss
knotty mantle
#

Yeah but 0 is the second param.

jade abyss
knotty mantle
#

,2 is the server. The point where i want to execute. Or am i completly wrong?

lone glade
#

yes, didn't see it because you didn't use `

jade abyss
#

remove the 2 completely

lone glade
#

lock is AL too

#

pass the vehicle as target

unborn ether
#

@knotty mantle To be sure you are hitting the argument, you'd be better

[_vehicle, 0] remoteExec ["lock"];

Because vehicle change locality when driver seat is occupied

jade abyss
#

-2 != Server

lone glade
#

[_vehicle, 0] remoteExec ["lock", _vehicle];

unborn ether
#

-2 = Server?

rotund cypress
#

-2 = Everyone except server*

jade abyss
#

fk my keyboard...

rotund cypress
#

๐Ÿ˜‰

#

Might as well remoteExecCall lock instead, more explicit but doesn't matter. Doesn't run scheduled either way cause it's a command but I'd use reCall

still forum
#

But remoteExec is shorter and faster to write ๐Ÿ˜‰

rotund cypress
#

You have a point there though.

jade abyss
#

less to write = faster to execute

rotund cypress
#

yeah kappa on that one

jade abyss
#

_a > _LocalVarDescription

lone glade
#

why use remoteExecCall tho....

subtle ore
jade abyss
subtle ore
#

Splendid

jade abyss
lone glade
#

S.P.L.E.N.D.I.D

jade abyss
#

So, back2topic noobs

lone glade
#

stop dscha, I can't handle this much of my mancrush

jade abyss
#

d(ยฐ.O)b

peak plover
#

โค

snow raft
#
 
  _packet = _this select 1;
  _dataplayrowner = _packet select 0;
  _dataplayrname = _packet select 1;
  _dataplayruid = _packet select 2;``` what exactly does select refer to?
jade abyss
#

_this

#

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

snow raft
#

๐Ÿ˜„

still forum
#

less to write = faster to execute I don't really want to go into where that's actually true...
oh.. you already did :U

jade abyss
#

๐Ÿ˜‰

still forum
#

select refers to the argument on the left side of select

#

so in your case _this and _packet

#

Btw that private in there is useless

jade abyss
#

_A = [1,"b",3];
_a select 0; //1
_a select 1; //"b"

snow raft
#

so what is in _this?

jade abyss
#

_this = _this

#

The vars that where "transported" over

#
[1,"b",3] call 
{
    _this select 0; //1
    _this select 1; //"b"
};
snow raft
#
private ["_packet"];
 
  _packet = _this select 1;
  _dataplayrowner = _packet select 0;
  _dataplayrname = _packet select 1;
  _dataplayruid = _packet select 2;
  _datanamearray = format ["%1_%2_mycustommissionname", _dataplayrname, _dataplayruid];
  _databasename = _datanamearray;
  
  _inidbiUN = ["new", _databasename] call OO_INIDBI;
  _databasefind = "exists" call _inidbiUN;```

thats the beginning of the initServer, what is passed with _this?
jade abyss
#

Dude, it't your code, you should know^^

snow raft
#

no its not ^^

jade abyss
#

+Check what i wrote above

still forum
#

In that case check wiki page of addPublicVaribleEventHandler

#

it tells you what is in _this

#

probably [something, variableValue]

unborn ether
#

@snow raft what its all about?

snow raft
#

yeh I do know what _this is and does but I dont get why the author of that script can just use _this at the beginning of said script? No idea whats in there

jade abyss
snow raft
#

playing around with iniDB2 @unborn ether

still forum
#

I just told you what's in there

subtle ore
#

??

still forum
#

The wiki page tells you

#

_this generally contains arguments passed to some script

unborn ether
#

@snow raft And whats the trouble with it?

subtle ore
#

"Generally contains arguments passed to some script" when does it not?

snow raft
#

Yes, and these arguments are what when initServer is called?

#

thats the point, what is passed there, i have no clue

still forum
#

variableName you already know

#

variableValue is whatever you publicVariable'd from the server

#

@subtle ore When no arguments were passed and it carries over from higher scope. It's just a normal variable that could be anything

knotty mantle
#

Thanks guys. I figured it out ๐Ÿ˜ƒ Was an error in a different place. but the script error i got pointed me in the right direction. ๐Ÿ˜›

subtle ore
#

@still forum But it can't be overwritten though right? So it holds no other purpose?

still forum
#

It's just a normal variable

#

you can do whatever you want with it

#

overwrite it.. whatever

#

well unless it's a final variable ofcause

subtle ore
#

Hmmm

jade abyss
#

_this isn't a protected var? ๐Ÿค” (never did it/needed to)

still forum
#

Bad practice using that anyway

subtle ore
#

@jade abyss I was asking if it was?

jade abyss
#

I mean, i could imagine it is proteced ยฏ_(ใƒ„)_/ยฏ

#

You know, everythings possible

still forum
#

Actually not really possible in engine.. no

jade abyss
#

thinkingsherlock sure?

still forum
#

yes

#

without making a special variable type

jade abyss
#

_forEachIndex also free?

still forum
#

yes

jade abyss
#

aye

still forum
#

Changing that doesn't change the engine internal tho

tough abyss
#

I doubt its protected but it doesn't really matter. You never need to assign a value to it

still forum
#

Already said it's not.. So.. No need to doubt

jade abyss
#

never underestimate the userbase

snow raft
#

ok I got it, ty @still forum

unborn ether
#

lol, so _x is also not protected

lone glade
#

ofc not

unborn ether
#

but again why would you ever do that.

still forum
#

any variable might be protected if it's a final variable.. Not sure what
forEach [compileFinal "1", compileFinal "2"] would do. Someone needs to try

unborn ether
#

Nothing. Seems like compileFinal is left outside the forEach

{_x = "nope"; systemChat _x}forEach [compileFinal "1", compileFinal "2"]
pliant stream
#

the final type probably has no effect on locals

still forum
#

Yeah. Never looked at that. Could be

south pasture
#

Hi there,
can config.cpp exist inside the mission? Or can i define subclass of vehicle inside the mission?

lone glade
#

No

south pasture
#

sad poo

still forum
#

yes it can. But it won't do anything (config.cpp - exist)
subclass of vehicle - no

south pasture
#

@still forum , @lone glade , Thanks

jade abyss
#

iirc only magazines could be inserted in the missionfile

still forum
#

I only know CfgSounds. I know there are more but I always forget

jade abyss
#

same, too long ago

unborn ether
#

CfgMagazines can be processed from mission container?

unborn ether
#

Well thats why i was curious about only magazines could be inserted

south pasture
#

can 3d model of the object be changed via script?

still forum
#

not really

#

you can maybe animate it. Which will change it. But I don't think that's how you mean that

jade abyss
#

(wich must be supported by the model itself)

south pasture
#

I want one box (ammo crate) look like the other box. Still fighting those f**ing rouge SupplyXX

still forum
#

Why can't you just use the other box?

south pasture
#

I need the box with emply inventory. Can't find empty equivalent of Box_NATO_Equip_F, that one leaks like crazy

still forum
#

Can't you empty it in Eden?

south pasture
#

it dynamically spawned/despawned (triggered encounter)

tough abyss
#

Just script removing the contents, otherwise you will need to make an addon to override or make a new class that doesn't spawn with inventory

south pasture
#

@tough abyss, that won't work - resource leaks are leaks

tough abyss
#

arma bugs are arma bugs

still forum
#

Use the Mod config way or.. suffer I guess

#

You can change the boxes Texture in script. But not the model

#

Or.. Make it invisible and place a fake simple object box....

#

XD

tough abyss
#

If you really annoyed about the supplyXX there used to code for Exile that would bruteforce it and delete all the netIDs of that type at near 0,0,0.
When the issue was there for backpacks etc, needed to be ran in unscheduled enviroment.
Don't think its on exile forums anymore shrugs

snow raft
#

Is there a way to make sure initServer is run before initPlayerLocal?

still forum
#

set a publicVariable at initServer

#

and make initPlayerLocal wait on that var

jade abyss
#

InitServer runs before initPlayerLocal

#

And if it's too slow, do what Dedmen said

snow raft
#

Order is not guaranteed says the legend above

jade abyss
#

Set a var on the InitPlayerLocal with false.
e.g.

MyTag_ServerReady = false;
waitUntil{MyTag_ServerReady};```

Then, when initServer is done:
```sqf
MyTag_ServerReady = true;
publicVariable "MyTag_ServerReady";```
still forum
#

If you want better you can use preInit CfgFunctions on server

#

Or just that publicVariable way. That's easier

jade abyss
#

Just noticed:
They are marked as "Order is not guaranteed", so should be done with the Var (or start the Server with AutoInit)

snow raft
#

ill try that Var

#

ty

snow raft
#

seems like it is run before initServer, that var is always false in iniPlayerLocal which is then waiting forever

#

hm

still forum
#

@jade abyss bad boy

#

Change the initPlayerLocal script to
waitUntil {!isNil "varname"}

#

and remove the setting of that varname before the waitUntil

jade abyss
#

pff

#

Don't make it overcomplicated for him ๐Ÿ˜„

rotund cypress
#

@still forum

#

just add a random sleep and get a performance gain m8

still forum
#

@rotund cypress

rotund cypress
#

ill show you de way

#

add a sleep

#

and you'll know de way

subtle ore
#

@rotund cypress stop

snow raft
#

waitUntil {!isNil "varname"} gives an error because of bool type

still forum
#

uhm

#

bool type would be correct here...

snow raft
#

expecting string, code

subtle ore
#

Expecting string or code!?

#

Expecting string or code!?

#

Can you paste the rest of the code?

snow raft
inner swallow
#

Inb4 missing semicolon