#arma3_scripting
1 messages ยท Page 411 of 1
I should keep a gist with quotes like that
sounds like something you'd read on r/iamverysmart
That's reasonable. But onEachFrame also uses string interally even if you give it CODE
one day the 400ms of EHs will get reduced
Study that a bit
Function also doesn't work. If you do onEachFrame fnc_func that's just as bad
You have to onEachFrame {call fnc_func}
addEventhandler ["Type","call fnc_bla"];
Where do you add that EVH dude?
๐ค
Since any source of EVH is an entity that is deinitialized after mission death.
"entity" "source".. What?
Pin it
player addEventhandler ["Type","call fnc_bla"];
Each eventhandler is a string in an array of strings.
player is an entity
Did you know there are other types of eventhandlers? Besides ones on entities?
But they fire only when the entity it attached to is present, m?
don't tell him about UI EHs yet
And where goes your player or display, or whatever since mission is dead?
addMissionEventHandler which is EachFrame doesn't have an entity
Yes, because the source is the missionNamespace itself
missionNamespace dies with findDisplay 46
I don't know how you always manage to change the topic to something completly unrelated
No
Eventhandlers are not stored in missionNamespace
What
and missionNamespace never dies. It only get's cleared. And no it doesn't get cleared at mission end
hell, you can run stuff before missionNamespace is available
it get's cleared before mission start.
Ok, show me the way of any code being alive in arma main menu, executed from the mission itself
not using onEachFrame and parsingNamespace
fun fact:
Arma actually starts really fast, it's just that the loading screens suck.
the main menu is a mission
just FYI
๐คฆ
so is 3DEN
That is completely beside the point, Demellion
Main Menu is RscDisplayMain, which is IDD=0
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
Well, ok ill stop argue and continue connecting between servers inside the servers. Thanks.
Just gone to far again
are you on drugs?
I don' treally want to flame anyone
Yes, I can redirect my client from one sever in-game to another lobby
with one click
You can read KKs silly release then
anyone knows what KK is doing now btw?
You should pin a guy saying KK's silly release not me
Yes, that happens when you do work for the company that makes the game
Someone else already made such a thing in Arma 2..
It leads to more harm that good, there was no need for it
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
Why harm?
Script kid joins your server
Now you're in another server
I thought that'd be obvious
And boom he owns your computer ^^
Learn how to use remoteExec from server, and don't perform that on client
What?
Wtf?
wut
And again you somehow managed to just switch to a completly unrelated topic
8] BoGuu: Script kid joins your server [16:48] BoGuu: Now you're in another server
Script kid executes the script.
I don't see how that is related to using remoteExec from your server
wtf?
What?
Oh..
pasting doesn't work in MP btw
There s a thing called Database
Which says are you allowed to go there or not
Like i need to explain that? really?
Pasting works in MP?
Yes it does.
is it just for the debug console then?
copyFromClipboard doesn't work, but that's just the command.
https://community.bistudio.com/wiki/copyFromClipboard
doesn't work in MP :/
And where are you willing to go anyways, just curious ๐
DAMN, FOILED AGAIN
puts a foilhat onto @lone glade 's long eyes
You do to retrieve shit from the clipboard in arma
The windows clipboard works fine even without the SQF command.
Do you play without a keyboard ๐
No I play with a clipboard
damn
@wraith cloud Arma no support racing wheel. I tried.
arma """support""" racing wheels and other input devices
Well it kinda does.. but... Not really
Quick, add it to intercept
The windows clipboard sucks. In general that is, can't even copy null-bytes.
Intercept_CBA already has joystick and other controller support @BoGuu#1044
You could even control gamepad vibration via script :3 But I didn't implement that yet because I no have vibrating gamepad
time to make an adult toy for men playing arma
๐ง

