#arma3_scripting
1 messages Β· Page 568 of 1
ah, I stand corrected, need a full path,
_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
_soundPath = _soundPath + "weather\snowstorm\res\sounds\gust_1.ogg";
playSound3D [_soundPath, player]
getMissionPath exists now π
Let us know when you have finished modifying all the wiki pages' comments that include pre-1.96 methods for getMissionPath now dad π
Guys, what wrong w/ Land_Camping_Light_F and setMass?
(ACE func override) I use next:
// default mass is 10
_lamp setMass 0.01;
and in MP this take effect in 10-50 seconds... With another objects it's ok
I use:
[_lamp, 0.01] remoteExecCall ["setMass"];
and no difference between this and first code
Are there any scripts that support dynamically spawned pylons for jets? AKA somehow taking all jets with the same classname and setting their pylons for when they spawn in
Again I must wait for ~30 secs
@tough abyss from what I heard, ACE has that
@winter rose isnt that ingame though? I dont want people playing with pylons ingame, cluster bombs 4 dayz
Attempting to add bombs to a jet, so all that are spawned in (they dont exist at start of mission) come with custom pylons i made
@tough abyss Eden Editor does allow pylon settings�
@rustic plover You should brush up on https://community.bistudio.com/wiki/Arma_3_Remote_Execution if you still don't understand why this is happening shoot me a DM. -ALiVE Dev Hazey.
@winter rose cant use eden, its for a warlords mission, a jet wont remain for players to use but to be spawned later in the mission(it isnt placed in eden before hand )
@ornate scroll thx, I know how remote execution works. I have problem only with setMass and strange delay before synchronize mass between all players
Are you setting this in an unscheduled environment?
Because, the remoteExecCall is unscheduled.
@rustic plover As soon as I am around my DEV machine, ill take a look for you.
@tough abyss There's nothing built in to arma like a module or something that will let you modify pylons on the fly, though there are a number of good scripts (Grumpy Old Man had a good one - https://forums.bohemia.net/forums/topic/204747-release-gom-aircraft-loadout-v135). Also be advised that Arma's system feels slightly cobbled together, and it works for their vehicles, but use cases like giving Gunners separate weapons from Pilots requires some serious exception handling
@worn forge its not for "on the fly" im trying to make it so when a jet is spawned through warlords it will spawned with scripted munitions ive set before hand that will stay the same throughout the mission, not change at all during the mission. Simply changing pylons in eden dosnt suit the purpose of warlords either
Well then, you're going to want to look into setPylonLoadout
or setup your plane in Eden and hide it with the checkbox, then "enable" it with myJet hideObject false
For example with the Wipeout, you could do:
[_vehicle, _loadout] remoteExecCall ["setPylonLoadOut", _vehicle];```
Okay ill try that, is that in a sqf file?
uh... yup
That you had to ask suggests to me that this might be a bit advanced and you'll be back with questions π
Your not wrong there lol but im the type to play around a bit first before i get frustrated and ask for help
@worn forge ok im frustrated now, can you show me what i did wrong π€£
_vehicle = [["B_Plane_CAS_01_dynamicLoadout_F[]]"];
_loadout = [[1,"PylonMissile_1Rnd_AAA_missiles",true,[]],[2,"PylonRack_7Rnd_Rocket_04_AP_F",true,[]],[3,"PylonRack_12Rnd_PG_missiles",true,[]],[4,"PylonRack_3Rnd_Missile_AGM_02_F",true,[]],[5,"PylonMissile_1Rnd_Bomb_04_F",true,[]],[6,"PylonMissile_1Rnd_Bomb_04_F",true,[]],[7,"PylonRack_3Rnd_Missile_AGM_02_F",true,[]],[8,"PylonRack_12Rnd_PG_missiles",true,[]],[9,"PylonRack_7Rnd_Rocket_04_AP_F",true,[]],[10,"PylonMissile_1Rnd_AAA_missiles",true,[]]];
[_vehicle, _loadout] remoteExecCall ["setPylonLoadOut", _vehicle];
I'm not sure if I know where to begin
But this line _vehicle = [["B_Plane_CAS_01_dynamicLoadout_F[]]"]; isn't a proper reference to the vehicle
I really don't suggest just throwing code into the game and seeing what sticks, take a step back and learn what you're doing
whats the place to start to correct my mess?
How do you spawn the vehicle?
its a bit complicated, the warlords sector module does it for you when you set it as a runway
in eden
I'm not sure how you're going to do this then, as you need a variable to hook on to
Ie., you need to tell the code what air vehicle you want to change the loadout for
so changing the vanillas classname pylons with a script isnt viable without a variable?
Well
When a Wipeout spawns, it has a default configuration, armnaments that it's loaded up with
The Wipeout has an internal variable, like 101d5ae170# 1782033: plane_cas_01_f.p3d, useless for you, hence normally when you spawn you give it a friendly name like "_vehicle" that you can reference in code or scripts
The only thing I could think of in your situation is something really messy like a loop that scans for new vehicles, and if it finds one, then changing the loadout on them
Unless the warlords module actually gives you something to work with
Would making a new config, inheriting the vanilla wipeouts configs under a new classname and changing pylons to my needs be against any EULA/tos(could be IP related)?
I don't think so, but then everyone would need to have the mod I think
But if you think this kind of scripting is hard, wait til you get into making yourself a mod π
that wouldnt be an issue as its a modded server, but then the next issue is i wanted to change weapons of Modded jets, i was using the wipeout as a method of understanding how it works. and id have to go around to authors and make sure theyre ok with me making new class names. and yeah its hard it took me a good month to figure out how to use inheritances to make a slammer+kuma+t100 mod
Making mods is easy, making a working mod is terror π
@exotic flax +1
It'd honestly be easier to open up the Warlords module and monkey around with that instead
Btw... Overriding or inheriting configs of 3rd party mods is completely fine and probably the easiest form of modding.
Using scripts to do the same is terrible, if it actually would work.
Wont be in the module only controls things like size of sector whether its a helipad harbor runway etc... id have to go into core files if even that could help me
There's a reason warlords is locked down, it's meant to be plug and play
True, but im trying to make plug and play more interesting
oh? overriding configs is acceptable? that might make things 10x easier
As long as you don't touch the original files, aka make a new mod which modifies configs, is completely fine.
And most mods can be extracted to your P drive to inherit the original configs, which is the main reason why this system exists π
π€ͺ now the things that i never understood make perfect sense
Just make sure you read the license attached to the mod before doing something, since some mods or parts of it don't allow modifications.
eg. one of the uniforms in RHS is not allowed to have retextures (which is also a config change).
CUP also doesn't allow any modification of its mods, especially unpacking to just use a few select assets.
will look into it, only looking at altering ammo types that RHS already has for their jets
there's a difference between taking assets from a mod, or extending them without taking anything (except for inheriting configs)
Just underlining that if you wanna use CUP you have to use all 13 GB of it
Is there a script to make AI lower weapons when walking?
Not in relaxed mode
But in aware mode, so they can do formation
I have a feeling that if their behaviour goes to Aware or Combat their weapon stance is gonna go up no matter what you do
That is also true of RHS if you are using more than just AFRF or USAF Ryko
Sounds good thanks to all for the info, ive learned alot. now need to relearn how to use P drive properly
Yeah when they are relaxed, they dont do formations
@restive leaf not surprised, probably true of any mod I'd expect
@tough abyss look up PMC wiki tools and p drive installation guide
@stray nova it's possible to use _unit action ["WeaponOnBack", _unit]; to lower the weapon, however AI will always raise their weapon when not in safe mode and/or walking around.
You can make your own FSM, that wouldn't be an issue.
Although I'm not sure if behaviour settings can be changed.
Sounds more like a #arma3_ai topic
I wish it was an override,
When in combat, you're in combat, the only reason a weapon should be up
I know 3 (primary) weapon states:
- low (pointing to the floor, hanging on strap)
- ready (hold weapon but in 45-60deg angle)
- up (aim at target)
Arma only has low and up when standing or moving slowly, while running and sprinting only has low and ready.
So even if it is possible to override the behaviour of AI, the next question would be; does the game have the proper animations available?
hmm, I am trying to setup a cloud "wisp" but I cannot seem to get the consistency quite right. it is very wispy, but I'd like it to be a bit more "solid" if you will as it blows.
using Particle Effects?
yes. I think it is a function of my alpha channels? [[0.5, 0.5, 0.5, 0], [0.5, 0.5, 0.5, 0.1], [0.5, 0.5, 0.5, 0]]
I've never fully understood PE in Arma (last time I tried to work with it was in Arma2), but I believe the config version is much better and has more options (although limited in changing things on the fly)
although I guess modifying weight, volume and rubbing might change how it behaves in the air
Is there a way "data terminal" can be on the target lists of squad leader? For examle, If there are explosive box and data terminal, explosive box is on the target list, but data terminal is not. How can make "data terminal" is on the target list?, so I can see it on the target list.
I'm not 100% sure, but I believe because the IED has an action that can be performed by the AI, while the Data Terminal is just a static object
then, any way to give an action to Data terminal?
use the action function (see wiki for more details)
Just because there's an action on it, doesn't mean it will be picked up that way... though let us know if that's the case.
Interesting question: I would like to hide items from (ACE) Arsenal based on a setting (through CBA Settings Framework).
Normally this is done by setting the scope in the configs (or use ace_arsenal_hide), but I would like to make it dynamic; show item A when setting is ON, show item B when setting is OFF.
Is this possible with scripts (or some fancy config conditions), or do I simply have to live with both items being available in Arsenal?
PS. I'm not talking about limiting the contents of a Arsenal Box, but about a "Full" Arsenal.
I don't know if this helps you @exotic flax , a little while back I wanted to introduce a "validate arsenal", completely decoupled from the baked in UI stuff in the ACE framework. Goal being to share load outs with AI units in my groups. Anyway I found much in the way of customization, or nuts and bolts API, was sorely lacking. There are a handful of sort of "big swath" API, but I wanted a more surgical strike. Was not possible without some customization on my part Plus side, I was able to reduce the validation complexity with a couple of strategic callback functions, especially in lieu of the nasty include definitions that had been there previously.
Q: I am finding that playSound3D intended for "all" players, followed remoteExec, seems to be stomping on the sound.
I'm aware of the limited possibilities of Arsenal and ACE Arsenal when it comes to modifying it, especially with scripts. Therefor the question, but fully knowing that there might not be a solution because Arma π€£
And regarding playSound3D; this should play for all players by default, and remoteExec shouldn't affect it in any way.
The only thing I can find on the wiki is the maximum volume of '5' when playing it remotely (= player A plays sound, player B won't hear it at all)
Would anyone know where to find a team balance script like whats in KOTH?
taking a step back, starting from some of the smoke particle effects, then introducing color, so I can see what the heck the effects are. after that lots and lots of experimentation.
okay, I have maybe 80% confidence in the PE effect so far. using cloud as a basis, "wisps" of snow feel more cloudy than actual wisps. is it possible to add more turbulant rotation?
I think I answered my own question, it would seem rotationVelocity is the effect I want, or thereabouts.
Q: what is the "strength" component returned by windRTD ?
Array with wind strength and direction
My issue still remains unsolved.:(Are we allowed to repost/bump the request for help?
Thanx
guess you just did.
Yes as long as you don't crosspost and don't do it too often you can bump
@thick merlin if you share code, please pastebin it
Smaller clips can be posted here with codeblocks
Nica,Thanx bud.Dedman,i did it as good as someone could ask that.Another opportunity to help missed.
Dedmen*
<Your code here>
(Three more backticks)
Sigh... doing this from mobile is hard. There, Iβll do it the lazy way π
np m8.
doing this without formal scripting education isnt easy either.:)
how did you bring up that box?
You encase your code in β```β
https://support.discordapp.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline- #3, otherwise someone on a PC may pop in and copy-paste the usual example eventually
```sqf
/* your code */
hint "good!";
```
β
/* your code */
hint "good!";
can someone pin that maybe?
radar animate ["radar_rotation", 1, 0.6];
radar addEventHandler [ "AnimDone", {
params[ "_unit", "_anim" ];
if ( _anim == "radar_rotation" ) then {
radar animate ["radar_rotation", 1, 0.6];
};
}];
Trying to make a animation loop?
first, it is recommended to use https://community.bistudio.com/wiki/animateSource
also, given you make a rotation from 0 to 1, you would have to "reset" it to zero in order to redo it
ah
@runic stratus is it a custom object or vanilla object?
radar addEventHandler [ "AnimDone", {
(_this select 0) animateSource ["radar_rotation", 1, 0.6];
}];```
@ebon citrus Yes, I get that. But "what" is strength? Qualitatively speaking. How do I gauge "weak" from "strong" wind?
Q: what is actually being effected with setParticleRandom? The PS itself? As opposed to, say, setParticleParams, which I gather are the generated particles themselves?
I assume from looking at it that it allows you to set the random values of thoes paramaters. while you define the inital state with the other.
More of a guess then anything sadly.
@dreamy kestrel no idea. Experiment
@dreamy kestrel
https://community.bistudio.com/wiki/setWind
wind unit is m/s
Dumb question: can iniDBI2 be used in Arma 2?
the extension interface is the same (I assume it doesn't use rvextensionargs)
but you might have to fix the scripts if they use params and such
but generally, you can make it work
Nice, because I'm having horrible troubles with ARMA2NET
@tender fossil Since A2 is fairly legacy, feel free to take a peak at how we did database stores in MSO.
Q: kinda sort scripting related, RGBA... A, alpha, controls hue aspects of the color?
A is the transparency of the color
hmm... I have colors in the form, [_x, _x, _x, _a] basically, but sometimes they are showing up "off color", i.e. not especially "white" or otherwise "grey" in tonal quality.
Can someone dm me a script for how to breach locked doors
@dark temple that's not really a scripting question.
what is your alpha at @dreamy kestrel ?
I was told that was something due to scripting
Yes it is but you want us to do a script. We only help you making one here
(or discuss about scripts and everything)
I just want to use a gun to breach a door.
while it sounds simple it is not as simple as that.
to get into scripting I read and did some of killzoneKids tutorials from his page.
theres also the list of all available commands
@cunning crown my color/alpha are set along these lines:
private _colors = [
[0.8 + random 0.2, 0.7 + random 0.3]
, [0.9 + random 0.1, 0.8 + random 0.2]
, [0.8 + random 0.2, 0.6 + random 0.2]
];
what are you coloring?
clouds, trying to simulate a wind blown wisp.
I transform that collection:
_colors = _colors apply {
_x params ["_color", "_alpha"];
[_color, _color, _color, _alpha];
};
@young current why wouldn't we do it like that? do you have a better suggestion? the colors are sometimes appearing kind of "tinted", but I wonder if some of that is the color range exposing itself in my LED IPS monitor.
perhaps if you explain in full what is it youre trying to achieve and what goes wrong. Also if possible get pictures or video of the issue.
@young current It's pretty simple, trying to simulate a wind blown wisp, in the context of snow storm weather, the colors are sometimes appearing kind of "tinted". Nothing magical about that.
you see wind blown wisp says nothing to me and "tinted" can mean lot of things and since this is a visual issue it would be easier to understand the problem if you show it as a picture
I am not giving any strength to any of the color channels, they are all _color, right? I'm thinking it is probably just a tinting effect of seeing Chernarus Winter white behind "gray" cloud pattern... but I wondered if there were any other insights as to why we would be seeing off color tinting.
where are you pluging the _colors?
I'm not sure I follow the question? pluging?
yes, using the PE system. as described above re: color/alpha calculations.
how far above
I don't know your screen, maybe 1-2 pages.
k, well good luck.
well, appreciate the feedback.
honestly I might be able to give better tips if you had answered my questions and provided the pictures. Its quite difficult to debug where and what stuff happens if you dont provide all the info. If you paste your whole code how you are using the particles that could give better insight. If you get those down here I might take a look later but I got my own stuff to do and cant spend my evening trying to pull the needed info from you.
Some examples of the tint appearance... https://imgur.com/a/d6XYVER
@young current Well, sir, honestly, I don't need to explain myself repeatedly when you can review the history for yourself.
Well I don't need to help you either. Its 2 way street.
Β―_(γ)_/Β―
good luck with it anyway.
Your choice, that's up to you. I've disclosed what I needed to.
@dreamy kestrel, you are setting random R, random G, random B
therefore you can have 1, 0.8, 0.8
What you should do is one random, and apply it to R, G and B
No, I'm not, at least I don't think so. Are you saying the whole expression is contained "pre" evaluation by _color?
That is essentially what I have here, is it not?
private _colors = [
[0.8 + random 0.2, 0.7 + random 0.3]
, [0.9 + random 0.1, 0.8 + random 0.2]
, [0.8 + random 0.2, 0.6 + random 0.2]
];
_colors = _colors apply {
_x params ["_color", "_alpha"];
[_color, _color, _color, _alpha];
};
that script doesn't make any sense in it's current state
Try splitting it in _r, _g, _b ?
How do you use the final _colors?
@exotic flax it makes various grey/alpha tints
I am passing the colors into the PE system.
Hm. Should then work. Try systemChat it?
but what I am hearing is that possibly this is like saying, [0.8 + random 0.2, 0.8 + random 0.2, 0.8 + random 0.2, 0.7 + random 0.3] in one sense.
[WORK] <ARRAY> [[0.870058,0.870058,0.870058,0.968789],[0.982284,0.982284,0.982284,0.949321],[0.834822,0.834822,0.834822,0.771789]]
this is what I get in sqfvm π
oh wait, maybe you have a random colour setting on the particle emitter!
so the tinting does not make sense to me...
possibly? which one is that...
my understanding is that colors were migrated through the array over the particle's lifecycle?
I am not sending anything beyond the PE target object, i.e. https://community.bistudio.com/wiki/ParticleArray
yes, this should transition between grey tints indeed, you have it right
maybe it's just light reflections through the grayscale cloud then...
emissiveColor ?
@exotic flax not sending one
could it be the shape which has baked in colors?
could be? it's just a "cloud" base object. that is possible however.
like https://community.bistudio.com/wiki/File:a3_universal_ca.jpg has a lot of fire/explosion shapes which include yellow/orange/red
I'm just using the \A3\data_f\cl_basic as the basic shape...
that should only become white/grey (unless colors used)
@dreamy kestrel care to dm a (minimal) demo mission plz?
I am curious about this one π
Anybody know if it's possible to configure EDEN modules outside of EDEN in regular scripts? I'd like to configure ALIVE without having modules all over the map making things hard to manage
I understand I can create modules, but is there any way to sync them to other ones programmatically?
You can probably do that but everything must happen at the initialization of the module, I don't thing you can change variables on the fly during the mission
Any ideas on what 'syncronizing' modules actually means in Eden? I'm pretty sure that the module attributes are just variables on the class, but I don't understand what syncing does
You can get sync objects using https://community.bistudio.com/wiki/synchronizedObjects
and add them manually using https://community.bistudio.com/wiki/synchronizeObjectsAdd
and unless something changed drastically in the module framework since i last time coded some, modules are nothing else but game logics with some variables being set to and a method that gets run
So create the game logic, set the correct variables, sync whatever needs to be synced, then call it's method?
Thanks @queen cargo
pretty much
need help change extdb2 with sql custom to extdb3
what is the exact problem and which scripts are not working as expected?
Does EH "Killed" remain after assigned unit's respawn?
I think so, but tests would be needed
Okay thanks
Yes it does
Working on a weather wind manager... Best I can tell, having ACE enabled, it wants control when its weather/wind is enabled. So we can guard against that with this?
private _fnc_aceWindSimulationEnabled = {
private _ace = [
{ace_weather_enabled}
, {ace_weather_windSimulation}
];
private _rawCount = count _ace;
if ({!isNil _x} count _ace < _rawCount) then {false} else {
{[] call _x} count _ace == _rawCount;
};
};
Man that code is a giant WTF?
how do you figure @still forum ?
I'm looking at one line and think "that makes no sense"
but okey, you can do that
look at next line "that doesn't do what you expect it to do, thats nonsense, oh wait.. nah you can do that, but still doesn't make much sense"
next part of same line "thats weird... but... okey? I guess"
next line "wow.. what? Why? that, oh no.. uh.. ah.. thats just a VERY weirdly written getVariable.. wow.."
it is a data flow version of something like this, if (!(a || b)) then ... else ....
But we cannot have the variables out there nakedly exposed because when ACE is not present, they will be nil, I am assuming, correct?
This would be my variant
private _fnc_aceWindSimulationEnabled = {
private _variablesToCheck = [
"ace_weather_enabled",
"ace_weather_windSimulation"
];
//return true if list contains a variable set to false
_variablesToCheck findIf {!(missionNamespace getVariable [_x, false])} != -1
};
wrapping variables into a code block, just to then get their value with "call" and checking if they exist with "isNil" and then comparing to a count of the array size..
That's kind-of brainduckish
My variant is find variable thats false, default to false if it doesn't exist.
In my code you can immediately see whats going on (getVariable vs your call+isnil combo)
what happens when enabled is present but windSimulation is not?
it will default to false, thus the findIf will find the false, and make the function return true
getVariable would return false for that variable so the whole code would return true
hrm, it also depends on missionNamespace, which I do not suppose would be changing any time soon...
sorry error. == has to be != because we want to check if there is NO false in the array
you can also use currentNamespace if you want to
but that variable is a missionNamespace variable, looking it up in a different namespace doesn't make much sense
thanks @still forum ...
how is rain accomplished, using the PE system? using base shapes?
curious using which particles, though.
actually it might be implemented in shader, not sure
hmm... trying to identify the shape name paths for the particle arrays here... https://community.bistudio.com/wiki/ParticleArray
if I understand how the masking works, I count indexing into the image arrays?
let's say I wanted to use this texture file, https://community.bistudio.com/wikidata/images/f/f8/a3_universal_ca.jpg, how do I identify that to the PE system?
maybe I'm missing something here... so the "\A3\data_f\ParticleEffects\Universal\Universal" refers to the A3 particle texture https://community.bistudio.com/wikidata/images/f/f8/a3_universal_ca.jpg ?
yes
okay, let's say I want to use the particles at, ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 15, 1]. how does it know I only want the first 5 or so textures?
or for that matter if I wanted to use something like ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 13, 9] for a patchier snow fall effect.
hmm, passable as a blizzard effect? heavy snowfall, vigorously falling out of the NNE, https://imgur.com/a/UfDWkw3, that's roughly 10oc player POV.
that's with x3 PS emitting snow particles. for lighter snow I dial back the number of PS, or go with a different base shape.
@dreamy kestrel you could get inspired by the BIS_fnc_sandstorm that uses bigger clouds to cloud player's vision as well
yeah, I considered visual FX, but I was not that happy with them. if anything, I might consider a "fog" PS, or even the vanilla fog.
FYI for anyones future reference, the default side in the role screen is just defined by the order they are specified in the sqm file. So you can specify it by placing playable units of the side you want to appear first.
Hey, some issue came up for me and because I'm quite a beginner when it comes to scripting I have problem solving it. The error box in game keep throwing this at me and I cannot even localise its source. This is the part of rpt file.
Error in expression < {
sleep 3;
if(!isnil 'GrpNATO_A3') then
{
count units GrpNATO_A3 > 0
>
Error position: <then
{
count units GrpNATO_A3 > 0
>
Error Undefined behavior: waitUntil returned nil. True or false expected.
I'd be very glad if you can figure out when the error might be hidden. Thank you in advance!
Thing is I don't even have a clue which file this thing might be hiding at. I'm using a framework and although I looked through all of it I couldn't find it.
Is there any part in the RPT file that could tell me which file is this error referring to?
Server side or client side?
Everything is included in the missionfile on my side, but some things require it to run on server.
If it's client side, you can bring up the error if you have show script errors enabled
And it will show the path
@opal gulch
```sqf
hint "it's aliveee";
```
hint "it's aliveee";
Just for better readability.
Thanks, I'll use it next time.
see my pinned message π @jade abyss π π
pah, who reads pinned messages anyway π
So im still kinda new, but i have set up simple "Kill X Y Z" to win mission" missions and simple "get to X to win" missions, id like to be able to combine both, to make a kind of "kill X Y Z then reach point Q to win" Is there a simple way of doing that? Something like a victory trigger area that only becomes active after the targets are dead?
@plain vale check the state of targets x, y and z with
https://community.bistudio.com/wiki/alive
so i have that already with stuff like !alive (target name) &&
So i assume you plug this into the exit area, which then plugs into the victory trigger?
So (guys are dead) area activates->get to area->winstate triggered?
However if you want to do it
There are honestly so many ways
You could make it even a waypoint
And then make the area trigger activation check whether the targets are alive
You'll have to do a bit of your own thinking here
So
Waypoint: kill targets -> waypoint: go to area
Trigger activation on unit enter:check if targets are NOT alive, do X
prolly the best way to manage it is through tasks:
- Task A:
!(alive target_1) - Task B:
!(alive target_2) - Task C:
!(alive target_3) - Final Task:
(task_a && task_b && task_3) && "player in exfil area"
but like Nica said, there are a lot of ways to manage such things, and even more ways to script it
I assumed tasks would be a bit more complex, but yeah, if you want to get into them, they are for sure the better solution
You just have to keep track of locality with tasks
Ok i think the thing is used last time was waypoints
or specifically a trigger area linked to a victory waypoint
OK no waypoints
yeah
so i guess i just want to gate the activation area to not be active unless the targets are down
OK! i got the area activating when the targets are down
now i think i just need to add a bit specific to the player getting there in particular
got it working

Can I rearm specific magazine on vehicle's turret?
Or should I remove empty magazine and add new magazine?
What do you mean specific?
For example, ED-1D has 3 magazines. Laser, pellet, slug.
With setVehicleAmmo or setVehicleAmmoDef, I cannot rearm slug without rearming pellet.
Remember locality
I dont remember how it goes in this case, but just keep it always in the back of your mind
[["Laserbatteries",[0],1,1e+007,0],["15Rnd_12Gauge_Pellets",[0],15,1e+007,0],["15Rnd_12Gauge_Slug",[0],0,1e+007,0],["15Rnd_12Gauge_Slug",[0],15,1.00001e+007,0]]
Problem with addMagazineTurret is empty magazine.
So I want to fill that empty magazine without add magazine.
Is it possible or should I remove magazine?
I considered that solution but imo filling original magazine is nice.
Stop being lazy
Just iterate on all magazines and remove them if they are not full and add a full one
There is an option to fill ALL magazines
But not one to fill just one particular magazine
Im unsure if you can pull a vehicle's loadout and if it includes loaded magazines
Try getUnitLoadout
And then setUnitLoadout
Might work
Okay then I will remove empty magazine and add fresh magazine
Prefered solution apparently
What are you trying to do exactly
It might be that youre overengineering this
Rearming ED-1D on field with infantry 12 ga rounds
π
But yeah, dont care about empty magazines in turrets
Arma is also not really about repacking magazines in vehicles, so dont even think about it
Well with that empty magazine, my script wouldn't detect current ammo status correctly.
Anyway I will use addMagazineTurret and removeMagazineTurret as you suggested.
Why?
If you want magazine information, use https://community.bistudio.com/wiki/magazinesAmmoFull
if I didn't remove empty magazine, array with that command will be full with empty magazine so I cannot get information correctly.
Ok...
Genius
Get the magazine state
Remove the magazine
Add magazine with previous ammo+added ammo
Load magazine into turret
What is diffrent between magazinesAllTurrets and magazinesAmmoFull on vehicle?
MagazinesAmmoFull is per turret path
And returns full information
MagazinesAllTurrets it per vehicle
Also, excuse my rude demeanor
I have my reasons, which are not your fault
Okay then thanks for your answer
how would one go about adding an array variable to a unit via setVariable then referring to that array later?
for context: i want to keep track of the number of areas completed, adding the area to their array with pushBackUnique each time they complete an area: after completing x number of areas, they advance to the next part
you just setVariable the variable, not sure what you're asking?
i'm not sure how to word it π
basically i just want to know how to refer to the array i give them for when i use pushback
is it just whatever name i give it with setVariable?
_array = object getVariable "yourvarname"
https://community.bistudio.com/wiki/getVariable for reference
ah, then just pushBackUnique on that?
yes
it already modifies then array so unless you want it public no need to re setVariable after pushback
lovely, cheers both π
keep the wiki closeby, it's a great friend (when not down)
shoots at wiki
wiki down wiki down! Mediiiic!
5 hours later
Wiki: I'm at grid 201856
Or a Dev Ops who doesn't break the server πππ
wouldn't wiki be Doc Ops?
if we call the Doc when the wiki is down, no wonderβ¦
To quite RvB; Doctors heal people. Medics just make you feel better.... while you die.
Don't need anything written code wise, just need some ideas.
Hmm, I don't believe I tried that last night. That's a good point.
plausible snowstorm billowing fog effects... https://imgur.com/a/lUdeTIP
noice! indeed, most of the time when there is a snow blizzard there is a fog π
these are all going to be aspects of my snow storm creation function. want billows? want snowfall? etc, etc.
and vary degree, intensity, i.e. number of billowing PS, thickness of the fog, etc.
Here's a funny effect... I do not think I've spawned in any particles like rain or snow. But when there is a "naturally" occuring storm, thunderstorm, etc, and the billows are rolling, the rain turns in to snow when it passes through the clouds. Interesting...
@dreamy kestrel you do realise that you did post the same URL, right? ^^
with an added image of the scenario.
Hi. Is there a way to add a Var Name to an inventory object when it gets taken from a player into a container?
Im using DropBag if that helps.
I was hoping that I could do something like
_VarNameHere = restOfLine;
But unfortuantly no joy.
Its the only thing in the box, does Arma have wildcards?
hope i haven't gone over my question quota for the day: does anyone have experience with BIS_fnc_kbMenu - wiki is turning up nada, not even google can shed much light on it
for a specific unit/vic class how can i get the patch name please?
Q: what is the position / moveVelocity in reference to? The PS? https://community.bistudio.com/wiki/setParticleRandom
@alpine ledge you can assign the variable to a Player and move it everytime the item gets moved
Loads of work... But the only way possible
Or in reference to https://community.bistudio.com/wiki/setParticleParams ? I take it one refers to the SOURCE, whereas the other refers to the PARTICLE, or whatever the thing was that spawned in, so to speak?
@alpine ledge you can assign the variable to a Player and move it everytime the item gets moved
Loads of work... But the only way possible
Completely ignoring what happens, when there are multiple objects of the same type in the inventory.
Madness, that's what happens. Tbh, just make it an assignable slot item and call it day, nobody needs a radio anyways, or a compas
Useful, yes, but if you have a gps, the compas is questionable
Dagr is nice too
Modded
Mhmm
Impossible to account for modded items
The Compass is useless if you have a gps and the radio slot is... questionable, so i wouldn't mind swapping one of these out for a mission related item
But i wish we could assign variables to inventory items
Wouldve made my project like 100 times easier
What? Basic gear is: know where you are (map), know how to get there (compass). No?
If you are on veteran youβll need it
The gps has a built in compass
So you WONT need a compas if you have that
It also has a built in map
So the map and compas flies out the window as soon as you have a gps
Radio is not useful in vanilla unless the scenario utilizes radio functions
How exactly can I use userconfig in a server folder environment? The biki says that you can use get-type and missionConfigFile to get any value from it. But would that be even accessible outside classes defined in description.ext?
@high marsh im not entirely sure what youre asking for, but is this of any help? https://community.bistudio.com/wiki/userconfig
Not really, I was using that as reference.
ucval = getNumber (missionConfigFile >> "X" >> "Y" >> "key")
missionConfigFile has access to description.ext defined classes like CfgFunctions or other custom type classes. But it would not seem it can reach the root a3 folder where say a userconfig file would be located. Or am I doing something wrong?
yes
you need to include it
class X {
#include "\userconfig\MY_addon\Somefile.hpp"
};```
Ahh. Letme see.
and inside Somefile.hpp:sqf class Y { key = value; }
and in that case, you could use: sqf ucval = getNumber (missionConfigFile >> "X" >> "Y" >> "key")
just to be sure, if i were you, i would check that the value is indeed a "number"
idiots like to write whatever in userconfig files
Right, seeing as how the file gets loaded without any respect to what's inside it.
Works great.
speaking of which, is checking if the config matches each type the most efficient method? I swear there was something like a function that had better compute time
ex:
_cfg = configNull;
if(isNumber _cfg) then {
};
if(isArray _cfg) then {
};
if(isText _cfg) then {
};
doesnt matter
Ok?

