#arma3_scripting
1 messages ยท Page 232 of 1
oh ok
looks good to me
[cursorobject,["motor",1]] remoteexec ['sethit',cursorobject,false]; right?
ah a missing bracket.. yeah will do
This is a good time to rant at addBackpack vs addVest and addUniform
Why does addBackpack require a local unit, but addVest and addUniform don't ?
its still says
'(_this select0) |#|setHit (_this select 1)'
Error setHit: Type Number, expected array
Same with addWeapon and addHeadgear
[cursorobject,0] remoteexec ['setfuel',cursorobject,false];
[cursorobject,["motor",1]] remoteexec ['sethit',cursorobject,false];
if you restart your display event will be caried over
and you end up with the previous one extra
because display 46 isn't destroyed if you restart
ah now it works
ha! knowledge is the key
true
ok, atleast i got the active script working now, so now i just need to add that postinit
btw, at the moment this script will still reside inside init.sqf, should it still be like that?
I get worked up at "this shouldn't even work wtf" issues ๐
chrish, you probably want to test in a new mission without init.sqf
You can test your CfgFunctions settup in a descrition.ext mission
And transfer it to config.cpp when it works
so i should just put this in the config.cpp now?
or description.ext
class CfgFunctions
{
class ImmobilizerTag
{
class CustomWeapons
{
class Immobilizer
{
postInit = 1;
};
};
};
};
Just keep in mind to load the mission ingame when you add files
im not using init.sqf at the moment.. so far im still in the config.cpp, i havent really divided it yet :S
i can't remember CfgFunctions at all, because I usually use a different frame work
Great.... so apparently somehow in eden description doesn't get reloaded if you reopen the same mission without first switching to another mission
You can check the ingame functions viewer if your function is defined
10/10 30 mins trying to figure out why the fuck this function doesn't work
but yeah, there is only one link for me know.. where should i really put this script?, inside the CfgFunction beside the postinit = 1;?
one link missing*
or in a separate sqf and call it from somewhere?
the script has to be in the mission when you use description.ext and inside the folder of the addon if you make a mod
so i need to add the script into the mpmission.sqm on the actual server?
CfgFunctions should have the path under file = "";
this is purely a mod
i rather not want to have to deal with the missionfiles
so i just add it to descriptions.ext then, and find that file argument you mentioned? ๐
ext = ".fsm"; // Set file type, can be ".sqf" or ".fsm" (meaning scripted FSM). Default is ".sqf".
i wonder if this works
class CfgFunctions
{
class ImmobilizerTag
{
class CustomWeapons
{
class Immobilizer
{
postInit = 1;
ext = "/immobilizer/immobilizer.sqf"
};
};
};
};
No, only 2 tags
class CfgFunctions
{
class ImmobilizerTag
{
class Immobilizer
{
postInit = 1;
file= "/immobilizer/immobilizer.sqf"
};
};
};
Or better
actually wait
nvm my bad
haha ok, so the last one you posteD?
class CfgFunctions {
class ImmobilizerTag {
class CustomWeapons {
file = "immobilizer";
class Immobilizer {
postInit = 1;
description = "";
};
};
};
};
Basically it's Tag > Category > Function
ok, it doesnt say file on bis wiki :S
class CfgFunctions
{
class myTag
{
class myCategory
{
class myFunction
{
preInit = 1; // (formerly known as "forced") 1 to call the function upon mission start, before objects are initialized. Passed arguments are ["preInit"]
postInit = 1; // 1 to call the function upon mission start, after objects are initialized. Passed arguments are ["postInit"]
preStart = 1; // 1 to call the function upon game start, before title screen, but after all addons are loaded.
recompile = 1; // 1 to recompile the function upon mission start
ext = ".fsm"; // Set file type, can be ".sqf" or ".fsm" (meaning scripted FSM). Default is ".sqf".
headerType = -1; // Set function header type: -1 - no header; 0 - default header; 1 - system header.
};
};
};
};
If you set the folder for category, it retrieves the Function based on fn_function.sqf filename
so i cant use filepath?
You can, but if you got more functions then you don't have to type the full file path out 20 times
Look at the functions example on BIKI, it explains this stuff
Your way works, but that example is what I'd use if I were you
this is one of the pages that isn't outdated
In what you linked (because file path isn't mentioned itll look for a file)
"functions\ImmobilizerTag\CustomWeapons\fn_immobilizer.sqf";
O RLY ?
Yeah so in Alganthe's screenshot it'll; use a file on the location "functions\misc\fn_VA_filter.sqf"
The former these days I think
class CfgFunctions {
class ImmobilizerTag {
class CustomWeapons {
file = "/immobilizer/immobilizer.sqf";
class Immobilizer {
postInit = 1;
description = "";
};
};
};
};
im getting confused again.. maybe we should start with how they work. what a tag is etc ๐
A tag is just so you don't get overlap with other peoples functoins
okay, the first class (under CfgFunctions) is going to be the first word of your function
So if I have a mod with a function called Immobilizer and you have one.. that they don't fuck up
so BI tag is BIS_
if I want my function callled herp to be derp_fnc_herp derp is going to be the first class
and CBA_fnc for cba etc?
exactly
second class is there for sorting files, third class is the name of your function.
fnc is added automagically.
oh ok
so in my case if herp is in functions\misc\ I'll have
chr_immobilizer how would that then be?
class CfgFunctions
{
class c2017
{
class vehicle
{
file = "YourPathToTheSQF";
class MyFunction {};
};
};
};
Result:
c2017_fnc_MyFunction
You don't even need to know your final functions name in this case, because it's postInit = 1 only anyway
class CfgFunctions
{
class tag {
class stuff {
file = "YourPathToTheSQF";
class MyFunction {};
};
};
};
{
class Chrish88 {
tag = "c88";
class stuff {
file = "YourPathToTheSQFFOLDER!!!";
class MyFunction {}; // points to "fn_MyFunction.sqf in above folder
};
};
};```
๐
so
class CfgFunctions
{
class IBZ
{
class Immobilizer
{
file = "immobilizer/immobilizer.sqf";
class Immobilize {};
};
};
};
would be IBZ_fnc_Immobilize?
Yep
No
No
ah not the file
that's wrong
^
Filename: "fn_immobilizer.sqf"
class CfgFunctions
{
class IBZ
{
class Immobilizer
{
file = "immobilizer/";
class Immobilizer {};
};
};
};
so this would point to the immobilizer.sqf?
without /
remove the /
nope, still missing the fn_
alganthe, you troll
the name of your function under that path need to be fn_immobilizer.sqf
oh, right
really?
Filename.
Yes
yes.
Filename of your file is going to be fn_{CLASSNAME}.sqf
ah ok
but where do i specify the path if say it resides in a scripts folder for example [mod]/scripts/fn_immobilizer.sqf?
class CfgFunctions
{
class MyFNC
{
class vehicle
{
file = "YourPathToTheSQF"; //e.g. (from Addon) "\YourAddonPBO"
class MyFunction {}; //e.g. "YourAddonPBO\fn_MyFunction.sqf"
};
};
};
Result:
MyFNC_fnc_MyFunction
the path is set in the file = entry
so mod/scripts
mod\scripts
Its called file,because usti hlavne
lel
haha, i have seen those weird words everywhere ๐
because stary svetlo @little eagle
That's the turret hitpoint right? ๐
doplonvani mate
psht
call medevac they're ded
Take that: Kolgujev!
Do arma modding for a while and you end up speaking fluent Czech
hehe
HELP THE GERMANS ARE ATTACKING US AGAIN (france)
Ruhรค! Still gestanden! @lone glade
he is french
Don't care if he likes Baguette
+You also drive backwards all the time? ๐
T.T
so this should work?
class CfgFunctions
{
class IBZ
{
class Immobilizer
{
file = "immobilizer/";
class Immobilizer {};
};
};
};
and would be IBZ_fnc_immobilizer?
XD
oh bracket
slash i mean
class CfgFunctions
{
class IBZ
{
class Immobilizer
{
file = "mod\immobilizer";
class Immobilizer {};
};
};
};
๐
@sacred fox If its in an Addon file: "" file = \immobla"; "" || If missionfile: "file = "Immobla";
"" \ "" <-- Important!
if its called fn_immobilzer and reside in mod\mobillizer?
ah ok
why is backslash important for paths?
that how they distignuish between addon and mission paths
ah ok, nice to know
class CfgFunctions
{
class IBZ
{
class Immobilizer
{
file = "\mod\immobilizer";
class Immobilizer {};
};
};
};
?
sometimes they even lead with @
fn_immobilizer.sqf
yes
would this be IBZ_fnc_Immobilizer then?
oh boy
Does anyone know a good way to check whether you're previewing mission these days? The old way doesn't work anymore
((uinamespace getvariable ["gui_displays",[]]) find (finddisplay 26) == 1);
``` that used to return true in editor preview
eeerm, why do you need to check for preview ?
so commy, now when i have the CfgFunction set up and, the script itself, should it just work now, aslong as the conditions in the script are met?
Because I want some extra debug mission editing formatting while i'm previewing in editor
Just a couple little things that you want to see while you're designing the mission
Just test it @sacred fox || Add a simple: " hint "i am working"; " then do a "" [] spawn Tag_fnc_MyFnc ""
just check if you have access to the debug console, isn't that faster ?
In the editor
ok
algantha, rather have editor preview in this case
foudn it
class CfgSounds
{
sounds[] = {};
class addonsound1
{
name = "sound from addon";
// start path to sound file in AddOn with @
sound[] = {"@a3\Ui_F_Curator\Data\Sound\CfgSound\visionMode", 0.8, 1};
titles[] = {0,""};
};
};
foudn!
oh wow oO
It was shoehorned in later
i got a bunch of if statements when i did it Dscha ๐
Thats the _fnc
[] spawn FNC Name
[] spawn FNC Name
nah. it's postInit . He doesn't even need that
In Debug console
oh forgot the postinit
just drop a diag_log in there and check the rpt
yh.. well nothing happened
and the script doesnt seem to work O.o
it didnt throw an error though
commy go
the function itself is
//fn_immobilizer.sqf
if (hasInterface) then {
0 spawn {
waitUntil {
(!isNull (findDisplay 46))
};
(findDisplay 46) displayAddEventHandler ["MouseButtonDown",
{ if (currentWeapon vehicle player == "fakeWeapon") then {
[cursorobject,0] remoteexec ['setfuel',cursorobject,false];
[cursorobject,["motor",1]] remoteexec ['sethit',cursorobject,false];
hint 'Vehicle immobilized!';
};
}];
};
};
i run this, and expect the script to work..
[] spawn IBZ_fnc_Immobilizer;
no its fn_immobilizer.sqf
and the CfgFunction class resides in config.cpp
check the functions viewer if it's there
keep in mind that you have to start a new mission for these functions to be defined
yeah it is.. but its blank and i know why lol xD
file = "\mod\immobilizer"; i forgot to change to the actual modname xD
it should complain if it can't find the file
im trying again now
is it any point in downloading the discord app for computer btw? ๐
Start your game with "ShowScriptErrors"
and also alganthe what editor are you using? ๐
too late :P, i will do that, after this test if it doesnt work ๐
ALWAYS start the game with it ๐
@chris88 it's atom
To answer my questoin: Editor preview >>
((alldisplays find (finddisplay 26) in [0,1]) || (alldisplays find (finddisplay 313) in [0,1]))
oh god
That's from Debug console code โค :p
atom
themes:
- atom-material-UI
- atom-material-syntax
Packages:
- highlight-selected
- keyboard-localization
- language-arma-atom
- linter-mixed-indent
btw where is show script errors? ๐
I wouldnt rely on the order of alldisplays
Arma Launcher?
Meh, it's not a very critical function, just a bit helpful and this is ripped from BIS stuff so obviously it's absolutely perfect way to do it
ah under author
this is ripped from BIS stuff so obviously it's absolutely perfect way to do it
even worse
/s
BI funcs spook me.
BIS_fnc_weaponComponents is the worst
ok, now it shows up in the function viewer.. but it doesnt seem to work:S
it's funtime now, DEBUG TIME
but if i take the same code as in the script i put it in debug window it works ofcrouse ๐
"arifle_mx_black_f" call BIS_fnc_weaponComponents
["arifle_mx_f"]
"laserdesignator_02" call BIS_fnc_weaponComponents
["laserdesignator"]
got any idea? afaik it should work, as the script itself works, and the function is there also showing the script.. but when only spawning the function, or not spawning the function du to postinit =1; it doesnt work :S
Once again: Try with a simple " hint "I am working" "
Then [] spawn FNCName
Just try that. If that works -> Add the normal code
it says Iam working
so does that mean that the function is working? even though it isnt? ๐
actually nevermind ^^
potinit is the probably cause.. these fucking typos xD
potinit ๐
sometimes you stare yourself blind on the punctuations :S
wtf, i still have to spawn it to use it,, it wont "postinit" ๐
... ShowScriptErrors, check the .rpt, cmon, we helped you alot. Now you can do it on your own ๐
yh sorry.. is there .rpt even for editor?
im really thankful, i have learnt alot from, you now! thanks a bunch! ๐
RPTs start when you start your game and end when you close your game.
unless you use -noLogs then you won't have any.
ok, thanks ๐
well it doesnt load in the postinit thats for sure.. and i hate to bother you guys again, but i tried to google some, but couldnt find any answer why my postinit, doesnt seem to work :S
21:14:59 [18727,71.091,0,"XEH: PostInit started."]
21:14:59 [18727,71.116,0,"CBA_VERSIONING: cba=2.3.0.160217, "]
21:14:59 [18727,71.126,0,"XEH: PostInit finished."]
only CBA appears to load
theres your first issue ๐ hue hue hue its a joke
class CfgFunctions
{
class IBZ
{
class Immobilizer
{
file = "\airpatrol\immobilizer";
class Immobilizer {};
postinit = 1;
};
};
};
and the function works
and in one of the four lines with watch enter thiss:
nvm found the issue
class Immobilizer {};
postinit = 1;
shoudl be
class Immobilizer {postinit = 1;};
๐
toooo slow ๐
๐
i need to take a break im staring myself blind.. if i actual check the BIS reference for CfgFunctions, its that structure..i just feel stupid ๐
at least you din't ask how to binarize a pbo
now here is a prolem with your script
and there is alot of things there that can pevent it ๐
okk, ill try
i dont want to sound stupid but how the fuck do i load a saved game?, i mean if i run the editor mission, and then saves it ingame, i cant find it to load anywhere in the editor either.. this makes me feel veeery stupido xD
you have to export it as single player mission and then go main menu -> scenario
got it, k
"restart" starts it over
yeah you're right it doesnt init
the second time
but would this be a problem when it should load when the server spawns the vehicle?
or adds the addon
only if you resume a game in MP
same behaviour
most scripts and addons have this issue
even CBA and ACE
hm ok
and that's what I'm working on since 3 weeks
it will, but not resumed MP game
what counts as a resumed game then.. if the mission is ran on a dedicated server, and you just rejoin?
or do the mission need to be reloaded?
so for example server restarts?
this script will be run on a public EXILE server. not in its current state though, but yeah, thats the point
when you resume it's a loaded save game
Dunno if EXILE supports that.
Apparently it's hard.
rejoining will work. That's called JIP and is different from resuming
There is another minor issue. if you restart the mission from inside the mission. Or use #restart on the server, you will have multiple mouse handler scripts
Doesn't make a difference in your case, except double the network traffic and execution time. Pretty minor
if one thing is optimized in arma it's network traffic
oh red text again
I highly recommend saving all handles in an array, saving to uiNamespace and going forEach delete in that on missions startup to fix what commy said. ๐
What's the most effecient way to add small dialog / rscTitle elements to the map? I'd rather not do a loop with checking shownMap and hate doing stuff on keybinds like that. Is there some way I can hook into BIS display scripts to extend functionality or something else?
It would be great if BIS added a scripted EH for pretty much all their dialog opening/closing
check addons enabled in the server RPT
Is there a simple way to check if a buildingPos is occupied?
nearestObjects with man as argument with a super small radius
could also retrieve worldPos of those units and compare them to buildingPos
I like the nearestObjects way, should work for what I need it for. Thanks for the tip.
also, BI added a new use to buildingPos in 1.56, it can now return all positions using -1 as index
Yes, I'm already using that. Cleans up quite a bit.
Yes, also thanks again alganthe. Your nearestObjects method worked fine for my purposes.
what was that site where the ace people hang out?
thanks
would this argument work?
waitUntil{isNil CursorObject} or how would i go to check if its defined or not?
ah ok.. so thhe value "<NULL-object>" you get from watchfield in the debug console is that isNull? ๐
and isNil requise code or string
ah ok
would this work.. the logic thinking is really giving me a headache now, with all the operators and boolean values XD
if (hasInterface) then
{
0 spawn
{
waitUntil
{
(!isNull (findDisplay 46))
};
(findDisplay 46) displayAddEventHandler ["MouseButtonDown",
{
targetHit = True;
[]spawn
{
waitUntil{isNull CursorObject}
targetHit = False;
};
sleep 12;
if (targetHit && currentWeapon vehicle player == "fakeWeapon") then
{
[cursorobject,0] remoteexec ['setfuel',cursorobject,false];
[cursorobject,["motor",1]] remoteexec ['sethit',cursorobject,false];
hint 'Vehicle immobilized!';
}
else
{
targetHit = false;
hint 'Immobilization failed!'
};
}];
}
};
shoule work.. but there is something wrong.. and i cant find it, if its a punctuation or something
oh, i need to modifiy the else statement otherwise it would trigger always when im not aiming at the vehicle i guess
@sacred fox add 3 ` befor and after your code and its better readable
just as small tip
3 ' what? ๐
just need to find that sign haha ๐
found it
if (hasInterface) then
{
0 spawn
{
waitUntil
{
(!isNull (findDisplay 46))
};
(findDisplay 46) displayAddEventHandler ["MouseButtonDown",
{
targetHit = True;
[]spawn
{
waitUntil{isNull CursorObject}
targetHit = False;
};
sleep 12;
if (targetHit && currentWeapon vehicle player == "fakeWeapon") then
{
[cursorobject,0] remoteexec ['setfuel',cursorobject,false];
[cursorobject,["motor",1]] remoteexec ['sethit',cursorobject,false];
hint 'Vehicle immobilized!';
}
else if (!targetHit && !currentWeapon vehicle player == "fakeweapon") then
{
targetHit = false;
hint 'Immobilization failed!'
};
}];
}
};
oh!
else if (!targetHit) then
{
targetHit = false;
hint 'Immobilization failed!'
};
maybe thats better as a elseif statement
if else not exist in SQF
you only can do if () then {} else {if () then {} else{]} and so on
will the waintuntil spawn work in that way ?
ah ok
as it is now
waitUntil{isNull CursorObject}
a sleep need scheduled enviroment too
hm ok.. well what i want is the script only to trigger if the cursor is still at the object after 12secs, so i thought a spawned waituntil would do the trick.. apparently not ๐
shouldnt the if statement and the script triggers after the sleeptime?, and then check if the variable targethit is true or false?, in my eyes this code looks right, but yeah iguess its not that simple
if (hasInterface) then
{
0 spawn
{
waitUntil
{
(!isNull (findDisplay 46))
};
(findDisplay 46) displayAddEventHandler ["MouseButtonDown",
{
targetHit = True;
[]spawn
{
waitUntil{isNull CursorObject}
targetHit = False;
};
sleep 12;
if (targetHit && currentWeapon vehicle player == "fakeWeapon") then
{
[cursorobject,0] remoteexec ['setfuel',cursorobject,false];
[cursorobject,["motor",1]] remoteexec ['sethit',cursorobject,false];
hint 'Vehicle immobilized!';
}
}];
}
};
if you use a sleep in a unscheduled enviroment it only throw a RPT issue and contiune without waiting
if (hasInterface) then {
0 spawn {
waitUntil {(!isNull (findDisplay 46))};
(findDisplay 46) displayAddEventHandler ["MouseButtonDown", {
[] spawn {
TAG_targetHit = True;
waitUntil{!isNull CursorObject}
TAG_targetHit = False;
sleep 12;
if (TAG_targetHit && currentWeapon vehicle player == "fakeWeapon") then {
[cursorobject,0] remoteexec ['setfuel',cursorobject,false];
[cursorobject,["motor",1]] remoteexec ['sethit',cursorobject,false];
hint 'Vehicle immobilized!';
} else {
if (!TAG_targetHit && !currentWeapon vehicle player == "fakeweapon") then {
TAG_targetHit = false;
hint 'Immobilization failed!'
};
};
};
}];
};
};
oh, so what is a scheduled environment then?
cant seem to find anything about that on the biki
unscheduled cannot be halted, and waitUntil / while {} do run 10 000 only
scheduled is anything passing through the scheduler, so FSM, spawned code and some commands.
in scheduled code has a 3ms runtime for each script and can be halted.
so if i spawn the timer?
was just answering the question, didn't looked at what you wrote above ๐
the sleep command is inside a spawn.. shouldnt this work?
a sleep only work in a spawn
oh and also sleep isn't precise.
-.- BIS giving me more and more headache ๐
That doesn't change your case but it's knowledge you need to have.
yh
what about this then?
if (hasInterface) then
{
0 spawn
{
waitUntil
{
(!isNull (findDisplay 46))
};
(findDisplay 46) displayAddEventHandler ["MouseButtonDown",
{
targetHit = True;
[]spawn
{
waitUntil{isNull CursorObject}
targetHit = False;
sleep 12;
if (targetHit && currentWeapon vehicle player == "fakeWeapon") then
{
[cursorobject,0] remoteexec ['setfuel',cursorobject,false];
[cursorobject,["motor",1]] remoteexec ['sethit',cursorobject,false];
hint 'Vehicle immobilized!';
};
};
}];
};
};
now the sleep is inside a spawn, with the active script aswell
@sacred fox add a tag to your vars to be sure that you dont collide with other scripts/functions
oh ok
if you use a global variable
how ever you want to call your vars
yh, just wanted to makesure i got you right ๐
something is still wwong withthe code thought, trying to run it in debug console, and it says ; missing, but i cant seem to find it, have been staring at this same code for a while now!
๐
ok
and functions yes in the secound waitUntil is a ; missing
waitUntil{isNull CursorObject};
so it should be like this?
waitUntil{(isNull (CursorObject)}
no there is a simicolon missing
oh right
frustrating when you cant find them, when you overlook them all the time -.-
how do i hint boolean values? :S
this doesnt seem to work
IBZ_targetHit = True;
[]spawn
{
waitUntil{isNull CursorObject};
IBZ_targetHit = False;
sleep 3;
hint IBZ_targetHit; };
im just testing stuff in the debugconsole
and im always having trouble hinting variables, or get hit forexample that reports the right value in the watchfield, but a long string in a hint
str true
k
Chris don't know if you're learning now or trying to get stuff to work, but if you're learning read up on types. Bool vs string vs scalar, etc.
not 100% true with the "if else does not exists in SQF" :)
it is just a little bit different as usual
case (<ExpressionGoesHere>):{};
case (<ExpressionGoesHere>):{};
default{};
};```
will work
only thing im not sure about is how it will handle 2 trues
It'll take the first
not true actually
of cause
performance of switch has improved
it highly differs on the specific case what is faster in the end
test1 = true;
test2 = true;
switch {true} do {
case test1: {
};
case test2: {
};
};
there switch case fail ๐
it execute both
Are you sure? I always thought it only executed first
I use it a lot ๐
then why you do not know that?
I haven't used it where multiple could be true in quite some time and can't remember on the other
anyone got game running
test1 = true;
test2 = true;
switch {true} do {
case test1: {
systemchat 'test1'
};
case test2: {
systemchat 'test2'
};
};
pls
ohh and as little promotion :)
else if (true) {...}```
works in OOS โค
why doesnt this work? :S
if (IBZ_targetHit && currentWeapon vehicle player == "fakeWeapon") then
{
[cursorobject,0] remoteexec ['setfuel',cursorobject,false];
[cursorobject,["motor",1]] remoteexec ['sethit',cursorobject,false];
hint 'Vehicle Immobilized!';
} else {if(!IBZ_targetHit) then {
hint 'Immobilization Failed!';
};
};
it returns Vehicle Immobilized in both cases :S
this is the code prior to that
IBZ_targetHit = True;
hint 'Keep on target!';
[]spawn
{
if (isNull CursorObject) then {
IBZ_targetHit = False;
};
sleep 3;
@queen cargo OOS sucks and is slow as Fuck
in my test i have over 90% speed lose with OOS vs SQF Pure
would love to see that test
its get horrible translated
lemme repeat: would love to see that test
as it would mean i got room where i have to improve
unless that, its just your word vs mine
still, there is room to improve
but 90% is definitly not the case!
eg. foreach of OOS currently requires another variable assignment for simplicity (but that wont cause a 90% drop as you described it)
simmilar things going to happen when you want to compare the for loops
OOS currently is not printing the for "_var" from 0 to 10 do {...} syntax as it is kinda complicated to detect and would consume too much time from other parts which need attention
so lemme ask again kindly:
would love to see those tests as you seem to have created quite solid tests to say im 90% slower then SQF
@austere granite {true} and not (true) ?
Just wondering whether switch exists on the first true result
or if it'll execute both cases
it will not execute any as there is no cases for {true}
its a typo @meager granite ... hell not even i am doing that fucking nitpicking
`
can't google it either for whatever reason
3x
switch {true} do {
case true: {systemChat "nope"};
case {true}: {systemChat "yep"};
};
switch (true) do {
case true: {systemChat "yep"};
case {true}: {systemChat "nope"};
};
the code was a typo
question is
two times true
expression true
what will get executed
why is it red? ^
red is not sent
case true: {systemChat "yep"};
case true: {systemChat "??"};
};```
it will execute only the first case
okay, so figured it would and i feel like i've used that, just couldn't check and made me unsure
that is interessting in 1.54 i use it
call {
if (_a == 1) exitWith {
systemChat "First case";
};
if (_a == 2) exitWith {
systemChat "Second case";
};
};```
that's a single code block, that's normal that the second if is going to be evaluated.
an alternative to switch
switches are used to keep the code readable.
well its a control structure so its primary use is to control execution flow not readability
switch is slower than a bunch of If's
depends
nah, always the case I did some tests.
if you check the most common case first it might be faster
0.0161s vs 0.0149s
looks like 10k loops. also ms.
depends on how many switches you use.
death loops?
i dont use while true
neither infinite for loops
nope
infinite loops are evil - thats what they tought me
polling should be avoided, but some things can't be done otherwise
events are the replacement for polling
you re the programmer - you create the world ๐
vote for a drowned event handler
idk, I don't touch medical if it can be avoided
allowdamage false doesn't work underwater, because the game outright kills you with oxygenRemaining 0
underwater is indeed totally broken
no one fights in water anyway
TMW createUnitLocal is only available on VBS and not ArmA. RIP... guess I gotta hide the unit on every client
most useless feature in A3
you are better off ignoring it imo. Especially if it means you need polling loops, because you can't change addon files
I just want to let the game run as smooth as possible, while having as much cool features as possible
So it seems like hideObject on an AI unit doesn't disable it's collisions to anything other than bullets.
That's mildly annoying
the ONLY while {true} do loop that I use is ```
derp_mission1Locations = ["missionMarker_Athira","missionMarker_Frini","missionMarker_Abdera","missionMarker_Galati","missionMarker_Syrta","missionMarker_Oreokastro","missionMarker_Kore","missionMarker_Negades","missionMarker_Aggelochori","missionMarker_Neri","missionMarker_Panochori","missionMarker_Agios_Dionysios","missionMarker_Zaros","missionMarker_Therisa","missionMarker_Poliakko","missionMarker_Alikampos","missionMarker_Neochori","missionMarker_Rodopoli","missionMarker_Paros","missionMarker_Kalochori","missionMarker_Charkia","missionMarker_Sofia","missionMarker_Molos","missionMarker_Pyrgos","missionMarker_Dorida","missionMarker_Chalkeia","missionMarker_Panagia","missionMarker_Feres","missionMarker_Selakano"];
while {true} do {
_selectedLocation = selectRandom derp_mission1Locations;
_isAOempty = count ((getMarkerPos _selectedLocation) nearEntities ["Man",PARAM_AOSize]);
if (_isAOempty == 0) exitWith {
false
};
and i'm leaving it like this just for the lulz :^)
why would you use the tag "derp" ?
why not ? :^)
The languages usable are listed at the bottom of that wiki page
Thanks
Can you access definitions made in Description.ext in SQF?
I'm looking for a way to have global definitions among all scripts
With #define, preferably not as variables
#defines only remain in current file
youd have to #include a file with all the defines in each file that needs em
Ok, thanks
Dont know if anyone uses game updater tool here, but i so: How are you supposed to unfuck your steam after having used it?
It seems like the only way to log in again is by exitting steam completely and logging in
kidn of #offtopic_arma ... still relates to coding and somehow i do not expect much audience there ... but not SQF ... so ... anybody here has experience with WPF?
got some quite serious problem with it which i cannot solve
Im trying to get the Fired eventhandler to work, but it doesnt seem to trigger when fired from vehicle gunner?
if (hasInterface) then
{
0 spawn
{
waitUntil
{
(!isNull (findDisplay 46))
};
(findDisplay 46) displayAddEventHandler ["Fired", {hint "FIRE!";}];
it doesnt even trigger in debug console, when i fire with a rifle :S
ok, got it to work with just ```
player addeventhandler ["Fired", {hint "FIRE!";}];
nvm, got it ๐
Add the EH to vehicles too
Greetings, can I access the action menu with scripts? I mean... does it have any IDC/IDD path , or is it completely engine side and it cannot be accessed?
better question @lunar mountain why would you want to do such a thing
because you have no access at all to the engine actions. Does it really matter why?
correction: you have, but not how they appear
@lavish ocean any ETA on the scheduled/non-blocking callExtension?
Or is it just Enfusion stuff?
when was a non-blocking callExtension announced?
also ...
why you even bother about it dude
you can simply start the thread yourself
Dwarden said some months ago to me that they're working on non-blocking callExtension
Yes, but AFAIK, even if it runs in a thread, it blocks the whole engine (as stupid as it is)
That's what I've been told
no, it does not Ezcoo
It does block only the thread? o.O
...
lemme quickly write something for you together ...
why the hell would you want scheduled callExtension ?
Database intensive mission
Imagine what it would do to server performance if it used blocking callExtension all the time
Performance is critical, minimal response time is not
ahhh
now its more clear what you want ezcoo
you want a call extension where you can get the value later
he want intercept.
no he does not alganthe
It's possible to wait, IF it's non-blocking.
pff ...
IF it blocks the execution, then we want to get the value later.
simply do what you always do on such things dude ...
start a worker thread
and just check with the extension if the value is available
instead of running the actual job in the callExtension
the worker thread is doing it
That's what we're considering already
"considering" ... it is the only correct way to do it
But why would we need to use such solution if callExtension blocks only the thread it's running in?
im sorry to ask but ... are you dump?
so ... lemme explain you what to do:
- Create a new extension with two commands, namely:
-- StartThread <-- Starts Thread if not yet started which does the heavy work
-- IsFinished <-- checks if thread is done and returns result if it is, if not it simply will return empty
in StartThread you will create a new thread and detach it from your current stack
by doing so, you can return safely from the current function
After that you just poll "IsFinished" until it IS finished
there is your non-blocking whateverHeavyWorkYouMightDo callExtension
properly implemented
tipp: do not touch callExtension if you do not know what you are doing
that is the planar basic of how to properly work with callExtension
lol, someone is on her period
he's always like this
im just nice as usual @tough abyss
but he's right.
and thats why i still can be like that @lone glade ๐
I mean, if he was wrong or was doing it in pure spite ok, but this time he's right.
:^)
seems like it could work
but what @tender fossil probably means is that no such hacks would have to be developed
if you could do callExtension in an SQF thread
and it only blocks that specific SQF script
it is no "hack" @tough abyss
the problem is the invalid expectation that it should work like so
callExtension is calling from within a c/c++ context another function
due to the nature of non-virtualized stuff
(which C/C++ is)
it simply will not return out of there to the VM unless you return out of the function or tell the VM explicitly it can pause now
thus you always have to exit callExtension ASAP to give control back to the VM
callExtension is not something every scripter can catch up
you need serious knowledge about programming itself to actually do something with it
so to quickly conclude this garbage that just came out of my hands:
callExtension is blocking and should remain so! making it "non-blocking" would require at least three new script commands and a lot of background code
the reason why callExtension is blocking is because the VM gives the current context to another function which is expected to return ASAP
normally it would do so (all SQF commands you issue work that way btw. they block the VM for a short periode of time fully but exit fast enough) but when you simply stay inside of the function, the VM cannot further process, the engine cannot do too and thus you block all
its like "that guy" who drives with 10 over a highway with a single road thus blocking all other ppl behind him
callExtension -> parseParamas -> push that to a seperate dll thread -> return job ID or some indentifier -> arma does its thing -> callExtension (is that job done -> dll returns
only proper way of doing it
aka what @queen cargo said probablly TLDR :p
yup
just without the "return job id" as i did not wanted to also provide guidance for that ^^
blah easy ๐
no you dont
but one of the more simple tasks
per thread buffers ๐
with single job per thread
stupid but no need for mutex ๐
/thread
I think it's ironic to say "pro tip: don't touch if you don't know what you are doing"
talk less - code more
waitUntil{itHurts}
laughed
for "_feels" from 0 to 10 do {halp}
There's still no way to get rid of the connections / connected messages is there?
with mod there is
RscDisplayChat, add a onLoad script and setPosition it to [0,0,0,0]
text background has no idc / -1, so proably have to change that too
You won't be able to read server commands though. maybe some additional ifs
Plus it means i gotta create my own chat system I take it
proably. maybe one can do some text parsing, before hiding the contols
extremly hackish
also have to use the string tables, cause the messages are different
but it would work
RscDisplayChat is the actual window were you enter the chat, it's a different one...
Meh don't worry about it for now, was just wondering about it
@austere granite call clearRadio on each frame
but small side effect, it removes all messages ๐
You can make callExtension non-blocking for scheduled code. ARMA would just suspend the script context until the DLL call that is marshalled to another thread/process completes and then return the value.
did today already @deft zealot :)
OOS got updated to 0.7.4-alpha
@tribal crane you cant
ArmA is not rly threading SQF
it is actually running in sequence which means --> [] spawn {"blocking" callExtension "";}will block your game just like non-scheduled would
ARMA can suspend a scheduled SQF script for any reason; e.g. when you do a "waitUntil" the waitUntil command suspends for an arbitrary condition.
There's no reason ARMA couldn't internally suspend your SQF script until the callExtension "work" off in some other thread finishes.
Lets be honest callExtension will be blocking for the entire Arma3 Lifetime, its highly unlikely they will change how the scripting engine works when it calls an extension
Personnally i am still waiting on a new str command that escapes quotations properly, so i can parse nested arrays containing strings (without having to worry about user input).
Its like a 10 minute job tops coding wise
Or an engine command to list loaded callExtensions & checksums on a client. Way to easy to get a random extension whitelisted
@tribal crane omgfg ... do you even read the shit i write?!
hell why i even make the work to write down any shit!?
arma CANNOT suspend if callExtension is not returning
How does waitUntil work then?
...
sometimes
sometimes i rly have no fucking clue how to be more bad
waitUntil is like call
just that it calls following function until it returns true
every command cannot be suspended
thus every operation (eg. player) is atomic
however
SQF can suspend inbetween those commands
thus
if you do not return callExtension ASAP
SQF cannot suspend
as youre still in your function
Every operation isn't atomic.
lemme ask again
do you even read what i write?
If arma loaded the callExtension calls in a seperate thread, they could try implement a callBack feature into the scripting engine.
Take:
{ sleep 10; } forEach [1, 2, 3];
cool
But BIS won't bother todo this, its to much work for them and they risk breaking abit ๐
2 atomic operations
good example ian ( sleep 10 and the actual forEach which however works a little bit different )
Actually they might, so they can run .dll's out of process, Torndeco.
But they dont ๐
BattlEye wouldn't have to worry about whitelisting DLL's, then.
X39: You can see SQF commands being non-atomic by looking at savegame dumps.
non-blocking call extension is also complete bullshit
dont talk trash shit
but dont worry @tribal crane i will write something together when my event is over
and explain it
AGAIN
X39: Don't go to the trouble just for my benefit. What's your event?
Friday ArmA mission
its not only for you ... there are multiple problems in understanding as it looks like ...
erf confused it with turretIndex (returned by getIn), getCargoIndex indeed only return cargo positions.
assignedvehiclerole might return completely wrong roles when you have an AI group leader
something like this:
fullCrew cameraOn select {_x select 0 == player} select 0 select 1
"driver", "commander", "gunner", "turret", "cargo"
@queen cargo how often do you get punched in the face?
too often, he's the salt god after all.
it begins
popcorn will be spilled.
dont see the problem with non blocking callExtension... instead of
CallExtension -> callFunc -> Return
just change it to
CallExtension
-> CreateThread(in thread: _x=0;callFunc;_x=1)
-> (waituntil {_x == 1};)
-> return
wont work in non-sheduled because you cant waitUntil.. but i think that does the job doesnt it?
you can waitUntil, just use the PFH variant available in ACE3 :^)
example why assignedVehicleRole shall not be used:
http://i.imgur.com/UQ97fim.jpg
dont mean waitUntil really.. its just symbolic for an engine side implementation
oh btw, any idea why mines can't be added to zeus ?
I'm using createMine :/
still CfgAmmo
T.T
so all of that is engine side.. in the current implementation callFunc runs in mainThread and stops whole game.. my implementation only stops its own thread and that single scheduled script
no
waitUntil just checks the condition.. and if it doesnt match it just jumps to the next scheduled script.. it has some processing to do.. but very little
so your callExtension just returns "pls wait" until it's done
yeah... basically what we have in script currently with just polling the extension and asking if its done... just in the engine compressed into one script command
I see no problem with that.
i also dont... @queen cargo says thats impossible... dont know why... Seems very easy to me
He was probably thinking of something else
still in mid-mission thats why you do not get any results
@daring zinc never
@still forum callExtension is always blocking until you return
that was the question
how to make it pseudo-non-blocking (by spawning a thread etc.) was something i already have described earlier
So you both agree after all.
true. pretty sure Dedmen knows that. He proposed polling.
never was in an argument with Dedmen
that's a surprise @queen cargo, considering how you behave in this channel
yeah i think i didnt think enough about what i read... i just saw people suggesting a new non-blocking callExtension.. and you stating its not possible because callExtension has to block
i am always right is the problem @daring zinc
you just got the feeling but your inner knows i am right
oh boy
yup
it is
#dontCare ๐
come around
prepare to drink
((so better do not come with a car))
yeah, that would be "dump", right?
exactly
Oh The Party, The Party is always right
And comrade, may it ever be so;
For who fights for the right
He is always right
glory to arstozka
I think I made my longest If condtion, ever.
if (!(typeOf _vehicle in _casHelos) && {!(typeof _vehicle in _secondCopilotHelos) && {0 in _turretIndex}} || {typeof _vehicle in _secondCopilotHelos && {0 in _turretIndex || {1 in _turretIndex}}}) then {
moveOut _unit;
["What are you doing?","You are not in a pilot slot!"] remoteExecCall ["derp_fnc_hintC",_unit];
};
yes the If is a single line.
i have seen and made worse
but it works !
typeOf in is case sensitive
at least wrap that shit
meeeeh.
Is it possible to localize hints with RE ?
might wanna check it, but I doubt it.
Well I guess you use your own function
it's a simple hintC without the second hint.
moveOut works on remote units?
They claim moveOut is global on the wiki.
moveOut is global and the hint is remote
I got myself tangled with my fired EH
this is a getIn EH added on the vehicles.
getIn already fires for remote units
are you trying to confuse me ?
wait, getIn is global ?
well it's not a MP event that sends code over the net. it will only execute on the machine were it was added
but it does fire for remote units and vehicles
both are scheduled environment
remoteExec is scheduled same for remoteExecCall
whoaaaa such perf drops, this is going to be ran once in a few hours and there's barely anything running clientside on my mission.
I want my hint to show today, not next week.
remoteExecCall is either for the sender and unscheduled for the reciver
:^)
both have a huge ass delay compared to PVEH
like do we need to have scheduled vs unscheduled thign again?
just running cba as servermod, can't use them :/
Grim, knowing is half the battle. You should at least know what a command does
What?
I wish we had in engine taskCreate for the new mission framework
remoteExecCall has nothing to do with envoiroment its executed in (scheduled/unscheduled)
same with remoteExec
only difrence is on reciving end
already done
nope not in this case
well, simple, check if the helo is in my array of helos with 2 copilots
incoming block of code
/*
* Author: alganthe
* Check if the unit is authorized to enter the pilot / copilot slot of the vehicle, if not they are kicked out.
* This is called by the getIn eventhandler.
*
* Arguments:
* 0: vehicle the getIn action is used on <OBJECT>
* 1: position in which the unit is entering <driver, gunner or cargo>
* 2: unit doing the action <OBJECT>
* 3: turretIndex of the position < [] for driver and [0] to n number of seats>
*
* Return Value:
* Nothing
*
* Example:
*
* yourVehicle addEventHandler [""GetIn"",{_this call derp_fnc_pilotCheck}];
*/
params ["_vehicle", "_position", "_unit", "_turretIndex"];
_authorizedPilotUnits = ["B_pilot_F","B_Helipilot_F"];
_secondCopilotHelos = ["O_Heli_Transport_04_F", "O_Heli_Transport_04_ammo_F", "O_Heli_Transport_04_bench_F", "O_Heli_Transport_04_box_F", "O_Heli_Transport_04_covered_F", "O_Heli_Transport_04_fuel_F", "O_Heli_Transport_04_repair_F" , "O_Heli_Transport_04_medevac_F"];
_casHelos = ["B_Heli_Attack_01_F","O_Heli_Attack_02_F", "O_Heli_Attack_02_black_F"];
if !(typeOf _unit in _authorizedPilotUnits) then {
if (_position == "driver") then {
moveOut _unit;
["What are you doing?","You are not in a pilot slot!"] remoteExecCall ["derp_fnc_hintC",_unit];
} else {
if (!(typeOf _vehicle in _casHelos) && {!(typeof _vehicle in _secondCopilotHelos) && {0 in _turretIndex}} || {typeof _vehicle in _secondCopilotHelos && {0 in _turretIndex || {1 in _turretIndex}}}) then {
moveOut _unit;
["What are you doing?", "You are not in a pilot slot!"] remoteExecCall ["derp_fnc_hintC", _unit];
};
};
};
yep.
test = {
systemChat str [_this, call CBA_fnc_isScheduled];
};
"call" call test;
"re" remoteExec ["test"];
"re call" remoteExecCall ["test"];
["call", false]
["re call", false]
["re", true]
I could add a seatSwitched EH and allow for the loadmaster seat to be used but meh.
dat indentations and variables
assignedVehicle Role
http://i.imgur.com/UQ97fim.jpg
If you are the group leader, yes
just sayin' v u1 and u2 aren't very good to use as params.
says the one that uses "derp" as tag
not very readable.
OK. I tested RE vs RECall and my conclusion is that RECall is always executed in unscheduled env, while RE is always executed in scheduled env.
Which is different from my last test that was made when these were new
hahahahahah.
depends on what args you move over the net
if REC was executing scheduled that would explain so much wierd crap
REC executes unscheduled
Yea it should
on server and client no matter who send it
but is it possible that it was executing scheduled
It didn't when they were new.
that just explaind so much wierd crap
hahaha
scroll menu? ingameuiseteh was fixed
i think that still works in a2
a2 is dead
ingameuiseteh can easily be solved in A2 by overwriting it with the mission
yup
anything else in A3 beside "" ?
""?
nothing ๐
lol
God knows
Well its either startis or Altis or VR but who wants to play in VR ๐
Its not the size
its the flatness of it ๐
ALtis size is still not enough
and color palet
gimme larger maps
yeah, no.
100x100km
altis is 240 x 240
eeeh no it isnt ๐
more like 24x24
its still not 240 XD
What's the point of huge maps when every city looks the same? The assets make the map
anyone know if there's an outbound limit on the function string length for callExtension?
its passing the direct pointer from the arma string.. so... The limit is only arma string limit
Really? So there's no limit on the character length?
er, rather, do you know what the arma string length limit is?
disregard: https://community.bistudio.com/wiki/String
was just looking that up but didnt find it ^^
No worries, thanks Ded
is it impossible to use setVectorDirAndUp on a groundweaponholder?
trying to attach a weapon to my character and it doesnt seem to do anything
im just gonna make a dummy weapon
thanks for the link though, ive actually seen this before
not sure if this is the correct chan, can anyone point me in the correct direction for creating a flight model for a helicopter?
might wanna try config_editing
will do
Extension question: if I reference additional DLL's from within the extension DLL, and then place them within the @mod folder, upon calling the extension DLL, arma3 crashes with a file_not_found. If I place the additional DLL's in the root arma3 folder, it runs happily. Any way to work around that?
@cold quartz Max output size is passed with the call itself as a param last time i checked
extern "C"
{
__declspec(dllexport) void __stdcall RVExtension(char *output, int outputSize, const char *function);
};
void __stdcall RVExtension(char *output, int outputSize, const char *input)
and @cold quartz you can get your modules PWD and call it with that path... it should work
@cold quartz no
you run from the root folder --> your dll has to be pathes properly from there
another option is to check for your dll path and cut off whatever you need
https://stackoverflow.com/questions/8605644/how-can-i-get-dll-location-path-inside-the-same-dll-in-c
So I'm trying to convert an array in string format, back to an array. I've done it before using this exact same method and it worked fine, but it's just not working in this case.
hint _data;
_data = call compile _data;```
The hint returns: ['Default',ObjectName]
However, trying to use the _data variable after that compile returns undefined variable. Any ideas?
^ Object name is just placeholder btw... the object name is a passed parameter refering to a unit. I just threw in "objectName" above to save typing out the individual object ID
@fallen locust, I was under the impression that that was the limit on what the extension could return into arma?
Yes its passed from arma to the extension as 2nd param
Yea but I was wondering if there was a limit on what arma provided to the extension?
Not really as far as i can tell...
as ouput limit is due to preallocated output buffer
Dedman? said it was basically whatever the limit on string length is
and you have no issue like that on input
yes that is true. but max string size in arma is prity huge
yea, like 10k
i thing is more then that
@cold quartz im called dedmen without an a ;)
for the dll loading in your @mod folder you could use GetModuleFileName to get the full path of your extension and then call LoadLibrary manually with that path to grab your other dll
Sry bud. I'll get it right next time ๐
@lavish ocean cleaning pleeease :^)
I was about to post the same issue, igi lol
the new patch must have broken using call compuile to return vehicles from a string
The issue can be replicated by returning: call compile str player
also im trying to return a variable using missionNamespace getVariable that's been publically broadcasted but its returning as nil
_keys = missionNamespace getVariable format["%1_KEYS",getPlayerUID player]; hint str (isNil "_keys")
its set on the server like so:
missionNamespace setVariable[_keys,_arr];
publicVariable (missionNamespace getVariable _keys)```
I'm thinking this might be the proper code instead:
call compile format ['%1 = %2; publicVariable ""%1""',_keys,_arr];```
its set on the server like so:
wrong syntax. It's:
keys = format["%1_KEYS",_uid];
missionNamespace setVariable[_keys,_arr];
publicVariable _keys
You have to pvar the variable name, not the value.
I think in 1.56 this also works:
keys = format["%1_KEYS",_uid];
missionNamespace setVariable[_keys,_arr, true];
Also this usage of call compile hurts my feelings.
https://community.bistudio.com/wiki/setVariable
public (Optional): Boolean - Only available for Object types and (since Arma 1.48) for missionNamespace. If public is true then the value is broadcast to all computers.
call compile str player
this never worked, simply because str player will be a string that is not compileable to the object reference. The only things that can reliably be compile str'd are booleans, numbers*, strings and arrays of these. It never worked for objects, groups or anything else really.
Edit: numbers below a million that is
Edit2: compile on objects can work if the object has a vehicleVarName, as str will return the vehicle var name. Since this is only an edge case, I wouldn't use this.
gee, use call compile only when you want your functions to be available only serverside.
_data = _ctrl lbData _index;
If you have to use lbData, then instead of using str on the value, simply setVariable on the list box control and use that string as lbData:
_ctrl lbSetData [_index, "data01"];
_ctrl setVariable ["data01", _data];
....
_ctrl getVariable (_ctrl lbData _index);
That way you can store any data type in the control and you don't have to worry about compile.
thanks commy
and alganthe ๐
i didnt think the global param for the setvariable would do anything for the mission namespace
just a ltitle confused with your example
_ctrl setVariable ["data01", _data];```
in my case, what do I substitute data01 for?:
_units lbSetData [(lbSize _units)-1,str(_x)];
_units setVariable ["data01", str(_x)];```
_units is the control, to avoid confusion
_x is a soldier object I guess?
_id = lbSize _units - 1;
_key = "data" + str _id;
_units lbSetData [_id, _key];
_units setVariable [_key, _x];
_key would be your unique string "key" for that list box entry
and the variable name on the control
edited it. This way you don't have to convert the object to a string, which is the huge benefit
thanks for clarifying
You basically store a variable name as lbData. And the variable is stored on the control. Maybe they'll fix lbData to support any data type. Until then this is the best solution.
I think I understand
Any command that returns magazine IDs from a vehicles cargo?
currentMagazineDetail
currentMagazineDetailTurret
magazinesDetail
magazinesDetailBackpack
magazinesDetailUniform
magazinesDetailVest
soldierMagazines
uniformMagazines
vestMagazines
backpackMagazines
^ None of these work.
Does that return them by ID tho?
nope,no ids
magazineCargo cameraOn
["BWA3_30Rnd_556x45_G36","BWA3_30Rnd_556x45_G36","BWA3_30Rnd_556x45_G36","BWA3_30Rnd_556x45_G36","BWA3_DM25","BWA3_DM25","BWA3_DM32_Orange","BWA3_DM32_Orange"]
I'm looking for smth like this:
currentMagazineDetail cameraOn
"MG5 7.62x51mm 120Rnd Belt Case(120/120)[id/cr:10000093/0]"
am I doing this wrong?
params ["_vcl", ["_l1","_l2","_l3","_n1","_n2","_n3"]];
getting an error:
Error Type String, expected Array```
yes, look at the syntax on the wiki
im trying to make out the examples
settled on params ["_vcl"]; (_this select 1) params ["_l1","_l2","_l3","_n1","_n2","_n3"];
yea
hey guys, long time no see
i have people suddenly reporting issues with HCs since v1.56, anyone knows anything about that ?
yes, #headless_client
thanks
" said: it's 100% broken atm, as @zealous solstice pointed out the inits are borked for HC and logics."
ok
they work on my end, somehow
with a mission created before eden
nope, they appear to work, they don't
they definitely do
we've tested this in depth at #headless_client
they definitely create local units and manage them alright, i have diags showing that
but that's with a pre-eden mission
wat.
i suppose exporting the mission right now would bork it
the people who get issue are those who modified my mission recently and exported their own version
the last official version works perfectly fine on our server with 3 hcs
i can send you the link if you want to test stuff with it
ok
not sure about the infinite loading issue tho
we don't get this one at all in v1.56
i'll try to get hold of my server admin first and make sure i'm getting it alright
I LOVE the changes they made to buildingPos, I never garrisoned units faster.
now if we could get a nearObjects command which takes multiple classnames as arguments (like nearestObjects but without the sorting) that would be niiiice.
oh what did they change ?
if you use -1 as index it returns all positions inside the building.
so it returns what BIS_fnc_buildingPositions would have returned right
but in engine and much better.
ok
a great change indeed
finally no need anymore to go through all manually and doing some check ...
my biggest issue with building positions atm is that setPosWorld doesn't work quite well with them :/
or that might be setPosWorld being too fast and my unit not spawning properly.
it could also be just some weird MP issue like i have ...
if somebody is interested in that issue btw.
http://pastebin.com/iiUz3n8N
hf
"MissionReady" never gets published
however ... the entire mission sets up correctly ...
they could have updated bis_fnc_buildingPositions with the new buildingPos behaviour to have both the performance gain and compatibility
just checked the code and it's not done
I prefer in engine solution imho
of course
but since most of the old code will never get updated :p
they could modify the old functions to take advantage of the new stuff
they often do actually
it's by dude ๐
@queen cargo createCenter is deprecated in A3. It does nothing.
What is GVAR_GVARS_missionContext? a game logic?
How is it created?
game logics have to be created with createUnit or createVehicleLocal (for a local one). createVehicle fails for whatever reason
_logic = _grp createUnit ["Logic", [0, 0, 0], [], 0, "NONE"];
[_logic] join grpNull;
deleteGroup _grp;
_logic;```
I think you can directly grpNull createUnit instead of the join
nop
that wont create a unit sadly ...
the logic is present
the mission stuff is present
just the stupid variable is not ๐
stupid. On the local machine it's set, just not on the other ones?
Maybe the object is not* transfered during preInit, but the object isn't put on the jip stack
Is this a 3den mission?
SP it works
MP it does not :)
converted it recently to 3den ... but not sure why that should cause trouble with a 100% scripted mission
ohhh ... wait ... think i did shit
if thats true what i think right now ...
then i am one of the dumpest idiots in this fucking world :facepalm:
yes ... i am a dump idiot
What was the issue?