#arma3_scripting
1 messages ยท Page 486 of 1
if (_curObject isKindOf "House_F" && {player distance _curObject < 12} || (typeOf _curObject in ["Building_Class_1", "Building_Class_2"])) exitWith {
[_curObject] call life_fnc_houseMenu;
}; can someone tell me what i have done wrong on this line
Post RPT with the full error that you're getting
Is there any way to grep the config file
I am looking for an ALiVE mod specific intel item
I cannot friggin add a intel document to my inventory ffs
[player, "CUP_Item_item_Cobalt_File"] call CBA_fnc_addWeapon;
always results in false
Have you tried CBA_fnc_addItem
yes at first
drives me kinda nuts ๐ฆ
configfile >> "CfgVehicles" >> "CUP_Item_item_Cobalt_File"
that's the bad boy
Event this one doesnt work configfile >> "CfgVehicles" >> "Intel_File1_F"
Oh, I dont think you can add CfgVehicles stuff to inventory.
But I might be wrong ๐
But...
Ok some questions now...
1.) How can I figure out the "working" class name to use?
2.) When using [player, "CUP_item_Cobalt_File", true] call CBA_fnc_addWeapon; the document object is NOT added to my inventory BUT placed on the ground
That is partwise ok, since the function described that if my inventory is full that happens
Problem: Inventory is empty
๐
sqf magic
sqf magic > magic
๐ค
Ok back to the class name thingie
๐ฅ
@high marsh scripting >https://gyazo.com/1a6abf1308642ec1709ecf67180d1c5c
general chat > https://gyazo.com/a3d304addc4496742d1cd88d47757b88
jesus murphy...
magic is real
Yup. It's all true
You thought magic was a childs game? Magic is real, it's heart exists inside SQF
also dat timing...
setMMagic 1;
world
setMagicWorldGlobal 1;
setWorldMagicToMagicWorldVisual
Okay the same call is not working for
configfile >> "CfgVehicles" >> "Intel_File1_F"
Is tehre any property called doNotAddToInventoryIfSteamIdIsOfXetra11Ffs = true ?
or for real now - some items seem not "addable" to teh inventoriouz
Please say yes you are right, xetra11
@frigid raven getPlayerUID gets steamid64 ,
you have the command canAdd which checks if it can fit into your inventory
and obviously the uniform and vest, backpack variants
player canAdd ["Intel_File1_F", 1] // true
[player, "Intel_File1_F"] call CBA_fnc_addItem // false
๐
๐ซ
what about just addItem ?
also afaik parent category for the cup items CfgWeapons not CfgVehicles
what u mean?
Intel_File1_F < that is vanilla one ?
ehm it is CBA I think
I saw the icon of it on the Editor
CBA Icon
A question - might it be that CfgWeapons can be picked up but cannot have any actions attached - but CfgVehicles can have Actions attached but cannot be picked up?
If so - then I understand why I am not able to add it to my inventory. These Intel Items yield an "Collect Intel" action
by "default" it seems
So... mybe that is the whole issue here where I am dangling around
Nah that theory does not work...
since configfile >> "CfgVehicles" >> "CUP_item_Cobalt_File" is CfgVehicle, too
and can be obtained
๐ฆ meh I thought I had it ๐ข
try this >
0 spawn {
private _document = "Intel_File1_F" createVehicle (player modelToWorld [0, 5, 0]);
_document setVariable ["RscAttributeDiaryRecord_texture", "a3\structures_f_epc\Items\Documents\Data\document_secret_01_co.paa", true];
[_document, "RscAttributeDiaryRecord", ["TopSikret Documets", "Documents description", ""]] call BIS_fnc_setServerVariable;
_document setVariable ["recipients", playerSide, true];
[_document, "init"] spawn BIS_fnc_initIntelObject;
};
server side only for the everything above ^, this is just an example... like always ๐
second texture there is just stamp https://gyazo.com/bca6b95d766236b9aacae8b7ea286056
that the first one > https://gyazo.com/08720c8aa2ab3ce2876fcacbcef40a8d
the folder > https://gyazo.com/1ca3ad53982e6d1c395020498d6fa501
@frigid raven
what ... the hell
All this is needed to make this friggin object addable to my inventory?
I think I stick with the CUP objects then o_O
turns out that interaction with docs items slightly... complicated ๐คท
and Intel_File1_F < that is vanilla item
alright gonna take care of that if my mod is v0.2 xD
btw: (typeName player) isEqualType "OBJECTasdasd"
how?
because both are String?
forget it - got it
Only one more hour of my questioning! Then I have to go to bed!
๐
player isEqualType objNull
Would someone be able to explain how to use Stringtables?
I have knowledge within HTML. So the tags are okay. I just want to understand how to apply it to (sentences) strings.
check this > https://community.bistudio.com/wiki/Stringtable.xml
Ah sweet, tanks @meager heart
Do I have to do both: sqf // stringtable.xml <?xml version="1.0" encoding="utf-8" ?> <Project name="Any Name"> <Package name="Mission One"> <Container name="Some Words"> <Key ID="STR_myKey"> <Original>Hey there</Original> </Key> </Container> </Package> </Project> & sqf // config entry class Test { word = $STR_myKey; };?
that was example how to use it in the configs
Right. Okay, not required?
yep
Nice. Just checking.
Shouldn't it be word = "$STR_myKey"; ๐ค ?
no
@meager heart Do you know why I would be getting this?
Error: https://gyazo.com/7d4c31675f7cfda3c1b65c3763ce51ec
Text Editor: https://gyazo.com/aab5bd159ce630130aa772f142b6224c
probably / < that is the problem
Nope. I've went back to the editor and loaded it. Still an issue.
Worked as one file.
How would I make: sqf private _units = selectRandom [ CAP_Squad_OPFOR, CAP_WeapSquad_OPFOR, CAP_Team_OPFOR, CAP_ReconTeam_OPFOR ]; into only picking one of these?
How to have a nested magic variable? Can I call it _y ?
{
{_y } forEach INTEL_ITEMS_WHITELIST;
_x
} forEach _items;
No. @frigid raven
So... no way to solve this?
One sec
{
_x = _y;
{
_y
} forEach INTEL_ITEMS_WHITELIST;
_x
...blah...
} forEach _items;```
{
_x = _z;
{
_x = _y;
{
_z + _y + _x = _a;
} forEach _blah3;
} forEach _blah2;
} forEach _blah1;```
Okay... one sec. @frigid raven
_uniform _vest _backpack ```sqf
_uniform = ["classname"];
_vest = ["classname"];
_backpack = ["classname"];
{
_x = _playerUniform;
{
_x = _playerVest;
{
_x = _playerBackpack;
unit1 forceAddUniform _playerUniform;
unit1 addVest _playerVest;
unit1 addBackpack _playerBackpack;
} forEach _backpack;
} forEach _vest;
} forEach _uniform;```
This is just an example.
It's an ineffective way of adding the players stuff. But it gets the point across, I hope.
I hope this helps you understand @frigid raven
sec
No I do not understand your assignments
_playerUniform = _x
that would be what I expect
You are sure you arent mixing this up?
He is definitely mixing this up
ok good - since the mixup is clear now. I still get your point @drowsy axle was just confused by the mixup of the assignments
It works both ways.
No, it really doesn't.
If you define _x as an undefined private variable, it's not going to work.
I know. Sorry okay.. xD
If you define _x as an undefined private local variable, it's not going to work. -- It's not private in this code.
If you want to be correct ;P @ruby breach
Likely a slightly easier to understand example (although there's likely a better way to handle whatever you're doing than forEach) - ```sqf
{
_x params ["_var","_val"];
{_x setVariable[_var,_val];} forEach [Unit1,Unit2,Unit3];
} forEach [["var1","val1"],["var2","val2"]];
also, there is no need for these forEach to be neasted
Anything wrong with this? sqf {_x distance player > 1000 and side _x == east } count allunits != 0
What are you going off @slender halo my example?
use findIf
Where? @meager heart ๐
As a replacement for everything you just typed
ik I'm dumb. I thought it was within my code @meager heart
@drowsy axle thx works that way - a pity that I did not figured this way out by myself... as a 4y experienced dev...
@frigid raven at some time, everyone needs help.
wow, nice, haven't put my hands in sqf for a while, nice new command
meh... @still forum is an exception I am sure
The fun new command is https://community.bistudio.com/wiki/a_hash_b
allunits findIf {_x distance player > 1000 and side _x == east};```
quick question, pveh vs remote exec for request and responses
you should use && instead of and
I know @slender halo . I took it from: http://www.armaholic.com/forums.php?m=posts&q=26395
Depending on how the mission works, you could also make it a little faster with lazy evaluation
You also still need to check if it's greater than -1 to return a bool though
fuck me
omg sweet - SQF Plugin for IntelliJ has a OnHover Documentation Update... so when my cursor is on a keyword I immediately can read the doc of BIS wiki โค
enemyFromPlayer = allUnits findIf {_x distance player > 1000 and side _x == east};
if(enemyFromPlayer isEqualTo 0) then {
TrigWave = true;
};```
oh my @frigid raven What is IntelliJ?
oh...
I used this "suite" for PHP.
That's still not going to work
Yea I am a Java Webdev so
Type number expected bool
I am using IntelliJ at work - for my private stuff I use emacs -> spacemacs on Arch Linux
UPDATED
Still not going to work
Why not?
Because findIf returns the zero based index of the first result
ah
({(_x distance player) > 1000 && {side _x == east}} count allunits) != 0
Sorted my issue. It was my fault. I was doing two loops when I only wanted / expected 1.
/*
({(_x distance player) > 1000 && {side _x == east}} count allunits) != 0
*/
#define EAST_ALIVE (allUnits select {side _x isEqualTo east})
if (EAST_ALIVE findIf {_x distance player > 1000} != -1) then {
/* code */
};
``` maybe ๐
How do I get the return value from: https://community.bistudio.com/wiki/createUnit ?
Example 1:
_unit = group player createUnit ["B_RangeMaster_F", position player, [], 0, "FORM"];
{
private _unit = _x createUnit [position _objects, CAP_UnitGroup];
_unit forceAddUniform "U_O_Protagonist_VR";
} forEach _units;```
get the return value @unborn ether
Not the fucking thing... but the RETURN VALUE.
What I've seen from: https://www.youtube.com/watch?v=EfI-VtMuVCw
are you trippin on something?
I can guess _units is supposed to be array of classnames.
type createUnit [position, group, init, skill, rank]
Return Value:
Nothing - NOTE: THIS SYNTAX RETURNS NO UNIT REFERENCE!
So change first line of your for each to:
private _unit = CAP_UnitGroup createUnit [_x, position _objects];
Check the first syntax @hollow thistle
You do not need to mention people every time you respond directly under their response.
at least it ain't @ everyone
๐
anyway. I'll try you suggestion, but the first syntax says that it returns value.
lol
@drowsy axle https://gyazo.com/2f48e7149355c61e63dc8073272a750e
I see that. It is my bad. I thought I followed the first one.
Someone needs a crash course in how to read and understand commands syntax on wiki
{
private _unit = CAP_UnitGroup createUnit [_x, position _objects, [], 0,"NONE"];
_unit forceAddUniform "U_O_Protagonist_VR";
} forEach _units;``` My apologises @hollow thistle / @meager heart
Someone needs a crash course in how to read and understand commands syntax on wiki What book is that in?
@tough abyss ^ is joke dw
The book @queen cargo is writing I guess
Writing is not coming along good tbh... Not very creative lately..
Mhh? @meager heart
i'm doing something wrong there ?
i mean was expecting [[1, 228, 3, 4, 5], [6, 228, 8, 9, 10]]
Technically that's what you got. Just with a lot of extra zeros displayed
Yup
The str method is literally just float to string without any formatting done in sqf-vm
Can be fixed fairly easy.. But.. Never really bothered
ok i see
When implementing tofixed I will "fix" that ๐๐
You might want to remove spaces after comma too, arma packs arrays tight when str ing it
Nah
Want that formatting space.. Hate how arma just ignores that
Though.. All is optional ๐คทโโ๏ธ can Start a vote for it
No itโs great, easy to parse
Guys. You need to check this out... I am so proud of this.
All by my lonesome: ```sqf
_loadouts = selectRandom [
"RIFLE",
"UGL"
];
{
CAP_unit = CAP_UnitGroup createUnit [_x, position _objects, [], 0,"NONE"];
private _handler = [_loadouts] execVM 'CAP\loadout\rifleman.sqf';
waitUntil {scriptDone _handler};
} forEach _units;```
Obvs excluding the things YOU wonderful peeps helped with.
params ["_loadout"];
if (_loadout isEqualTo "RIFLE") then ...```
oh wait. the _loadout needs to be within the {}forEach.
Otherwise each unit is the same.
that execVM there...
wut? abut it? @meager heart
it's bad
I know.
I tried using CAP_fnc_rifleman
but I couldn't be bothered at the moment with functions.,
the worst thing that you are using it in a loop
well... up2u
I'd rather improve it.
and it does work.
So no need for sloppy coding.
I always just try and get things to get an expected result and tidy up afterwards.
Hmm does the engine assign a rank to each soldier? And I guess there's an option somewhere to make that rank visible to the players (eg. in front of the name in various contexts)? Possibly even with the graphics of the rank insignia?
So the service from the engine itself is rather limited (like in many cases - but it's still there at the bottom)?
https://community.bistudio.com/wiki/rank ? @regal kraken
Found this: https://gist.github.com/X39/f149ef35484d6466fc4b
from @queen cargo
Okay. I'm asking more from a roadmapping PoV ๐
drawIcon3D [format["\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa", rank _x], [1,1,1,1], _pos, _size, _size, 0, "", 0, 0, "PuristaSemibold"];
Good to know there are existing examples
Got few more of those fancy ones
Full promise System for example @drowsy axle ๐คทโโ๏ธ๐
Important question is what kind of licensing the mods can provide?
?? @queen cargo
this one: https://gist.github.com/X39/709ecbf88c5fda594586c9b995c8c6a0 @queen cargo
Yup
omg @queen cargo this is handy... may I use? https://gist.github.com/X39/42eddab99c71a488a410edc76d851cfc
Do as you like ๐คทโโ๏ธ๐คทโโ๏ธ ๐
Imagine if it took the draw tool from the map... dicks in the air lol
๐๐
pls tell me that is it possible. xD
It is
Though.. Not sure 100%
I would pay 0.01 for that.
You need the line Info
Before:
Enemies are here.. marked on map.
After:
Enemies are here.. marked in the air, with a downfacing arrow.
?
Good code or what?
I am on mobile
And will not judge at this time of the day
Hahah okay.
hint format["Wave %1.",_w];
[
["VR SYSTEM","Wave: %1.",0]
] spawn BIS_fnc_EXP_camp_playSubtitles;``` How can I get format to work with `playSubtitles`?
The above is an example, to show my expected results and NOT my attempt to solve. ^
is there a way to make a trigger, trigger allies to fire at you regardless of being allies but only in the vicinity of the trigger?
(i.e. I'm trying to make a game mode where I play as independent and only want enemies to fire at me when I'm in restricted zones such as bases, but not out in the streets)
or have them just enemies that don't fire unless fired upon until entering a restricted zone
@drowsy axle
for "_i" from 1 to 9 do {CAP_unit addItemToBackpack "1Rnd_HE_Grenade_shell";};
Can you explain the loop? Isn't there a way to actually tell the amount to be added beforehand by a func param?
@glad edge try making something like undercover mode from antistasi, if the player isn't wearing military gear and is far from an enemy base then change the side relations to friendly.
But I wanna run around with military gear and not get shot until I fire at something or someone
Excluding in bases, then just shoot me
@tough abyss is this feature open source? I want to add something similar in the future
ah sorry
I read "I try making..."
Ok then just check if the player is near to a mil base and then change side relations
implying that you are working on such a feature
@glad edge
sleep? we don't do that here
anyone know the function to cause blood to spawn under the player? working on bleeding script
brutality
what?
Sorry was just saying brutality... because it sounds brutal
not any contstructive info tho.. sorry
rip
yah trying to add a old school bleeding script to replace the basic and quite underwhelming one exile has built in
wanting to remake the one from arma 2
dayz*
Doesn't ACE3 medical has this?
thats ace
function to cause blood to spawn under the player?
This literally means nothing and everything
What exactly do you want?
blood decal underwater?
@frigid raven https://discordapp.com/channels/105462288051380224/105462984087728128/491657375967739904 Grab a AIO config. Just google "Arma AIO config" there is a BI forums thread with them uploaded.
https://discordapp.com/channels/105462288051380224/105462984087728128/491672145093591050 no it isn't. Weapons are CfgWeapons. Not CfgVehicles.
the document object is NOT added to my inventory BUT placed on the ground That's a special feature of CBA_fnc_addWeapon.
https://discordapp.com/channels/105462288051380224/105462984087728128/491678959541551125 yes. You cannot add vehicles to your inventory.
There are many CfgVehicle entries for items so that you can place them directly in the Editor. Get the classnames out of Arsenal instead.
https://discordapp.com/channels/105462288051380224/105462984087728128/491693699030450178 which doesn't even make any sense to check anyway. Because player is always object.
@unborn ether https://discordapp.com/channels/105462288051380224/105462984087728128/491710449826660375 yes. But "most" binarizers automatically detect that it has to be a string and add the quotes internally.
@drowsy axle https://discordapp.com/channels/105462288051380224/105462984087728128/491713738920165377 Huh? selectRandom is already only picking one of these
@frigid raven https://discordapp.com/channels/105462288051380224/105462984087728128/491713746167922688 just put it into a different variable.
_myStuff = _x;
Ignore the crap posted by Capwell. He mixed up left and right hand side when assigning variables.
@meager heart https://discordapp.com/channels/105462288051380224/105462984087728128/491726772547878926 findIf is intended to not make it iterate through everything. What you did is iterate through everything and then findIf again. Bad solution.
@drowsy axle https://discordapp.com/channels/105462288051380224/105462984087728128/491743317948628992 like any other return value.
private _var = <command>
https://discordapp.com/channels/105462288051380224/105462984087728128/491748158796333056 Are you drunk?
@tough abyss https://discordapp.com/channels/105462288051380224/105462984087728128/491751162001883140 not like we tried a dozen times.
https://discordapp.com/channels/105462288051380224/105462984087728128/491759990491709451 use private for your loadouts. Also do you really need to pack that into an array before execVM'ing? No actually you don't.
Also why execVM and wait? Instead of just call? That's kinda stupid
https://discordapp.com/channels/105462288051380224/105462984087728128/491843667703889933
Easier https://community.bistudio.com/wiki/backpackContainer https://community.bistudio.com/wiki/addItemCargoGlobal
for "_i" from 1 to 9 do {CAP_unit addItemToBackpack "1Rnd_HE_Grenade_shell";};
->
backpackContainer CAP_unit addItemCargoGlobal ["1Rnd_HE_Grenade_shell", 9] Much better to read isnt it?
Good morning ๐
What you did is iterate through everything and then findIf again ...?
you mean there ? > https://discordapp.com/channels/105462288051380224/105462984087728128/491726772547878926 ๐ค
there is only 1 findIf ๐
(allUnits select {side _x isEqualTo east}) and a select that iterates through all units
Just because it's hidden in a macro doesn't mean it's not there ^^
ok i see what you mean, better option for that ? ๐ค
keep both inside the findIf
kk
Okey.. Most bestest variant probably allUnits inAreaArray to grab all ones in distance
check there commented stuff... makro was just for readability
Aah okay
That makes sense
If there's no reason to save it into a variable, the best way to make big if statements more readable is macro
Never thought of it like that
But mostly you'd want as few loops and as few iterations in those as possible
(findIf >> side check >> inArea check)
Real question is
anyway that will be used in execVM'ed script in the forEach loop... just tried to make it a bit better ๐
Did you consider frinedly fire in this scenario?
What if a unit friendly fires, so their side is no longer east
Mr.@drowsy axle will answer that question, i have no idea tbh ๐
nigel, scroll up there was long conversation with few parts lol
@still forum you really took time to answer all of our stuff. You have to love us somehow... u just have to
Either that or do work.
Discord links donโt work in mobile app so no Idea what you referred to
Trying to get him to read wiki
Oh I see
https://github.com/acemod/ACE3/tree/master/addons My commit is everywhere MUHAHAHA
Your attempts are futile, pathetic humans!
you guys cry at night eh?
sometimes
but that is mostly related to someones xxx-life
or due to hellish dreams of SQF realms where in all eternity i will be doomed to serve to the hellish god of horror
Will I ever be a good coder?
How long have you been at this and how long do you expect to continue?
does someone here know a little about the insides of VCOM? I have a few questions about the flanking, call for reinforcements and the advancedmovement
specifically, if i set Advancedmovement to false, will that disable the call for backup as well?
rgr
if (count(nearestObjects [player, ["house"], 250]) > 0) exitWith {
hintSilent "too close to a house - 250m";
};
"Land_Pot_02_F"
why the hell is that pot detected like a house? :S
any trick?
Can't really think of anything ๐ค
thinking
check size of bounding box? If it's too small it's probably not a house
Depends if you consider a dog house or a garden shed as a "house"
can i get the class in someway?
1de999bc100# 1779935: pot_02_f.p3d
how to get only the model, or the class of this model
typeOf - returns config classname
oki, got it
sizeOf+typeOf maybe
bounding box solution would be universal though.
If you're using cba you can try https://cbateam.github.io/CBA_A3/docs/files/common/fnc_getVolume-sqf.html#CBA_fnc_getVolume
nope, pure sqf
or sizeOf as sldt1ck said, but sizeOf is inaccurate.
I'm not sure if it is consistent between objects.
private _nearHouses = nearestObjects [player, ["house"], 250];
if (count(_nearHouses) > 0) then {
{
if (typeOf _x != "Land_Pot_02_F") exitWith {
hintSilent "too close to a house - 250m";
};
} forEach _nearHouses;
};
works
on this map, in this place you're checking ๐
oh btw... maybe entities with base class and excludes ๐ค
it should be a then :p
probably will be really slow...
ยฏ_(ใ)_/ยฏ
If you're using cba you can try
nope, pure sqf
CBA is pure SQF tho..
Btw we have findIf for things like that
yush
you could check for the count of positions
pot wont have positions, but on the other hand it probably may malfunction if the houses around dont have positions either
in towns you shouldnt have a problem, that would only happen if you are somewhere rural and the only house around has no positions
@late gull
hmm ok, ty
most buildings do have positions though. i think even some of the ones you cant enter for some reason. but i dont know that for sure. i think in most cases you would find some sort of shed next to them, which then has a position...
so i guess if your plan is to avoid buildings, it might do the job in 95% of the cases....
but what's the problem with my solution code? :p
works too, but no idea if other items would pop up too
if thats the only one yours is fine ^^
if its more but rare cases, make an aray of objects
@peak plover Did you consider frinedly fire in this scenario? What if a unit friendly fires, so their side is no longer east Once a unit friendly fires. It becomes (sort of) civillian / rating = -1;sqf if (player rating =< -1) then { player addRating 999; };
It becomes side enemy
Nope.
What you can't do is change a unit's side at runtime.
Once the rating is above or equal to 0 then it "becomes" a friendly side again.
This can be seen in Zeus.
@still forum the for "_i"loop is the default export of Arsenal Loadouts.
Is the use of params okay here: ```sqf
CAP_fnc_removeAll = {
params ["_this"];
removeAllWeapons _this;
removeAllItems _this;
removeAllAssignedItems _this;
removeUniform _this;
removeVest _this;
removeBackpack _this;
removeHeadgear _this;
removeGoggles _this;
};
CAP_fnc_RIFLE_East = {
params ["_this"];
_this forceAddUniform "U_O_Protagonist_VR";
for "_i" from 1 to 3 do {_this addItemToUniform "30Rnd_762x39_Mag_Tracer_F";};
_this addBackpack "B_ViperHarness_blk_F";
for "_i" from 1 to 4 do {_this addItemToBackpack "FirstAidKit";};
for "_i" from 1 to 16 do {_this addItemToBackpack "30Rnd_762x39_Mag_Tracer_F";};
for "_i" from 1 to 2 do {_this addItemToBackpack "SmokeShellRed";};
_this addHeadgear "H_HelmetSpecO_blk";_this addGoggles "G_Goggles_VR";
_this addWeapon "arifle_AK12_F";_this addPrimaryWeaponItem "acc_flashlight";
};
CAP_fnc_RIFLE_West = {
params ["_this"];
_this forceAddUniform "U_B_Protagonist_VR";
for "_i" from 1 to 3 do {_this addItemToUniform "30Rnd_762x39_Mag_Tracer_F";};
_this addBackpack "B_ViperHarness_blk_F";
for "_i" from 1 to 4 do {_this addItemToBackpack "FirstAidKit";};
for "_i" from 1 to 16 do {_this addItemToBackpack "30Rnd_762x39_Mag_Tracer_F";};
for "_i" from 1 to 2 do {_this addItemToBackpack "SmokeShellRed";};
_this addHeadgear "H_PilotHelmetHeli_B";_this addGoggles "G_Goggles_VR";
_this addWeapon "arifle_AK12_F";_this addPrimaryWeaponItem "acc_flashlight";
};```
https://discordapp.com/channels/105462288051380224/105462984087728128/491921291943870474 yes and the default export is stoopid
I know.
that use of params is "okey" yes. But stoopid
What you are doing is _this = _this
Sure.. You can do that if you really want to... but..
๐
Then it will still be _this = _this
and if _this is not defined then _this will also be not defined
nil call CAP_fnc_removeAll
Maybe not doing anything is the intention here
was just a guess, couldnt check myself and its been some time ๐
[player] call CAP_fnc_removeAll; why though? Why put it in array just so you have to write extra code to take it out again?
player call CAP_fnc_removeAll; and just use _this and you're golden
Right.
Shame ๐
[CAP_Unit,_loadouts] execVM 'loadout\spawnedAI.sqf';``````sqf
params ["_unit","_loadout"];
_unit call CAP_fnc_removeAll;
if (_loadout isEqualTo "RIFLE" && ((side _unit) isEqualTo east)) then { _unit call CAP_fnc_RIFLE_East } else { _unit call CAP_fnc_RIFLE_West };
if (_loadout isEqualTo "UGL" && ((side _unit) isEqualTo east)) then { _unit call CAP_fnc_UGL_East } else { _unit call CAP_fnc_UGL_West };```
Would it be better to rename _this to _unit?
it would make it more readable yea
you can use _unit call CAP_fnc_removeAll once b4 the if's and remove it from there...
Yeah. You are right.
Just tested serverTime seems to be fixed
Does having something in the init.sqf make it available both server and client?
check this > https://community.bistudio.com/wiki/Event_Scripts
init.sqfsqf if (playerSide isEqualTo east) then {CAP_UnitSide = west;}; if (playerSide isEqualTo west) then {CAP_UnitSide = east;}; if (playerSide isEqualTo independent) then {CAP_UnitSide = east;};initServer.sqfsqf if (CAP_UnitSide isEqualTo east) then {CAP_UnitGroup = createGroup west;}; if (CAP_UnitSide isEqualTo west) then {CAP_UnitGroup = createGroup east;}; if (CAP_UnitSide isEqualTo independent) then {CAP_UnitGroup = createGroup east;};spawnedAI.sqfsqf if (_loadout isEqualTo "RIFLE" && (CAP_UnitSide isEqualTo east)) then { _unit call CAP_fnc_RIFLE_East } else { _unit call CAP_fnc_RIFLE_West }; if (_loadout isEqualTo "UGL" && (CAP_UnitSide isEqualTo east)) then { _unit call CAP_fnc_UGL_East } else { _unit call CAP_fnc_UGL_West };
oh crap... init.sqf Executed when mission is started (before briefing screen) < Event_Scripts page ๐
it runs on the server and clients
use initPlayerLocal.sqf
and initServer.sqf
initPlayerLocal.sqfsqf [ ["VR SYSTEM","Welcome to Wave Defence! Contact your Instructor to get your Loadout!",0] ] spawn BIS_fnc_EXP_camp_playSubtitles; //player call CAP_fnc_removeAll; //player call CAP_fnc_RIFLE_West; InstructorGuy addAction ["Loadout: Rifleman.",{ player call CAP_fnc_removeAll; player call CAP_fnc_RIFLE_West; }];
waitUntil {time > 2}; < better do not suspend init scripts
Okay
if you need delay there use spawn
waitUntil {time > 2}; < better do not suspend init scripts only really matters for postInit. The others atleast have no negative effects if they even let you slp
is that correct? waitUntil {(vehicle player) == player};
[] spawn {
waitUntil {(vehicle player) == player};
[
["VR SYSTEM","Welcome to Wave Defence! Contact your Instructor to get your Loadout!",0]
] spawn BIS_fnc_EXP_camp_playSubtitles;
//player call CAP_fnc_removeAll;
//player call CAP_fnc_RIFLE_West;
InstructorGuy addAction ["Loadout: Rifleman.",{
player call CAP_fnc_removeAll;
player call CAP_fnc_RIFLE_West;
}];
};```
if you want to wait till the player is not inside a vehicle.. yes
I think he wants to make sure player is pointing to the player
player in player
To be or not to be
I often ask myself if I exist, too
So it is a philosophical code expression which should not be judged!
waitUntil {player in player}; Would that work @meager heart
๐
waitUntil {vehicle player == player};
ftfy
ftfy?
fixed that for you
(isNull objectParent player) is a better way to do that
^ agreed
How do I set things up to be able to play a sound from a file?
I got it in the description.ext and using this addAction ["Play", {playSound3D ["sound.ogg", _this select 3]}, this]; says that Sound: Error: File: sound.ogg not found !!!
class CfgSounds
{
sounds[] = {sound};
class sound
{
name = "sound";
sound[] = {"sound.ogg", 1, 1.0, 100};
titles[] = {};
};
};
path to the sound file complete?
well it's in the mission root directory, that should work?
i guess then the path is correct yep
Maybe check wiki?
Sound file extension must be specified even if a config entry has none:
so it has to have the file extension
Read the wiki comments. To play mission sound files you have to do something else with the path.
theres something about correct path for custom missions
And even then, I would guess it suffers from the same issue as setObjectTextureGlobal has with mission paths.
ok it works now, thanks.
I'll send you the mission if I finish it.
i dont seem to be capable of creating some local markers via remoteexec
[_side,_unit] remoteExec ["fez\fez_AI_OPS\fez_OPS_Intel_Localmarkers.sqf", 0, true];
supposed to create some markers for players depending on their side
so for _side show a marker on the _unit
remoteExec looks fine, probably something wrong with the Localmarkers.sqf
i have a diag log in the beginning of that file but not even that shows up in the rpt
well there's your problem
Read the wiki comments. To play mission sound files you have to do something else with the path.
this
yeah I got it now
one second
Fetzen
I know whats wrong
what is it then?
_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
_soundToPlay = _soundPath + "sounds\monster_condom.ogg";
playSound3D [_soundToPlay, _unit, false, getPos _unit, 10, 1, 50]; ```
You're putting a file in there
remoteExec takes in function names
RemoteExec needs a function to be an actual function (defined in CfgFunctions and CfgRemoteExec), and not a filepath iirc
here's something that should work:
{ // execute the file here, with execVM or something } remoteExec ["bis_fnc_call", 0, true];
so for your example it would be:
remoteExec execVM ?
will try thanks
hmm but how do i pass the "_side" parameter now?
because i want to create those markers only on clients of a specific side
Why even pass a side parameter at all then?
You're already using remoteExec
Just remoteExec to one side only
I failed on declaring a sub-folder in my CfgFunctions. Can anybody tell me what the mistake here is:
class Scripts {
file = "Scripts";
class initEventsServer {};
class initEventsClient {};
class addPlayerActions {};
class addPlayerVariables {};
class initNpcs {};
class punishRenegade {};
class saveReputation {};
class Profiles {
file = "Scripts\Profiles";
class createPlayer {};
class addRegisterAction {};
class login {};
class playerLogin {};
class getPlayerProfile {};
class registerPlayer {};
};
}
wouldn't matter, it would still load just give a message in RPT
whats your full cfgFunctions config?
I also don't think cfgFunctions even does multiple file entries with extra subfolders
aka your nested Profiles class would not load
yea that is whats happening
only profiles doesnt load
well that I have to flat it out
@tough abyss so I do not need ; at the end of the class <funcName> {} ?
i meant you are missing the semicolon
You just have to move Profiles up a level
Then it should work
I don't think cfgFunctions have ever been recursive
@frigid raven The best way to nest CfgFunctions is to do something similar to this:
class CfgFunctions {
class DT {
tag = "DT";
class Systems {
file = "\yourServer\functions";
class yourFunction {};
};
};
};
You'll never messup anything in your mind.
"Subfolder" class should be at the same level and you should adjust the "file" value:
Are there any othjer damage systems other than ace3?
yes the vanilla one?
This one had its own medical system I think (name similarity is accidental) :
https://forums.bohemia.net/forums/topic/174404-veteran-mod-vtn-announcement-and-wip/
20x20km map of region of Russia
im sold
I'm sure if all of the stuff that is advertised is done, their workshop entry has 400mb ๐
theres probably like 20 dependencies so it adds up to like 30GB
Whats a good sizeEx to use?
Something something safeZone
You can find out how big the screen is
Setting the text size according to the size of the screen is good (for me)
Do you guys always make a ; on one-line expressions?
player addAction ["Show reputation", { [_this select 0, clientOwner] remoteExec ["X11_fnc_showReputation", 2]; } , [], 0.5];
for instance
I'd like to get rid of the ...remoteExec ["X11_fnc_showReputation", 2]; <<<
but wanna stick with the best practises
@frigid raven AFAIK using ; after the function return might give some issues, so using something like:
DT_fnc_someFnc = {
private _string = "";
_string;
};
Will haver issues (you might ask Dedmen for example, if its total true).
So usually I stick to syntax where {...}; and not {...;}; since your function actually will look like the last one (remoteExec usually returns "")
I do. Unless it's a return value or inside otherwise oneliners like your example
AFAIK using ; after the function return might give some issues, so using something like: no.
Well that's why I asked to confirm, I heard that wrapping return with ; gives some issues.
As a C++ programmer, missing semicolons haunt me in my sleep.
So I put them everywhere I can.
Hello, is there a way to skip loading time of a magazine? Not talking about reload time between shots, talking about reload time for the whole magazine. Adding something like Titan AA to a vehicle. It takes long time for it to be loaded, looking for a way to skip this, without having to use mods.
private _playerProfiles = profileNamespace getVariable [KEY_PLAYER_PROFILES];
Where KEY_PLAYER_PROFILES is from a constants.hpp file.
How can I have it be used like a string?
I actually defined it as such - but it is not used as one:
#define KEY_PLAYER_PROFILES "dpl_player_profiles"
@copper raven sorry did not read your question - did not want to interfere
@copper raven
https://community.bistudio.com/wiki/setWeaponReloadingTime
what about this?
Not talking about reload time between shots
How do I reference a mission in the server.cfg that is inside a mods addon folder?
AFAIK using ; after the function return might give some issues, so using something like: IDK where you get your "wisdom" but you're saying bullshit for another time. (remember remoteExec discussion?)
No hard feelings tho.
Had high hopes for that command when i saw it 
@copper raven
The description is confusing to me. What the command essential does is to set the reloading state/time of the given weapon. For example you can fire a missile, and make the weapon available to fire again instantly if you apply 0
thats what sb. tells about the mentioned function actually
and u demanded Adding something like Titan AA to a vehicle. It takes long time for it to be loaded, looking for a way to skip this, without having to use mods.
xetra, you're mixing syntaxes
@ruby breach tell me more wise one
getVariable is either a string, or an array w/ 2 elements
You can change reload time in a magazine between missiles with that command, but not reload time of the actual magazine itself.
ah ye sorry @ruby breach forgot about the default value
@copper raven ah ok - wow confusing stuff
It only works for me between shots, doesn't work for the magazine, tried it for 3rd time now.
Add 4Titan AAs(magazine: "4Rnd_Titan_long_missiles")
Command has no effect
After Titan AAs have loaded
Shoot
Command works, reload time 0
Can shoot again instantly
yeah. You start reloading and then run the command once you started reloading
which should insta finish the reload
Thats exactly what i'm doing. It has no effect, it only works when you run the command after firing from a loaded mag. When you add a mag through addMagazineTurret or so, that command doesn't have any effect on that loading time.
Tried emptying magazine after addMagazineTurret, then setting it back to 4, loading time was still persisting.
Donโt empty the mag, set ammo back with penultimate shot
Guys, anyone knows how to do a spark effect?
I have a dragon egg you need to collect, how do I make it kinda magical and make particles come from it
why
๐ฆ
๐
Dragon emoji
Want a pic of it?
THERE IS ALWAYS 18+ CONTENT
Dragon + ๐ ... ๐ค
Well you certainly want particle effects
But I don't know if there is already one that would do what you want
and particle coding is.... ugly
Particle config creation is the very best thing about arma
And I'm really upset that the one of the few things BIS is doing for DayZ modtools, is having a different particle editor
I found this one which is quite perfect but the problem is is that its's to big: https://forums.bohemia.net/forums/topic/175676-creating-spark-effects/
/s
I can't find any way to change the radius on it
So I thought maybe someone made a particle or can help me with making one
Well just making that existing one smaller is alot easier than making a new one
But I don't find any value to do so
If you're making a mod you can copy that thing in the forum and just make size or sizeVar smaller
Or reimplement the whole thing in script as a https://community.bistudio.com/wiki/setParticleParams
Which is the "ugly" part
Aren't size and sizevar only for the particle itself not for the radius?
How do I reference a mission in the server.cfg that is inside a mods addon folder?
@drowsy axle Let me see I dont this before
@drowsy axle I think it's in the server config file
class Mission1
{
template = "MyMission.Altis"; // Filename of pbo in MPMissions folder
difficulty = "Regular"; // "Recruit", "Regular", "Veteran", "Custom"
};
Here you need to change it
Oh. yes they are. Radius is more speed of particle and lifetime. And I think volume maybe?
@gleaming cedar I mean.
Dragon + ๐ ... ๐ค
Dedmen, when you see this kind of questionWant a pic of it?in the internet... there is so many options... ๐
Awwo
OwO
๐
Just kinda new to me that @meager heart knows ๐ค
I mean... I was there before your parents met, saw a lot ๐
@still forum are u actually a furry
lol
he used to be a werewolf but he feels better nowwwwwww
ouuuuuuwww
@gleaming cedar I might be able to make that particle params thingy for you tomorrow in like... 10-12 hours from now.
If I don't forget
Alright that is cool then I'll go catch some sleep soon
I been working on this stupid egg mission for over 12 hours now lol
And it's just one scene of the like 10
I have an underwater mission which sharkes which I need to give a new AI path
there was some "particles effects editors" on bif, maybe you can try those
@copper raven no
good morning dudes and dudettes and those not sure yet
dudettes lmao
Maybe someone can point me in the right direction.i made a vehicle claim / locking addon.i set an inventoryopened eventhandler to lock inventory also and this works fine.but: if you would have a groundholder next to the veh you can access its inv by selecting the crate inv on the top left.anYone an idea what to do about this?
does it happens on every vehicles ? even vanilla ?
Yeah even containers.my plugin makes some lockable.
Is there a way to make an UberAddon ? I want to put my Mod plus ALiVE, CBA and ACE3 into one downloadable addon. I am aware of the problems with not having the actual versions of mentioned addons.
Just want a way to let ppl not think "omg this server is full of addons I do not know I won't join this"
Sure.. Just put them into a single folder. done.
๐ฎ
all the pbo's into addons folder. And the other stuff into a single @mod folder.
But you cannot reupload to steam workshop or anywhere public
I see
so I can have my 10 @mod folders merged into one and ppl only see this one "@ theOne" addon when joining or browsing eh?
will the Arma 3 Launcher still realize what to download?
Or will it download a new addon called theOne
Arma 3 Launcher won't be able to auto-detect or download anything
As it can only auto-detect workshop mods. And only download from workshop. And as you can't reupload your pack to the workshop that won't help you.
I see
But it isnt impossible to load it up to steam however eh?
I want it to be available on steam, too somehow
like a addon called "Xetra11s CoolMod Package"
you can
But you risk getting your steam account banned. And getting banned from this discord as soon as someone finds out
soooo.. Bad idea.
Just use A3Sync dude
have you ever tried some oop on arma 3 ?
did I miss* something maybe? https://discordapp.com/channels/105462288051380224/105462984087728128/492240925028909057
Yes I tried oop in Arma. Intercept ๐
thats interesting, did you ever wrote something about it ? I would like to see how it works :d
It's on GitHub
@still forum can you enlighten me? What would be the reason for banning if I pack addons to one file addon for convenient reasons?
@frigid raven dude use A3Sync and avoid problems
U dont get the point. I have a bunch of whiney buddies who wont join my friggin server if it is filled with more than 5 addons they don't have yet
I wanna decrease their cryation by offering just one addon
so their little hearts won't break
Can't you just create a collection? Then they hit one button to get the addons.
Ah okay
Well that sounds like what I wanted to achieve
Why is a guy called @fringe yoke needed to direct me to that solution? why
Why not? ๐
You ask the important questions bud
Is it possible to kinda create a collection out of four addons and one map tho? ๐
I mean - Steam does not make any differences what kind of workshop items are uploaded eh?
w/e just gonna try it
@frigid raven What would be the reason for banning #ip_rights_violations
collections are just... collections of whatever workshop items you want
They are basically just a list of items
kk
As soon as you break out Arma 3 tools to upload someone elses mod to the workshop you become a topic in #ip_rights_violations
Is to create you mod preset (a mod with nothing in it)
And add all the other mods as requirements for it on steam
Using your preset
A collection is not a preset. A collection is just a list of mods. You have to manually enable the right mods in the launcher
You can clikc subscribe to all dependencies
๐ค
A preset defines which mods should be enabled so you don't have too many or too few and the right ones activated.
alright then
But since almost no "organisers" bother to make presets, I use my own tool that takes a url to a steam collection and generates the preset file for me.
https://steamcommunity.com/sharedfiles/filedetails/?id=751965892
You see the required items?
You can make an empty mod
And add as many required mod as you want
When you then load this mod in arma 3 launcher
It will prompt you about subscribing to all required items
@errant jasper That seems like a good solution
I had a power shell script which downloaded mods and copied keys from the steam workshop. Only thing I had to change was 1 file with a list of steamworkshop IDs
For server
I'd really like that Bi made some decent implementation before the end of life for arma 3
@peak plover ah alright. That seems to be the way I gonna go
Bi should really make both client and server side of things work flawlessly, it's not like the technology isn't out there
Yeah, they should. My tool is a tiny web application so everybody can get the preset. Basically you give a link to my tool where you appended the steam collection url. To sharing the "collection" as a preset was simply sharing a url.
Don't understand why they even bother using "only" the steam query language, when it is unsuited for servers with more than a dozen mods.
I cant see how the above is scripting related but what i can say is my question was...
Meant the steam part obviously
Well guys ill ask the direct way.
Is there a way to lock access to groundholders near a vehicle or to a vehicle when near groundholders?
if you're able to lock a vehicle then you should be able to lock the groundholder, right?
using the same inventory EH
you cannot "lock" but you can immediately close again on inventory opened EH
Well i closedisplay (i think 602) when a variable is on the vehicle right now.
But if you access a groundholder next to the locked vehicle and select crate on the left list it will be accessible through this
It works for the vehicles inv but then again not with the groundholder "trick"
Looking for #LUA scripters working to work current Logitech mouse script, payment will be handed. PM me if you know LUA.
serious?
@still forum Hey fake furry man I was wondering if you tried to make the spark thingy
๐
Ah yes. I'm having fun reading reddit right now tho. I'll do it on the side and see when I'm done
particleSource setParticleParams
[
[
"\A3\data_f\ParticleEffects\Universal\Universal", /*String*/
16, /*Number*/
13, /*Number*/
2 /*Number*/
],
"", /*String*/
"Billboard", /*String - Enum: Billboard, SpaceObject*/
0.00025 //timerPeriod is this correct? Interval?, /*Number*/
0.15, /*Number*/
position, /*3D Array of numbers as relative position to particleSource or (if object at index 18 is set) object.
Or (if object at index 18 is set) String as memoryPoint of object. ## Modify this##*/
[0,0,1], /*3D Array of numbers. ## Modify this##*/
1, /*Number*/
1.275, /*Number ## This is weight of the particles. You might wanna modify this to change effect*/
1, /*Number*/
0.08, /*Number*/
[0.2,0.2,0.2,0.2,0.2,0.12,0.12,0.12,0.12,0], /*Array of Number ## size over lifetime*/
[
[ 1,0.6,0.6,-10 ],
[ 1,0.6,0.6,-8 ],
[ 1,0.6,0.6,-6 ],
[ 1,0.6,0.6,-4.5 ]], /*Array of Array of RGBA Numbers ## color over lifetime*/
[1000], /*Array of Number*/
0.5, /*Number*/
0, /*Number*/
"", /*String*/
"", /*String*/
this, /*Object ##change this##*/
0, /*Optional Number - Default: 0*/
false, /*Optional Boolean*/
0, /*Optional Number*/
[1,1,1,0] /*Optional Array of Array of RGBA Numbers ## you can modify this to make the sparks emit light in the dark*/
];
I think that should do it. Pay attention to all the things that are marked with ##
position and object(this) I've left empty
Have fun spending hours messing with this till either it looks like you want it to, or it suddenly doesn't work at all anymore
(what does it do?)
what does what do?
the particleSource you posted
one way to find out
Oooh
Thanks
This gives me an idea
I just #ip_rights_violations your ideas guys.
Now it's my ideas
I think I should re-design my apartment in hello kitty style.
I think that's a nice Idea
#offtopic_homeimprovements
you're not allowed to talk in that channel unless your nickname is "Tim Allen"
Well kiddo
well I dont know what a spark effect is lmao
Dedmen: I think I should re-design my apartment in hello kitty style. what year is it? is this #arma3_scripting yet, or we got too much ๐ correct?
As you might've overread. This is #offtopic_homeimprovements now
@still forum ah so you think you are the big boss here who can define room-names or what?
oh noes
No @tough abyss did it
Hello. Did anyone try adding larger images into a adv hint?
looks like they are hardcoded to icon size
this always was #the_somewhat_scripting_related_offtopic_channel
@calm bloom default max size for the "adv hints" pictures is 256x256 and they will be scaled to feet ui size, make your own version of it if you want it bigger ๐ , that is just couple controls with key down eh...
yep it is. Its just a matter of time spend
<img image='\pzn_sfx\controls_ru.paa' width='314' align='center' />
haha, that one in text made it like 16x16)
iirc \a3\ui_f\data\gui\cfg\hints\ < default images (not 100% about the path), use one of those maybe...
ui_f_data or ui_f\data ๐ค
@still forum Thanks just got home from school
I am having trouble getting it working
@still forum particleSource setParticleParams [ [ "\A3\data_f\ParticleEffects\Universal\Universal", 16, 13, 2 ], "", "Billboard", 0.00025, 0.15, this, [0,0,1], 1, 1.275, 1, 0.08, [0.2,0.2,0.2,0.2,0.2,0.12,0.12,0.12,0.12,0], [ [ 1,0.6,0.6,-10 ], [ 1,0.6,0.6,-8 ], [ 1,0.6,0.6,-6 ], [ 1,0.6,0.6,-4.5 ]], [1000], 0.5, 0, "", "", this, 0, false, 0, [1,1,1,0] ]; I paste it like this in the init of the egg
I get nothing ๐ฆ
I paste it like this in the init of the egg uhhh.. no
I guess the left side argument is undefined?
probably not created ๐
default value of what toFixed <scalar> is set to, anybody?
6 probably
Wiki says str pi; //"3.14159" - 6 significant figures (default)
However it also says that default would output [11580.3,11797.7,0.00146675] And 0.00146675 definitely isn't 6
Also Arma's default string conversion limits numbers to 6 significant figures
0.00146675 is 6 Dedmen
00146675 ๐ค
Yeah
So 0's don't count?
I guess
So what's with 0.000001234 ?
Yes. Just checked
https://s.sqf.ovh/ida64_2018-09-20_18-56-58.png here. Proof.
Have fun
Yes the printf is missing parameters I know. a4 is the number and v6 is the toFixed value
@still forum You mean like this?
this setParticleParams
I don't know what left side means ๐ฆ
this setParticleParams [ [ "\A3\data_f\ParticleEffects\Universal\Universal", 16, 13, 2 ], "", "Billboard", 0.00025, 0.15, this, [0,0,1], 1, 1.275, 1, 0.08, [0.2,0.2,0.2,0.2,0.2,0.12,0.12,0.12,0.12,0], [ [ 1,0.6,0.6,-10 ], [ 1,0.6,0.6,-8 ], [ 1,0.6,0.6,-6 ], [ 1,0.6,0.6,-4.5 ]], [1000], 0.5, 0, "", "", this, 0, false, 0, [1,1,1,0] ]; I now do this still nothing
I do a little bit here and there
What is that code, intercept?
what code?
that's SQF. Particle params.
And someone failing to use
```sqf
```
properly
No in image
ok ... sqf-vm will just use 6 and not handle unset tofixed ๐คฆ
The image is secrit
sqf-vm
So?
alt. syntax allows to change output length of str
also, default length simply is important for equality re asons
though ... in this case just fuck it ... if one not parses numbers proper anyways, they are fucked on a different level ๐ ๐
Use sprintf with "%g" for default
Then it will convert to scientific notation exactly when Arma does it
nah ... will leave it like this
std::stringstream sstream;
sstream << std::setprecision(decimals) << mvalue;
return sstream.str();
Otherwise "%0.Nf" where N is 0...20
Ok, I thought the idea was to mimic Arma behaviour, no worries then
yes ...
what is C++ code doing here?
SQF-VM
c++ code has many reasons to be here.... Although... I can only really think of 2...
when someone writes it ๐
can't wait for all my knowledge on SQF to be thrown into the trash because it's the only language i know
I gonna use SQF as a transition to get into the C++ world ... I started with C++ but never had a real usecase writing it
Now the time has come
Now... finally
Use Intercept to combine your SQF knowledge with your C++ knowledge ๐
It's a Arma SQF SDK essentially
So all teh SQF stuff is there available as C++
n-ice
think gonna swap to it when my mod has reached the first MVP
btw does intercept allow stuff like extensions do?
like calling a REST-API on a remote server application?
sure
sw33t
you can do everything a extension does
plus full SQF availability on top
you can also implement your own SQF commands :3
who forged this piece of gold?
godlike
tbh I am glad to land here and the arma 3 mod stuff. I was always looking for a way to get more active on open source stuff over the years. started to join the rust community in the Chaos Computer Club in Cologne, Germany - but well. This shit was way too advanced for my trainee developer brain
Now I have finally reached a progress boost it development thx to arma scripting
are you CCC member? I always wanted to but never found the time
I also took off when I started work on TFAR. Before I was mostly doing stuff for myself
Nah there is no real membership - but I live in Dusseldorf and my friends live in Cologne so I have major CCC spots around and often visit for talks or when I am drunk roaming around cologne ๐
Yea - I asked sb. and his response kinda told me u are a member as soon as you show yourself often enough
You can just walk in the CCCs
and sit down the couch and start hacking stuff
I visit the coworking spaces there often when I start tinkering on my microcontrollers tho
tools everywhere free for use โค
love the IRC room entering device on the door that tells how many people are in the CCC actually via an IRC bot xD
@Dedmen so with Intercept could I use some 3rd party C++ libraries? (SQLite, etc.)
yeah sure
Sweet
you can make SQF commands to directly issue SQL commands from SQF scripts
Only real downside is no battleye support (yet). So if you are trying to do public server clientside stuff that's kinda bad
But in my milsim group everyone runs intercept as we don't use BE ^^
Well it's a mod
ah...okay ๐ฎ
There is the host mod. Which is basically just a library like CBA.
And then you make your own mod with a Intercept plugin.
The host mod is basically just a bridge between your plugin and Arma itself
ah okay
lbAdd
fast check ๐
Hey guys. I got an error. https://gyazo.com/c144acf355c101e8c8207ae2e0dbf76d 0x0000DEAD With the error popup as too many virtual blocks requested.
Any solutions?
or just google.com
command to get all connected players?
Allplayers
allPlayers
:^)
Will also return headless clients tho.
wtf I googled for that
Google powerrrrr
(allPlayers - entities "HeadlessClient_F") or [] call CBA_fnc_players to get only Huuumen players
Bots are humans too V >:(
These will be players joined mission though not connected to the server
The two go hand in hand. There is no reason to count those in lobby
As they're there temporarily
#define ALL_PLAYERS (allUnits + allDeadMen) select {isPlayer _x && {!(_x isKindOf "HeadlessClient_F")}}
//or
#define ALL_PLAYERS ((allUnits + allDeadMen) select {isPlayer _x})
โ
@tough abyss @meager heart It was to do with my codes
Yeah..
What code?
Ah wait lemmie look in my crystal ball
lol
Nope one sec
Here it is. All in one place. https://github.com/AxeriusNetwork/EC-Public/tree/master/WaveDefense.VR
I had a look through it. Seems legit. However, I'm unsure about the call CAP_fnc's
Ah wait... Would this: https://github.com/AxeriusNetwork/EC-Public/blob/master/WaveDefense.VR/init.sqf ```sqf
InstructorGuy addAction ["Loadout: Rifleman.",{
player call CAP_fnc_removeAll;
player call CAP_fnc_RIFLE_West;
}];
InstructorGuy addAction ["Start Next Wave..",{
sleep 2.5;
CAP_StartWave = true;
playMusic "LeadTrack01_F_Bootcamp";
}];``` Has anything to do with my crashing, as the functions aren't read yet.
allPlayers - array
Right yes it is
Thanks
also why not just cfgFunctions ?