and never again
so there is no point in bothering yourselkf over a microsecond more computation time
Right.
just and them all
into a single if condition
and then you want to have it trip on a false
and then start throwing errors
"Hey, listen!"
"You messed up your config files!"
Mission end
it's just a measure to make sure that you dont have to spend good time hunting down a user-error
Agreed.
always remember this: https://twitter.com/brenankeller/status/1068615953989087232
Oh no for sure, my use case is to manage settings that stick to the user from server to server w/o having to modify for each. Rather than store vars in profile data I feel like overall less file operations which is why I was interested in using userconfig.
there are default settings, but the player can change them at will.
something that the players can't F up on is the mission defaults.
are you sure?
Well, if no user config exists. Mission automatically applies values. User doesn't interact with these values
is it possible to increase the speed of an animation on an object called via animate or are you stuck with the preset speed
derp, it was right there on the wiki looking me in the face 
use animateSource plz
hmm, why's that?
It's more network friendly
it is written on the animate page:
It is recommended that animateSource command is used instead of animate whenever is possible, as it is more efficient and optimised for MP
I should move this note up, really
this config info has close to nothing to do on this page.
oh yeah, people like me ain't got time to read that far down π©
hehe
π
Hey guys, We have a database through indbi. When you load into the server after a restart it doesn't auto update your UI (Cash, XP, Rank etc.). How would one do this?
Once you get another kill, more xp, or more cash it'll update correctly however.
L*fe server?
Nah
what, then
I don't know, if they have a Discord it would be more successful to ask there I believe
(though other peeps here could know the answer)
I am speaking with the dev, it's apparently a bug, but there's gotta be a way to update it after a restart when you load in
I don't know how they work, maybe with connection EHs/scripts
initPlayerServer.sqf, playerConnected EH
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/addMissionEventHandler#PlayerConnected
I'll give it a go tah
been trying to use this script but as soon as I activate it the "elevator" just disappears
while {true} do {
if ((_pos select 2) < 20) then { // Stops at 20 meters
_pos = getPos elevatorB; // Get position of elevator
elevatorB setPos [(_pos select 0), (_pos select 1), (_pos select 2) + 0.02]; // Increase Z-Axis by 0.02 meters
};
sleep 0.05 // Re-run section every ~0.05 seconds
};```
I think its made by Rumpus
@smoky verge try using getPosATL setPosATL
@high marsh what you were probably looking for was https://community.bistudio.com/wiki/isNumber
so isText etc.
aaaaaaaaah sorted https://community.bistudio.com/wiki/animate out
no excuse now @alpine ledge Γ¨.Γ© π
you underestimate my ability to not notice things right infront of me π
ah, that looks much nicer, good job!
it always bothers me to see technical data where it is absolutely not needed / not smart to put there
@smoky verge i recommend setVelocityTransformation over setPos trickery
also keep in mind that the setPos does not apply nicely to remote units
so vehicles will... if unoccupied, move up with the "elevator", but players will sink into the ground
unless the player moves
i wish arma 3 had parented movement
yeah I noticed
was thinking about it but never managed to make setveltrans work correctly
and the project is not important enough
sommething which Enfusion doesnt seem to lack
yeah, i ended up making elevqators the battlefield 4 way
close door, wait, teleport, open door
yeah seems to be thte safest way
sommething which Enfusion doesnt seem to lack
wat, parented movement is in Enfusion? if so, neat!
oh dear that would be grand
to a certain degree, it seems
@ebon citrus reminds me of the stand by manufacturing rule of thumb, poka-yoke, or something along those lines. https://en.wikipedia.org/wiki/Poka-yoke you can try to idiot proof it, but along will come the bigger, better, badder idiot...
Would someone with a better grasp of the Particle Effects care to comment? I am trying to understand this better... setParticleCircle effects the Particle Source? setParticleRandom effects the Particle Source? setParticleParams effects the Particles themselves?
https://community.bistudio.com/wiki/setParticleCircle
https://community.bistudio.com/wiki/setParticleRandom
https://community.bistudio.com/wiki/setParticleParams
Concerning the Particle Effects, I've got about a dozen or so parameters I think would be interesting for a billowing fog effect, and I want to narrow that field to maybe half a dozen or so, depending on the engine/API effect.
How is iniDBI2 supposed to work with multiple files handling a database if the database is a local variable _iniDBI?
And do .dll files need to have execute bit set in order to work as part of program?
I.. don't think so?
I don't know either lol
I'm trying to find a reason why my ARMA2NET database application doesn't even initialize, just nothing
!issuewarning @ebon citrus for profanity. Please see the #rules for further information.
Done.
Done.
I'll dm you the message
i wish it would be
been there, tried that
It aint that complicated to create the delta to the Position
get's a little bit stuttery over network
and especially player-operated vehicles begin to function strangely
exactly why i would recommend setVelocityTransformation instead
but arma 3's behaviour with remote objects interacting with local ones isnt flawless, to say the least
Um, no
@stray nova
Do you not wish to read the rules or do you you not wish to follow them. I'm, confused.
I'm confused too
Hi confused, I'm dad!
well, you apparently said a bad word
bad words are not accepted
you get a warning for saying a bad word
Lou is very angry now!
agrrr π π
Why doesn't this work?
curatorKD = (findDisplay 312) displayAddEventHandler ["KeyDown", { systemChat str _this; }];
Expected behaviour: keypresses in curator interface would produce a systemChat of key pressed.
findDisplay would only works if the display is displayed I think
Well, when I enter zeus, no systemChats
it has to be open when you add the EH
Mmm, interesting. I'll give 'er a try.
@ebon citrus zero confusion regarsing checking type of config value. It just seemed jank using all three to check the type
yup, nice
rookie msitake, i did the same thing
works
Hey guys is it possible to add a weapon to a player and give the weapon a scope in a statement in the config.cpp
like in this line
statement = "this animate [""proxy_su_4"", 1]; 0 = [player, ""OPTRE_M319"", 1] call BIS_fnc_addWeapon;";
so i know that obviously its player, weapon name, magazines but is there anything after where i can specify a scope?
Where have you found that old code?
Its mine haha, its for a weapon rack that you can actually take the weapons off, but i want someone to be able to take a weapon that doesn't have a class that has a scope attached already
Seems to me there are plenty of weapon classes baked in to Arma which have and don't have attached optics - use one of those?
Yeah thats not the problem, sorry if i wasn't clearer, that statement is activated from the scroll wheel, and i want to add in a bit to give the player a scope on the primary weapon, ive just found addPrimaryWeaponItem but im unsure where i can use it in that statement
I'm a bit confused by your mentioning config.cpp - is this a mod you're designing or is it part of a scenario
and if you want to be global, a.k.a. Mr. Worldwide: https://community.bistudio.com/wiki/addWeaponWithAttachmentsCargoGlobal
Very well.
a mod
Bohemia isnt all that creative with their naming scheme
So could you do call BIS_fnc_addWeaponWithAttachmentsCargoGlobal?
Oh right
or script command
container addWeaponWithAttachmentsCargoGlobal [[weapon, muzzle, flashlight, optics, [primaryMuzzleMagazine, ammoCount], [secondaryMuzzleMagazine, ammoCount], bipod], weaponsCount]
thank you
Just read wiki page :u
also, for config stuff, go to #arma3_config
add this to your bookmark bar: https://community.bistudio.com/wiki/Category:Arma_3:_Editing
oops sorry didnt see that channel
no harm done. I like to believe that nobody here is a bad guy from ww2
hey guys, anyone else had issues with not being able to enter a vehicle? as in, entering the driver, the door opening, not actually entering the vehicle, still a guy.
mods?
so it seems to work, and not work. I'll see if this becomes an issue for many people on Saturday. π sorry to bug ya.
m'kay! Β―_(γ)_/Β―
@winter rose Hey, I tried the code that you gave me last time
{
private _myObject = createVehicle;
_myObject attachTo [_x, [0,0,0]];
} forEach allPlayer;
and I get error, invalid number in expression
I am pretty sure I didn't give you this codeβ¦ π
createVehicle takes arguments
allPlayers*
@tough abyss
you gave me last time
:doubt:
^
but this code is not complete, you will have to add the rest of the things the commands require
perhaps if you paste the whole code you have used it can be debugged
When executing:
call {
private _c10 = _d displayCtrl 10;
systemChat str [_c10, ctrlParent _c10, ctrlText _c20, _c30];
};
In the Debug Console, the systemChat shows [00007FF6FC2F3E90,00007FF6FC2F3E50,string,any]. If I try to return that, I get nothing. Isn't that supposed to throw an error and stop?
{
private _myObject = "classNameHere" createVehicle;
_myObject attachTo [_x, [0,0,0]];
} forEach allPlayer;
I also tried
have you looked at cretevehicle commands wiki page?
{
private _myObject = createVehicle ["classname",position player];
_myObject attachTo [_x, [0,0,0]];
} forEach allPlayer;
Yes I took examples from there
and still allPlayers*
that too
I'm attaching anyway
ok
I still think I will get same error. I will try it now
@winter rose Yes, that was a typo in discord
can you paste the exact code you just tested
yes
{
private _myObject = createVehicle ["ModuleChemFlare_F",getpost _x];
_myObject attachTo [_x, [0,0,0]];
} forEach allPlayers;
{
private _myObject = createVehicle ["ModuleChemFlare_F",position _x];
_myObject attachTo [_x, [0,0,0]];
} forEach allPlayers;
Nothing happens now
there
in the top one you again can see the mistake on the coloring
also do you know waht position of player model is 0,0,0?
0,0,0 is relative to _x
on their feet
ground pos yes
not when falling it's not
not when falling
it can't fall if its attached
It works as intented when I to
testObject attachTo [player, [0,0,0]];
now I just need to do it for all players
Yes, I told you I want to attach a module
?
is your testObject the same thing you are trying to create there?
Kind of. I spawned the thing in eden and gave it a name. Then used that name instead of testObject
so no
Well I can't attach something that doesn't exist
so how did you create the thing in eden?
drag and drop from the menu
ModuleChemFlare_F is not a classname of any object
It's a mod
drag and drop from what menu?
modules menu
When you hover your mouse over items in eden it shows classname correct?
it should yes
That's the classname I get when I hover over that module
why not just attach the chemlight itself
We just agreed that it shows classname though
@alpine ledge Why do you mean? Isn't that why I'm doing?
it shows the classname of the module not the actual light
it shows the classname of the module you got from some mod
oh
zing
Well, how would I know that
π€·ββοΈ
The module is really just the flare itself tho
I don;t know
Another version of it exists as a grenade in the arsenal. Can we use that instead?
I do know that the module is just a thing in editor that when you launch the mission plops down a flare object
1 sec i've actually got a script that does what you're after
_light1 = "Chemlight_red" createVehicle [0,0,0]; then use attachTo on _light1 to whatever it is you want to stick it to
class Chemlight_green: Chemlight_base
{
model = "\A3\Weapons_f\chemlight\chemlight_green_lit";
effectsSmoke = "ChemlightLight_green";
typicalspeed = 14;
};
class Chemlight_red: Chemlight_base
{
model = "\A3\Weapons_f\chemlight\chemlight_red_lit";
effectsSmoke = "ChemlightLight_red";
};
class Chemlight_yellow: Chemlight_base
{
model = "\A3\Weapons_f\chemlight\chemlight_yellow_lit";
effectsSmoke = "ChemlightLight_yellow";
};
class Chemlight_blue: Chemlight_base
{
model = "\A3\Weapons_f\chemlight\chemlight_blue_lit";
effectsSmoke = "ChemlightLight_blue";
};```
yeah, that there is the classname for the module ^^
these would be the vanilla available chemlight items
chemlight_red is the flare itself
Ok, how can I find this for the one I'm using?
from config viewer if its some special chemlight not in the above list
We're talking about the version that's in the arsenal as a grenade right?
Can you tell me where I can find this config viewer?
Alt+G in EDEN
ok there's a lot of stuff there. Where would I expect to find it?
it is in A3/Weapons or probably on its own thing
if you want the lit one, then cfgAmmo
https://imgur.com/N6PpTvB is what you're looking for
just use the classname with the createvehicle command
you should see the classname at the bottom of the screen where it says Path
configfile >> "CfgAmmo" >> "Chemlight_blue"
Chemlight_blue is the classname you want to use for createVehicle
HuD_ChemFlare_Red_Ammo
HuD_ChemFlare_Red_Ammo3
I found two :)
afaik one of them has a different duration, but that doesn't matter to me
should I try that createvehicle script now with that name?
give it a go
minor note i've found when using createVehicle with chemlights is that there's a slight delay before the light actually turns on
similar to when you throw them as a grenade
It works!
How can I give you a kiss? xD
Thank you so much
Now I only need to test it with actual players and hope it works
{
private _myObject = createVehicle ["HuD_ChemFlare_Red_Ammo",position _x];
_myObject attachTo [_x, [0,0,0]];
} forEach allPlayers;
Uhm, one minor issue
that should attach them but it will also create them at their feet
deleteVehicle will do that
If I put delete vehicle in the script it will create and then delete
I want to delete at a later time
when do you want them gone
like after 30 seconds
sleep 30 then deleteVehicle?
I don't really know exactly when
could they be done outside of the loop?
because that would pause the loop on one player
Is there something like..
delete all vehicles with class name HuD_ChemFlare_Red_Ammo
it should just sleep 30 for every person, not pause when it hits the first player
Can you put it in my code so I can test it later?
could probably do something with isKindOf "HuD_ChemFlare_Red_Ammo" if you're inclined to go that route
don't think it's that straight forward, 1 sec
isKindOf returns a boolean, not an object
oh rip
if it's too complicated or adds a lot of processing then might as well go with sleep
if it works
Maybe something along those lines could work:
{
private _myObject = createVehicle ["HuD_ChemFlare_Red_Ammo",position _x];
_myObject attachTo [_x, [0,0,0]];
_myObject spawn {
uiSleep 30;
deleteVehicle _this; // _this represents the left argument of spawn, in this case it's our object
};
} forEach allPlayers;
Oh, I thought of this
{
private _myObject = createVehicle ["HuD_ChemFlare_Red_Ammo",position _x];
_myObject attachTo [_x, [0,0,0]];
sleep 30;
deleteVehicle on attachedObjects;
} forEach allPlayers;
^
This will do
attach the chemlight to player1
wait 30sec
delete the chemlight
attach the chemlight to player2
...
Maybe not what you want
Not what I want
You can either spawn one "thread" for each player which will wait 30s and then delete the chemlight, OR, add all chemlight to a list, and once the foreach is done, spawn one thread that will wait 30s and delete every chemlight in the list. The later is probably better
private _chemlights = [];
{
private _myObject = createVehicle ["HuD_ChemFlare_Red_Ammo",position _x];
_chemlights pushBack _myObject;
_myObject attachTo [_x, [0,0,0]];
} forEach allPlayers;
sleep 30;
{ deleteVehicle _x } forEach _chemlights;
My intention is for it to be deleted when the player touches ground
now that's different
Yup
If that's too complicated I can do with timer
It's just going to look silly when they are walking around with flares attached to the ground below them
might be able to use waitUntil {isTouchingGround _x}
exactly
private _chemlights = [];
{
private _myObject = createVehicle ["HuD_ChemFlare_Red_Ammo",position _x];
_chemlights pushBack _myObject;
_myObject attachTo [_x, [0,0,0]];
[_x, _myObject] spawn {
params ["_unit", "_chemlight"];
sleep 1;
waitUntil { isTouchingGround _unit; }; deleteVehicle _chemlight;
};
} forEach allPlayers;
a bit barbaric, but will work
why is it still sleeping 30?
it's not? π
ok I will test this
it's a bit tired after going round all those players π΄
a bit barbaric, but will work
Now I feel like mine is over-engineered || and probably not that good || π
private _chemlights = [];
{
private _myObject = createVehicle ["HuD_ChemFlare_Red_Ammo",position _x];
_chemlights pushBack _myObject;
_myObject attachTo [_x, [0,0,0]];
} forEach allPlayers;
_chemlights spawn {
private _chemlights = _this;
while { (count _chemlights) > 0 } do {
private _temp = _chemlight;
{
if (isTouchingGround (attachedTo _x)) then {
_temp deleteAt _forEachIndex;
deleteVehicle _x;
}
} forEach _chemlights;
_chemlight = _temp;
uiSleep 1;
};
};
one thing to keep in mind is that allPlayers will only test for human players, so if you're testing it with AI it may seem like it's not working
Yes, there will be no AI
@cunning crown uiSleep is not nice for this in SP
But why use allPlayers if you're the only player?
SP and MP compatibility π
I got errors on both of those scripts xD
nevermind, it was an error from the previous one stuck on my screen
I think that error is showing up a bit later
Yeah good point Lou π
it's stuck on my screen forever :P
So on @cunning crown 's version I get
Error, undefidined variable in expression _chemlight
And on @winter rose 's version it doesn't work when a player is inside an aircraft
Yeah, juste noticed that, 2s
I guess isTouchingGround is also inside an aircraft
Will probably have to execute airborne :P
https://community.bistudio.com/wiki/isTouchingGround This command returns always true if the falling object is attached to some other object with the command attachTo, like for vehicle air drop with parachute.
btw, I think the chemlight doesn't stay attached once you open your chute
Correct
ah true, in vehicle
But when you touch ground it will reattach (if not deleted)
wouldn't it still return true if they're in a vehicle because that counts as being on the ground
waitUntil touching ground and not in vehicle
@cunning crown Did you fix it?
Fixed the undefined var bug but it will still detach itself once you open your parachute
I intend for that lol
it still says undefined
@winter rose At line 9 you refer to object as _chemlight instead of _chemlights is that correct?
Ohh, didn't update the previous message but:
private _chemlights = [];
{
private _myObject = createVehicle ["Chemlight_blue", position _x];
_chemlights pushBack _myObject;
_myObject attachTo [(vehicle _x), [0,0,0], "head"];
} forEach allPlayers;
_chemlights spawn {
private _chemlights = _this;
while { (count _chemlights) > 0 } do {
private _temp = _chemlights;
{
if (isTouchingGround (attachedTo _x)) then {
_temp deleteAt _forEachIndex;
deleteVehicle _x;
}
} forEach _chemlights;
_chemlights = _temp;
uiSleep 1;
};
};
But I think that you should try something else. Instead of doing that for each player at the same time, just let each player handle that individually
Should be easier
Lou's version works fine
\o/
When using CBA_statemachine_fnc_addTransition
Can I leave _originalState as undefined or is it required?
I am trying to make a transition that could happen from any other state.
Or do I need to add a transition for each of the states?
EDIT: Also, how often is requirement for transition checked? I presume it is each frame?
EDIT2: can I trigger an Statemachine event transition using the CBA custom event system?
sorry quick dumb question: how can i restart editors MP server instance without restarting the editor?
(if I don't restart it my 2nd client won't redownload the pbo...)
start in singleplayer, quit, restart in MP :-\ @ebon ridge
oh, probably at least as slow as restarting the editor for me, thanks anyway π
yep, not ideal at all!
Before I go trawling for a complicated way to do this: does anyone have code handy which translates the vector relationship between object A and object B into something that works with attachTo?
Ie., Object A is a player, and Object B is 45 degrees from A and 20 metres in the air. There would be some complex math to figure out what [X,Y,Z] array would be used with in the objectB attachTo [objectA, [X,Y,Z]] statement, but maybe (as has been the case before) Arma already has a function for this?
yeah hang on a min
_x params ["_object", "_pos", "_dir", "_up"];
private _relativePos = player worldToModel (_object modelToWorld [0,0,0.1]);
private _starting_h = getCameraViewDirection player select 2;
private _bboxCenter = boundingCenter _object;
private _originHeight = (getPosATL _object) select 2;
private _height = (_bboxCenter select 2);
private _relativeDir = getDir _object - getDir player;
private _ghost = (typeOf _object) createVehicleLocal (getPos _object);
_ghost enableSimulation false;
_ghost attachTo [player, _relativePos];
_ghost setDir (_relativeDir + _rotation);
Thanks, I'll toy with that
Where is _rotation set?
Yeah, I dig it
would anyone be able to tell me why this doesn't work solved (but not sure why) it was due to another script moving other people in the script around, but that shouldn't have mattered since that script was called first, eh idk π€·ββοΈ
the pilot should start moving to towards the marker almost instantly, but for whatever reason he sits around for a few seconds, or sometimes doesn't even start the engine at all
the more bizarre thing is that this was working perfectly a few hours ago 
executing the doMove line with the in-game debug console makes him move as normal, so why doesn't it work in script form 
https://community.bistudio.com/wiki/Profile is it possible to get the value of a game setting stored in the player profile? I'm hoping to find the value of floatingZoneArea
obviously you can easily get the stuff from the profile variables file but that's rather separate.
Ok im having a bit of a weird time
i had a resupply helicopter mod working
and it was basically a copy-paste and it works kind of thing
a bunch of SQF files, one init file, and the player character with a specific init input
it was working fine, then i copied a level and now returning to it and the copy the script no longer works
what is weird is that it does still work on other maps, just not those levels
and even weirder the error it complains about, a specific line in one of the SQFs having an undefined variable, is identical in the missions where it works
Im honestly not sure what is going on here?

