#arma3_scripting
1 messages Β· Page 399 of 1
have you go through ALIVE documentation?
Can I save the progress without a dedicated server?
Set Persistence to Local in the ALiVE Data module. If you want to use War Room services such as Mission Stats, Server Monitoring and AAR, you need to run @aliveserver on the host machine and have a War Room account with the host details setup (ensure the IP address is correct).
Cloud Persistence works best with a dedicated server on a static IP. However, it is possible to set up a "local server" on your PC (arma3server.exe) running the same mods and register that with the War Room. Be sure to check the IP address in your War Room group profile from time to time, as most people are on a dynamic IP and it may change. See the BI Community Wiki for info about setting up a server.
Advanced users can set up their own local instance of CouchDB.
How do I reset persistence?
Change the mission filename. See ALiVE Data page for further details of how to reset persistence and stats.
And this is if you are running the mod locally
Alright, but as far as using the vanilla arma 3 save function. Im toast
but then i guess thats why most major mods, Have their own save function....lol
wla
overthrow
ect
" + "There are" + _amountb + "boxes"
Can I correctly merge text + _variable amounts with it?
Fuck
How would I compile something
message = "text" _variable "text" _variable Γ©more textΓ©"
How would one do this correctly?
"i have " + str(_amount) + " apples"
fml why didn't it work earlier then π
format["I have %1 apples",_apples]
Format is much better if you have more than 2 strings
Ah yes ofc
Dafuq I have been doing format ofc
Cheers
Fucking stupid
why I forgot the hole format shit ...
Is there a function that allows you to take the first/middle/last x characters in a string? Or do I need to convert my string to an array and then back into a string?
select + count + math
hey whats the best way to create a unit that isn't really there? his only purpose is to open a dialogue and click something, that dialogue will allow him to choose the actual unit he will play as.
agents
so, instead of placeing a payable unit in the editor, i can just create an agent in the init and make the player play that agent?
or wait hold up
i got an idea
nvm
wait, what the hell are you asking
I dont wanna place a playable unit in the editor
Because he isnt going to be used
or well hes just going to be used for one thing
i guess i could just delete him on player switch
@peak plover with help of mister google... this thing is working```sqf
0 spawn
{
onEachFrame
{
_start = ASLToAGL eyePos player;
_end = (_start vectorAdd (eyeDirection player vectorMultiply 50));
drawLine3D [ _start, _end, [0,1,0,1]];
_pos_player = getPos player;
_screen = screenToWorld [0.5,0.5];
_get_direction = ((((_screen select 0) - (_pos_player select 0)) atan2 ((_screen select 1) - (_pos_player select 1))) + 360) % 360;
hintSilent format ["Direction %1", (round _get_direction)];
};
};
Does arma have a function to convert 123456 to 123,456 by chance?
round wil do 123,456 to 123
convert 123456 to 123,456? Like 123456 / 1000?
I guess that would work to add commas to a number wouldn't it. Assuming I replace decimals with commas.
Let me give a better example. Say I have a fairly large number, lets go with 123589334. Basically I just want to add some commas to make it more readable. So that would turn into: 123,589,334
I don't know of a pre-made function that does that
Gotcha. Just wanted to know if there was a pre-made before I went ahead and made my own.
Sounds like an life issue to, i bet there are some solutions for that already
Probably some life server that has that. Meaning.... You have to make your own
hint str (123456 toFixed 3); //--- 123456,000
But he want's 123,456 as result, sldtmnondfgo1ck
ic .Hugh Dschasdjhfsiudhfsdfhckman
do split string
_string = _arr select 0 + _arr select 1 + _arr select 2 + "," + _arr select 3 + _arr select 4 + _arr select 5
Wow
you can make it more sophisticated with for do loops etc to detect where you should put the comma
it's lazy
wow
very lazy
I have no words for this
lazy and dumb
I had the idea to use https://community.bistudio.com/wiki/select and do essentially the same as you do just better.
But that was so dumb that I didn't want to say it
oh wow I totally forgot the string syntax of select
it's pretty dumb but
if you need it to work quickly and only once, bodges are fine
(not for production code ofc)
Oh look! I can google!
https://forums.bistudio.com/forums/topic/195447-snippet-currency-formatting-function/ -> https://community.bistudio.com/wiki/BIS_fnc_numberText
Description
Function to return currency symbol & passed amount as text
Β
Installation
Copy/Paste function file wherever you want, decl...
BIS_fnc_numberText formats with spaces instead of commas or dots. But that's already close
that is the right way
No it's not
Not rly
Oh look! I can not only google but I can also read and click the second result instead of the first
https://github.com/CBATeam/CBA_A3/blob/master/addons/strings/fnc_formatNumber.sqf
@jovial ivy There ya go
It's even localized to your language
damn, that's powerful google fu right there
And it's using the select variant that I thought of.
Man these poor people that are unable to google... Can't imagine how they can live. I bet they wouldn't even be able to figure out how to use a lightswitch
depends what type of switch
I'm sure I could troll people by wiring differently and using different types all over the house
XD I would probably love that
"to turn this one on, you have to keep it pushed"
you can't install them upside down
which kinda sucks
Or use emergency push switches. And install a camera so you can watch people trying to figure out how to turn it off
that's an aesthetic
Old rusty squeeky levers π
And a "Touch both ends to turn light on" sign above it
how can I get a list of all units that are not players?
allUnits - allPlayers ?
it cant be allUnits-allPlayers XD
Ok.
ah thx
allUnits is also a script. I don't even know how you would do anything without a script`
@edgy dune What can you do without a script?
it's checking every unit on the map and only adding units which are not players to an array
stare at the screen and hope his brain waves somehow changes transistor states to do what he wants
we don't have an allAIUnits command because @lone glade's method is succinct and does not need a separate function
we noticed
@edgy dune, if you know the size or the different possible properties of a set you can define the subset you want with information from one subset
ie
if I wanted to move the red and green marbles from a bag with 25 mixed red, green and yellow marbles and count them, I can take the yellow marbles out and count the remainder of the marbles in the bag
I don't even know what you are trying to do there
see wat I was tryna do was apply a script to all non player units
yes, and you need all non players units for that
Yeah? What is preventing you from doing that?
@nocturne iron I don't really see the reason to explain primary school math on a 3 year old level on a Discord for a USK 16 Game.
he might not have realised that's why you need allUnits
that's a bit harsh
even i wouldn't insult someone to such lengths
formal gud cuz formula
XD
damn dude
there's no reason to spell it Game though
it's actually wrong
I hope you have bad christmas because of this
you damn well deserve it
lulz
Yeah. I'll have to spend christmas with my in-laws instead of sitting here and writing code
your mum isn't a proper noun
can't have a bad christmas if I don't celebrate it
you're guaranteed to have a bad christmas if you don't celebrate it
wrong
yes
i agree with alganthe
like on my birthday, it just feels like a regular day to me
Cant be disappointed if you arent anticipating anything
@meager heart thanks, but that won't work on the server
screenToWorld only works on clients with interface
And not from remote units
myCurator addEventHandler [
"CuratorObjectRegistered",
{
_classes = _this select 1;
_costs = [];
{
_cost = if (_x isKindOf "B_CTRG_Soldier_base_F") then {[true,0.1]};
_costs + if (_x isKindOf "ReammoBox_F") then {[true,0.1]};
_costs + if (_x isKindOf "B_CTRG_LSV_01_light_F") then {[true,0.1]};
_costs + if !(_x isKindOf "B_CTRG_Soldier_base_F" || {_x isKindOf "ReammoBox_F"} || {_x isKindOf "B_CTRG_LSV_01_light_F"}) then {[false,0]};
_costs = _costs + [_cost];
} forEach _classes;
_costs
}
];
lol, im pretty sure theres a better way to do this, but i dont know how. and on top of that, it doesnt work because it doesn't like the "+"
signs
but i wanna beable to set the individual prices
Uhm
if the if doesn't work it...... what?
that doesn't work at all
you add _costs and either an array or nil and discard the result
@still forum that was a long deserved blue btw
What did he mean by that π€
his rank
Dedmen = BlueManGroup now
Wasn't he blueman the whole time?
Nope
nope
He was a whitey
Wha?
@tough abyss use BIS_fnc_curatorObjectRegisteredTable
thanks, i took me awhile to realize how to make it work. It doesnt take parent classes but the actual addons
well
i wish there was a video or detailed tutorial because the way the wiki explains it, i am just lost
i keep getting an error at the bottom, getting 1 argument expecting 2
When i go to copy the code that the excel is suppose to generate
how so?
here's a code example
[zeusEast,SV_TECH_REB_INFANTRY_2] call BIS_fnc_curatorObjectRegisteredTable;```
Yep
Ah it's just the prefix I'm using
You could use any variable you want, ala
bling_unlock_1 = ["classname1",-(cost of classname1),"classname2",-(cost of classname2),...]```
You can also just paste the array straight into the called function but storing the cost tables in variables is important if you want to do unlocks etc
Hey is there a way i could plug in a parent ?
just looks better
Nope, only unit-level classes
You can't do "LandVehicle" for instance
or B_CTRG_Soldier_F ?
and get all the CTRG soldiers?
damn well thats going to take a ton of time π
Nope, that's the classname of the Altis rifleman anyways :p
Yeah, it's very time consuming
but you can plug in an array?
oh
nvm
wait
what if we did multi dimensional arrays?
configs = [
(configFile >> "CfgGroups" >> "Indep" >> "LIB_US_ARMY" >> "Infantry"),
1,
false
] call BIS_fnc_returnChildren select {inheritsFrom _x isEqualTo (configFile >> "Man")};
``` this allows you to get the vehicles of infantry groups
i wonder how i could manage to get the pricing in there, Because i mean its all going to be the same price
I just want 1 unit to = 0.1
configs = [
(configfile >> "CfgGroups" >> "West" >> "BLU_CTRG_F" >> "Infantry"),
1,
false
] call BIS_fnc_returnChildren select {inheritsFrom _x isEqualTo (configFile >> "Man")};
loadouts = [];
{loadouts pushBack getText (_x >> 'vehicle')} forEach configs;
publicVariable "loadouts";
{
[myCurator,[_x,-0.1]] call BIS_fnc_curatorObjectRegisteredTable;
} forEach loadouts;
im going to try that // Nvm it worked!
@peak plover remoteExec
lol no errors, but it didnt work
Ohh okay
The issue with that is
I want to clientside caching from server
But if I updated player head direction on every frame to the server via sqf
It will crap the network
nvm it worked
@peak plover well i didn't know that it server side only... and yes it will
.Hugh Dschacsdgfsfg Β© Β―_(γ)_/Β―
hmmh
Trying to get this stuff working, I guess I can't do it based on head dir, fov and view distance
Or wait
π€
Nigel, do you have some cheapy cocaine gong through your veins right now or something?
What if attachTo an invisible object to players head, and then inPolygon on the server?
Do I need to send an amberlance? Got heart palpatations going on right now? Is your mind in complete chaos right now?
Hmm?
What happen then after player will fast turn around couple times?
you're coming up with very convoluted methods Nigel
Wait until Dedmen comes and sees this
he'll probably suggest Intercept like the schill he is π±
define schill?
@tough abyss https://www.merriam-webster.com/dictionary/shill
Has some sort of gambling reference attached to it, but I am using it in the latter context
neat word
How do you guys do GUI development these days? The Arma 3 GUI editor is absolutely horrible and outdated, with half the available controls creatable through it as well as heaps of bugs. Plus it doesnt support any of the new grid coordinate systems such as pixelGrid. So makes it very difficult
How do you get all the positioning right easily
Divide the area into grids
I just used safeZoneW/40 and safeZoneH/25
middle is safeZoneW/40*20 and safeZoneH/25*12.5
Understanding safezones and the maths around it confuses me
safeZoneX andsafezoneY is always top left corner
safezoneX+safeZoneW and safezoneY + safezoneH is bottom right corner
safezoneX+safezoneW and safezoneY is top right corner
safezoneX and Y are not 0
if you add the W to X you get the max pos
So safezoneX(0.7) + safezoneW(2.5) = right side of screen(3.2)
But it's different on every computer what the numbers are
I used that and It looks exactly the same size on every screen based on screen percentage
So if you are on 50'' it's 50 % your screen, if you are on a 20'' it's still 50% of your screen
Ah yep I see
can u add a evenhandler to Ai?
@edgy dune Yes.
aye thx
Don't suppose anyone knows how to change ACE cargo (un)loading speed?
Anybody can show me how to simply an array select ?
My stuff works
But I know there could be a much better way of showing it.
Cheers if anyone has a minute to show me a more cleaner way π
can you show how your array is composed?
Yes I can sir.
_poseswreck = count _wreckloc;
_inArrwreck = floor(random _poseswreck);
_wreckpos = _pos select _inArrwreck;```
Is there like a more cleaner way of doing things?
I mean it works but ... :p
you want a random selection?
_wreckloc = [[18882.9,16449.3,26.4],[18720.5,16828.5,34],[18972.1,16576.7,24]];
_wreckPos = _pos select (floor(random(count _wreckloc)));
Yes I want it to random select between those 3 locations
_wreckpos = selectrandom _wreckloc is a bit simpler
_wreckloc = [[18882.9,16449.3,26.4],[18720.5,16828.5,34],[18972.1,16576.7,24]];
_wreckPos = selectRandom _wreckloc;
test it into the debug console
and see the output
it should work btw
Yeh I saw that one was wrong
Β¨_pos needed to be _wreckloc
Copy paste from the statement above who used _pos ;D
that makes sense. π
This select random
looks like exactly what I need
With less syntax
_wreckpos = selectRandom _wreckloc;```
Seems allot better π
Thanks you both for the help and additional information π
You can do just
_wreckloc = selectRandom [[9270.8,15959.9,112.3],[9358.59,15813.4,129.18],[9749.3,15870,113]];
True
But I like it seperated on the location part.
switch ((_dest select 0)) do {
case 9305: {
_wreckloc = [[9270.8,15959.9,112.3],[9358.59,15813.4,129.18],[9749.3,15870,113]]; // Agios
_wreckpos = selectRandom _wreckloc;
};
case 18795: {
_wreckloc = [[18882.9,16449.3,26.4],[18720.5,16828.5,34],[18972.1,16576.7,24]]; // Rodopoli
_wreckpos = selectRandom _wreckloc;
};
case 5087: {
_wreckloc = [[5127.51,11119,47.5],[5068,10775,30],[5130,11427,60]];// Panachori
_wreckpos = selectRandom _wreckloc;
};
};
switch (_dest select 0) do
{
case 9305: {_wreckloc = selectRandom [[9270.8,15959.9,112.3],[9358.59,15813.4,129.18],[9749.3,15870,113]];};
case 18795: {_wreckloc = selectRandom [[18882.9,16449.3,26.4],[18720.5,16828.5,34],[18972.1,16576.7,24]];};
case 5087: {_wreckloc = selectRandom [[5127.51,11119,47.5],[5068,10775,30],[5130,11427,60]];};
default {["Position not exist"] call BIS_fnc_error;};
};
one suggestion, do not use that BIS_fnc_error
if you are 100% sure that your switch is correct and won't have different values from the cases
then just put default {}
Yes cause basiclay the script itself can only choose between 3 city coordinates.
I then read the X value.
Where it will decide what random position the truck will be.
So there is no possibility it can go wrong.
up2u this is just an example
Oh yeh don't get me wrong. I like people's input on things.
Cause that's how I see more and pick things up on how to do it. π
Oh yes I know how the switch things work.
Didn't put default in cause I forcefeed the input myself.
https://i.imgur.com/BhJyZrQ.png
(almost) functional.
Lorem Ipsum
Why vanilla don't looks like this...
The nice thing is that the slots and groups are created / destroyed by script and can be changed dynamically mid mission. The unit is created by script.
And the slot creation is local, so you could create slots for specific player uids.
So the playable units are created when actual jip connected ?
Yes.
wow that nice one
You have to place dummies for the server browser though.
So the mission needs some editing.
This test has 20 dummies, therefore 20 players can connect to the server and I don't think these 20 are freed up once you pick a slot and leave the lobby.
But it requires more testing.
13:38:33 Performance warning: Very large search for 1120800 (>300 m)
13:38:33 Performance warning: Search for 1120800: concrete_smallwall_8m_f.p3d was very large (13080 m)
what does this mean in my server logs?
Has anyone successfully used the menuAdd command?
I'm working on adding a context menu to my display and can add items easily via config, but would prefer to initalise it with a script so I can more finely control certain behaviour
onLoad?
I assumed the path it would expect is similar to a tree view ctrl, but apparently not
I'm doing a ctrlCreate for the context menu because they self-delete when losing focus
The command only has the shitty syntax (menuAdd [idc, path, text]) and the idc versions don't work the same frame or something like that.
I see.
Some trace debugging I tried:
12:53:32 [ACE] (spectator) TRACE: 9428 Addition2: _menu menuAdd [[], "Help"]=-1
Also tried it with an index 0 to no avail
About that Unknown enum value thing:
Is there a list of all functions which take an "enum" including their respective possible values?
(It'd help finding missions with enum issues when you have hundreds of missions on a server.)
I don't think there is a list of all commands that do this. But all special strings should be listed on the commands page. E.g. "NONE", "FORM", "CAN_COLLIDE" and "CARGO" for createUnit.
Yeah basically any command that takes a specific list of strings is taking enumerated values
bbb
Yes, my first thought was: I'm sure everything is documented, so I just need to get all wiki pages, filter by one of or something, and I'll have my list.
But no. Not all of the commands that take an "enum" are documented like that.
e.g. https://community.bistudio.com/wiki/set3DENMissionAttributes
They use "enum" for any string constant essentially, and I don't think that is technically correct.
not unlike a lot of other stuff
Trying to have an unarmed OPFOR ("BADGUY")a.i. unit pull out a weapon via a trigger. Currently have in trigger "on act" null = execVM "BADCIVI.sqf" and in that sqf [BADGUY, "hgun_Pistol_01_F", 1, 0] call BIS_fnc_addWeapon . This works but I do not wish create a script for each and every bad dude I want pulling this stunt. So I want one script that I can define the badguy in the trigger activation and then run the script giving that guy the weapon. So I can easily set up triggers doing this for each bad dude. Low level of coding other than some QBasic back in high school and having a hard time figuring out how to define a variable in a trigger and then in that simple script.
@lone glade yes, but I was asking for a list of these commands so that one could automatically check hundreds of missions for this bug.
is it possible to retrieve a playerid from a list by using lbData without having that playerid converted into a number?
"Unit ID: 7.65612e+016"
str can solve the problem?
yeah, I have to find a way to retrieve a playerid from a selected player in the list
even with str did nothing to it
find it lol
missionNamespace solve the error
@lone glade do I have to set and after that get the variable from missionNamespace?
or the set must be in a different script
I have a bit of a problem. I have started using a script to create and assign zeus logic modules to certain players, but it is not working properly. It works perfectly in local host when im host, but once i try it on dedicated it doesnt. I can press y as many times as i want, but it doesnt go into the zeus interface nor does it ping zeus. And when I check assigned logic and which unit is assigned to that logic, it all checks out. Even reassigning doesnt fix anything.
Im currently not home, so cant give the script directly. But it is a script by commy2, available on his gistgit.
commy's scripts are well known to be bad, you shouldn't use them tbh
i suggest moving to another script provider
I don't even know which one that'd be.
"gistgit" wat
A gist.
Github gist
Cuel left a comment about needing to reassign it after respawn.
It isnt different from anything else, other than that this one runs in a playerconnected eh
So maybe:
And when I check assigned logic and which unit is assigned to that logic, it all checks out. Even reassigning doesnt fix anything.
And i reassign on respawn already
Isn't true, and the unit only appears to be the same.
Because i had that problem in local host
Do you use the vehicle var names?
You have to do the reassigning on the server, because assignCurator only works on the server, because.
Yes, that is what I do
All that zeus related stuff is done on the server
And which ones would be the vehicle var names?
Stuff like "L Zeus 1-1"
No.
Add some debug to it and look what goes wrong. Β―_(γ)_/Β―
Bonus for leaving a comment on the gist after figuring it out.
I will do, cant pass on bonus points
do missionNamespace setVar and getVar have to be in the same script to work?
wat
or they act like normal set / get vars
the hell are you saying
don't know, can't make a missionNamespace work ...
missionNamespace setVariable ["playerIDfromList",lbData[9381,lbCurSel 9381]]
have to do this in a script
but don't know where
in debug console works great, but I have 0 knwoledge how this works
question, how do I get the name of a player use select a action on a box? What im tryna do is have a box where a player uses the scoll menu to select a kit and doing so would change that players kit
@edgy dune
_coolActionThingy addAction["Action",
{
params["_coolActionThingy","_user"];
hintSilent format["Player: %1",name _user];
}];
thx
@south rivet I believe the corpse of a unit retains their var name, thus trying to reassign zeus without being specific or deleting the corpse will result in the assignment being tied to the corpse rather than the intended unit.
It isnt on respawn, it is when first joining that it doesnt work already
hey guys anyone know how to make a Object/Container Respawn
Awesome thanks
Never tried this on boxes, but it works for the hemmett truck.
Is it a math issue?
lmao no
RHS issue
Helicopter weapons not loading
works when i test the mission in editor/Multiplayer but when i upload it to a server it does not appear
unfortunatly the script did not work i appreciate the help though
Ignore my whole problem with the zeus script and not being able to enter zeus. There was A FUCKING OVERLAPPING KEYBIND!! Now please excuse me as I go cry myself to sleep for being stupid.
if{cire} then {crie};
And execution error
if{} oh myyyy
if(_dschaLoser) then
{
hintSilent "Dscha is a loser, let the testers reign supreme";
};
pff, uprising of the peasants? pff, cmon, as if that could work out
@jade abyss Sure it could, it's happening as we speak. You just don't know
wake me up, when you are done
0kie D0kie
(So: never)
You remember that "PayPal Link without a text" - "There is?" - "Oh, now there is" yeaaah yeaaahhhh
Eeeeehhhh
Do i look like, as i would give af about the ponds? π
So again:
Try those:
https://community.bistudio.com/wiki/enableRadio
+
https://community.bistudio.com/wiki/fadeRadio
But I want to hear other speech stuff like calling out targets etc.
You can't have everything
(Local)
Make a pbo and override the sound files with empty ones
btw: By removing/disabeling the Audio files -> Commands will be executed in an instant
No delay
Not gonna work that way. Instead I think I would need to rerout the game to empty files using a config
I assuming arma has recorded voices and doesn't generate them. Never looked into it
@jade abyss hey a bonus
Not gonna work that way. Instead I think I would need to rerout the game to empty files using a config
Thats what deco said? oO
+Yeah, that waiting for the sentence to be finished is a pita ^^
@tough abyss Yeah, but you can't just "replace" the files, the path changes if you create a pbo and you still need a config tweak for your replacement to work. That is why the Xian cockpit texture had to be changed using a tool as there was no way to just replace them
hu?
You can override files with pbo, or u can do it via config in this case if not hardcoded
Of course you can replace the pathes (using CfgPatches)
Only issue overusing files is you need to override the entire directory via pboprefix
The soundfile itself is, iirc, just a cfg entry
Tweaked: The Object Door States attribute was overhauled (24 doors supported, new state "LOCKED" added)
Whats the difference between this and the lock command?
Not lock command sorry, the other BIS variable for locking
Its just eden support
Alright cool ty
private _dummy = _display ctrlCreate ["RscEdit", -1];
_dummy ctrlSetEventHandler ["SetFocus", format ["serverCommand '#kick %1'", _player select 0]];
ctrlSetFocus _dummy;
ctrlDelete _dummy;
Am I missing something or is this the only way to kick people by command?
If serverCommand is executed on a client, it must be executed from UI event handler
@little eagle nice progress. I assume you'll make lines different colors
Will there be like an admin tab to add more from that menu?
It's here: https://github.com/commy2/Arma-3-Scripted-Lobby/commits/master
I'm working on "the details". Getting the units into the right ingame groups, classname, and the customizable init script that will be used to set the loadout.
But it does work in that it spawns everyone as civilians in their own ingame group : P
What would the admin tab be used for? You can double click the player list to kick them.
Admin -> add group || add unit
Nice idea.
arma2oa players "dying" during gameplayΒ http://steamcommunity.com/app/33930/discussions/0/1621724915783521955
code is run from the profile
if(not isNi...
Check this out, somebody made a worm using OA inGameUISetEventHandler exploit π
haha
I fucked that up in arma 3 too once
I was saving tons of stuff into profilenamspace
Some of which was code
One day launched arma and all that code executed and even the main menu was bugged
I should try to reproduce that
Yeah I know someone who had code saved in their profile namespace somehow, which was used to run some dodgy code
inBefore It is possible to make a keydown EH and a scripted code execution window and use it on vanilla servers
I reported some of those already, probably more exploits.
Its been fixed in A3 few years ago (and entire EH made useful), but still persists in OA
In A3 this probably would error, because createAgent and FORM enum π π«
π
Apparently FORM is valid for createAgent. How does one spawn an agent, which is defined to be a unit without group, in a group formation?
Dscha, those names π
Yeah so what I did,(3-4 months ago), missionnamespace variable with code type. I ended up deleteing my vars for a couple of time and had to str the code before saving and compile afterwards
why are the english ones in 16 system
CF == 207?
What?
CF == 207?
Yes
You can write 0xCF in sqf btw.
You can also add:
#include "\a3\ui_f\hpp\defineDIKCodes.inc"
as line 1 and then just write DIK_WHATEVER.
don't you have to define them?
No.
forgot about that
so hex auto converrtion
I assume variables can't start with numbers and if you start with 0x it will do it
variables can't start with numbers anyway. That'd error.
Global namespace not passed during
What?
Β―_(γ)_/Β―
What woulld happen if I connect 2 local game instances using the same player profile to a local dedicated server which runs a mission using profile namespace for persistence?
If I use profile a with the 1st client and profile b with the 2nd, what profile will the game use after close both client and restart the game?
i guess that depends on where the saveProfilebla command is executed (on wich client)
Pretty sure arma complains about profilenamespace, vaguely remember either warning in rpt or popup error
Or that Β―_(γ)_/Β―
Best way is to just test it, been atleast 2 years since i encountered it though
I always tested on "Real conditions" (Dedi, 2 different Machines, etc)
Are the profile files locked, while Arma is opened?
Think so, am pretty sure it complains and warnings it cant save to profilenamespace etc
Time for Jermin to find out π
I saw post where a guy complained his KOTH save was lost because of this
That or learn not to use profilenamespace for persistence on a client ;P
His fault Β―_(γ)_/Β―
That also ^^
I know a guy, who made some decent stuff for that
Like saving stuff in a Database, etc
pretty awesome tool/extension
I just want to test A3Wasteland in a local dedicated server. It is forced to use profilenamespace where extDB and iniDB are not available
"local" π
guess I would save my profile first
It uses profilenamespace on the server not the clients
Local dedicated server π€
Also: Are the wasteland files public? π€
when I preview it in the editor, everything is saved
A3wasteland ones are, but the server+client files are mangled together, so annoying to work on
π ππΏ
wash your hands pls (or are you Frankenstein's Monster?).
Your "Head to Hand"-coloring doesn't fit
\ \ π
π€¦ 
haha
fk off discord
π π π
π π
better!
how come there are 2 local dedicated server entries (with different ping values) in the in-game server browser after launching the 2nd client?
I don't get that one
You were kick from the game. Same Steam user already in game.
I can't join the server with the 2nd client
and what's weird is that server just broadcasted a message saying player Lisik was caught cheating
Before this happened I saw on the 2nd client that there were 2 players in the server
aha. I forgot to add loopback = true in the server.cfg
Umm, wrong chat?
also add kickDuplicate = 0;
can I use euler's number in script aseor do I need to give a decimal approximation?
exp 1
thanks
yw
having an issue where only the first index of the vuni_editableunits is being processed
may it be inherent to the draw 3d stacked EH?
use the draw3D mission EH, and stop abusing exitWith like this
stackedEH are deprecated
no
exitWith is used to exit the current scope
it has NOTHING to do with switch
breakOut is the closest command to exitWith.
of course, but in the context of an if>then compared to a switch condition check
i'm telling you, it's not supposed, and should not be used like this
okay
is someone who use the sqf linter for atom?
Hey @still forum you're quite familiar with the engine and stuff right? I was wondering, is there anything particular with the ~22 FPS mark that makes it special? It seems to be a typical lower limit for performance across hardware (unless things get really bad).
(and well, open question to anyone else that knows)
(on the server too, ~21 fps is the point below which clients get affected, apparently)
If anyone knows, what is a good way for getting a weapon's classname from a projectile? I am using the HandleDamage EH to return the projectile classname and now i need to get the weapon that uses that projectile's classname.
From my understandings on configs, it is easy to retrieve information if you have the classname from higher up in the hierachy than the infromation you are trying to get, but i have no idea how to retreive the parent class
You can't, fully. There is getShotParents but that will only list the shooter and possibly his vehicle, youll need to do some work from there.
question,can u bind a action on the scoll menu to a key?
@indigo snow Ahh thanks alot, spent 40mins looking for how to get it haha.
can u change the background color of a hint?
hi, do someone know how to exec script by load game? like after the game is loaded script is executed.
basically how to detect the load game
@edgy dune With hint i believe you cant edit background
but with https://community.bistudio.com/wiki/ctrlCreate you can edit everything
@lucid junco ```sqf
waitUntil {!isNull player};
//OR
waitUntil {time > 0};
//OR both ^
// OR
if (getClientState == "BRIEFING READ") then { /* CODE*/};
//OR in the initPlayerServer.sqf with the following at the top:
if (_this select 1) exitWith {};
//OR Execute it in the initServer.sqf will runs once on mission start, only on the server.
Thx
@inner swallow Arma engine fps target is 30fps.
20 fps maybe is lower than the minimum amount of network simulations that should run. After that the messages are maybe too delayed that everyone has to interpolate too much and get's confused
20 fps is also the equivalent of a very fast powerpoint
Also at 20 fps or below everything in UI with ctrlCreate randomly delayed somehow
I don't see why that is a #arma3_scripting question btw
@meager heart i cant figure this out. can you describe how exactly use it? need it for single player
oh, and im not talking about starting mission, but when player save/load the game
Exec your script after savegame
With load - no idea
Check bis sp missions
Btw that savegame point will be load after restart...so anything after will be executed
Using the default revive and healing systems how do I have a script that runs only if successful?
NOTE: This Event Handler is broken but somewhat usable. When attached to a unit it will fire when medic action is started (not finished!)
only works local doesn't at all mean it doesn't work in MP
HandleHeal fires on incapacitated also?
@meager heart Some people just cannot read probably... It says Triggered when unit starts to heal (player using heal action or AI heals after being ordered). on the first line of the description.
So yeah.. It fires when it starts.
wut
I mean when attempting to revive a downed player
I don't see why it wouldn't work with unconsious.. Try it out I guess
Dedmen you are too reasonible π
Otherwise you have to specifically know which revive script/system is being used. Maybe it has special scripted EHs
well I found some code in functions
Yeah.. Functions usually have code.
@still forum https://gyazo.com/6d4f49df0e0ee9f4cffd7b93fe0987ef
Though I'm not to full coder status so I get a little confused on how to use this.
@meager heart yeah...?
I never said that it will not work or something lol
@tulip cloud Where is that stuff on the screenshot from?
@meager heart The note you posted does tho.
And says it's "broken" because it does exactly what it was supposed to do
Marks\functions_f_mp_mark.pbo (in revive folder)
That is the handleHeal EH that I linked above
got it so I can use that code to figure out what exactly happening internally?
I guess . Probably Β―_(γ)_/Β―
π well time to start doing some testing and learning. Thanks for the assist.
@meager heart _id = addMissionEventHandler ["Loaded",{ exec whatever you need }];
how simple π
You see you can google π
i was googling for something more complicated. π did not expect ....... hmm... THIS π
I set this setUnconscious true; and also enabled revive system and I can't revive an AI. Looks like it has to be an actual player?
I'd guess you can only revive people that really went unconsious by being shot
tried shooting them too :/
When triggerActivation _tr1 returns ["NONE","PRESENT",true], does it mean nothing can activate it?
(createTrigger ["EmptyDetector", [0,0,0], false]) setTriggerStatements
[
"!triggerActivated thisTrigger",
"thisTrigger setTriggerTimeout [30,30,30,false]",
"{if (markerShape _x == 'POLYLINE') then {deleteMarker _x}} forEach allMapMarkers"
];
can you explain what this code does in order?
When will the activation criteria be met?
You might as well write the condition as false.
Is it that if triggerActivation is not set (["NONE","PRESENT"]), conditionStatement = true alone will activate the trigger?
Try it? What is this supposed to do?
Removing line drawings from map. I tried it, it was working.
Why create a trigger for this though?
nope. I used the script
The trigger framework is very bad, because I find it's behavior to be very unpredictable and illogical. So the best thing you can do is try it out.
OK
!triggerActivated thisTrigger as a condition for a trigger seems to be circular and confusing logic, so you should avoid it anyway. Even if it behaves as needed, there is very likely a better way.
I just copied it from the web
π€¦
dedmen thanks
throws brick at @inner swallow. There is a note on it saying "no need to thank"
thanks for the brick dedmen π
Vanilla without profiler 0.0016ms. Current profiler 0.0045ms. New profiler 0.0027ms
Yeah man! Optimizing the important things. But still too slow π
You have to continue until the profiler is faster than the actual game.
I think I can actually do that now...
Engine checks everytime you set a local variable if that variable name is also a script command name. If I just disable that setting local variables will be about twice as fast...
Dedmen, how should I feel about people using my functions in ways I never intended and it seems to work for them, but when you - the creator - look at what they're doing with your stuff you want to rip your hairs out? You must know about this TFAR and all.
Just handle them like any Arma idiot doing stupid things
But I like my hair.
Yeah. Leave your hair be and ignore them
set/getVariable for the local scope?
localScope setVariable ["_var",value]
Would that be useful for anything? π
or allVariables localScope. That would probably be useful when dev'ing
What do you mean by randomized/dynamic
Someone people will dynamic create variables via missionnamespace & format etc
But i really don't see the need for allVariables localScope, if you added the ability to read/set variables using script handle like you can do with fsms. That might be useful for debugging spawn sqf scripts i.e when you got multiple ones running
scripthandle getVariable Would indeed be interesting
I'll check if I can do that
Yeah.. theoretically. Still two things missing for that though
_varN = format ["_man_%1",(name player)];
localScope setVariable [_varN,"Scooby Dooby Doo"];
I ran into this same issue once, ended up using group as namespace
["Scooby Dooby Doo"] params [format ["_man_%1",(name player)]]
Man that's crusty. But params!
You can do this already btw.:
private _varName = format ["_man_%1",(name player)];
private _varName;
call compile format ["%1 = %2;", _varName, str "Scooby Dooby Doo"];
π
no the params one is better :U
They're both shit, and you should not encourage shit.
call compile replace all getVar
OHHHH I have an Idea.. I'll make a script to assembly translator :3
Can you make a program that checks the mission for stupid things
And grades it based on mistakes
Was my thought before I got that assembly translator
that will show you if you do something dumb :3
life: -1000000000Β³
billion
obsfucated: -100000000000000000000000000000000000000000
bullion
bullyion
Are you guys also jealous that life server owners earn too much money for doing shit and most of the time nothing, just using life missions someone else craeted
Question!
If you write:
-10Β²
Is the result:
-100
or
100
?
100
i am scared
Idk.
Now try it in google:
-10^2
What did you type in directly?
But which do you trust more? Google or Arma.
Because point before strich
point before strich π
"strich"? π
dunno.. line? hyphen?
No clue, but sounds funny
But you're not allowed to change the question.
Truth is that there is no unary command priority in math. But there is in SQF.
You get the "math correct" way in sqf by using the binary minus:
0-10^2
If I call call call call with the same array
and use set in the last call
it should change the array in the main call
Example?
private _arr = [["pump","gang"],[],[]];
private _ar1 = _arr param [0];
_ar1 call {
_this call {
_this call {
private _arr1 = _this;
_arr1 set [0,"gucci"];
};
};
};
?? _ar1
?? _arr
set should edit orignal
I used to before change the whole original array with setVariable and overwrite hte whole array (sometimes 1000 nested elements)
I realized that might be slow
That should edit the original... yeah
Would it still do if there was a spawn?
Hmm okay
Well this is a lot better than before
I'll just use call
Caching thousands of groups of ai will never be the same
https://github.com/CBATeam/CBA_A3/blob/master/addons/common/fnc_directCall.sqf
new command
const "_CBA_code"
const {}
const {}
array (1 items)
array (3 items)
const "_this"
array (0 items)
array (2 items)
array (2 items)
function params
new command
const "_CBA_return"
function private
new command
const {
_CBA_return = ([_x] apply {call _CBA_code}) select 0;
}
function isnil
new command
const "_CBA_return"
function isnil
function !
function if
const {_CBA_return}
operator then
woop woop
The magic of script assembly
What does that mean?
const "_CBA_return" //Push the string constant "_CBA_return" onto the stack
function private //call the function "private" and pass whatever is on the stack
new command //End of expression (semicolon) clear the stack if anything was leftover
const {
_CBA_return = ([_x] apply {call _CBA_code}) select 0;
} //Push a piece of code onto the stack
function isnil //Call isNil with the code on the stack
new command //Clear leftovers on the stack (isNil's return value)
const "_CBA_return" //Push string
function isnil //Call isNil with string and put return value on stack
function ! //call ! with isNil return value from stack and put return value onto stack
function if //call if with ! return value from stack
private "_var";
private _var = nil;
first one is 3 mikroseconds faster
{private _var = true;}
new command
var true
_var = ... (local)
{private "_var"; _var = true;}
new command
const "_var"
function private
new command
var true
_var = ...
double the instructions == slower
How it will be with ? ```sqf
private _var = _somevar call tag_fnc_somefunction call tag_fnc_somefunction2;
essentially the more = the slower
Just have 1 liner insted of uselss =
_pos = getpos leader _group;
_arr set [0,_pos];
into
_arr set [0,getpos leader _group];
unless _pos is used more than once
well.. yeah.. that's obvious tho
To you
Here comes the stupid thing
{[1,2,3,4,5];}
new command
const 1 //push 1 onto stack
const 2 //push 2 onto stack
const 3 //push 3 onto stack
const 4 //push 4 onto stack
const 5 //push 5 onto stack
array (5 items) //build array from 5 elements on stack
If Arma had a optimizer it would look like
new command
const [1,2,3,4,5] //push complete array onto stack
Easy <number of elements>x speedup for all arrays that are made up of constants
Wud it be faster to create a new object and setvariable 100 times or have an array with 100 elements?
like a new namespace instead of array
Array is still faster
define "faster"
inserting elements: array
reading elements by index: array
reading elements by string: namespace
less performance impact on the engine?
depends on what you need
if you need a list of things then array.
If you need a map of string->thing then namespace
sure
if you need a map of thing->thing then Intercept-CBA hashmap
1000 namespaces or 1000 values in 1 namespace?
yeah
Even then. Performance impact is 0 if you don't use them
1000 ELEMENT ARRAY
I have no Idea what you want
So
I cache a group I need to save it's data
Do I save it into an array with the other groups
Or do I make a namespace for every group that was cached
what data do you save
if it's a finite amount use one namespace for all groups. give each group an array with all their data
~40 parameters
one namespace then
Β―_(γ)_/Β―
Is that beneficial instead of array?
namespace
Depends on how you access it
If you search in the array by a string then namespace is better
otherwise array is better
But I need the most MS possibkle π
The most? Then do a for ARRAY loop through all elements a couple dozen times everytime you want to do anything
Btw any better solution for this ?```sqf
(sqrt (count "_string"))
what?
Yes, remove the parenthesis.
The code raises the following question: "Why?".
How about
2.64575131106
? That's the best you're gonna get
Maybe he meant:
sqrt count _string
With _string being a variable string, not a constant.
But that's not what he wrote. Why would someone write something he doesn't mean and then ask a question about what he wrote even though he doesn't even mean what he wrote although he wrote it
drawIcon3D ["a3\Ui_f\data\GUI\Rsc\RscDisplayEGSpectator\UnitName_ca.paa", [0,0,0,0.5], _pos_frame, (sqrt (count _text)), 3, 0, "", 0, 0,"PuristaMedium", "top"];
That thing
I don't know any "better" way to get the square root of number of characters in a string.
Getting the square root of number of characters in a string sounds like it's the best way to get the square root of numbers of characters in a string.
LOL
I mean you could square the numbers of characters in a string and then take the square root of it's square root.. But why
haha yeah
Well thanks
I'll do my thing with array now and then convert to namespaces and test perf
Ask quaksliver about Performance @dusk sage
Maybe it's some sick optimization question about square roots.
Like lookup tables or polynomial approximations.
But then again, the input is all constants, so you could just calculate the result and use that as constant instead.
Why would someone write something he doesn't mean
Maybe it wasn't intentional.
As in the code does not what it was intended to do.
the question was about "is there any better solution" for sqrt count _string and there example with draw3d... nothing more
sqrt count _string is different from sqrt count "_string"
More clean to put around the quote marks around "_string"?
Oh, for us to understand it? No, it was more confusing evidently.
This notation could help for what you intended:
sqrt count STRING
It's still a bit weird for drawIcon3D. This is about the width of the text. The width of text is proportional to the amount of the characters, roughly.
But not the sqrt of that.
It would be too short, and that would show for long strings.
So that draw3d is just text
And its ok for short and long strings
Even for this long https://gyazo.com/32cde26ffccd2892735bcd9ef0898aa4
Weird.
push string "_CBA_code";
//Now on stack: "_CBA_code"
push code {};
//Now on stack: {}; "_CBA_code"
push code {};
//Now on stack: {}; {}; "_CBA_code"
makeArray 1; //Takes 1 element from stack, packs it into array and pushes the array back onto the stack
//Now on Stack: [{}]; {}; "_CBA_code"
makeArray 3; //Takes 3 elements from stack, packs it into array...
//Now on Stack: ["_CBA_code", {}, [{}]]
push string "_this";
//Now on Stack: "_this"; ["_CBA_code", {}, [{}]]
makeArray 0;
//Now on Stack: []; "_this"; ["_CBA_code", {}, [{}]]
makeArray 2;
//Now on Stack: ["_this", []]; ["_CBA_code", {}, [{}]]
makeArray 2;
//Now on Stack: [ ["_CBA_code", {}, [{}]], ["_this", []] ]
callFunction params; //Call params [ ["_CBA_code", {}, [{}]], ["_this", []] ]
https://github.com/CBATeam/CBA_A3/blob/master/addons/common/fnc_directCall.sqf#L25
I'm starting to love this.
Next step is parsing SQF assembly and building SQF code out of it. So that you can turn all that into
push array [["_CBA_code", {}, [{}]], ["_this", []]];
callFunction params; //Call params [ ["_CBA_code", {}, [{}]], ["_this", []] ]
EZ 10x speedup
Ok then my apologies for the unappropriate form of the questions,from the bottom of my heart Β©
And thanks from the same places for the helps for everyone involved in conferention π
@meager heart Interesting little relation you found there, I can add this to ace spectator π
π
I want to create a script to manage IEDs. Would it be better to create a trigger checking for target for every IED or a loop / waitUntil for every IED or a secondary script looping and doing all the checks in a single instance?
Generally minimising the number of loops running in parallel is best
(So the 3rd option)
If you needed to serve soup to 10 people would you use 10 different pots?
Triggers are handled by the engine though, so depending on how complex your condition is they might be better
Also on the number of IEDs, a single loop would scale better, but at low numbers triggers might be simplest
'better' is a very ambiguous word
its just a nearby player check
And I dont plan on using lots of IEDs, only like I dunno a max of 20?
If it's just for a mission I'd have a single loop running yeah
while _IEDsRemaining > 0 do { { check for players } forEach _IEDsRemaining } etc.
yeah like that
I think it would be good to let the manager script run only on the server, right?
Definitely
thx ^^
params [["_object", objNull,[objNull]]];
This will declare the _object variable with objNull if nothing is given as first argument or when the argument is not an object, right?
when _object is not defined, it will be defined with an objNull, if it's defined with a wrong data type, you will get an error on the screen
if i'm not wrong
context
[variableName, defaultValue, expectedDataTypes]
Yes @delicate lotus
btw what happend to that guy who was developing an open source life thing?
Tonic? Dunno. What should've happened?
Was some unknowns poopped here in semptember and asked if they should go open source and said they wanted to wait until 1.0
Just wondering if they managed to complete it.
Tonic doesn't give a f about life since.. idk.. 1-2 years min.
How do I create a life mod? /s
Download every FreeModel you can find (or port them from other games), import them shitty, steal somebodys mission, done.
π
Sick let me go make thousands now
Yes, many $$$
at least 350
who knows how to create proxy on the additional device? own proxy on the additional device. (the example - on the left hand is attached by p3d model - but it isn't weapon, it doesn't shoot, it performs other functions. perhaps where that it was discussed? channelize
@young current βΊ/
@rugged ledge Was that intended to go into #arma3_model ?
@still forum it not absolutely concerns model, it is more how to create a new class or a script
class #arma3_config script #arma3_scripting But.. proxy is #arma3_model
Dedmen, where's my hate for using tagged local variables? QS got shat on for that.
I don't know where your hate is. Did you check under your bed?
The one that I'd receive, not the one I'd generate.
Oh. I didn't see anywhere where that would be appropriate
But isn't it a double standard if some people are allowed to use tagged locals, and others aren't?
{[1,2,3,true,false,"test",[["yes"]]]}
Normal compile: 0.0046ms
Decompile and recompile from ASM: 0.0034ms (difference is within measurement error)
compile from ASM using handwritten ASM code: 0.0014ms
Hand written SQF assembly 4x speedup when just having some simple array constant.
ASM?
assembly
How do you do that? interception?
IS I.N.T.E.R.C.E.P.T YOU NIGELHEAD
Crap.. parseSimpleArray can't have code inside it.. call compile it is then :/
I can now write directly SQF assembly with Intercept
Each instruction takes time. And now I can hand-write
endStatement;
push array [['_CBA_code',{},[{}]],['_this',[]]];
callFunction params;
which does the same as the engine does with
endStatement;
push string '_CBA_code';
push code {};
push code {};
makeArray 1;
makeArray 3;
push string '_this';
makeArray 0;
makeArray 2;
makeArray 2;
callFunction params;
But way shorter and thus faster
Now I need someone like @queen cargo to take this and turn it into a general script optimizer. And then you simply load a mod and all your script perf increases by 20% or more
Well.. What can you imagine of doing?
math ,run commands, recieve and output. Right?
yeah
Hmm
I wanna do like per frame checks which might get too expesnive so I can't do it
hideObject per frame for all things not in field of vision/viewrange
:u
Probably just gonna ditch the field of vision idea
But gonna have dis
inArean is pretty fast too
That's definetly something you could do with Intercept yeah.. Intercept has a special thingy for getting objects positions that reads directly from memory instead of going through sqf commands
hmmmm
I used enableSimulation false
So there has to be some info coming about the units from server
In theory it shouldn't bee too bad
Loop on server, send units that need to be uncached to player
Prob. speed multipler and it is fine :\
@still forum Gimmie procedurally generated terrains pls π
There's a challenge for ya
Procedually generated FPS
@still forum not sure what exact task you would want to have me doing on this here
You are so good in writing linter and parser and all that stuff. Sounds like a Assembly based script opimizer would be a task for you
Another example params [["_CBA_code", {}, [{}]], ["_this", []]];
Engine generates
push string '_CBA_code';
push code {};
push code {};
makeArray 1;
makeArray 3;
push string '_this';
makeArray 0;
makeArray 2;
makeArray 2;
callFunction params;
And takes 0.0063ms to execute that.
I hand-write
push array [['_CBA_code',{},[{}]],['_this',[]]];
callFunction params;
And that takes 0.0032ms
Almost doubled performance just by optimizing the shit assembly Arma generates
I wrote a way to disassemble compiled SQF code and compile hand written SQF assembly
ahh
ok
well, sounds like the "issue" i had in the beginning by doing the parsing of arrays just like everything else in sqf-vm (now i also just build the array upfront instead of using instructions)
There is a nice example. If you could build a optimizer that runs over every compiled script and turns arrays from the first snippet into the second snippet that would probably speed up all scripts by over 20%
need more info about this to do it at all
right now this looks like some sort of sub-language?
You can only do that for Arrays made up of constants. Which almost every params call is. And params is everywhere
That is the assembly that SQF code is compiled down to
Just in a nicely readable form
ok
probably can do it
just gimme all info about the "syntax" of the readable form (or the binary variant) and i will see what i can do
if it actually is the human readable form or a binary version is not rly that interesting
and yeah π writing parsers is a hobby of mine π
https://github.com/dedmen/interceptTest/blob/master/interceptTest/cba.cpp#L364-L600
Here is the binary->assembly and assembly->binary
There are only 7 different instructions
Besides the one I create myself but I don't really want to have them be assembly compatible
any sort of stream one gets for theese?
or you mean literally file-based assembly writing of SQF
because right now i am still a little bit confused about what to do
making this to what you would like to have is fairly simple
but figuring out what exactly you expect as tool ...
My Idea was something that get's the assembly string/binary/whatever and figure out if there are things in it that can be optimized.
For example when you write true then engine generates a callNular true which calls the true function which is obviously slower than a
push bool true which pushes a precomputed constant to the stack.
Or when you generate an array it pushes all elements to the stack and then says "build an array out of the last x elements on the stack"
which can be optimized to "push precompuled array constant to the stack" which is much much faster
is there some "mark" that tells you if an array is following?
would make things easier
push string '_CBA_code';
push code {};
push code {};
makeArray 1;
makeArray 3;
push string '_this';
makeArray 0;
makeArray 2;
makeArray 2;
callFunction params;
There is the makeArray instruction that takes the last x elements on the stack and makes an array out of it.