#arma3_scripting
1 messages · Page 538 of 1
What about variables?
If you are overloading ram, then that has nothing to do with your while loop itself
it's caused by your stuff being badly written code
probably I was too stupid and it wasn't ram that was overloaded
You should put sleep into your while loop to improve your performance (less fps-loss)
I didn't mean to tell that sleep should make it last forever 😃
while true without sleep will execute as many iterations as it can until it hit's the 3ms limit.
while {true} do {
missionNamespace setVariable ['ten_var_' + str (random 10^10),random 10^10]
};
Can variable overload ram?
think so yes
So if you don't want it to iterate multiple times per frame, you should add a sleep
Thanks guys 😃
waitUntil only does it once a frame :^)
I just made 2m variables and only went up like 200 mb in task manager
It just wrote to pagefile after a while
😢
You probably can abuse the CPU or GPU faster
Enter some good smoke effect spawns there
Can variable overload ram?
Now do the same with profileNamespace only add saveProfileNamespace
I wanted to show a player's health % in the bottom right corner of the screen. But it looks that titleText somehow doesn't apply Structured decoration. Plus I don't really get how to place it by x/y coordinates. While animated text functions are just too much animated for this. Any suggestions? Thanks!
Interestingly enough [_stringHealth-1,-1,0,1,0,789] spawn BIS_fnc_dynamicText; puts animated text to the center of the screen, while changed to -2, -2 for x, y completely removes it from the screen.
Any way to implement a dictionary in sqf without cba?
i.e. any nice small addon scripts written efficiently
Is it possible to make a mission with only triggers and no SQF’s?
I’m new to coding completely and I’m making a mission, sooo I’ll probs need a crap ton of help x3
i'm up to help
I mean all I know is switchmove and setpos
yeah arma's interesting
because most programming languages you ge tstarted with the basics first
but in arma you're like 'i want to do something'
so you ge tsome code, have no clue how it works but slowly over time begin ot understanding
wow my spelling
Yeah that’s what I did with html
same
it's all copying and pasting
i still have to look up the
what is it
<!DOCTYPE html>
Any nice way to create and spawn compositions?
without manually entering positions and configs
@tough abyss so how can i get a Target Lead Indicator for other vehicles?
im having an issue where players get kicked from the server as they should for being idle in role selection for too long, but cant connect for 10min afterwards. i dont have that set to be that long anywhere but its happening. this is what is in my server.cfg
kickTimeout[] = { {0, 300}, {1, 30}, {2, 60}, {3, 0} };
votingTimeOut[] = {60, 90}; // Kicks users from server if they spend too much time in mission voting
roleTimeOut[] = {90, 120}; // Kicks users from server if they spend too much time in role selection
briefingTimeOut[] = {60, 90}; // Kicks users from server if they spend too much time in briefing (map) screen
debriefingTimeOut[] = {45, 60}; // Kicks users from server if they spend too much time in debriefing screen
lobbyIdleTimeout = 300; // The amount of time the server will wait before force-starting a mission without a logged-in Admin.
Hey all! I've got a problem with the revive system. I'm one of the Devs on Dynamic Bulwarks and we have a system where if you're carrying a Medikit you get automatically revived. The way we're doing this at them moment is terrible. We're just using a script in a loop to check if any players are unconscious and if so the script revives them. This leads to weird things like players stuck in the revive animation and stuff. I'd much rather handle this with and Event Handler. Any ideas? I can't find any events connected to the revive system. Is there any way to use the "hit" or "dammage" events to detect if the player is about to die? Then I can just make them play an animation instead of going into the revive state or something.
Actually, I think I have it figured out using handle damage.
@plush oriole Any way to implement a dictionary in sqf without cba? you mean a string->value map? Just do it the same way CBA does it
Yo, anyone able to look at my script in DMs and see if its all correct?
And possibly help me with a trigger script
How do i do sleep commands in a trigger
and if i cant
How do i make it into an sqf or something so i can execute itttt
"
why not just ask everyone in here
Ill paste it here
and take the answer from the first guy that finds time to look at it
This is already SQF?
No
Looks very much like SQF to me
Like when i put it into a trigger
it doesnt work as intended
the sleep commands dont work
the [pos] is weird
Yeah im gonna put the positions in
Yes. As I said, put it into a spawn
Where?
And then do i just paste that into a trigger? or into a SQF
Trigger code IS SQF
Ok so i just paste it into the trigger
Doesn't matter where you put it. Works both ways
Let me try that gimme a momento
Sorry
Didnt work @still forum
Hang on ill just paste the whole thing how i have it set up in the trigger
I have the condition set to this
Hi! Am I getting it right, that if amount of damage coming is something like 1.83398e-006 it does not kill unit because it hits some HitPoint that is not lethal?
It is very very very low value, almost 0
how come? it looks like "one-point-eight" while setDamage 1 kills everything
Google scientific notation
Oh, it's because of -
Got that, thanks.
Next question: if I want to simulate more simple damage model, will it work if I will gather every HitPoint damage, nullify it and apply 0.02 to body?
Probably not, some hit points depend on other hit points
Oh noes.
Hmm, I can still nullify everything if I'll have a list of all HitPoints
Or I can setDamage 0 and then wound a body hit point with 0.02 if it wasn't a body
Smells like XYProblem http://xyproblem.info/
this is actually bugging me so much, I spent all day working on this
Well, I want to simplify a damage model for a player and show his Health 😃
And thanks for the article, it can fix some things both inside me and around
Nothing i do seems to work for some reason and i put the spawn in it
Put in it [] spawn {hint "triggered"}
Do you see hint?
I tried that
It wont even play
I put it all in the trigger
Hint doesn’t play
No I mean like
@tough abyss explain how exactly it doesn't work
I put spawn in my code
It just wont, like it wont put anything in the animation
when i test it
If the code doesn't execute at all, then that's not the codes fault
Do what I said
add systemChat or hint's into code to see if it's running properly :u
Oof... So.. Every player will setPos these units, meaning you maybe get a dozen setPos per thing.
Also every player will start the animation, so it might flicker around.
Also every player will try to switch into "Main1" but only one player can do that.
Is this a singleplayer mission?
Yeh
We don’t know even if the trigger triggers
It does
But you say your code doesnt run
it ran before all this
but did everything at once
because sleep doesnt work
add systemChat's to your code, to check that each line actually runs as you expect
Atleast I hope systemChat will show up in SP?
If it is not disabled
it does unless its running before its not loaded
dont spawns in triggers complain if you dont assign a var when you execute it in triggers or did they fix that
yeah maybe
kerc i believe you do still have to assign handles
'nothing expected but returned handle' or something like that
Any way to add folding settings to an extension in vs code?
so i can do something like #region #endregion to have a foldable block, like an if statement
i need to configure the language, but it's from an extension
hello
If I got a sqf file which contain inline functions.
If I dont call this sqf file, can I use theses inlines functions ? are they compiled at the connection ?
compiled yes
but they are not put into a global variable if you don't execute the script that puts them into a variable
Oh okay so I have to execute the file, thanks
@plush oriole make it catch this:
//#region
//#endregion
yep just did a config
Nothing - This syntax does NOT return a unit reference! In order to reference this unit, you can use newUnit = this in the init field. If the target group is not local, the init script will only execute after a slight delay; see Killzone_Kid's note below for more information and issues about this syntax.
does this mean in order to get a reference to a created unit, it has to be part of a group
ah nice you don't need a unit to create a group
disableCollisionWith Isnt working for me
Like the breaching animation doesnt start right away so the units get pushed around and the command isnt working
@tough abyss in multiplayer, or even in the editor?
Singleplayer
[Flashbang, Doorman] remoteExecCall ["disableCollisionWith", 0, Flashbang];
So im just gonna put that into the trigger
and see if it works
Remote exec is called remote because there are local and remote PCs on network. In single player there is only local PC, what do you need remote execution for?
Well that's what I saw on the wiki
So you know the breaching animation how they all have to be in the same spot right?
They spawn in and then it takes a second for the trigger to activate
There is lots of other code on the wiki too
So they move about
Like how do I make it so they don't move about, Do i have to put something into the Init sqf>
Besides the JIP param in remote exec in SP is utter nonsense
Well I dont know that, its just the disablecollisionWith isnt working for me
Basically Im trying to get the truck to pull up then the trigger to activate
Would anyone happen to have a script that forces a player to drop their bag if they have a specific item in their loadout? I have put together the little bit below and while it doesn't produce errors, it also doesn't drop the bag.
_recentlyDeceased = getUnitLoadout player;
if ("SatchelCharge_Remote_Mag" in _recentlyDeceased) then
{
_gwh = "Weapon_Empty" createVehicle position player;
player action ["DropBag", _gwh, typeOf unitBackpack player];
};```
However, the section below when run on it's own, drops the bag regardless of present items since it isn't checking for anything.
_gwh = "Weapon_Empty" createVehicle position player;
player action ["DropBag", _gwh, typeOf unitBackpack player];```
So, I'm thinking its something that I'm formatting wrong with the if portion but I can't figure out what. Any ideas? Feel free to ping me if you have something.
use magazines player instead of getunitLoadout
getUnitLoadout is array of arrays you query just 1st dimension, so it never finds the item
So in an sqf file do i have to define what the varible name for what it is ingame?
Or can i just put the name of the unit into the file and it will run
maybe im just too dumb to understand this all
So once i've done
if (triggerActivated trg1) then {
execVM "setpos.sqf";
};
In init.sqf, In the setpos.sqf I put this
Flashbang setpos [3255.19,6746.35,0.160004];
Deadman setpos [3255.08,6746.5,0.160004];
Guard setpos [3255.19,6746.35,0.160004];
Doorman setpos [3255.18,6746.35,0.160004];
Is this ok? Is there anything I need to add?
"So in an sqf file do i have to define what the varible name for what it is ingame" no, you do that in editor already
"Or can i just put the name of the unit into the file and it will run" the name of the unit IS the variable
"So once i've done " where do you put the code?
"in init.sqf" no that won't work
you will check once if the trigger activated at mission start. The trigger won't be activated then
and then you check never again
You should run the code from your triggers onActivation field, that's how it's supposed to be done
@ivory lake @tough abyss Thanks!
Oh, alright. i'm just still dealing with a couple problems which i have already put on the forums, so I wont bring them up here but thanks
What happened to the troubleshooting we tried to do before?
Well
where we told you to add systemChat's, you never came back
nononon
the trigger works
Im having troubles with the collisions
Like you know how the breaching animation requires all four to be in the same spot, the trigger doesn't activate fast enough to stop them from being pushed
disableCollision only works for physics objects afaik
human players aren't physics
Ah no. it was opposite.
Did you read the wiki page?
https://community.bistudio.com/wiki/disableCollisionWith
you did a remoteExecCall before (the call part is nonsense but it doesn't change anything here) but in singlePlayer, you don't remoteExec, there is no remote.
Yes I did, im just trying to wonder if there is a command to stop them from colliding
I've looked pretty much everywhere
just remove the remoteExecCall
because it's singleplayer
so it gets confused (non technical :D) when you try to do it in singleplayer
if the mission is planned to be MP, use remoteExecCall though. but if testing that in singleplayer is not working, your problem is elsewhere
yes
Huh, I think i managed to figure it out
Do you need a camera for the cinematic borders to show?
wait nvm scratch that think i found something
Thanks boys
Guys, what is the difference between a hit point and a hit selection? And also a hit index o_O
hit index is when a bullet hits a finger
Oh, yeah
afaik, selection is a 3D model part's name, whereas hitpoint is the "generic" name (such as rotor, hand etc)
it is better to use hitpoints now.
Got it, thanks
which do you prefer,
myVeh getHit "velka vrtule"``` or ```sqf
myVeh getHitPointDamage "HitEngine"``` ? ^^
I was accustomed with mala vrtule not so long ago, so i'm kinda ok with both!
you were supposed to destroy them, not join them!!
%)
mala vrtule gang
ok so it appears addAction does not work on vehicles with hideObject set to true
but this isn't documented so it may just be my own personal frickery
if you hide, addaction, then unhide them does the action appear afterward?
'ang on i'll test
wait do you mean the otherway around
i.e. hide after doing addaction
neither hide then addaction or addaction then hide wor
work
can't see action
addAction is the only purpose is to ADD action. Is the action added?
what
well
the point is there appears to be undocumented behaviour where hideObject also hides actions
Does it return action id that is not -1?
and it doesn't work either way round so I assume it's just hidden
yeah i'll check
0
but this is addAction, then hide
so hiding makes no difference?
ok so it appears addAction does not work on vehicles with hideObject set to true
Incorrect assumption?
well i don't know
if it looks like a duck and quacks like a duck it is...? Well I dont know
what
when it's visible, actions work. when it isn't, addaction returns a valid id but aren't visible
really? why would you expect it appear on invisible object?
i don't know
it could have been either way
it's because scripted satchel charges appear not to have any hitbox so adaction doesnt work
so i need a helper
ok
Does anyone know of any way to keep actions visible and usable on a hidden object?
none of the 'invisible' props are the right size
Wouldn't "variable name" addAction "Custom action name", "abcdefg.sqf"; work on any object even invisible?
nope
or at least not in my experience
well
it works and adds the action but the action isn't visible
Ah and it's on an object that is invisible correct?
Have you tried adding an action while in a certain area
unfortunately it's moving
basically it's a helper object, because the actual object is a scripted satchel charge and its hitbox doesn't seem to be large enough to aim at for an action
@frozen oar
Syntax: object addAction [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious, selection, memoryPoint] Parameters: object: Object - unit, vehicle or static object <---------------------------------- OBJECT
https://community.bistudio.com/wiki/addAction
Yeah doing of the top of my head
Currently at work 😅 so I don't have my files in front of me
Also, I'm new to writing scripts in. Sqf files. So take a pinch of anything I say as it may not all be true exactly.
We have all been there this is why wiki is your best friend
Does the breaching animation support the force weapon fire command?
Like some animations allow and dont allow firing
hmm
whilst playing them
Deadman ForceWeaponFire ["weapon_arifle_MSBS65_F", "Single"];
so the best way to find out is a little advanced but check the config files via the config browser
Would that work?
Promet 6.5 mm
well weapon_arifle_MSBS65_F needs to be replaced with the muzzle name
you're telling the game which of his weapons to fire
So where would you find the muzzle name?
currentWeapon
should be it
or just use fireAtTarget
which doesn't actually move where the unit is aiming
afaik
So I would just put
Deadman ForceWeaponFire ["currentWeapon", "Single"];
no currentWeapon is a command
currentMuzzle highly recommend using a page like https://community.bistudio.com/wiki/All_Arma_Commands_Pages
oh yeah currentMuzzle
So where does it print what the muzzle name is?
Well i assumed that
if you do currentMuzzle unit, it returns unit's current muzzle on thei rcurrent weapon
so something like Deadman ForceWeaponFire [currentWeapon Deadman, "Single"];
_muzzle = currentMuzzle player;
Wait wouldnt that be currentMuzzle Deadman? or CurrentWeapon Deadman
nice
Pretty sure it doesn't work indoors
why not?
likeIntersects doesn't work indoors, pretty sure checkVisibility also always returns 0 indoors
But not sure on that, can't test rn
likeIntersects doesn't work indoors
Huh? Which likeIntersects?
lineIntersects 🙄
Any way to more directly force ai to drive a certain way
other than that command wher eyou record and play back movement
i'm setting up a checkpoint and when the bar gate is closed, they'll happily go through both bar gates, but when i open the gate they invariably go all the way around, normally crashing into something on the way past
@plush oriole https://community.bistudio.com/wiki/setDriveOnPath
that 's exactly it
thankyou so much
how did i not find that
and it will make them drive through or over anything in their way?
no pathfinding?
and presumably it's based on unit speed setting
you could give a set of waypoints to your group
hmm setDriveOnPath doesn't seem to do anything
i've turned the vehicle's engine on
tried with various targe tpoints
ooh maybe there has to be multiple points
im having an issue where players get kicked from the server as they should for being idle in role selection for too long, but cant connect for 10min afterwards. i dont have that set to be that long anywhere but its happening. this is what is in my server.cfg
kickTimeout[] = { {0, 300}, {1, 30}, {2, 60}, {3, 0} };
votingTimeOut[] = {60, 90}; // Kicks users from server if they spend too much time in mission voting
roleTimeOut[] = {90, 120}; // Kicks users from server if they spend too much time in role selection
briefingTimeOut[] = {60, 90}; // Kicks users from server if they spend too much time in briefing (map) screen
debriefingTimeOut[] = {45, 60}; // Kicks users from server if they spend too much time in debriefing screen
lobbyIdleTimeout = 300; // The amount of time the server will wait before force-starting a mission without a logged-in Admin.
do they get a different error if they try to connect within the time they're kicked for
i..e after 300 seconds or whatever does it switch to a different error message
message is the same. "the way the server is setup you can not rejoin for x seconds" or something like that. Ive been kicked for idle too long. just says 600 seconds soon as im kicked and it takes that long to get back on.
Could someone possibly test setDriveOnpath how they expect it to work
I can't get it to do anythinf
thing is i'd expect it to do something anyway
yeah
well i've tried getPos player, [0,0,0], getMarkerPos
and getMarkerPos is the example, so I assume it works with a z coord of 0
yeah seems so 🤔
how are you using the code? for a Player or Ai
How would I get this eventhandler to work with my character class? Would I just add it to class eventhandler? Or do i need to do it a different way.
I'm trying to get it so when the Spartan picks up a weapon it will get replaced with one that is compatible with the Spartans skeleton, which is not the same as the arma skeleton. I made a second weapon class and added spartan to the end of it, which has the new handanim for the new skeleton.
player addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
if(_item == "OPTRE_SRS99D") then {
player removeWeapon "OPTRE_SRS99D";
player addWeapon "OPTRE_SRS99D_Spartan";
}];
well you need closing curly braces for one thing
and i'm not sure whats going on with that indentation
but yes
yeah then { never closes
if (((toLower (typeOf _unit)) find 'spartan') != -1) then {
// unit classname has spartan in it
}
That's how you can find out if the unit that picked up the goods was a spartan
The best way to do it is just add the class EH with cba XEH
okay, thanks i'll try later when i get time.
oh my god
setDriveOnpath needs two points at least
and it does not mess around
civilian vehicle goes over two fences at top speed, then screeches to a halt literal centimetres from the barrier gate
Hey, how or where can i look up what these Macro's do in the Ace Mod Code on Github . f.e. :
[_unit, !_unconscious, 10e10] call EFUNC(medical,setUnconscious);
(thats a Line in the "fnc_moduleUnconscious.sqf" of the Ace Mod)
Im tryin to find out how to make an AI Unconscious, but i cant use
[player, true, 5, true] call ace_medical_fnc_setUnconscious;
because the ace-uncon setting for the AI is on 50/50 and they get killed from time to time.
I dont want to change this setting
🤔
don't see why it wouldn't
but give it a go
or at least i'm pretty sure it's worked for me in the past
i will test in 6 hours
@peak plover thx, thats quiet helpful. Its basically the same function i used before ace_medical_fnc_setUnconscious ^^
so why is the AI going to be 100% uncon with the Zeus function, when it uses obviously the same function?
here
You can set the value for individual units
so you can still have it as normal mission settings for the rest of the units
I assume it has to be 2
so sqf _unit setVariable ['ace_medical_enableUnconsciousnessAI', 2,true]; _unit call setunconsious
Does anyone know the IDs of the Apex doors
Wait let me get the classname of the house
Land_House_Small_02_F
The door is just called BIS_fnc_Door
Open the door
Through a trigger
So with the breaching anim, there is a guy that opens the door and I want that to happen
This is what the statement is
statement = "([this, 1, 1] call BIS_fnc_Door)";
How can I put that into a trigger so it opens
I just dont know how
yeah
instead of this you have the house
use the edit terrain object module
You can add a variable name to the house with it
_theBuilding = nearestBuilding someObject;
_theBuilding animate ["BIS_fnc_Door", 1];
I do not even know how to do that
Can I just put
house1 animate ["BIS_fnc_Door", 1];
Nope
damn
In the statements for the doors they dont even tell you the name like the normal ones do
YSe
Yeah
Thank you
Holy crap where has this discord been most of my life
// Let me say something. I have seen this happen too many times. When there is a place on the internet that has people with certain level of expertise it often attracts more people of the equal or superior knowledge. Then this place becomes an interesting place to visit. However earlier or later it attracts people who are not willing to learn but find it convenient just to ask for copy paste solutions. The problem is that they ask primitive questions and they ask a lot. This pushes people with knowledge away because it becomes boring place to visit. This has happened to BI scripting forum sometime ago and this is happening to this discord. I hate to see it vanish, but unfortunately this is unstoppable like global warming. IMO StackOverflow is the only website that did it right and still stays afloat. Sorry for the rant, and this is not directed at anyone in particular.
if (true) exitWith {};
Maybe it's not that they are not willing to learn, but rather unable to learn? 🤔
I look all over the internet before i ask
sometimes Its obvious and I just dont see it
after spending a solid 3 days without asking questions, I ask
g00gel
i mean on the flipside there are people who jump on anyone asking a basic question
and this server is very confusing for a new player
Definitely, i barley know anything about coding tbh
But i've managed to make this and im happy
honestly you're one of the better ones
you're trying stuff, unlike some people who just go 'then what'
best way to get the name of a vehicle?
Hover over it in eden editor
Like class name of the vehicle?
Then yeah I found that’s one way
I have an array (vehicles) that returns all the vehicles available. I want to list the names of the vehicle in a list (doesn't work with name _x) in a ForEach vehicles
Yep okay that’s out of my range zone
Haha sorry buddy, I thought ya just meant how to find a class name
thanks anyways
have you tried typeOf?
getText (configFile >> "CfgVehicles" >> (typeOf _X) >> "displayName")```
Then you have other issues because that should work
what does sqf typeOf (your object) return?
i see no reason why "getText (configFile >> "CfgVehicles" >> (typeOf _X) >> "displayName")" shouldnt work. are you sure you are using it on a vehicle?
because magazines and weapons are not part of cfgVehicles.
@peak plover finally set up a fresh scenario and it worked, still dont know where the problem was. Anyway thx for your help
@tough abyss >Smells like XYProblem http://xyproblem.info/
Nah, it actually smelled like this: https://www.youtube.com/watch?v=m1NuRlKp_TU 😃
Thanks @quartz coyote for all the help!
is there a way to delete a position inside an array with out rearranging the whole thing? kind of like
_testarrray set [0,<null>];```
but with an actual working command. i dont wanna replace, i wanna delete positions.
okay scratch that. i dont get how i didnt notice that before:
https://community.bistudio.com/wiki/deleteAt
is there a way to make a keypress for a player with sqf?
e.g. make the player move forward
Is keypress necessary or you just want him to move?
no that's an order
for AI units
oh
yes
wait is it an AI unit??
that you want to move, sorry for double ?
nope i want to move a player
but with full animation and not by setting his pos every few frames
i'd have it as an AI unit and put a camera on its face
If it's for a cutscene sounds like a plan. You can even substitute your player with the same model and loadout. Gamedev is fun.
Hi all, can i found some help here for new dayz -serverMod ?
or its only Arma 3 scripting
so long as it's sqf it should be similar
but most people won't know about dayz specific functions
I noticed a strange behaviour that can be a bug in the core soul of Arma 3 Engine:
On this code:```sqf
_posW = getPosWorld BRPVP_construindoItemObj;
_vdu = [vectorDir BRPVP_construindoItemObj,vectorUp BRPVP_construindoItemObj];
[BRPVP_consMovObj,_vdu,_posW] remoteExecCall ["BRPVP_moveActionBoxBack",2];
[_posW,BRPVP_consMovObj,BRPVP_construindoItemObj] spawn {
params ["_posW","_consMovObj","_delete"];
waitUntil {ASLToAGL _posW distance _consMovObj < 10};
deleteVehicle _delete;
};
BRPVP_construindoItemObj = BRPVP_consMovObj;
_vdu select 0 will have vectorDir BRPVP_consMovObj and not vectorDir BRPVP_construindoItemObj.
Run in unescheduled mode
BRPVP_construindoItemObj at start is an box created with createVehicleLocal
can you demonstrate it with a smaller snipper
snippet
without using non vanilla functions
@plush oriole you understand what happened wrong?
Hey all,
I'm attempting to add Alias's Kamikaze script into another mission and I'm not 100% sure what to do. Can someone point me in the right direction?
try to find badly placed objects in terrains - namely overlapping/intersecting ones
we tried with BB and vectors, but its too imprecise and costly
any other suggestions we could try?
I can't think of another way other than BB and lineIntersects
Just check one per frame
I would image you'd need to review it manually anyway
So I'd just check on per frame
Save the array to profilenamespace
So i could load it again later if I reload the mission or sth
Have a keybind to teleport through the array
@velvet merlin What kind of objects? Terrain pre-placed ones or added through some script?
terrain objects
Anyone know if there's a list of defaults for https://community.bistudio.com/wiki/cutRsc
like RscTitleDisplayEmpty
etc
and also controls
like
RscText
@tough abyss Well the AI won't automatically land, so presumably when a player who is not the leader of their squad lands, the AI command them to 'move' to their current objective, which always involves taking off
i.e. the AI don't land of their own accord
so presumably the VTOL throttle is affected directly by the AI command
/\ speculation /\
dangit
Hey. Does anyone know a script that restricts 3rd person in certain locations?
is there a command for knowing if lights are enabled? Because you can't enable lights from a vehicle at day (or from something else)
found this
If a vehicle has headlights, they are usually available for the driver of the vehicle and if the driver is a human player, the headlights could be operated via keyboard binding (normally L) or scroll action menu. If the driver is AI, it will operate the headlights depending on some preset condition. For example it will turn the lights at night and turn them off in the day time. The exact time when AI may decide to use the lights can be obtained via the following formula (⚠ current formula but could change):
private _isTimeForLightsOn = [0,0,0] getEnvSoundController "night" > 0.7;
so apparently no built in function which is guaranteed to be accurate but you can recreate the internally used one
Thanks a lot
no problem
Does anyone know a module that makes a player roll virtual dice?
as in a function that returns a number from 1 to 6
or one which says 'roll a dice', then animates dice rolling
Hello, guys! How can i check if an object has the inventory?
private _vwitemcargo = weaponsItemsCargo _x;
private _vitemcargo = itemCargo _x;
private _vmacargo = magazinesAmmoCargo _x;
_vcount = 0;
if (!isnil '_vwitemcargo') then {
_vcount = _vcount + count _vwitemcargo;
} else {
_vwitemcargo = [];
};
if (!isnil '_vitemcargo') then {
_vcount = _vcount + count _vitemcargo;
} else {
_vitemcargo = [];
};
if (!isnil '_vmacargo') then {
_vcount = _vcount + count _vmacargo;
} else {
_vmacargo = [];
};
if (_vcount > 0) then {
that one seems too large
private _vwitemcargo = weaponsItemsCargo _x;
private _vitemcargo = itemCargo _x;
private _vmacargo = magazinesAmmoCargo _x;
if (count (_vwitemcargo + _vitemcargo + _vmacargo) > 0) then {};
Yes thank you but i am talking about another wayto do that
sorry if that excessive code part messed you up about what i was asking
Your question didn't really make sense
Hey. I'm looking for a script that would allow me to add XP system on the server. One that would reward XP for player and npc kills and could be used to spawn with better gear by leveling up. i have seen that on some servers
switchMove has this on the wiki: When the argument is remote, the animation change on the executing PC is only temporary. - I've been using remote execution to run this, but I've found in a few small cases it does only seem to be temporary, and the animation change is never propagated to the person it's applied to or anyone else. Is there a solution to this I'm missing?
are you using remoteExec?
Yes
so something like remoteExec [unit]
In about 90% of cases it's fine, there's just a small proportion where it's only temporary. I can only figure there's something with locality affecting this.
Other scripting functions I'm using in a similar fashion all seem to be fine over the network all of the time, it's just switchMove proving to be unreliable.
i imagine one of the sqf wizards will know something about this
actually
is it only being run on the object local machine
It may say so in the commands wiki page btw
I think he's already read it
hi guys, how can i force a player to get out of a vehicle with a script?
player action ["Eject",vehicle player];
that was fairly googleable btw
i don't want to be snarky bc lots of people are but often you can just google what you want
although admittedly often it'll be very hard to find
and wording is important
Anyone know why diag_log stops working when I go more than 2 layers deep of execVM scripts?
your script apparently doesn't execute
diag_log doesn't care where it is
Doesn't even know where it is
pretty sure it's not an issue with mine
If it's not logging, it's not the command
a diag_log at the start of my second layer of script sqf diag_log "AAAAAHHHH D:";
never runs, although the stuff inside it does
It's something you're doing that's not executing the command
If it doesn't log, then your script doesn't run
hmm so no weird edge cases
thanks i'll keep testing
oh wow it was
wtf
ahhh a waituntil
that shouldn't have paused
do you guys know any good databases for camouflage patterns ?
I heard there was a good thread on facepunch
but that's gone now
What does that have to do with scripting?
Attempting to get the sounds from a script demo (Kamikaze) to port over to the KP Liberation mission correctly. For some reason, I can't get the sounds to link and keep getting an error saying that they cannot be found, even though I've kept the directory the same from the original.
Can there only be one CfgSounds in a mission file? Or what else could be causing this?
yes probably only one CfgSounds
multiple sounds within it but if it's not working i assume that's the issue
I'm making a Main menu mod which Im hoping to create a simple config for, I was wondering if there was a way, how could I make this dialog check a config for image directories? to make it easier for certain people to use it.
could I just do configFile >> "anxMenu" >> "directories" >> logoimage ?
put in config editing by accident
Is there a way to do it from the dialog or do I have to make it ctrlset with the config?
as in make a property which automatically checks the config?
Its going to be a mod obviously, but I have the dialog with the text directory, is there a way to make the text check the config for the correct directory & image?
think you'd have to do a script
alright
how do i return the texture of an object that doesn't have any texture in it's config?
As in if doesn’t have a hiddenSelection defined? I don’t think there is any other way other than unpacking the PBO and checking the paths in the model.
Do you have an example of the kind of object you’re looking to find the texture for?
hello, im trying to get me a list of available factions
i was trying ```("(getnumber (_x >> 'side') == 1)" configClasses (configfile >> "CfgFactionClasses" ))````
but that returns me this:
[bin\config.bin/CfgFactionClasses/BLU_F,bin\config.bin/CfgFactionClasses/BLU_G_F,.......]
i only need that last bit....
BLU_F etc...
is this for a2 a3 compatability
afaik east,west,resistance,civilian and then sideUnknown,sideFriendly,sideEnemy,sideLogic,sideEmpty,sideAmbientLife are always going to work
@proven crystal ```sqf
_yournamesarray = _yourresultarray apply { configName _x };
ahhh thanks
and how do i get the corresponding DisplayName?
ah got thant
gettext (configfile >> "CfgFactionClasses" >> "BLU_T_F" >> "displayName")
just had a typo in it
yeah ```sqf
getText (_x >> "displayName");
Can anyone spot why this doesn't work
_vehicle addAction ["Open Rear Doors", {(_this select 0) animateDoor ['Door_4_source', 1]}, nil, 1000, true, true, "", "_target doorPhase 'Door_4_Source' < 0.5", 10, false, "","door4"];```
it does work like this:
```sqf
_vehicle addAction ["Open Rear Doors", {(_this select 0) animateDoor ['Door_4_source', 1]}, nil, 1000, true, true, "", "_target doorPhase 'Door_4_Source' < 0.5", 10, false];```
so something's wrong with the memoryPoint argument.
it also doesn't work like this
_vehicle addAction ["Open Rear Doors", {(_this select 0) animateDoor ['Door_4_source', 1]}, nil, 1000, true, true, "", "_target doorPhase 'Door_4_Source' < 0.5", 10, false, "door4"];```
so apparently door4 is neither a valid memoryPoint or selection argument, despite sqf van selectionPosition "door4" working
Hey there, I would appreciate a little bit of help here :
_types = ["B_Heli_Transport_01_F", "B_Heli_Attack_01_dynamicLoadout_F", "B_Heli_Light_01_dynamicLoadout_F", "B_Heli_Light_01_F", "B_T_UAV_03_dynamicLoadout_F"];
{
_display = [_x] call GSRI_fnc_minifyName;
_modifier = {
// some code, working well
};
_condition = {
// some code, working well too
};
_statement = {
systemChat "poke";
};
_action = [format["action%1",_display],_display,"",_statement,_condition,{},[_hangar, _x],"",2,[false, false, false, false, false], _modifier] call ace_interact_menu_fnc_createAction;
[_handle, 0, ["ACE_MainActions"], _action] call ace_interact_menu_fnc_addActionToObject;
} forEach _types;
With the code above, the statement is never executed. It doesn't looks like an ACE problem since similar actions all around my mission are working perfectly. I got no script error. There is not trace of such operation in RPT.
It's probably a very dumb mistake, but I can't see where exactly.
@plush oriole, what vehicle is that ?
the IDAP van
it's in the config and i really can't see any way that's not a valid selection
and i'm afraid i don't know anything about ACE functions
although at least we have vaguely related issues :D
Hello, I can use pi in arma with pi command right ?
@plush oriole just tried, the action is not displayed indeed. However the game does not look at it as an error : the action ID is properly returned by addAction.
@compact maple looks like you can, yes
yeah i think it's a positioning error
ok thanks
what's really weird is that the only 'issue' with selectionPoint i can find is some of them are animatio nrelated, so return [0,0,0]
but that should still be object center
@plush oriole look into config defined userActions of your vehicle
there is already a "rear open" action, but it has no position attribute
it's filtered by seat position i assume but i couldn't find that action in the config
i assume it's inherited
but i don't know if that's even a thing
there is already a "rear open" action, but it has no position attribute 👀
@winter rose ?
@vernal mural just a sentence that needs a context, else it is a dirty reference 😄 don't mind me, please proceed
@vernal mural sometimes you get duplicate config folders
i believe they both open when you expand one though
which is fun
yep
the main issue is i'm using valid selectionPoints but it just 'doesnt work'
yeah I'm still searching for a solution here
I've just seen this funny strange thing in config
yeah it's another 'arma thing'
@plush oriole this works :
van addAction ["Open Rear Doors", {(_this select 0) animateDoor ['Door_4_source', 1]}, [], 1000, true, true, "", "_target doorPhase 'Door_4_Source' < 0.5", 10, false,"","pos cargo LR"];
@tough abyss thanks :3
It is open to criticism / other advices
Also, may I add a "clean useless items" function to this page, inspired by yours?
no idea
i couldn't find a reference for what 'memoryPoint' actually was
just tried other memoryPoints found in config
first one was the right one ^^
which entry are memorypoints in
the one I found is in configfile >> "CfgVehicles" >> "C_Van_02_vehicle_F" >> "Turrets" >> "CargoTurret_03"
ah
so are memorypoints defined in the p3d
i was wondering if maybe they were in the model, so you could only find them by seeing where they're used
@plush oriole yeah I tried to find a quick memoryPoint script exporter but it looks like no script command is able to get a list of it.
However, I'm still stuck with my problem :/
anyone who copies this, just be aware that obviously since that's a cargo position it's not quite centred
what seems to be the issue with these waituntil {!isNil "fez_zonefncs_init"; sleep 1;}; waituntil {!isNil "fez_patrolfncs_init"; sleep 1;}; waituntil {!isNil "fez_reinffncs_init"; sleep 1;};
there are 3 scripts, at the end of which i set a public variable to true. before that the variable does not exist
remove the quotes
You are not returning anything from waitUntil
"remove the quotes" no, don't do that.
oh am i misunderstanding isNil
yes
waitUntil needs to return a bool.
"Sleep 1" doesn't return a bool.
oh i got to put the sleep before the statement?
ye
thanks
I remember seeing a while back something that inserted a diary entry to all mission files for things like server rules/standards. Does anyone have any extra info on this or know about it? I know it requires file patching enabled but thats about it
as in you have multiple different missions running on a server but add the entry to all of them?
yeah, inserting a diary entry into the mission on init/pre-init. I remember seeing it on a BI forum a few months back but cant find it again
so the first thing that occurs to me is a server global init script
rather than for diary entries specifically
just a serverside mod, with preInit that remoteExec's with JIP flag a script that creates diary entry
yeah that makes sense
tyvm ❤
@tough abyss change this to unit attachments
I did split like this in order to show that not only "equipment objects" but also clothing pieces were impacting
@tough abyss can we head over #community_wiki please?
Is there any way to make multi listbox item like toggle button(make it selected when click. make it unselected when click already selected item)?
Currently I cannot unselect list item with click but Ctrl + click is working.
hey, quick question, I'm on the way of fixing my problem, but does anyone know what is <null> in an array ?
@plush oriole Thanks. I will check
there's also nil but that means undefined, whereas null is actually a type returned
i.e. a function to find an object might return null if no object is found
I think in 5 years I never encountered such a thing. I'm used to objNull, grpNull and all other null things, but I think I never seen this one
I know nil also
i think <null> is the representation when it's formatted
i.e. i assume that hinting a null object will show it as <null>
I think checkbox isn't for me. I need LIST with toggle capability.
usually I know exactly what data type I'm working on, but I'm know designing a function which is able to handle different data types, and it looks like it does not know how to handle one of the tries
i.e. i assume that hinting a null object will show it as <null>
you assume wrong
@vernal mural <null> is nil, same as any ```sqf
parsesimplearray "[something]"
Really ? I think I'm starting to understand why my code doesn't work in some specific cases
because you rely on string representation of nil?
I rely on a string returned depending on the input. But I was not expecting this function to start outputing this <null> duda
It works this way :
OBJECT ==> myFunction ==> modified DisplayName
STRING ==> myFunction ==> modified DisplayName of the corresponding type
stuff like isNil requires a string parameter
but it looks like if I input :
objNull ==> myFunction ==> <null>
this output is then compared with other strings, but comparing strings with <null> seems to fail silently
all that is wrap in a ACE action's condition, which is still displayed even if it's condition silently fail to be processed from time to time. But in such a case, the statement block is not processed at all
as in isEqualTo?
you should check if the result is nil if there is a chance it could be nil
!(bla isEqualTo bla) or (bla != bla), same result here
@tough abyss yeah, I just figured it out, thanks to you
and can compare different types without an error
yeah I know but here the result is the same, it just fails
ye
ending myFunction with [(_entry splitString " ") select 0, ""] select (isNil "_entry") should do the trick
probably nicer to format as sqf if (isNil "_entry") then {""} else {(_entry splitString " ") select 0}
no syntax error but it can return nil
Yes syntax error
Ah sorry Im ignoring @plush oriole was talking about @vernal mural 's code
How can that return nil?
empty string
Ah the splitString can fail and return empty array
I really like being able to use select for two-alternatives choices like this. Is that performance friendly ?
as with everything, it depends
use param
yes it's faster, but it evaluates both values always
First I get it to work, next I optimize ^^ for now I have a few mistakes to fix before getting all this cleaner and faster
Yep ! All clear, working perfectly !
Me being like
Except I'm french.
Thanks everyone for all advices !
@vernal mural https://community.bistudio.com/wiki/Code_Optimisation you got it right: make it work first, optimise then!
is there a way to make custom textures behave properly ? Usually when a flag or a sign is set with a custom texture, it appears black until the player get close enough
@vernal mural jpg or paa?
jpg need horribly close player to display. paa is better but still, it does not always load quick enough not to notify it
or maybe it's just at mission start...
once loaded, what if you leave and come back?
By the way guys, about that non-senscetive question about the vehicle cargo detection - i was trying to find the way of determining if an object has an "inventory" action - ability to store any items inside. So far ive found that fastest:
private _vwitemcargo = weaponsItemsCargo _x;
if (!isnil '_vwitemcargo') then {
yes you are not reading the wiki
"source" stringReplace [needle, replaceWith]
and
"source" stringReplace [[needle1, needle2, ...], [replace1, replace2, ...]]
Thoughts?
Is there something similar to backpackContainer but for weapons, to get the weapon object or that specific objects netId?
i dont think weapon is the object
i think it is the 'WeaponHolderSimulated'
in case it is on the ground
But why are backpacks/vests/uniforms objects?
nvm just saw that on the wiki
they are vehicles, just like ammoboxes
actually you can't see the backpack container
what you see is a inaccessible proxy that's linked to the container bla bla bla magic bla bla
mmm, what'd be the best way to check if a weapon gets duped (2 ppl get it out of a container at the same time)? It's easy to just check if there are two people with the same backpack...
serverside check
container has 3 weapons, two people take one out and now have a weapon from the container, but the container still has 2 weapons inside it.
@still forum and presumably
if (!isNil {weaponsItemsCargo _x}) then {``` won't work
it would
since the alternate syntax can't deal with undefined since it evalutes the expressio
but weaponsItemsCargo only returns nil if _x is nil
"since the alternate syntax can't deal with undefined since it evalutes the expressio" what?
What has evaluating a expression to do with dealing with undefined?
isNil checks if piece of code returns nil
so what's the undefined value
somewhere I read that something like nil is synonymous with a non-existant variable
i.e. you remove a variable by assigning it to nil
and evaluating expression = executing code and dealing with result
is there a neat way to check if given number is in given range ?
other than x>lower && x<upper?
yeah
that seems pretty simple and it's the most common idiom i've seen
all i can think of is some other convoluted solution involving max and min
actually
nah it's more convoluted
someone else might have a suggestion
nil is a value, that says "there was nothing here"
if you pass nil to a command, it won't execute the command but instead just make the command return nil too, because there is no command that could sensibly do anything with nil
as in nil is a value with a type, and null is the absence of anything
no and no
for example if you get <bool> it's a nil, of type bool
as I said above, script commands that you give a nil to, don't execute but return nil, but they return a typed nil
of the type that the command is supposed to return
seems like that wouldn't always be desirable
althoguh i guess if you use an array of arguments you can show no arguments with an empty array
Then there's also null (objNull, ctrlNull) which is a different category
yea
the null's are the actual types, just with null value.
For example objNull is of type object, but it doesn't point to any object.
There are only null types for things that point to something, control, object, group, scripthandle and so on.
Hello guys, i'm looking to create a crate with unlimited capacity : is there a command line to do so ?
thanks in advance !
set the crate's storage mode to 'virtual'
also what do you mean 'command line', as in script?
no just a crate with unlimited cargo capacity, and yes i mean with a script (I don't know if its possible)
oh i see
so unlimited space
rather than unlimited supply of objects
hmm
i think you'd need an addon because it's a config change
or else a slightly more complex scripted solution where you put items in as more space is available
[19:01] Dedmen: but weaponsItemsCargo only returns nil if _x is nil
that command returns nothing if there is no inventory (tested on random static object though)
nothing aka nil or empty array?
commands that return array, should always return empty array 🤦
not empty array
consistency!
https://s.sqf.ovh/arma3client_x64_performance_192_145773_v10_2019-06-30_19-15-45.png
https://s.sqf.ovh/arma3client_x64_performance_192_145773_v10_2019-06-30_19-18-07.png
I guess this works for me. Gonna rename to replace cuz ACE team feedback
Hi guys! Are there any commands or function that provide access to the wounded state of a unit? I want to lower wounding effects.
well getDamage is the obvious choice to get if the unit is at all injured
and you can check animations to see if a wounded animation is playing
what do you mean lower wounding effects
Don't put a man on both broken legs when he is really hurt
hmm?
which drones
and to whom are the enemies known... you must reveal the enemy to drone's crew I think
@dull drum Look at setHitPointDamage and setHit on the wiki.
is there a script way to change values of a rvmat?
or do I have to go and make my own rvmat and load it in
own rvmat
rip okay thx
@crude needle I can lower damage itself by it, but it can't set something like "stop acting like a drunk chameleon when wounded". It's somewhere else.
On the second thought I can prevent damage to get to the wounded state. Hmm.
store a seperate health counter?
keep player's health at 100%
then when your own health counter gets to 0, kill them
although theywouldn't be able to heal themselves
I don't know what specifically your use case is, but you may also want to use the hitPart eventhandler.
I like the way of your thought, my lord @plush oriole
Hey guys, I have a script which part of is supposed to deduct side score via addScoreSide, and it works fine on my listen server. However, the addScoreSide part does not work on a dedicated server. I've tried encasing it in "if (isServer)" or "if (isDedicated)" checks, but neither work. I'm trying to make it run serverside. What am I doing wrong? Thanks.
Server execution only. From where do you run it?
A .sqf I made in the main directory of the mission.
where areyou calling the sqf from
I create a new comm menu option in description.ext, which opens a submenu defined in its own .sqf. The options you can pick in that submenu run "execVM" on other .sqfs I have made in the same directory. With that said, I'm not sure how I would adapt this to putting my scripts in initServer.sqf, since right now I just call the .sqf I want to run when an option is picked in the menu.
well when the option is picked, that happens locally
only on the client who opens the menu and clicks
you need to use remoteExec to tell the server to run it
Oh, I see, thanks! I'll see if that works. EDIT: It worked, thank you so much!
how was the waitUntil isNull display thing for the map at mission start? So I can waitUntil the player can move around? I don't care if the loading screen is still up, you can have to click ok to close the window
If can move around sounds like a findDisplay 46 to me
waitUntil (!isNil findDisplay 46)
of course i'm dumb. I tested exactly this but forgot the !
Probably just tired. It's 2 am europe time :)
1 am for me
Still late enough
- That's wrong and an error. You'd want isNull.
- It's entirely unnecessary. Just use postInit, or for missions without CfgFunctions, initPlayerLocal.
I used isNull^^
i used initPlayerLocal (but i got a CfgFunctions)
i want to open the aan article thing from the laws of war DLC at the beginning after the map at mission start @random crescent
@calm bloom this has been fixed on dev for awhile now, no need to panic
Anybody gets spam of Wrong text element 'null' and Overflow in their client RPTs?
Trying to figure out if this is caused by something in my mission or general arma spam.
@tough abyss thats bad, because i was using that behaviour(
hey guys, i'm trying to create my own form of the "limited arsenal" script made by Jeroen in the Antistasi missions. instead of an arsenal, i'm using a dialog. i'm having a few problems, could anyone take a couple mins to help me out?
@plain urchin what problems u having?
How can I have camera like Virtual Arsenal when I open my GUI?
You have to script it. Look at arsenal script and see how it works.
Okay thx!
I'm trying to work out the best way to transfer loadouts of specific players between missions (The mission is manually edited after each session). Right now the most achievable method I can think of is to do it all manually - getting screenshots of everyone's inventory at the end of each session, replicating it in arsenal and exporting it to a loadout, putting that in the init of units named after the players. But that's far from ideal.
I know the loadouts can be exported with BIS_fnc_exportInventory, but I don't understand where the exported data would go - it'd need to be visible without direct access to the server its self.
Ideally, the mission would save players' loadouts and load them back in based on playerID so it's all automated.
I don't have a great idea as to where to start, so please DM me if you can help.
diag_log and getUnitLoadout will get it into RPT, then you can just go copy it into a startup script for the next mission.
Is the RPT server-side or will it go into those of every client?
Can be either depending on where you run the command.
Alright, that should work. Thanks
you can save it to profileNameSpace if its just one server for one mission
either to the client or the server
Hello, should I use global var or setVariable on player ?
depends on what you need
global is probably good for your case?
Ok thanks. There is no big diff between global and setVar so ?
sure diff
one is on the player, the other is global
but I don't understand why you want to take the extra effort
just curious
im very very (very) new to this scripting thing and was just wondering if this would work:
HQ_MAP addAction [Escape, player SetPos [getMarkerPos [selectRandom [Spawn1,Spawn2,Spawn3,Spawn4,Spawn5,Spawn6,Spawn7,Spawn8,Spawn9]]]]
if not how would i make this work?
needs to be in this format:
HQ_MAP addAction [title (String), { (your code) }];
so in your case, it would be
HQ_MAP addAction ["Escape", { (_this select 1) setPos (getMarkerPos (selectRandom ["Spawn1","Spawn2","Spawn3","Spawn4","Spawn5","Spawn6","Spawn7","Spawn8","Spawn9"])) } ];
oops
something like that
Marker names need to be strings too.
Recommend you start reading here https://community.bistudio.com/wiki/ArmA:_Introduction_to_Scripting
- agreed
ty
Trying to add a script to a unit so that it has it enabled whenever it spawns. How do I do this? I know how to add it to a unit in editor but I need the unit to spawn with it made added already.
@winter orchid dm me
@peak plover Would that be done in the unit's config or in the config that spawns the unit?
Just in script
Cba adds a script to every unit cfg, that runs cba init eh
Ityou can add code to the init eg with a script
So you can have mission specific code that runs when the unit is created
Just google cba a3 extended eventhandler
Tge documents have an example for init
Alright sweet, thank you. I'll check it out.
Is there a function that basically makes a vehicle undetectable to active radar or other sensors?
Is the .ogv file format the only format you can play video in a mission
Making a mission currently where at the start of the mission I want a small intro video to play
However with a 720p, low bitrate video going for 40 seconds its 14mbs :/
Wondering if I can use .avi or something
Nope. Ovg is the one. Now you must decide if its worth the disk space.
Dang, figured as much. Its more Im worried 50 players downloading the mission file from the server at once will tank it hahaha
possibly
it is not optimal to include a lot of textures and stuff like that in a mission
such should be added via an addon
I have a mission with a intro/outro movie, we just put it into a seperate pbo in our mods
couple hundred MB no issue
That's probably not what she said
remember that arma mission download is quite slow
atleast in my missions a couple hundred KB take several seconds
I play a different mission every week
privileged
hey guys, i'm trying to get the containers of a crate which i know how to do, but i also need all of the contents of each of the containers (weapons, backpacks, uniforms, vests , etc). is there an easy way to do this or do i just have to use everyContainer and go through everything like that?
the end result would be to loop through an array with all the classnames and amounts of the stuff stored in the crate , so I can save the crate’s inventory
use everyContainer to go through everything