Levels?
You mean terrains?
And you did copy ALL the files?
Anyways, it's hard to say when you just explain and show nothing
yes ive copied all the files from the levels where the mod still works fine
from separate missions sorry not levels
_unghi = [_spawnPosition,_resupplyPoint] call BIS_fnc_dirTo;
this is the line
but when i compare it to the same line from the same files in the missions where it works it is identical
i am assuming then it is something working with this line and not the line itself that is breaking
γ½οΈ
π€
You gace very little information all in all
Sorry i was nit of help, but i dont see how i couldve been
Ah yeah sorry i was kinda working through the changes i made to see how what borked it
i was just more so wondering if there was some broader thing
the specific detail (i think) seems to be that the victory trigger area had this as a condition
!alive A2 && !alive A7 && vehicle player in thisList
though now im not sure exactly why that was causing problems
@ebon citrus Ok let me rephrase it like this, assuming i want to have a mission where i have a victory trigger set to an area trigger, and that area trigger should not become active until target X is dead andthe player is inside the area, what would the best way to write the Condition area of that area trigger be?
If you REALLY want to do it that way
Then us a simple
if(!alive X) then {
// Your code
};```
@plain vale
Ah ok thanks
@ebon citrus so like this
if(!alive A2) then {
// vehicle player in thisList
};
?
it gives me an "ERROR INVALID NUMBER IN EXPRESSION"
@plain vale // stands for comment
Lines starting with // are not interpreted by the engine
So you would use
if(!alive theTargetUnit) then {
endMission "END1";
};
@snow viper https://community.bistudio.com/wiki/setVelocityTransformation or keyframe animations. Pick your poison
Ah ok
@plain vale did that work?
ive never done it that way
ive always done it
if(!(alive theTargetUnit)) then {
endMission "END1";
};
ive never tried it the way nica does it
ive always done it with the extra ()
you dont need the extra brackets here
they wont do any harm, but they are not necessary @silent latch
is there a built in function in arma to solve a system of equations?
nothing hard, just
equation 1:
x*y=z
equation 2:
x/y=4
equation 3:
x+y>0
Where Z is known.
im silly
x > 0 && y == x/4 && z == x^2/4
Does anybody know off the top of their heads, if the Virtual Garage applies textures globally when used in MP? Like, so if you swap out a camo, it doesn't just show for the client?
Is virtual garage the new / improved Virtual Vehicle Spawner?
It's the Splendid one built by BI. The one you can see in the Virtual arsenal.
@outer fjord It uses BIS_fnc_initVehicle so the textures should be global
Done.
oh dear this again
Awesome thank you R3vo!
I need help how to make something like board with name and time of firing drill on mp missions
i think something like travel from triger A to trigger B and it will be shown on scoreboard or show hint with it
some ideas ?
hello i have the following problem, i tried to retexture a couple of vehicles and publish them as a mod , however i have no idea how to code from scratch, does anyone know of a mod i can use that would allow me export the necessary line needed for the config from the 3den editor, also how to convert custom compositions into mods
Retextures and compositions are 99% configs (retextures can be done with scripts, but doesn't make sense in a mod).
A few good sources to get started:
https://community.bistudio.com/wiki/Arma_3_Characters_And_Gear_Encoding_Guide
https://pmc.editing.wiki/doku.php?id=arma3:config:stiltman-retexturing-tutorial
How do I go about making a 3d player icon so players can see each other when playing and it limits friendly fire?
@broken snow https://forums.bohemia.net/forums/topic/158494-how-to-make-3d-wasteland-style-on-screen-player-markers/ might be your answer
yes
Could someone walk me through it?
Hm is there a command to get the point the player is looking at? If there is you could propably use an addaction and create the lightning strike module on the position that comand gives you
^ I still donβt get it

Where do I put the command?
[player,nil,true] spawn BIS_fnc_moduleLightning;
player setDamage 1;``` @dark temple
If you want the lightning to happen as soon as the unit is created then yes, otherwise no.
I want to be able to spawn it on command.
this addAction
[
"Eat that!",
{
[cursorTarget,nil,true] spawn BIS_fnc_moduleLightning;
cursorTarget setDamage 1;
},
[],
1.5,
true,
true,
"",
"!isNull cursorTarget",
50,
false,
"",
""
];```
Add an action to the player unit which is available when you aim at an object.
And I enter this in attributes?
ah neat so there is a command for that, thanks for sharing your wisdom
@cosmic lichen
And init I'd assume @dark temple
a units init that is
@dark temple Put the above code in the init of the unit you want to have that action.
βError invalid number expression β
Remove the // comment, sorry for that.
It says missing a bracket
btw whats with arma 3 not liking comments
? noticed that myself with both the // and the comment tag
@dark temple There is no bracket missing, I just copied it into an init field.
Hi
Oh I didnβt copy the fixed version
@ivory wren
I play arma 3
@oblique arrow call compile doesn't like comments =/
yeah its quite annoying
Yep, it is.
What button is attached to it?
No button, the scroll wheel action menu
Nope. I just spawned injured
It only shows if you look at an object, otherwise it's hidden.
it's possible to change stamina settings without use an addon ( script side ) ?
@slate sapphire https://community.bistudio.com/wiki/Arma_3_Stamina ?
setStamina
Set given amount of stamina. Please note that it sets absolute value, not fraction of Stamina.
getStamina
Return current stamina. Please note that it returns absolute value, not fraction of Stamina.
setFatigue
Legacy command from old Fatigue system. Now it set Stamina pool state on interval [0,1].
getFatigue
Legacy command from old Fatigue system. Now it return current state of Stamina pool on interval [0,1].
enableStamina
On / Off switch.
isStaminaEnabled
Check whether stamina is in effect.
allowSprint
Enable/disable Sprint for infantry movement (for all stances).
isSprintAllowed
Returns whether unit can sprint or not. Complementary to allowSprint.
seems those would be what u are looking for
@surreal peak no it's not but I've found a solution, the one you pointing me it's the first that I've found and it was not working, cos it doesn't allow you to have more or less stamina it just allow you to set less example max 1 you can set 0.5 to have half value, I wanted to raise the duration, after digging up and keep searching I've found that it's possible reducing the loadout weight coef using: https://community.bistudio.com/wiki/setUnitTrait
Hi, how to limit the territory of the map, as in the screenshot? https://imgur.com/a/gxRHyN2
Arma 2 OA
#end_of_life_arma @wary lichen
I have a mod which has lightbars on top of the vehicles however they only change color, they do not emit the light onto the surroundings. Is there a way to do this without editing the models?
@minor grotto you'll need to fiddle around with the color, intensity, attachTo positions and pause duration to get what you want, but this will create a red light on your vehicle, wait for the time you define, delete itself then create a blue light, then repeat
[vehicle name, pause duration, array of left light position, array of right light position] execVM "siren.sqf";
//Siren.sqf
private ["_vehicle", "_pause", "_leftPos", "_rightPos"];
_vehicle = _this select 0;
_pause = _this select 1;
_leftPos = _this select 2;
_rightPos = _this select 3;
while {alive _vehicle} do
{
private _light1 = "#lightpoint" createVehicleLocal (getPosATL _vehicle);
_light1 setLightIntensity 1;
_light1 setLightAmbient [10, 0, 0];
_light1 setLightColor [100, 0, 0];
_light1 attachTo [_vehicle, _leftPos];
sleep _pause;
deleteVehicle _light1;
private _light2 = "#lightpoint" createVehicleLocal (getPosATL _vehicle);
_light2 setLightIntensity 1;
_light2 setLightAmbient [0, 0, 10];
_light2 setLightColor [0, 0, 100];
_light2 attachTo [_vehicle, _rightPos];
sleep _pause;
deleteVehicle _light2;
};```
or modify the Reflectors class in the configs
psst if you add sqf behind the first 3 Β΄'s discord will color code the code @alpine ledge
so that's how you folks do it 

