#arma3_scripting
1 messages Β· Page 404 of 1
I had an outdated intel igpu driver, it DESTROYED the permissions on files with changing refs in git.
which is what i mean
c# actually would be a great scripting language for the arma series
want to check out a different branch? lolnope, the folder perms are fucked
Your graphics driver changed permissions on a git repository?
not on the repo
@tough abyss there are already arma2dotnet mods
on files I modified through the bash console
youre porting intercept to .net?
ye
that is quite a big deal
π
I hope you got alcohol to get you through this
but a benefitial one
anyways
if youre doing that you might be interested in contributing to arma.studio
though ... need to refractor the docs system (again)
runs cause i have no clue on how to make a linter
no need for linting but rather development @tough abyss π
straigth busy work
also possible to be done on sqf-vm
Step 1. Start implementing a parser for SQF.
Step 2. Rip your hair out because of edge cases
Step 3. ????
Step 4. Profit???? PTSD???
And it worked first try!
lol
@errant jasper @signal peak
tfw your interface is pixel perfect... except frames, because apparently frames and backgrounds have a 1px difference
I should scan in some of my gui drafts and upload them for science.
would be fairly useful doc to put on the wiki honestly
My scribblings? lol
@lone glade that is kinda normal for most UI stuff ... sadly
I wrote a paper on how to design the settings stuff, though it's written to myself, so the thinking is strange and hard to explain for normal people.
How do I get an emji library?
normally things like that are not due to px differences @lone glade but rather due to how the UI is displayed
as arma is not using pixel space but relative space, one pixel of an image might get displayed on two pixels on the final output which makes them blur
@lone glade The system works! ??
nah, still a pixel difference on the left side of each frames
and i'm using pixelGridNoUIRescale based values
But the other sides are fixed?
other side never had the issue, it's only 1 pixel of difference
Anyone implemented emoji for arma yet?
wont happen anytime soon @peak plover due to how arma renders text
What about webdings? Can you add your own fonts?
: D
PLS
@tough abyss Intercept already exports their API to c++
There is also @shut flower working on Intercept C#
that's it guys, i'm cancelling ACE Arsenal, time to remove the module
ofc, how would it be so perfectly aligned?
@still forum yes i know intercept does but i mean arma doing it themselves. also @shut flower and i have been talking π
Just do safezoneX+ (safezoneH/25)
safezone > pixelgrid
ah, where's my torch again
π Commy
Do you really want something like Intercept to be maintained by BI? It wouldn't make any progress or get any new stuff ever π
maintained by interns π π―
Intercept for commuinty DLC 2018
I caaaaan't wait for arma 4 and the questions from lifers
"how do I port X to arma 4?"
@lone glade use the ui stuff the eden update brought already ( Ν‘Β° ΝΚ Ν‘Β°)
Arma 4 will probably not be called 4
You mean Arma 1, right?
ArmA: Infinite Warfare
xXxArmAxXx
ArmA craft
If you name it ArmA craft you might aswell sell Premium for which people pay 100β¬
God damn Minecraft servers are making millions
yep
VBS Blue. Maybe ArmA Universe or sth
its slightly sad
How is it sad?
Sad because you are not swimming in money and cocain and snorting hoes
should've made life servers
Next Game I Code Life.
@little eagle deal
Code Life! You were the chosen one! It was said you would destroy Life not join them!
GTA SA is one of my fav games of all time, so I should be able to get into the mindset, right?
If the top guys from this channel would band up... You'd all be driving lamborghinies and buying BTC by the dozens in a year
"it's not copyright infrigement if I don't make money directly from it"
Lol. Don't forget, "I haven't made this, but use it according to fair use.... No copyright intended"
plays the whole music anyways
"it's totally fair use if I mention it's not mine after using it"
@little eagle SAMP had some great roleplay servers
Lol, I only played the 24/7 drift servers
I mostly played on the fun servers where there was Derby π
Damn, coding a decent life would take a year
coding a dcecent life would take nothing ...
a year? you're generous
getting the actual content delivered into it is a different story
Assets?
the systems of a life server are mostly such barebone scripting that it is a pure joke
that they run so poorly
huuuh, i've seen some really advanced ones
I mean coding like the full system and implementing an autistic amount of features
Share your studies of the life @lone glade
What was it
I made (parts of) AGM and ACE. How difficult can scripting Life really be?
no, I mean the one that was posted here yesterday
It would just take time, because it should be this massive thing with a lot of features
@little eagle most things are simple stuff
get a base system that provides most basic timed updating, a database addon for the server and youre settled mostly
just make it a glorified deathmatch
^
the rest is just few UIs and busywork
But algathe, that's not where the whales reside
with most UIs being reusable if done right
honestly the gameplay loop of those is fucked, it's just busywork to justify killing
Most of it is simple. Yet, I have one or two life-related mods, in my list. When I open a mission using those mods, I get, a skeleton error, a p3d error, and when I start it, I get a at least 30 script errors.
Why the database? Can't you just dump everything to file and read that the next mission?
Never understood that.
too many unique users
pff ... bullshit @lone glade
you'd be surprised how much traffic they get
normal life servers youre right @little eagle
To be honest I feel a server based database is overkill for many things, so I am considered writing a storage extension using sqlite isntead.
however, if you want to do it right with less work on your end, you need actual data relations
So essentially a file, but more structured.
What do you mean "do it right"? Why the database stuff?
got a whole concept for a life server somewhere on a dead HDD including the full database setup
because you got eg. product relations
and you do not want to code them by hand
but rather code code that codes it automatically from data
I just remembered I wrote a vanilla revive system and never finished it π
in life servers you got "products"
Items.
like from iron ore you craft iron bars and from that with wood you then craft idk pickaxe
instead of doing this whole shit yourself, you just code something that parses the database properly and you design those chains in a comfy application outside of arma and sqf
And? You store them ingame in arrays (and pseudo namespace if you want to fancy), and at the end of the mission, you dump it all into a file.
And at the start of the next, you read and apply the file.
that is what is done by now more or less ... i am talking about more advanced stuff
This can be extended to be as advanced as you want.
Everythings an array at the end of the day.
Why the DB?
relations ...
Multiple servers
Multiple servers is an actual answer.
@little eagle Many got/had Interfaces, where you can access your CharInformations through a HP
you cannot have relations in files
that is why
those would be id-based
anyways ... not gonna start about how even the whole map can be updated on-the-fly via the method i proposed
go online > Look at your character
+With about 5k Entrys -> No chance with a file
I've seen a life server have a gambling website where you could win ingame items
^
+With about 5k Entrys -> No chance with a file
lol, you should see my RPTs
^+1
database just provides different access to your data ...
π₯
5000 lines of defines.
most life servers not utilize a database in any bit
one function call
Exactly Commy π
you want to have a website like facebook, but for your life server
It needs to work on all devices!!!
As i mentioned before: The LIFE-concept is not bad at all. It's a different kind of game, with an extreme amount of possibilitys.
But the comm... oh the community... π¦
apps on mobile that are just a website
And there needs to be something to do there, like gamble with in-game money or buy ingame money with real money π
that is stuff that can then be linked into the app @peak plover
Website*
ingame money can be earned or bought via appstore
Don't forget lootboxes
#include "script_component.hpp"
params [
["_name", "", [""]],
["_group", "", [""]],
["_className", "", [""]],
["_init", {}, [{}]]
];
private _slot = SLOT_CREATE(_group);
SETVAR(_slot,name,_name);
SETVAR(_slot,group,_group);
SETVAR(_slot,className,_className);
SETVAR(_slot,init,_init);
Lobby_updateSlots = true;
_slot
This is how a proper SQF function looks like. Deal with it. πΆ
lifelotto.com @peak plover
No U.
what i try is to replace
_nObject = nearestObject [(getPosATL _playerObject), _spawnObject];
with
_nObject = nearestObjects [player, ["HeliH"], 200] param [0, objNull];
_nObject = getPosATL _nObject;
but at the moment this is not gonna do it. any idear commy2?
: /
Thanks
heheee
whitey
Last Christmas Thonk of the year.
And who wrote a scripted lobby in 2 days?
@still forum Please choose a valid option
"2 days"
I did
@little eagle I'll write you a broken one in one day
I can say i wrote arsenal in 1 month, but that's without considering the bugs and QOL improvements I had to make π
instead it took around 2
π
i'm in denial ok?
K, I added a few 3 days later, but it did work at that point.
Git gud and use more macros to code more efficiently.
#define answer "No"
tfw your 330 lines of defines aren't enough
Help me define a list of fireworks I need to buy in a few minutes instead
I'll blow you up anytime baby
No but seriously I have to get to the shop before it closes otherwise I wont have any fireworks π¦
20β¬ for 12 rockets
dont buy fireworks, buy a bottle of wine instead
But I want to blow something up
Or 3.
Don't tell anyone, but last year I accidently nuked someones mailbox
( Ν‘Β° ΝΚ Ν‘Β°)
I don't drink, I don't smoke
Mortar shells and Roman candles...only way to go
Do you want to live forever?
with my diet? nope
"accidently" @tame portal Yeah... doubt it
Yeahh......
The rockets are always ready.
doubt it.
I attached two rockets together because I like to experiment with them, sadly one failed and it flew like 10 meters up, then the second rocket ignited and it flew parallel to the floor to someones mailbox
π
Is it time to take the stupid hat off?
You need fireworks in your picture instead
Lol
That will do https://i.imgur.com/Y6Cw8S2.png
yes
slaps @tame portal hard
85β¬ per year is not much π
Did someone mention me or was there a funny @here guy
two people mentioned
and only blues and higher can Γ€there I think. Not even sure if blues can
So stupid discord doesnβt show that up when switching to the channel
Needed to scroll up 150 messages for that
However we're already in contact and try to find solutions for the C# API
While we are working with 2 different approaches
Or you just read https://support.discordapp.com/hc/de/articles/222495948-Wie-kann-ich-kΓΌrzliche-ErwΓ€hnungen-ΓΌberprΓΌfen-
@shut flower there's an @ button on the top right
allows you to jump to it
or what dedmen said but not in krautspeak
At least it's not frogish
I'm trying to use the HandleDamage event handler to lower the damage received by a vehicle, and its successfully lowering the damage number received, but the vehicle is still getting destroyed. Could ACE be interfering with this?
yes
Cook off I believe.
wow, that stopped it! thanks!
Disabling cook off?
Hey guys! I'm trying to make a Safezone trigger. I want all vehicles, players and objects to be indestructable within the trigger area. Is this possible? I've tried adding object allowDamage false; but it doesn't seem to work in MP
object allowDamage false is the correct way to do it
If it doesn't work then it didn't execute
Or something else is allowing it again periodically
allowDamage is AL EG, so if the trigger is server only, it will fail on remote objects.
I tried using the Protecting Zone object instead but it's cylinderformed and doesnt match my area
so I thought a trigger-area with a script could do the same thing
Well, it can.
I set Activation: Any Player, Type: Present
and On Activation: object allowDamage false
On Deactivation: object allowDamage true
Doesn't work. I dont get it xD
That will obviously not work
as object is not defined. and even then it would only toggle that one object
I don't think this is how "On Deactivation" works either.
you gotta forEach thisList
Yeah, but not On Deactivation like that.
And I think the trigger is only activated when the first object enters right?
@echo rivet Does it need to work for AI too? Or only players and their vehicle?
buildings can't move into a trigger anyway
// init.sqf
0 spawn {
private _protected = [];
while {true} do {
sleep 5;
private _inSafezone = (allUnits + vehicles) inAreaArray "Safezone_Marker";
{
_x allowDamage false;
} forEach (_inSafezone - _protected);
{
_x allowDamage true;
} forEach (_protected - _inSafezone);
_protected = _inSafezone;
};
};
Is this right? I'm pretty tired.
Safezone_Marker is the name of a marker you place.
π€· I see nothing wrong with it. Add some systemChat to debug.
W-what did change?
Phew.
Too many layers of markers and stuff I mixed em up
This is as simple a script as it gets, so I was worried I lost my edge.
Is there a way to destroy a global variable? Im ive tried setVariable ["SomeVariable", nil, true], but it doenst seem to work
@grizzled spindle ```sqf
gvar_to_remove = 13;
gvar_to_remove = nil;
publicVariable "gvar_to_remove";
hint str (allVariables missionNamespace find "gvar_to_remove"); // - 1
//-----------------------------------------------------------------------------------
gvar_to_remove_object = createAgent ["Goat_random_F", [0,0,0], [], 5, "CAN_COLLIDE"];
missionNamespace setVariable ["gvar_to_remove_object",objNull,true]; // or gvar_to_remove_object = objNull; publicVariable "gvar_to_remove_object";
if (isNil "gvar_to_remove_object" || {isNull gvar_to_remove_object}) then {hint str gvar_to_remove_object}; // <NULL-object>
@meager heart If you wanted to do it for a variable set via setVariable how would you go about that
@little eagle Noticed that the bullets inside the safe zone still did damage so I added an EH to your script to delete outgoing bullets from vehicles and the player. Seems to be working fine!
EDIT: Scratch that lmao
//init.sqf
0 spawn {
private _protected = [];
while {true} do {
sleep 5;
private _inSafezone = (allUnits + vehicles) inAreaArray "Safezone_Marker";
{
_x allowDamage false;
delBulletsEH = player addEventHandler ["FiredMan", {deleteVehicle (_this select 6);}];
hint "Damage disabled"
} forEach (_inSafezone - _protected);
{
player removeEventHandler ["FiredMan", delBulletsEH];
_x allowDamage true;
hint "Damage Enabled"
} forEach (_protected - _inSafezone);
_protected = _inSafezone;
};
};
@grizzled spindle varspace setVariable [var_name, value, isglobal] ?
Yeah thats what I have been doing
Doesnt seem to work
player setVariable ["SomeVar", false, true]
then
player setVariable ["SomeVar", nil, true]
What is "SomeVar" ?
Its just something i made up as a example
Here is what im talking about for example
RR_Container_inUse is infact nil however its still part of the object so not actually deleted??
There you have cursorObject getVariable ["RR_Container_inUse",DEFAULT_VALUE];
and return is DEFAULT_VALUE
What about cursorObject getVariable "RR_Container_inUse"; ?
Yes I know that but. using allvariables it still shows up as a variable
the line below
I added 1234 to provve it was nil
however if its nil why does it still show up under allVariables
that default_value "1234" - value to return if variable doesn't exist
Yeah I understand that but what im saying is if you look at the line below where I return all the variables using the allVariables function the variable which 'doesnt exist' is listed
@grizzled spindle not really any profit deleting a variable
Youll just use unnecessary network traffic (if broadcasted)
I might be wrong here but i think that setting the nil will not delete the variable...
it will just set the value as nil
And with isglobal= true on a variable which before was local, will send message to the server for JIPs
@rotund cypress The point in deleting the variable was to remove it from the jip queue so less people had to get the variable on joining
Most likely it will not make any difference @grizzled spindle
You just gotta be careful that you dont broadcast too many variables in the first place
Niling variables will most likely cause more issues than keeping it there
@grizzled spindle
Heya! Is there a way to open the Video-Settings of Arma through a script command or a function call? Greetings!
hmm okay :/
Depends on how deep you wanna go XD
@grizzled spindle Cannot delete vars on object but setting them to nil might still remove them from JIP queue. allVariables says nothing about what is in the JIP queue.
Good evening, an info on this order? She is not in the wiki
Added: HoldKey Function (executes a user-defined code when a key has been held down for a specified period of time)
A function is an "it"
Oh man. Who would've thought. I bet it's in the function viewer too
We will have to wait a little longer
work smart, not hard
I do not search in the category dev
category dev?
You just type HoldKey in the searchbox on top right and press Enter
That's what a search box is for
let's be honest, it sucks
It does. I didn't expect it to find the holdkey function. Didn't have much luck with finding functions so far
7am in France, I'm tired
7AM here too. Just got up half an hour ago
Just noticed I have a acceptible sleep rythm.. Interesting
π
Dedmen, we're getting old.
I just type bis_fnc_whateverIwannafind
if I don't remember the exact name i'm fucked tho so there's that
Hi there,
setUnitLoadout produces garbage entities (backpacks), which stay in simulation queue and jip-queue. Is there any approach to overcome that behavior?
wat
it doesn't, just so you know
also, getting backpacks out of the JIP queue, really?
logEntities;
then
_loadout = getUnitLoadout player;
for "_i" from 0 to 20 do {
player setUnitLoadout _loadout;
};
then
logEntities;
compare and enjoy
It does @lone glade
O.o
that sounds like the backpacks not being removed from the scene properly
not an inherent fault of the command
well. Still kinda the commands fault
@south pasture What happens if you manually remove the backpack? logEntities should go down. And if you then call setUnitLoadout does it still create additional entities?
like alganthe said maybe only the old backpack isn't deleted properly. Maybe it works if you do it manually
you know where they are, at worst you can do some cleanup at 0,0,0 to alleviate the issue
Yes had troubles with backpacks and solution was removeBackpackGlobal when you remove unit dead body
can anyone else confirm insanely longer loadtimes on dev branch?
at least on game startup? no mods.
Editor loadtimes doubled in 1.78
@still forum
I log to my instance of DS, do garbage stuff, logoff. Login again with diff ownerId, do it again. Entities from prev session stay (accumulate). In MP after long session over 4k garbage enities present
And you are telling me that.. why?
You just threw a bunch of useless information at me and didn't answer my questions at all
does logging off of player destroys its inventory properly? (last backpack included)?
Dunno
easy to check, log in on dedicated, check entities, log off, check entities
is the issue only repeatable on dedicated?
huh, went through the dev branch updates to check if they fixed a specific enum error and what do I see:
Tweaked: Entity locality is now set before the init script call
What's that mean?
And nobody can't exactly tell what is about
afaik it means the owner is guaranteed to be defined before the init runs
But local this worked before right?
yes
a quick question, if I have to create a script which cleans up my server from vehicles after X minutes, should I go for an FSM or .sqf script?
FSM is a more complicated variant of a SQF script
I don't see why you would go for FSM
so the best option will be to create a script server side that cleans my shit every X minutes?
FSM and SQF are both scripts
I don't know how you would do it without any script
So.. It's the best and only option
Why do you then consider using something that you don't understand
That's a very bad Idea
I searched a bit on the web
"I'll just use this fork to eat my soup"
FSM is best left where it is, unless you're a BI employee, then use it for mission flow because it's easier to maintain laughs in the distance
hmm ok
It's good to visualize stuff
But you should just plan your mission workflow out and then script it
Statemachine mission flow sounds interesting
Genesis aka vcom is making a huge mission with the fsm
Thanks @still forum
/\(O_O)/\
batman?
My nightmare:
One possible issue I expected get posted to the issue tracker, poster doesn't fill out the template and doesn't give out detail / writes broken engrish.
that's on the same level as someone posting "I fixed it" when you search how to fix something
Is there a way to make it so 2 AI snipers wait until Blufor goes into an area, and then shoots
π€
#define 2aisnipers (group sniper_1)
2aiSnipers setCombatMode "BLUE";//set the group to not shoot
waitUntil {// wait until
!((allunits inAreaArray [town_1,500,500,0,false]) isEqualTo [])// the list of units in the area is not empty
};
2aiSnipers setCombatMode "RED";
simple
What is that lol? @peak plover
If the snipers are in group 2aiSnipers and the target area is called town_1(object) and the disttance you want is 500m
Wait you can give variable names to towns?
inareaarray also works with area markers and triggers
ah area markers
You can place a game logic and call iot town_1
it's group name
Yet you do it π
and local variables you can.
Since the first letter is _
Either way, I would not recommend.
Β―_(γ)_/Β― who cares π
Also, naming a group 2aisnipers as well, is most likely a bad idea as this group can become bigger than two people
place down an object, set the variable name to town_1
game logic is a plaacable object
No questions are stupid my friend, however, why would you use a game logic for that? π€
Because Nigel told me to :p
How about a trigger? would that work?
sure
Just get the position of the town, and then use that
with a trigger
You dont need anything else
Place yourself in the town, type getPos player and get a return value.
Then use that
It's supposed to be so that they go in front of a guy (5x5 area) then they start getting shot at
basically an ambush
Is this going to be a static or dynamic position?
static
Cause if its not changing, you can just get the position beforehand
And then using a game logic or trigger would just be awful
?
Its an extra addition that you do not need
If its just a static position that will never change.
So then how do I set it up?
Go into where you want and get the position by command.
Then use that in your script
However, if you are doing things such as calls on people entering the zone, better to use a trigger as you else must use waitUntil and what not
if you are doing things such as calls on people entering the zone
@lone glade its not good to touch your face too much
Yeah, so when guy goes into small area, sniper fires, but not until then
Maybe spots will show up
what am I risking?
Yeah, then do what someone else said and use a trigger, but game logic would still be stupid IMO. @unborn mauve
You can just ```sqf
params ['_group','_area',['_side',west]];
_group setCombatMode "BLUE";
waitUntil {
if !(((allunits select {(side _x) isEqualTo _side}) inAreaArray _area) isEqualTo []) exitWith {
_group setCombatMode "RED";
true
};
(isNil {_group} || {isNull _group || {(count units _group) isEqualto 0}})
};
make that a function and
```sqf
[group _unit,trigger_1,west] call nig_fnc_holdFireUntilSideInArea;
Maybe something along those lines
But this needs everyone from that side to be in the area right?
you don't even need a trigger for that nigel
place a marker, spawn that func
Marker area or just make your own area
https://community.bistudio.com/wiki/inArea
[center, a, b, angle, isRectangle, c]
And how do I make it a function?
Hello,
Is there somewhere I can find the correct links to the markers ?
https://community.bistudio.com/wiki/cfgMarkers
exemple : "\ca\ui\data\markers\marker1.paa"
well, I tought it would be a bit simpler but okay
it's fairly simple
For you sure π
i'd say also give full knowledge of the targets before making them enter combat mode
at least they won't spend 30s finding the target.
use reveal with max accuracy
params ['_group','_area',['_side',west]];
_group setCombatMode "BLUE";
waitUntil {
private _units = allunits select {(side _x) isEqualTo _side}) inAreaArray _area;
if !(_units isEqualTo []) exitWith {
{
_group reveal [_x,4];
} forEach _units;
_group setCombatMode "RED";
true
};
(isNil {_group} || {isNull _group || {(count units _group) isEqualto 0}})
};
reveals
exitWith return value for the waitUntil
^
the syntax of that code block fucking triggers me
or even just using private in a waitUntil
you realize you're redefining the var over and over and over again?
Doesn't matter much
π€
why the fuck do you have an exitWith in a waitUntil too
hell, why the fuck do you bother returning true while using exitWith there
Why the fuck are you here? @lone glade
Because you have to?
exitWith exits the current scope, doesn't it resume the rest of the func?
@lone glade with no true it jsut exits that current waitUntil iteration, but not the waitUntil loop
or does it just ends that instance of waitUntil?
Alganthe, chill out a bit, thanks.
???
:thonking: intensifies
And if you don't have a true on the stack when you reach the end of the waitUntil code. It won't end
π¦ π¦ π¦ π¦ π¦
so, hear me out, how about having the exitWith condition be the waitUntil block?
And the other conditions?
You could rebuild the _units array or move the variable up one scope so it stays alive
then recheck after the waitUntil if it's non-empty and then run the code in the exitWith
So I have to make this a function?
You don't HAVE toi
just reveal will not make them fire when you need it, its just send them info, also it will trigger 'tacticool mode' and they can move somewhere from they positions
Sometimes when you reveal high enough they shoot at you through walls tho
unless they're insanely far they should fire at them without relocating
hey there, got a lil question for you, is it possible to return an array w/ remoteExec ? i've read the wiki, and it says "anything - nil if error - string otherwise"... so ?
What are you trying to do?
well basically, i've got a dialog which should show some SQL-stored infos of the player. i have the correct infos when running my query, but i can't send it back to the client to update my RscStructuredText. i got it working thru a publicVariable and a waitUntil, but im kinda sure there's a more optimizated way to do it
Make a setDisplayedInfo function on your client. Which get's called with the info and displays it in the dialog
remoteExec to the server and tell it to grab the info. Then the server remoteExec's to the client that requested the Info and executes that setDisplayedInfo function
will try that, thank you for your advice. will send back the results π
I already know it works. I'm using that in TFAR. Instead of publicVariabling back and forth which was done previously
Works for me well when doing for AA / enemy heli
Happy new year. however
UTC still 3:51 pm
On the internet live by UTC
UTC is +3... DOUBT
SERIOUSLY DOUBT
Did you visit primary school? Because I don't think UTC + 3 = UTC.
I think such stuff was taught in primary school right?
he lives in there that's waht he saying
UTC/GMT +3 hours
So you mean moscow is +3 i think and not utc is +3 i think like you wrote
Is there a way to remoteexec this ?
[format["<t color='#004399' size = '2' shadow='1' align='center' font='PuristaBold'>BLUE</t> <t color='#FFFFFF' size = '2'>Team Wins<t/><br/><t color='#FFFFFF' size = '1'>Blue : Points %1 - Captures %2<br/>Red : Points %3 - Captures %4</t>",(WScore),(westtouch),(EScore),(easttouch)],-1,-1,15,2,0,4001] spawn bis_fnc_dynamicText;```
UTC is either UTC. Or utc is -3 would also be acceptible. Because it's -3 from your zone
but utc is +3 i thinkis completly wrong
@quartz coyote yes.
π
yes lol I guessed :), but it's a bit complicated for me let me make a try
example 8
{[format["<t color='#004399' size = '2' shadow='1' align='center' font='PuristaBold'>BLUE</t> <t color='#FFFFFF' size = '2'>Team Wins<t/><br/><t color='#FFFFFF' size = '1'>Blue : Points %1 - Captures %2<br/>Red : Points %3 - Captures %4</t>",(WScore),(westtouch),(EScore),(easttouch)],-1,-1,15,2,0,4001]} remoteExec ["bis_fnc_dynamicText", -2]``` ??
right, lets try again
[format["<t color='#004399' size = '2' shadow='1' align='center' font='PuristaBold'>BLUE</t> <t color='#FFFFFF' size = '2'>Team Wins<t/><br/><t color='#FFFFFF' size = '1'>Blue : Points %1 - Captures %2<br/>Red : Points %3 - Captures %4</t>",(WScore),(westtouch),(EScore),(easttouch)],-1,-1,15,2,0,4001] remoteExec ["bis_fnc_dynamicText",[0,-2] select isDedicated];
π
I don't see why that isDedicated tho.. but.. whatever
cleanupFSM = [] execFSM "cleanup.fsm";
cleanup = [] spawn XYZ_fnc_cleanup;
Excuse my ignorance but, the line above are the same and they get called both of them in the init.sqf server side so I have identical cleanup system running together without any reason?
@quartz coyote please don't send all that teext with remoteexec
No the lines are not the same. They are clearly different
[format["<t color='#004399' size = '2' shadow='1' align='center' font='PuristaBold'>BLUE</t> <t color='#FFFFFF' size = '2'>Team Wins<t/><br/><t color='#FFFFFF' size = '1'>Blue : Points %1 - Captures %2<br/>Red : Points %3 - Captures %4</t>",(WScore),(westtouch),(EScore),(easttouch)],-1,-1,15,2,0,4001] remoteExec ["bis_fnc_dynamicText", -2];```
@quartz coyote Your passing the arguments to the remoteExec just like you would pass it if you werent remote executing it.
And no you don't have two things running without any reason. The reason is you start them both @winter dune
@quartz coyote make your text showing into a function and just remoteExec that function
@peak plover why ?? is it too big ?
@still forum but why do I need to execute both of them?
For you
or should I just delete the damn fsm file and make my cleanup system
@winter dune you don't?
It doesnt really make much of a difference though @peak plover still pretty much doing the same thing? Would be a bit nicer though I guess
No it's not doing the same thing
@warm gorge literally didn't understand a thing ...
[format["<t color='#004399' size = '2' shadow='1' align='center' font='PuristaBold'>BLUE</t> <t color='#FFFFFF' size = '2'>Team Wins<t/><br/><t color='#FFFFFF' size = '1'>Blue : Points %1 - Captures %2<br/>Red : Points %3 - Captures %4</t>",(WScore),(westtouch),(EScore),(easttouch)],-1,-1,15,2,0,4001] remoteExec ["bis_fnc_dynamicText", -2];
//vs
remoteExec ["nig_fnc_nigText", -2];
the amount of data you are transmitting is a lot smaller
you are sending all that for every client
which is insane
Do you understand how to make your own functions @quartz coyote ?
To do it how nigel suggested
but ..... @peak plover I have 5 different messages to show on player's screen .... that makes a lot more functions ... i'd like to keep the number of file small ....
@warm gorge Yes np π thx
which is neglectable @peak plover
more important: keep the ammount of packages low instead of the data transfered
but indeed, should be improved if just for readability purpose
The size doesn't matter @quartz coyote ignore @peak plover
wow ....... data transmition war xDDD
size does not matter
Why would you send the data that's already included in the mission file? seems redundant
Because it is irrelevantly small
package count is more important due to packages have to be parsed
low pckcnt --> better netperformance due to: less time spend parsing the package
AH ! So i'm right to keep the number of files low right ?
@still forum talking about size vs ammount
π€¦
Yeah. But still one remoteExec is irrelevant
obviously
compared to the hundreds of position updates per second
took that for granted
The size doesn't matter Β© yes its all about the diameter ππ¨
less files more frames
lol
πΎ πͺ πΈ π§
The only reason people have low fps in mods like altis life
etc.
Is that they put too many files in
Just use init box on unit and no files
hahah I launched the best argument ever π
Well TBH nigel launched it
true dat
By saying that you should limit sending stuff that you already have on your ram/hardrive
You don't even know that
What if that's a server-side only script from a server-side only mod?
don't be so harsh on him
usualy that it is not the case in #arma3_scripting
I am harsh with people that are needlessly confusing SQF beginners that are obviously already having a hard time with the basics.
Then that's different
that is why we are here too @still forum
to keep the knowledge high
because you know
we are high on knowledge
IQ > 50 only allowed in this channel
bye
That's reasonable
https://zenpype.com/wp-content/uploads/2016/12/weed-einstein.jpg <-- high on knowledge
I think with IQ>50 we are still fine an no one needs to leave
You need to be this tall to get that joke Β―\_(γ)
nigel Β―\_(γ)
ohh shit
the L is tall enough
phew
Has anyone experienced any performance issues with setUnitLoadout? Just found a report about it creating hundreds of entities at [0,0,0]
No
But I also don't run thousands of setUnitLoadouts in missions.
We talked about that here a few hours ago
@warm gorge You could try deleting them π
If it actually does something like that
Was just curious if anyone knew much about it, didnt know it was spoken about earlier here. Apparantly the issue is going to be looked into, but never know how long thats gonna take. π
https://feedback.bistudio.com/T127225 Being looked at for over a month already
Exactly what I mean, have seen many bug reports with the same response not get anything done about them for months and months. I understand it might be hard getting around to them with however many devs are working on Arma ( 3 ) at the moment, but a lot of painful issues often never get fixed
0 engine devs are fulltime on Arma 3 at the moment
Really? Uh, well we can assume where their working I guess
Actually last week and this week there are 0 devs doing anything on Arma at all
They are on DayZ
No need to assume
Im just waiting for an annoucement of whats going to be done with arma after the Tanks DLC.
They get moved back on a per-task basis. If there is something to do they pull them back off the DayZ team
I know its been discussed so many times lately, but surely Arma 4 is going to be a thing in the next couple of years, with how well arma 3 has gone
Opposite. Arma 4 is not going to be a thing in the next couple years
2-3 years of further dev time is to be expected before we get it
Well whats gonna be done after this last DLC for arma 3? Just fix updates and shit
exactly
probably more people moving away from vanilla to modded
and community DLC's are kinda content updates
You have the editor. you can be playing a new scenario every day
If only the editor didnt have so many performance issues to where its virtually impossible to edit with maps with heaps of objects lol
performance issues in the Editor??
If the editor is already lagging you don't even need to try to launch the mission
Right now you cant even select a group of objects without a freeze since the last update. But with missions with hundreds of objects its extremely laggy, almost like everything is being loaded in even out of view
hey @still forum, the method you gave me is working perfectly, thanks
community made DLC
would be great
would require source level access though ...
trusted members only thus
What does source access have to do with community DLC?
We already have community DLC. And it doesn't require source access. And they already said no engine changes allowed for them
content DLCs are boring ...
We will just push Intercept plugins
that is how we have to do it without, yes
And it will become something like JayArma2Lib
Just instead of one closed source binary that does a specific thing we have a fully open-source moddable/extendable system
wanna hook into the UI system?
That also doesn't break with each update like JayArma2Lib did.
You mean custom drawing on top of game window? that's planned. so yes
Hook the UI config crap backend stuff? no
Thayt would be nice
no i talk about actual ui config stuff
we also would barely be able to introduce new engine-based systems
everything is kinda weird when done this way
with direct source level access, things could be different
Intercept is basically source level access
it is not
it just provides a lot of things by hooking into source
Though.. you would barely able to add stuff that Intercept doesn't already provide the API to do.
Would be easy for me
Can you read assembly?
Then take arma3.exe and read it. It has everything in it ^^
buhu ... so you cant right now
True.
My dev drive is dead
I cannot do anything right now
I already hooked the preproc in my debugger
ArmA 3 Engine DLC
more or less
So I did all the research and have all the docs lying around on my dev drive
In form of commented assembly
well ... i always failed to use those RE tools ...
could dig myself through the assembly
but failing to jump back to eg. last location was killing it for me
jump back to last location is backspace in IDA
Or switch tab if you opened a new one
not using IDA
well then.. Β―_(γ)_/Β―
could have used the free version ... but that is kinda weird looking and i never understood what the percentage thingy is doing
as even after two days of runtime it still was not complete
Takes about half an hour to analyze Arma for me
And It took me over a year to somewhat master IDA.
And it's one of the easier RE tools
idk ... did not touched it now for a long time
could also have been something else π
but i know in x32dbg it worked out of the box and as i expected it
probably was just osi layer 8 issue
but still ... that kept me away from the free IDA version
and the paid version ... no monez
Damn, There is still no single plug-and-play module/script that you can just drop into your mission have have shop and money system with would let you buy and sell items vehicles and recruit AI squad members
need all info we know about enfusion scripting lang
I'm honestly considering kludging something up myself
that "life" game made on UE4 will save us all (it's sarcasm)
@queen cargo Download DayZ Standalone. unpack dta/system.pbo
you should watch it for the lulz
Double click the documentation file and read
the scripting language is in there?
yes
well ... then making room on my hdd is now required i guess
I'd send it to you but.. It's on my dev drive
got an idea for a quick side-project
that probably requires intercept
and a lot of parsing
A LOT of parsing
AST generation, transformign it and outputting assembly
I want more mathemagics in arma
even more
EnScript --> SQF
possible
you have been warned
Why would you do that?
because why not?
EnScript -> SQF?!
It's like... idk...
filling up a Ferrari with Catpiss
It makes no sense
i...
do what you want
@jade abyss but be aware: you might loose your mind about this mortal
I don't loose my mind, i am more in a constant facepalming pose
close enough for me
also thinking about some XAML-Like language for arma UIs
<ui ext:x="io.x39.framework.il.xatt" ns:my="my.example.package">
<background backgroundColor="#AAAAAAFF">
<stackpanel>
<button click="{x:static my:button_click}">
<label text="OK"/>
</button>
</stackpanel>
</background>
</ui>```
would be fancy
anyways
got enough project for the next few decades again in my pipe
Not Enscript to plain SQF. Enscript to SQF Assembly
Needs some special instructions though
That's actually easier than using existing instructions
That's mandatory for everything to work without a large Performance impact
You might not have noticed but creating existing instructions is already a ducttape hackjob because they actually require a pool allocator which I don't have
It also adds OOP to arma for free as sideeffect
Contrary to popular belief,
isFlatEmpty```
does not return a boolean, but instead an array
Please, I hope they do not implement SQF in the enfusion engine
Lets just let them keep out this creepy cousin cause its time for it
@edgy dune </b>
ah thx
Keep in mind though, that is just for structured text. @subtle ore @edgy dune
So you can use parseText if you want to do it in a hint @edgy dune
@rotund cypress Yep, i thought that was implied
hint parseText "line 1 </b> line 2";
Yes ^^
is there away to have a variable in a addAction name?
I'd assume yes, not sure if you could change it
@edgy dune _object addAction [format ["Some text %1", your_variable]...
ah thx
Quick question here,
I'm having to work offline since my isp is down at the moment. I am using playMove for some anims and the ai has zero collision
Going to try and post the script, it may be a while.
All i am essentially doing is just playMoving the anim, attaching unit to snap, detaching
As soon as the ai unit is killed however, collision is back
Ai's placed in editor or spawned ? I had some troubles with ai collisions only if they placed in editor and no troubles with spawned
@subtle ore
@meager heart Going to try spawned now, thanks for the feedback
np
[
["a", 22],
["j", 36],
["f", 16]
]
what'd be the fastest way to select the array element containing the largest number?
reverse, sort, reverse
that func is literally:
selectMax _this
and, just so you know, he want the ARRAY that has the biggest number
also selectMax doesn't support multidimensional arrays
ye got it, thanks
thought you meant reverse the order of the array initially
not the elements
yeah, the elements, it sucks but it's the only way to do that kind of sorting
btw here (somewhere in this channel) was solution for getting highest player score and name, but it was exactly like you just said with sort
yes, reverse the array, sort it by last value, reverse it back to what it was
just to be clear, it's not "reverse the array" really is it?
the elements
it's more "make sure the first value in a child array is numerical" isn't it?
yes
sweet just making sure
wait, got an example in garrison
you could achieve the same thing doing some weird shit with select / apply right?
nah
sort has always been the way?
yep
i've not touched sqf in months
it uses the first value of the array.
so I reverse it to have the Z pos as first index, sort it, reverse it so I can use those again
if I didn't it would sort by the highest X pos
The fastest way you say?
_array = _array apply {[_x select 1, _x select 0]};
_array sort false;
_array = _array apply {[_x select 1, _x select 0]};
Copy.
π€
{reverse _x} forEach _array;
_array sort false;
{reverse _x} forEach _array;
And without copy.
Whad'scha thonkin about?
I was thinking, if i get some more food or not.
0 spawn
{
_array = [
["a", 22],
["j", 36],
["f", 16]
];
_array sort false;
hintSilent str (_array select 0);
};
good, now you sorted them in alphabetical order
^
lol
You tried.
return is ["j", 36]
reverse alphabetical order then
with true // ["a",22];
Meh.
Real sqf mathmagic begins with MACROS:
#define SINH(x) ((exp (x) - exp - (x)) / 2)
#define COSH(x) ((exp (x) + exp - (x)) / 2)
#define ATANH(x) (ln ((1 + (x)) / (1 - (x))) / 2)
no it's more like tricks then magic
more tricks ```sqf
#define PUSH(a,v) (a) set [count (a), (v)]
#define ARG(x) (_this select (x))
#define ARG_IF(x,v) (if (count _this > x) then {ARG (x)} else {v})
PUSH, we have pushBack now.
ARG, this macro replaces one command. Useless unless it replaces at least 2 commands, or duplicate arguments.
ARG_IF, we have param now.
Don't like.
Also:
than*
Inline functions!
#define SLOT_CREATE(grp) (call {\
private _lastId = GETVAR(grp,lastId);\
if (isNil "_lastId") exitWith {""};\
private _id = format ["%1:%2", grp, INC(_lastId)];\
SETVAR(grp,lastId,_lastId);\
private _slots = GETVAR(grp,slots);\
_slots pushBack _id;\
Lobby_allContainers setVariable [_id, CREATE_NAMESPACE];\
SETVAR(_id,id,_id);\
_id\
})
Is it from your lobby ?
Yes.
the scripted one
These are what I wrote first and took half the time to write it. The other half was creating the gui. The scripts themselves happened somewhere inbetween waiting for reloading the configs.
rgr
Please tell me you are using commands for atan and Co @little eagle
And not those macros
extension that uses the windows calculator
if (getVariable ["hideKD", false] && !_isPlayer) then {
_entryAllKills ctrlSetText "-";
} else {
_entryAllKills ctrlSetText str (([_player, "playerKills"] call fn_getScore) - ([_player, "teamKills"] call fn_getScore));
};
Anyone knows why the game gives me a "Missing )" Error on line 1?
@queen cargo There is no sqf command for atanh.
Did not saw that h part π
@stable wave I'm refusing to help someone tagging their functions fn_, but I'd look into the syntax of getVariable, because it's a binary command, and you used in like a unary command.
varspace getVariable
I'd be delighted if atan could be implemented with basic arithmetic and a natural logarithm tho.
Would make finding anti-derivatives less of a hassle.
commy
Yes?
You really think we're getting more commands?
they made this:
https://community.bistudio.com/wiki/BIS_fnc_lerp
instead of a command
Intercept
at that was well before senior devs were getting moved
I never said we get new commands.
if we ever get that they'd make it a new one and call it atan3
2.5 (two point five)
we already got 2