hi, how would i make a script loop on respawn of a player with debug?
onPlayerRespawn.sqf -> while true do {diag_log "debug";}
as in the debug console
so like player setCustomAimCoef 0; except making that loop on respawn
What does "loop on respawn" mean?
You want to start a endless loop at respawn. or you want it to run at respawn
As in when they respawn I will not have to execute the script again
So they will not have sway when they die
With "when they die" you mean "after the respawned" ? Because those are completly different things
After they respawn
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
Thank you
And if there wasn't init.sqf only initPlayerLocal, initBriefing, initPlayerServer and initServer where would i put it
@tough abyss If you dont have init.sqf just create it.
@tough abyss In the mission root
is it necessary tho
surely I can just place it in one of these as i see other scripts like fatigue
@tough abyss Well each of that is Event Script (https://community.bistudio.com/wiki/Event_Scripts)
You could make a description.ext with CfgFunctions and then make a preInit function and use that.. But.. Why?
@tough abyss init.sqf is performed both Host/Client, while initServer.sqf and initPlayerLocal.sqf. You got it?
ok
@tough abyss This will help you understand when preInit and postInit works (https://community.bistudio.com/wiki/Initialization_Order)
ty
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.
@fossil yew There was bug with kbTell on dedicated server not sure is it present on local host
You can check this https://forums.bohemia.net/forums/topic/176031-release-advanced-conversation-system-acs/ that is workaround with conversations, it uses playSound3D instead of kbTell
@meager heart thank you
what does WeaponGroundHolder mean?
does it return all the objects on the ground if combined with allMissionObjects?
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
also >WeaponGroundHolderGroundWeaponHolder
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
well, I tried xD
A weapon holder is always a weapon holder. And fnc_itemType is for items
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
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
let's say, weapons on the ground
I want to keep weapons on the ground, delete everything else
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
and how can I understand that the X weapon holder has a weapon in it?
getWeaponCargo
gives you a list of all weapons in it
and then you can use bis_fnc_itemType on the classname
ah ok, thanks for the input
@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
What? By his logic he wants to delete everything that doesn't have a weapon.
Aha, delete anything with
["Weapon","Magazine","AccessoryMuzzle","AccessorySights"]
yeah, that was wrong xD
oh come on
wrong logic
btw its possible like that ```sqf
{clearWeaponCargoGlobal _x} foreach (nearestObjects [_position,["GroundWeaponHolder"],_radius]);
Test it
No
๐
He said he wanted to delete everything besides weapons.
And you solved it by.. Deleting weapons but keeping everything else
That's bullshit
How is that different from the code he had before?
Kinda not scripted but anyone use imageToPAA?
yes
Ugh. Size not multiple of 2 ?
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
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?
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
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?
remoteExec a setVariable back
But yeah.. could use publicVariable then.. If you really wanna do such a thing
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
just remoteexec the returned value back
@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>
true, but person still seems confused ๐
right, which I would do with the event handler. I don't see how I could be async with a two way remoteExec
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
I see what you are saying now. Makes sense, thanks
Can anyone send an example eden script for someone who has had programming backgrounf but new to Arma's sqf language?
Huh
Not what you wanted? Or... ?
WTB 3DEN Scripts, cheap.
any way to align the hint text to the left instead of centered?
If you hint structured text then yes
oooohh nice ๐
^^ that was first bit of sqf code i did back in the day for a2 dayz
A completly scriptable remake of the MP lobby?
How dare he
no lol structured hint for debug info so it had label left + value right side, instead of all centered aligned
^^
mmmm fancy thanks ๐
@viscid marlin https://foxhound.international/arma-3-eden-scripting.html
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?
biki
biki lists SQF commands
Ones that have no documentation and have a fat banner on biki saying engine command undocumented
๐
?
example?
removeWeaponCargo
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
just means it is exported instead of handly added
There is no export script
more or less
every command is handly added
Returns a random element from the given array. Engine solution to BIS_fnc_selectRandom
it is enough to give him an idea
nah there is ded
I do the same with all commands I add to biki
pedantic, but fair ๐
Thanks, Ill take a look when I can get back on arma
yiss my shit works
Released SQF-VM Standalone Alpha 0.1.4 (tool allowing you to run arbitrary sqf code)
highlights this version:
- support for
spawn(executed after the sync context of the VM is done, might suspend a script to give other scripts a chance to run) - support for config parsing (during runtime, use
configFile mergeFrom__ parseConfig__ "<YOUR CONFIG>") - Changes to the command line parameters (making old scripts possibly outdated)
https://github.com/X39/sqf-vm/releases/tag/0.1.4-alpha
more info: https://forums.bohemia.net/forums/topic/210118-sqf-vm-an-sqf-emulator/?do=findComment&comment=3261801
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
๐ ๐ Good Job and Thanks @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))
stable or dev ?
1sec so I tag it with the proper game version for future ref
โค
@queen cargo does not matters -> does not matter
yyy
I can't find the open curator event
use the display
?
aah okay, that'd work thanks
so I guess there is no easier way
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
[
"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 ๐
Also... use XEH. That works
No idea about the script never used that
addDisplayHandler is also a completly different thing
#notamod
Well.. I guess you don't then. Don't know if you can add XEH's via script @little eagle will know
with a sleep or waitUntil
JAAS
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
lol crashed my game trying to create markers
When i loaded that stuff directly in the EH, it wouldn't have loaded all the time
lol noob
ohh here we go
count allMapMarkers
//95653
map markers proven FPS friendly
Just freeze when creating 100k in unscheduled
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
ahha, but different from locations, I can use markers with zeus
Well
the EH does not fire at all
addDisplayEH
Code?
[
"load",
{
systemChat '0';
}
] call CBA_fnc_addDisplayHandler;
ยฏ_(ใ)_/ยฏ
cooo coo cooo cooo
because what you do doesn't make sense
as you can't add a display eventhandler to a non-existend display
which is what addDisplayHandler does
Parameters:
_type - Display handler type to attach. <STRING>
_code - Code to execute upon event. <STRING, CODE>
ยฏ\(ใ)/ยฏ
It does not take display as param?
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???
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)
Both load and unload don't work
Ah, "you can't fail, if you don't even try " 
Which i already said above....
First thing I said is that it's a completly different thing
If you don't even want to listen to what I say why do you ask me then
I thought at first that it's EH for any display that gets initialized
and all of them would have it
Google. First result https://cbateam.github.io/CBA_A3/docs/files/events/fnc_addDisplayHandler-sqf.html
I did read, was just trying to make sense of it
Yeah, I thought it's compleatly different. Gotta get that coffee
Ahh, thanks
Wait
I was hoping it would just plug here ๐ฆ
Wow...
Why do you confuse me with you cannot use config
ofcause you can
description.ext is a config
Hmmmmm
["KeyDown", {
if (inputAction 'CuratorInterface' > 0) then {
systemChat '1';
};
}] call CBA_fnc_addDisplayHandler;
wwwwwords
Okey.. I just gave you the solution.. But feel free to just ignore me
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
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
_this call nig_fnc_sendToJail
because we all know nigel is making this for a lifer scenario
LOL, no I don't ๐ฐ
YES YOU DO NIGEL! We all know it, just give it up now.
@still forum how much work is too much work
eey works, Thanks
5
What?
You know nothing about that... It's just too much work
You have a typo in your #creators_recruiting post @subtle ore
I would rather attempt a method or look into it then delete everything and readd it, spewing out attachments and all
>playing PUBG
lol
He asked for a way to not delete everything. So deleting everything is not part of the solution...
Lots of bulli tonight I see
Right, that was the method I had. Trying to not do that
Since it can create odd attachments and have detached attachments
@peak plover At least I'm not as bad as a lifer
๐

I think you can add markers in Zeus. And maybe move them too
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
yeah..
netID Or just.... str
or setVariable and generate a ID yourself
or the name
netID should do the trick, thanks
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 ^^
Is battleye enabled ?
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 ^^
? sounds like he is running the inidb scripts locally on all the clients
https://community.bistudio.com/wiki/remoteExec
look at comments from revo/killzone kid etc
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
what does your script do?
Its a box that removes your items from your inventory then replace it with the kit that a class would have
Scripts working in Eden is still bullshit. Eden is a Editor.
There is no player with an inventory in Eden
That is not "in" eden tho
no, it is
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
have it working in the editor, as in WHILE TESTING IT IN THE EDITOR
Why does your head scripter not take care of it? Isn't that what he is there for?
Its my test
its a simple addAction from what I can gather ded
And he is working on mem leaks
jesus, that's the worst format to pass an sqf script i've ever seen, wait a sec
there
Better
also, jesus why do people use comment still...
Thats auto generated and unnecessary
That's vanilla editor export lol
^
Is that just a couple arsenal exports?
> 2018
> not ace 3 arsenal
Yep
Just use ace arsenal instead of vanilla arsenal ๐
For some reason we dont
You can use it to export your loadout
brb, i'll go back to cry myself in a corner
tfw people prefer Virtual Arsenal to ACE Arsenal -> ๐ญ
I don't understand it either. Vanilla arsenal is ass compared to ACE Arsenal
Good to know
@lone glade They probably use it but don't even know they do
if there are issues i'd like them reported, or at least told to me.... so i can fix em'
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
LOL
Probably the default camera controls
player addAction ["save", {[] call UN_fnc_savedata;}]; placed in initPlayerLocal, why is that not firing? No action showing up, executed in Debug Console works ..
ACE Arsenal scripts are vanilla
^^^
I think it has to do with memoey leaks
@snow raft Maybe initPlayerLocal is too soon?
The only "memory leak" which btw isn't even a memory leak is the container entity bug
initPlayerLocal is ALWAYS after the player start existing
also, jesus why do people use comment still... because there s no Arma SDK besides the console that obviously doesn't support// preprocessing
> 2018
> complaining about FPS
> gives ai scopes and backpacks
๐คฆ
waitUntil {!(isNull player)}; got that one line before @still forum
ah
@lone glade some console update recently supporting //?
ty
"recently" about 10 versions ago
@unborn ether I think CBA should have fixed that
oh right I never play without CBA, that might be why ๐
I just asked, i don't really use default console much.
going to check
And since it has that problem, never tried to even paste a code with // since 0.50
What other consoles are there
why exactly is it so bad to suspend an init?
@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
I am coming from developmemt using java thats why I use //
// is what you should use
@snow raft Because you suspend other stuff too that you didn't intend to suspend.
@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.
you suspend everything waiting for initPlayerLocal to finish
suspending a postinit script for example and waiting for something after postInit will give you endless loading screen
nope, vanilla also supports //
@still forum bullshit bullshit. Explain the reason why comment is so bad?
@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
@still forum like why you should do \\ or comment both then, it does nothing.. oh.
forward slashes not back :p
comment doesn't work you said, what runtime?
I never said it doesn't work
// is evaluated once when you preprocess the script. comment is evaluated everytime you run the script.
Yes
you can literally replace
comment "myComment"; by "myComment";
So @lone glade the script doesnt actually work in game, its supposed to put a bright green box down
That's true
it's literally the same thing
runtime as in. Time when the script actually runs
I feel like we already had that discussion ded
And if it really does nothing what it takes ?: D
I have a very strong dรฉjร vu effect.
Well using Sublime for finding all comments is kinda handy for me
put comment "stuff" in debug console and test performance. Then replace by //stuff and test again
or do you not have sqf highlighting ?
Why can you search comment but not // ??
hell, you have regex support in sublime...
I dont really like the rainbow of SQF in Sublime
O.o
if you don't care about the performance then fine. Do whatever you want
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.
Not firing in init too, I dont get it..
Again \\ doesn't work.
and no it's not a markup decision
it's a measureable performance impact
What if i say \ is also a runtime of C++ preprocessing. It checks it and skips it.
Which is really BI's fault
5 colors is a rainbow ?
https://imgur.com/a/96BLa
do you see a rainbow in that image ?
@unborn ether compiletime vs runtime. Google that if you don't understand it
gne, I didn't add your name on that func ded O.o
huhร
UMLAUT DETECTED
ร is not a umlaut actually
ร
It's a sz
@still forum Like did i ask you telling me that at all at the point of some infinite nothing performance
is german weirdothingy
You are not telling huge thing about it dude
What?
That
I said everything I needed to say didn't I?
it's stupid to use comment, that's all there is to it
Stupid for you?
3microseconds runtime.
vs 0 runtime.
second one is infinetly as much faster
it makes it harder to see comments when you have highlighting
Well keep that ok
Just dont tell people its stupid, because its like discussing pepsi against cola
because it is
the personal decision
it's stupid
Weren't you just arguing about isEqualTo vs == bullshit just because it's faster by a tiny amount?
it's a useless command that doesn't highlight properly in an editor
it's more chars than //, it's thus longer to type
did you know you can actually change your syntax preferences
or its also stupid? ๐
there's LITERALLY 0 benefits from using it
You can also type 1+1+1 instead of 3
you can type "comment"; and it'll do the same thing
And if you really really want to you can just "comment stuff" if you still want to find all comments by searching for it
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.
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
it's somewhat useful in the editor where you don't have the preprocessor
Why spend precious runtime on stuff that doesn't do anything
And again. comment is just a command that does absolutely nothing.
It's the same as just writing the string without comment
it's better to do it without comment ๐
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
does that allocate
inb4 someone starts defending , as line break
My ; key is broken
write code > comment > everything works > remove comments > play
forget why you did X > cry as you fix it again
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
variable = v1
case in point:
My scalar that doesn't work as a scalar without converting it to a string and back to a scalar
do defines not work in strings?
imagine if i didn't comment that
dude who thought he was doing cleanup would've gone fucking mental ๐
ok, did the same now with an object and the action is there and works.. so why not on my player? Im confused..
@river meteor You need to use ' quotes instead of " quotes
Is that a c thing or an sqf thing?
or you could just use stringify...
.... you realize actions added to yourself can't be used by yourself ?
No. That's the same as " quoted string
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.
Just it allows macros. Don't ask why
and that is why @lone glade?
@unborn ether It takes 3 microseconds. Please don't teach people bullshit. Thanks
because if executed in console I can use them
@snow raft nevermind it should be available
confusion between ace actions and addAction ๐
@still forum Don't tell people its important to keep that infinite low bullshit values.
importance is subjective
Never said that it's important
Then stop arguing about it dude
@unborn ether don't tell people its not important
It's extremly important for the stuff I do
I like comment whatever you say
And I already said if you want it that way then that's okey
@snow raft do you mind posting the rest of the file / function ?
@still forum You should just never talked about that damn 3 microseconds
I wrote it 3 times.
Its not important at all
And it might not be for you
// > comment
why are you so butthurt about it? important is subjective
Theyre only explaining why its a silly command. Its nothing to do with you.
_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;}];```
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
Because i don't really want to listen someones subjectives in a place where is being passed as a superposition
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
Like you coded engine and you know it? What if i say that // is also processed as it get lint check anyways?
That guy again ๐คฆ
And if you say that you just show you have no idea
Please stop arguing about pointless bullshit. Thanks
XD
Sqf isn c++
The backend is @indigo snow
Sure
@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?
@unborn ether You have no Idea what i do? do you? ๐
Which file?
You dudes should really understand whats engine is coded on and how before arguing about SQF processing importance
Im done.
Yes. I know that.
good?
If you want to know too. Google "Arma Intercept"
lmao ๐
Everything works, just the addAction to player is not working
the one where this code is executed and doesn't work @snow raft
There is a way to draw occluder ?
@little oxide afaik not.
There are some other DrawModes in the DebugVersion
@jade abyss Emotes dude, hello
i thought you were done
@little oxide not really no. You could make a custom model I guess
Or.. What do you mean exactly @little oxide ? Diag drawmode?
only available on the diag branch btw. ^
Still?
I don't know, want to know if it's possible to draw occluder in arma
yes dscha
I thought they were enabled now @still forum
Thinking that's have something in Diag drawmode can draw occluder
Or you want to show how the occluding part of a existing model looks like
occluder are parts of the Model, dedmen
I'll check dscha, might as well be fixed.
I know
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
I want to show how the occluding part of a existing model looks like
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
@snow raft how do you know it doesn't work considering you don't have logging in that function?
cause there is no action displayed when scrolling?
then the addAction isn't added, so can you post the entirety of initPlayerLocal.sqf (pastebin or gist preferably)
Might be editing in the wrong folder/forgot to save, too
and no, no drawModes available
nah
@little oxide Just use http://odolconverter.t-db.de/ also kinda wrong channel aswell to ask
#arma3_model is more appropriate
yes, a diag command
which does nothing right now
because all it's modes are disabled
I better say nothing about the private in there ๐ Keep that for after the problem is solved
not my code, get it somewhere from armaholic forum I think the author was Mr.jizz or somethin
Author name fits
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?
do you have a script running removeAllActions by any chance ?
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
obviously....
Any errors in log or anything?
your func is defined after the init field runs
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?
Calling a not defined Fnc will end up in: nothing
No error msg etc
but, no clue what @lone glade meant
init fields are evaluated before initPlayerLocal
also if the interaction isn't here it's getting removed by something
doesnt matter, the addAction should still go through even with an undefined func in it
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?
setting a publicVariable with an publicVariableEventhandler attached to it
want to see the initServer?
Nah, just wanted to know if you know it.
You basicly reset that var on every client to Nil
(for whatever reason)
@jade abyss are you a CUP developer?
{[_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 ๐ฆ
2 is locked
Yeah but 0 is the second param.
,2 is the server. The point where i want to execute. Or am i completly wrong?
yes, didn't see it because you didn't use `
remove the 2 completely
@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
-2 != Server
[_vehicle, 0] remoteExec ["lock", _vehicle];
-2 = Server?
-2 = Everyone except server*
fk my keyboard...
๐
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
But remoteExec is shorter and faster to write ๐
You have a point there though.
yeah kappa on that one
_a > _LocalVarDescription
why use remoteExecCall tho....


Splendid

S.P.L.E.N.D.I.D
So, back2topic noobs
stop dscha, I can't handle this much of my mancrush
d(ยฐ.O)b
โค
_packet = _this select 1;
_dataplayrowner = _packet select 0;
_dataplayrname = _packet select 1;
_dataplayruid = _packet select 2;``` what exactly does select refer to?
๐
less to write = faster to execute I don't really want to go into where that's actually true...
oh.. you already did :U
๐
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
_A = [1,"b",3];
_a select 0; //1
_a select 1; //"b"
so what is in _this?
_this = _this
The vars that where "transported" over
[1,"b",3] call
{
_this select 0; //1
_this select 1; //"b"
};
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?
Dude, it't your code, you should know^^
no its not ^^
+Check what i wrote above
In that case check wiki page of addPublicVaribleEventHandler
it tells you what is in _this
probably [something, variableValue]
@snow raft what its all about?
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

playing around with iniDB2 @unborn ether
I just told you what's in there
??
@snow raft And whats the trouble with it?
"Generally contains arguments passed to some script" when does it not?
Yes, and these arguments are what when initServer is called?
thats the point, what is passed there, i have no clue
https://community.bistudio.com/wiki/addPublicVariableEventHandler
There. [variableName, variableValue, pvartarget]
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
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. ๐
@still forum But it can't be overwritten though right? So it holds no other purpose?
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
Hmmm
_this isn't a protected var? ๐ค (never did it/needed to)
Bad practice using that anyway
@jade abyss I was asking if it was?
Actually not really possible in engine.. no
sure?
_forEachIndex also free?
yes
aye
Changing that doesn't change the engine internal tho
I doubt its protected but it doesn't really matter. You never need to assign a value to it
Already said it's not.. So.. No need to doubt
never underestimate the userbase
ok I got it, ty @still forum
lol, so _x is also not protected
ofc not
but again why would you ever do that.
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
Nothing. Seems like compileFinal is left outside the forEach
{_x = "nope"; systemChat _x}forEach [compileFinal "1", compileFinal "2"]
the final type probably has no effect on locals
Yeah. Never looked at that. Could be
Hi there,
can config.cpp exist inside the mission? Or can i define subclass of vehicle inside the mission?
No
sad poo
yes it can. But it won't do anything (config.cpp - exist)
subclass of vehicle - no
@still forum , @lone glade , Thanks
iirc only magazines could be inserted in the missionfile
I only know CfgSounds. I know there are more but I always forget
same, too long ago
CfgMagazines can be processed from mission container?
Well thats why i was curious about only magazines could be inserted
can 3d model of the object be changed via script?
not really
you can maybe animate it. Which will change it. But I don't think that's how you mean that
(wich must be supported by the model itself)
I want one box (ammo crate) look like the other box. Still fighting those f**ing rouge SupplyXX
Why can't you just use the other box?
I need the box with emply inventory. Can't find empty equivalent of Box_NATO_Equip_F, that one leaks like crazy
Can't you empty it in Eden?
it dynamically spawned/despawned (triggered encounter)
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
@tough abyss, that won't work - resource leaks are leaks
arma bugs are arma bugs
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
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
Is there a way to make sure initServer is run before initPlayerLocal?
Order is not guaranteed says the legend above
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";```
If you want better you can use preInit CfgFunctions on server
Or just that publicVariable way. That's easier
Just noticed:
They are marked as "Order is not guaranteed", so should be done with the Var (or start the Server with AutoInit)
seems like it is run before initServer, that var is always false in iniPlayerLocal which is then waiting forever
hm
@jade abyss bad boy
Change the initPlayerLocal script to
waitUntil {!isNil "varname"}
and remove the setting of that varname before the waitUntil
@rotund cypress
@rotund cypress 
waitUntil {!isNil "varname"} gives an error because of bool type
expecting string, code
Expecting string or code!?
Expecting string or code!?
Can you paste the rest of the code?
Inb4 missing semicolon