It's the top pin as well
[vehicle name, pause duration, array of left light position, array of right light position] execVM "siren.sqf";
//Siren.sqf
private ["_vehicle", "_pause", "_leftPos", "_rightPos"];
_vehicle = _this select 0;
_pause = _this select 1;
_leftPos = _this select 2;
_rightPos = _this select 3;
while {alive _vehicle} do
{
private _light1 = "#lightpoint" createVehicleLocal (getPosATL _vehicle);
_light1 setLightIntensity 1;
_light1 setLightAmbient [10, 0, 0];
_light1 setLightColor [100, 0, 0];
_light1 attachTo [_vehicle, _leftPos];
sleep _pause;
deleteVehicle _light1;
private _light2 = "#lightpoint" createVehicleLocal (getPosATL _vehicle);
_light2 setLightIntensity 1;
_light2 setLightAmbient [0, 0, 10];
_light2 setLightColor [0, 0, 100];
_light2 attachTo [_vehicle, _rightPos];
sleep _pause;
deleteVehicle _light2;
};
that's what i'm doing 
weird
You can't have the sqf bit on a new line
it's not, it's right after the ``
works with editing aswell
nailed it, first try 

could someone more smarterer than i explain this to me:
this script is being called via addAction:
//private [blah blah set later]
_instructor = _this select 0;
_unit = _this select 1;
_unitShort = switch (_unit) do
{
case B_player1: {"D"};
case B_player2: {"K"};
case B_player3: {"R"};
case B_player4: {"J"};
};
_unitFirst = _unit getVariable "skeetFirst";
if (isNil {_unitFirst}) then
{
//Units first time speaking to instructor
systemChat "Performing first time check";
systemChat str _unit;
call compile format ["['skeet', '01TrainingDay', ['KB_Skeet_%1_Begin_0', 'KB_Skeet_%1_Begin_0'], 'DIRECT'] call BIS_fnc_kbTell;", _unitShort];
["skeet", "01TrainingDay", ["KB_Skeet_I_Begin_0", "KB_Skeet_I_Begin_0"], "DIRECT"] call BIS_fnc_kbTell;
_unit setVariable ["skeetFirst", true];
systemChat "Setting first time variable";
systemChat str _unit;
}
else
...```
~~the first time i check it with systemChat, _unit is B_player1 as expected
when it hits that second systemChat, _unit now returns B_player4 yet as far as i can see, i haven't changed it, so why is it different?~~
**solved**: BIS_fnc_kbTell is spawn, not call - still not sure why that changes _unit but whatever, it works
just that little snippet there
am stupy its in the script
hmm, by process of elimination it doesn't change when i comment out the BIS_fnc_kbTells
but that doesn't make any sense, why does that change _unit
_pos = [] call BIS_fnc_randomPos;
hint format ["%1", _pos];
gives me "any"
i have added functions manager to mission
arma 2 btw
https://community.bistudio.com/wiki/BIS_fnc_randomPos
Introduced in Arma 3 version 1.00
right was actually using BIS_fnc_findSafePos
nvm figured it out, needed to close out the mission and restart
Ah, BIS_fnc_findSafePos... The wiki for that command was written by someone awesome, cause it never uses the word random... cause it isn't
@restive leaf
// line 130
_checkPos getPos [_maxDistance * sqrt (_off + random _rem), random 360] call
Already 2x random in 1 line...
LOL... And everytime it runs on Altis it selects the salt flats π
#define searchCenter [7049, 9241, 0]
#define searchRadius 4880
#define searchSlopeMax 2
#define searchFreeSpaceMin 20
local _pos = [searchCenter, 0, searchRadius, searchFreeSpaceMin, 0, searchSlopeMax, 0, []] call BIS_fnc_findSafePos;
Error in expression <ition was passed!"; []};
if (_maxDist == -1) then
{
_maxDist = getNumber(conf>
Error position: <== -1) then
{
_maxDist = getNumber(conf>
Error ==: Type Array, expected Number,String,Object,Side,Group,Text,Config entry,Display (dialog),Control,Team member,Task,Location
File ca\modules\functions\misc\fn_findSafePos.sqf, line 71```
happens only in sqf script, debug console is fine
Hey folks, could do with a fresh set of eyes on this one. If anybody has a spare minute your help would be greatly appreciated. (Apologies for the ugly formatting).
if ((side _x) == civilian) then
{
deleteVehicle _x;
};
} forEach allUnits inArea "Jail_Marker";```
Essentially I'm running this piece of code in an .sqf that is called by an addAction on a unit. I want it to delete only the civilians inside a marker area "Jail_Marker".
I've gone through a tonne of different iterations but need some fresh perspective. It throws up a bool error because inArea is incorrect.
...I've fixed it. For anyone interested:
{
if (((side _x) == civilian) && (_x inArea "Jail_Marker")) then {_selectJailUnits pushback _x;}
} forEach allUnits;
{
deleteVehicle _x;
Jailer_01 sideChat "Detainee Processed.";
} forEach _selectJailUnits;```
@velvet kernel Works fine in initPlayerLocal, replace local with private, your syntax is incorrect for A3
Im not using arma 3
AnimationSourceState
So I'm working on a script that attaches a vehicle to another one, and uses bounding box functions to calculate the offset so that the vehicles arn't clipping

