#arma3_scripting

1 messages Β· Page 568 of 1

restive leaf
#

Could be the issue. But this works fine as an example: sqf playsound3d ["a3\missions_f\data\sounds\radio_track_01.ogg",objNull,false,getposasl player];

dreamy kestrel
#

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]
winter rose
#

getMissionPath exists now πŸ˜‰

restive leaf
#

Let us know when you have finished modifying all the wiki pages' comments that include pre-1.96 methods for getMissionPath now dad πŸ˜‰

winter rose
#

no

#

…unless you list them πŸ˜‰

rustic plover
#

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

tough abyss
#

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

rustic plover
#

Again I must wait for ~30 secs

winter rose
#

@tough abyss from what I heard, ACE has that

tough abyss
#

@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

winter rose
#

@tough abyss Eden Editor does allow pylon settings…?

ornate scroll
tough abyss
#

@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 )

rustic plover
#

@ornate scroll thx, I know how remote execution works. I have problem only with setMass and strange delay before synchronize mass between all players

ornate scroll
#

Are you setting this in an unscheduled environment?

winter rose
#

@tough abyss script it is then

#

or you can create it and hideObject it

ornate scroll
#

Because, the remoteExecCall is unscheduled.

#

@rustic plover As soon as I am around my DEV machine, ill take a look for you.

worn forge
#

@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

tough abyss
#

@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

worn forge
#

Well then, you're going to want to look into setPylonLoadout

winter rose
#

or setup your plane in Eden and hide it with the checkbox, then "enable" it with myJet hideObject false

worn forge
#

For example with the Wipeout, you could do:

[_vehicle, _loadout] remoteExecCall ["setPylonLoadOut", _vehicle];```
tough abyss
#

Okay ill try that, is that in a sqf file?

worn forge
#

uh... yup

#

That you had to ask suggests to me that this might be a bit advanced and you'll be back with questions πŸ™‚

tough abyss
#

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]; 

worn forge
#

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

tough abyss
#

whats the place to start to correct my mess?

worn forge
#

How do you spawn the vehicle?

tough abyss
#

its a bit complicated, the warlords sector module does it for you when you set it as a runway

#

in eden

worn forge
#

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

tough abyss
#

so changing the vanillas classname pylons with a script isnt viable without a variable?

worn forge
#

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

tough abyss
#

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)?

worn forge
#

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 πŸ™‚

tough abyss
#

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

exotic flax
#

Making mods is easy, making a working mod is terror πŸ˜…

drowsy axle
#

@exotic flax +1

worn forge
#

It'd honestly be easier to open up the Warlords module and monkey around with that instead

exotic flax
#

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.

tough abyss
#

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

worn forge
#

There's a reason warlords is locked down, it's meant to be plug and play

tough abyss
#

True, but im trying to make plug and play more interesting

#

oh? overriding configs is acceptable? that might make things 10x easier

exotic flax
#

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 πŸ˜‰

tough abyss
#

πŸ€ͺ now the things that i never understood make perfect sense

exotic flax
#

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).

worn forge
#

CUP also doesn't allow any modification of its mods, especially unpacking to just use a few select assets.

tough abyss
#

will look into it, only looking at altering ammo types that RHS already has for their jets

exotic flax
#

there's a difference between taking assets from a mod, or extending them without taking anything (except for inheriting configs)

worn forge
#

Just underlining that if you wanna use CUP you have to use all 13 GB of it

stray nova
#

Is there a script to make AI lower weapons when walking?

#

Not in relaxed mode

#

But in aware mode, so they can do formation

worn forge
#

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

restive leaf
#

That is also true of RHS if you are using more than just AFRF or USAF Ryko

tough abyss
#

Sounds good thanks to all for the info, ive learned alot. now need to relearn how to use P drive properly

stray nova
#

Yeah when they are relaxed, they dont do formations

worn forge
#

@restive leaf not surprised, probably true of any mod I'd expect

stray nova
#

Really annoying

#

Unrealistic

young current
#

@tough abyss look up PMC wiki tools and p drive installation guide

exotic flax
#

@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.

worn forge
#

I wonder if you could make your own FSM

#

"That'd probably be easy"

exotic flax
#

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

stray nova
#

I wish it was an override,

#

When in combat, you're in combat, the only reason a weapon should be up

exotic flax
#

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?

dreamy kestrel
#

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.

exotic flax
#

using Particle Effects?

dreamy kestrel
#

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]]

exotic flax
#

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

quasi rover
#

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.

exotic flax
#

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

quasi rover
#

then, any way to give an action to Data terminal?

exotic flax
#

use the action function (see wiki for more details)

worn forge
#

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.

exotic flax
#

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.

dreamy kestrel
#

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.

exotic flax
#

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)

broken snow
#

Would anyone know where to find a team balance script like whats in KOTH?

dreamy kestrel
#

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.

dreamy kestrel
#

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.

dreamy kestrel
#

Q: what is the "strength" component returned by windRTD ?

ebon citrus
#

Array with wind strength and direction

thick merlin
#

My issue still remains unsolved.:(Are we allowed to repost/bump the request for help?

#

Thanx

still forum
#

guess you just did.
Yes as long as you don't crosspost and don't do it too often you can bump

ebon citrus
#

@thick merlin if you share code, please pastebin it

#

Smaller clips can be posted here with codeblocks

thick merlin
#

Nica,Thanx bud.Dedman,i did it as good as someone could ask that.Another opportunity to help missed.

still forum
#

Dedmen*

thick merlin
#

soz

#

Is this codeblock -

#

{ codexxx. }

ruby breach
#
<Your code here>
(Three more backticks)
#

Sigh... doing this from mobile is hard. There, I’ll do it the lazy way πŸ˜…

thick merlin
#

np m8.

#

doing this without formal scripting education isnt easy either.:)

#

how did you bring up that box?

ruby breach
#

You encase your code in β€œ```”

thick merlin
#

"like thus"

#

nope dont look right

ruby breach
thick merlin
#

Thnx bud.I appreciate your patience.:)

#

'''test'''

#

test

#

cool

winter rose
#

```sqf
/* your code */
hint "good!";
```
↓

/* your code */
hint "good!";
#

can someone pin that maybe?

runic stratus
#
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?

winter rose
runic stratus
#

ah

young current
#

@runic stratus is it a custom object or vanilla object?

runic stratus
#

Its the mobile radar from contact

#

So Vanilla i guess

worn forge
#
radar addEventHandler [ "AnimDone", {
    (_this select 0) animateSource ["radar_rotation", 1, 0.6];
}];```
dreamy kestrel
#

@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?

nocturne bluff
#

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.

ebon citrus
#

@dreamy kestrel no idea. Experiment

winter rose
tender fossil
#

Dumb question: can iniDBI2 be used in Arma 2?

still forum
#

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

tender fossil
#

Nice, because I'm having horrible troubles with ARMA2NET

ornate scroll
#

@tender fossil Since A2 is fairly legacy, feel free to take a peak at how we did database stores in MSO.

dreamy kestrel
#

Q: kinda sort scripting related, RGBA... A, alpha, controls hue aspects of the color?

cunning crown
#

A is the transparency of the color

dreamy kestrel
#

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.

dark temple
#

Can someone dm me a script for how to breach locked doors

rough heart
#

@dark temple that's not really a scripting question.

cunning crown
#

what is your alpha at @dreamy kestrel ?

dark temple
#

I was told that was something due to scripting

cunning crown
#

Yes it is but you want us to do a script. We only help you making one here

#

(or discuss about scripts and everything)

dark temple
#

I just want to use a gun to breach a door.

young current
#

while it sounds simple it is not as simple as that.

dark temple
#

Well crap

#

Could I get any pointers

young current
#

to get into scripting I read and did some of killzoneKids tutorials from his page.

#

theres also the list of all available commands

dreamy kestrel
#

@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]
];
young current
#

what are you coloring?

dreamy kestrel
#

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 are you doing it like this?

#

and what is the issue?

dreamy kestrel
#

@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.

young current
#

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.

dreamy kestrel
#

@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.

young current
#

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

dreamy kestrel
#

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.

young current
#

where are you pluging the _colors?

dreamy kestrel
#

I'm not sure I follow the question? pluging?

young current
#

where is it used

#

these are particles I assume?

dreamy kestrel
#

yes, using the PE system. as described above re: color/alpha calculations.

young current
#

how far above

dreamy kestrel
#

I don't know your screen, maybe 1-2 pages.

young current
#

k, well good luck.

dreamy kestrel
#

well, appreciate the feedback.

young current
#

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.

dreamy kestrel
#

@young current Well, sir, honestly, I don't need to explain myself repeatedly when you can review the history for yourself.

young current
#

Well I don't need to help you either. Its 2 way street.

#

Β―_(ツ)_/Β―

#

good luck with it anyway.

dreamy kestrel
#

Your choice, that's up to you. I've disclosed what I needed to.

winter rose
#

@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

dreamy kestrel
#

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];
};
exotic flax
#

that script doesn't make any sense in it's current state

winter rose
#

Try splitting it in _r, _g, _b ?
How do you use the final _colors?

#

@exotic flax it makes various grey/alpha tints

dreamy kestrel
#

I am passing the colors into the PE system.

winter rose
#

Hm. Should then work. Try systemChat it?

dreamy kestrel
#

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.

exotic flax
#
[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 πŸ˜‰

winter rose
#

oh wait, maybe you have a random colour setting on the particle emitter!

dreamy kestrel
#

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?

winter rose
#

yes, this should transition between grey tints indeed, you have it right

dreamy kestrel
#

maybe it's just light reflections through the grayscale cloud then...

exotic flax
#

emissiveColor ?

dreamy kestrel
#

@exotic flax not sending one

exotic flax
#

could it be the shape which has baked in colors?

dreamy kestrel
#

could be? it's just a "cloud" base object. that is possible however.

exotic flax
dreamy kestrel
#

I'm just using the \A3\data_f\cl_basic as the basic shape...

exotic flax
#

that should only become white/grey (unless colors used)

winter rose
#

@dreamy kestrel care to dm a (minimal) demo mission plz?

#

I am curious about this one πŸ™‚

tropic thunder
#

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?

cunning crown
#

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

tropic thunder
#

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

queen cargo
#

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

tropic thunder
#

So create the game logic, set the correct variables, sync whatever needs to be synced, then call it's method?

#

Thanks @queen cargo

queen cargo
#

pretty much

dark ocean
#

need help change extdb2 with sql custom to extdb3

exotic flax
#

what is the exact problem and which scripts are not working as expected?

manic bane
#

Does EH "Killed" remain after assigned unit's respawn?

winter rose
#

I think so, but tests would be needed

manic bane
#

Okay thanks

worn forge
#

Yes it does

dreamy kestrel
#

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;
    };
};
still forum
#

Man that code is a giant WTF?

dreamy kestrel
#

how do you figure @still forum ?

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.."

dreamy kestrel
#

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?

still forum
#

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)

dreamy kestrel
#

what happens when enabled is present but windSimulation is not?

still forum
#

it will default to false, thus the findIf will find the false, and make the function return true

cosmic lichen
#

getVariable would return false for that variable so the whole code would return true

dreamy kestrel
#

hrm, it also depends on missionNamespace, which I do not suppose would be changing any time soon...

still forum
#

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

dreamy kestrel
#

thanks @still forum ...

#

how is rain accomplished, using the PE system? using base shapes?

still forum
#

rain?

#

engine side particle effects

dreamy kestrel
#

curious using which particles, though.

still forum
#

actually it might be implemented in shader, not sure

dreamy kestrel
#

if I understand how the masking works, I count indexing into the image arrays?

still forum
#

yes

dreamy kestrel
#

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.

dreamy kestrel
#

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.

winter rose
#

@dreamy kestrel you could get inspired by the BIS_fnc_sandstorm that uses bigger clouds to cloud player's vision as well

dreamy kestrel
#

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.

ebon ridge
#

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.

opal gulch
#

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!

ebon ridge
#

give more of the code please?

#

the whole waitUntil block

opal gulch
#

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?

ebon citrus
#

Server side or client side?

opal gulch
#

Everything is included in the missionfile on my side, but some things require it to run on server.

ebon citrus
#

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
#

That's all I get

jade abyss
#

@opal gulch
```sqf
hint "it's aliveee";
```

hint "it's aliveee";
#

Just for better readability.

opal gulch
#

Thanks, I'll use it next time.

winter rose
#

see my pinned message 😎 @jade abyss 😘 πŸ˜„

jade abyss
#

pah, who reads pinned messages anyway πŸ˜‚

plain vale
#

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?

ebon citrus
plain vale
#

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?

ebon citrus
#

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

exotic flax
#

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

ebon citrus
#

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

plain vale
#

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

plain vale
#

got it working

ebon citrus
manic bane
#

Can I rearm specific magazine on vehicle's turret?
Or should I remove empty magazine and add new magazine?

ebon citrus
#

What do you mean specific?

manic bane
#

For example, ED-1D has 3 magazines. Laser, pellet, slug.
With setVehicleAmmo or setVehicleAmmoDef, I cannot rearm slug without rearming pellet.

ebon citrus
oblique arrow
#

have you tried using an add magazine command?

#

oh ye what @ebon citrus said

ebon citrus
#

Remember locality

#

I dont remember how it goes in this case, but just keep it always in the back of your mind

manic bane
#
[["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.

ebon citrus
#

That's a lot of ammo

manic bane
#

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.

ebon citrus
#

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

manic bane
#

Okay then I will remove empty magazine and add fresh magazine

ebon citrus
#

Prefered solution apparently

#

What are you trying to do exactly

#

It might be that youre overengineering this

manic bane
#

Rearming ED-1D on field with infantry 12 ga rounds

ebon citrus
#

AddMagazine

#

Definately

manic bane
#

Adds a magazine to a person.

#

ED-1D isn't person

#

It is an UAV

ebon citrus
manic bane
#

Also it has turret so I think it should be handled with that

#

yah

ebon citrus
#

The one i posted earlier

#

That exact one

#

Right there

#

Up there

manic bane
#

πŸ‘

ebon citrus
#

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

manic bane
#

Well with that empty magazine, my script wouldn't detect current ammo status correctly.

#

Anyway I will use addMagazineTurret and removeMagazineTurret as you suggested.

ebon citrus
#

Why?

manic bane
#

if I didn't remove empty magazine, array with that command will be full with empty magazine so I cannot get information correctly.

ebon citrus
#

Ok...

#

Genius

#

Get the magazine state

#

Remove the magazine

#

Add magazine with previous ammo+added ammo

#

Load magazine into turret

manic bane
#

That's what I wanted

#

yeah

#

Thanks

manic bane
#

I was using this

ebon citrus
#

Here is all you need

#

In order

manic bane
#

What is diffrent between magazinesAllTurrets and magazinesAmmoFull on vehicle?

ebon citrus
#

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

manic bane
#

Okay then thanks for your answer

alpine ledge
#

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

still forum
#

you just setVariable the variable, not sure what you're asking?

alpine ledge
#

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?

still forum
#

_array = object getVariable "yourvarname"

winter rose
alpine ledge
#

ah, then just pushBackUnique on that?

still forum
#

yes

#

it already modifies then array so unless you want it public no need to re setVariable after pushback

alpine ledge
#

lovely, cheers both πŸ‘

winter rose
#

keep the wiki closeby, it's a great friend (when not down)

alpine ledge
#

yeah i'm no stranger to it ^^

#

just forget the basic stuff sometimes

still forum
#

shoots at wiki
wiki down wiki down! Mediiiic!

alpine ledge
#

5 hours later
Wiki: I'm at grid 201856

ebon citrus
#

Wiki: "Regroup"

#

we need a Biki status bot

exotic flax
#

Or a Dev Ops who doesn't break the server πŸ™ŠπŸ™‰πŸ™ˆ

still forum
#

wouldn't wiki be Doc Ops?

winter rose
#

if we call the Doc when the wiki is down, no wonder…

ruby breach
#

To quite RvB; Doctors heal people. Medics just make you feel better.... while you die.

ornate scroll
#

Don't need anything written code wise, just need some ideas.

still forum
#

can you add the action to the player itself?

#

instead of the target object?

ornate scroll
#

Hmm, I don't believe I tried that last night. That's a good point.

dreamy kestrel
winter rose
#

noice! indeed, most of the time when there is a snow blizzard there is a fog πŸ˜‰

dreamy kestrel
#

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.

dreamy kestrel
#

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...

winter rose
#

@dreamy kestrel you do realise that you did post the same URL, right? ^^

dreamy kestrel
#

with an added image of the scenario.

jovial steeple
#

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.

jade abyss
#

nope

#

(sadly)

jovial steeple
#

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?

alpine ledge
#

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

ebon ridge
#

for a specific unit/vic class how can i get the patch name please?

dreamy kestrel
queen cargo
#

@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

dreamy kestrel
jade abyss
#

@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.

ebon citrus
#

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

hot epoch
#

Actually yeah. Both are super useful

#

Especially if you do wayfinding

ebon citrus
#

Useful, yes, but if you have a gps, the compas is questionable

hot epoch
#

Dagr is nice too

ebon citrus
#

Modded

hot epoch
#

Mhmm

ebon citrus
#

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

dreamy kestrel
#

What? Basic gear is: know where you are (map), know how to get there (compass). No?

hot epoch
#

If you are on veteran you’ll need it

ebon citrus
#

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

high marsh
#

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?

ebon citrus
high marsh
#

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?

ebon citrus
#

yes

#

you need to include it

#
class X {
  #include "\userconfig\MY_addon\Somefile.hpp"
};```
high marsh
#

Ahh. Letme see.

ebon citrus
#

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

high marsh
#

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 {

};
ebon citrus
#

doesnt matter

high marsh
#

Ok?

ebon citrus
#

sorry

#

i was applying lotion

#

so

#

you usually check the values at mission startup

high marsh
ebon citrus
#

and never again

#

so there is no point in bothering yourselkf over a microsecond more computation time

high marsh
#

Right.

ebon citrus
#

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

high marsh
#

Agreed.

ebon citrus
high marsh
#

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.

ebon citrus
#

are you sure?

high marsh
#

Well, if no user config exists. Mission automatically applies values. User doesn't interact with these values

alpine ledge
#

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 blobDerpy

winter rose
#

use animateSource plz

alpine ledge
#

hmm, why's that?

young current
#

It's more network friendly

winter rose
#

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.

alpine ledge
#

oh yeah, people like me ain't got time to read that far down 😩

winter rose
#

hehe

young current
#

πŸ˜‘

thin owl
#

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.

winter rose
#

L*fe server?

thin owl
#

Nah

winter rose
#

what, then

thin owl
#

Operation Cobalt

#

bit like Exile

winter rose
#

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)

thin owl
#

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

winter rose
#

I don't know how they work, maybe with connection EHs/scripts

thin owl
#

I'll give it a go tah

smoky verge
#

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

winter rose
#

@smoky verge try using getPosATL setPosATL

ebon citrus
winter rose
#

no excuse now @alpine ledge Γ¨.Γ© πŸ˜„

alpine ledge
#

you underestimate my ability to not notice things right infront of me 😎

#

ah, that looks much nicer, good job!

winter rose
#

it always bothers me to see technical data where it is absolutely not needed / not smart to put there

ebon citrus
#

@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

smoky verge
#

yeah I noticed
was thinking about it but never managed to make setveltrans work correctly
and the project is not important enough

ebon citrus
#

sommething which Enfusion doesnt seem to lack

#

yeah, i ended up making elevqators the battlefield 4 way

#

close door, wait, teleport, open door

smoky verge
#

yeah seems to be thte safest way

winter rose
#

sommething which Enfusion doesnt seem to lack
wat, parented movement is in Enfusion? if so, neat!

smoky verge
#

oh dear that would be grand

ebon citrus
#

to a certain degree, it seems

dreamy kestrel
#

@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...

#

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.

tender fossil
#

How is iniDBI2 supposed to work with multiple files handling a database if the database is a local variable _iniDBI?

tender fossil
#

And do .dll files need to have execute bit set in order to work as part of program?

still forum
#

I.. don't think so?

tender fossil
#

I don't know either lol

#

I'm trying to find a reason why my ARMA2NET database application doesn't even initialize, just nothing

open vigil
#

!issuewarning @ebon citrus for profanity. Please see the #rules for further information.

lyric schoonerBOT
#

Done.

open vigil
#

!issuewarning @stray nova for profanity. Please see #rules for further information

lyric schoonerBOT
#

Done.

ebon citrus
#

can i ask where?

#

oh...

open vigil
#

I'll dm you the message

ebon citrus
#

"heck up"

#

i got it now, no need

stray nova
#

What

#

Um, no

queen cargo
#

@winter rose @ebon citrus attachTo

#

That is your parented movement

ebon citrus
#

i wish it would be

queen cargo
#

Alternativly, you can just also move the Players

#

Using setpos

ebon citrus
#

been there, tried that

queen cargo
#

It aint that complicated to create the delta to the Position

ebon citrus
#

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

open vigil
#

Um, no
@stray nova

Do you not wish to read the rules or do you you not wish to follow them. I'm, confused.

stray nova
#

I'm confused too

winter rose
#

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

tender fossil
#

Lou is very angry now!

winter rose
#

agrrr 😠 πŸ˜„

worn forge
#

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.

winter rose
#

findDisplay would only works if the display is displayed I think

worn forge
#

Well, when I enter zeus, no systemChats

winter rose
#

it has to be open when you add the EH

worn forge
#

Mmm, interesting. I'll give 'er a try.

high marsh
#

@ebon citrus zero confusion regarsing checking type of config value. It just seemed jank using all three to check the type

ebon citrus
#

use waituntil

#

and once the display returns true, add a displayeventhandler to it

worn forge
#

yup, nice

ebon citrus
#

rookie msitake, i did the same thing

worn forge
#

works

hollow stirrup
#

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?

worn forge
#

Where have you found that old code?

hollow stirrup
#

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

worn forge
#

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?

hollow stirrup
#

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

ebon citrus
#

addWeaponWithAttachmentsCargo

worn forge
#

I'm a bit confused by your mentioning config.cpp - is this a mod you're designing or is it part of a scenario

ebon citrus
stray nova
#

Very well.

hollow stirrup
#

a mod

ebon citrus
#

Bohemia isnt all that creative with their naming scheme

hollow stirrup
#

So could you do call BIS_fnc_addWeaponWithAttachmentsCargoGlobal?

ebon citrus
#

no

#

no need to call it

#

it's built in engine "operation"

hollow stirrup
#

Oh right

ebon citrus
#

or script command

#

container addWeaponWithAttachmentsCargoGlobal [[weapon, muzzle, flashlight, optics, [primaryMuzzleMagazine, ammoCount], [secondaryMuzzleMagazine, ammoCount], bipod], weaponsCount]

hollow stirrup
#

thank you

still forum
#

Just read wiki page :u

ebon citrus
hollow stirrup
#

oops sorry didnt see that channel

ebon citrus
#

no harm done. I like to believe that nobody here is a bad guy from ww2

drowsy axle
#

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.

winter rose
#

mods?

drowsy axle
#

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.

winter rose
#

m'kay! Β―_(ツ)_/Β―

tough abyss
#

@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

winter rose
#

I am pretty sure I didn't give you this code… πŸ‘€

#

createVehicle takes arguments
allPlayers*

#

@tough abyss

still forum
#

you gave me last time
:doubt:

young current
winter rose
#

^

young current
#

but this code is not complete, you will have to add the rest of the things the commands require

tough abyss
#

I added the class name yo

#

it's still the same

young current
#

perhaps if you paste the whole code you have used it can be debugged

cunning crown
#

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?

tough abyss
#
{ 
  private _myObject = "classNameHere" createVehicle; 
  _myObject attachTo [_x, [0,0,0]]; 
} forEach allPlayer;
#

I also tried

young current
#

have you looked at cretevehicle commands wiki page?

tough abyss
#
{ 
  private _myObject = createVehicle ["classname",position player]; 
  _myObject attachTo [_x, [0,0,0]]; 
} forEach allPlayer;
#

Yes I took examples from there

young current
#

you would want position _x

#

or actually getpos _x

winter rose
#

and still allPlayers*

young current
#

that too

tough abyss
#

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

young current
#

can you paste the exact code you just tested

tough abyss
#

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

still forum
#

and you can already see why

#

look at the colors

tough abyss
#

there

still forum
#

in the top one you again can see the mistake on the coloring

young current
#

also do you know waht position of player model is 0,0,0?

tough abyss
#

0,0,0 is relative to _x

young current
#

yes

#

and where on _x is 0,0,0

tough abyss
#

so it's different for each player

#

in the center of their body?

still forum
#

on their feet

winter rose
#

ground pos yes

tough abyss
#

not when falling it's not

winter rose
#

not when falling

still forum
#

it can't fall if its attached

tough abyss
#

It works as intented when I to
testObject attachTo [player, [0,0,0]];

#

now I just need to do it for all players

winter rose
#

you are attaching a module

#

I am not sure that's how it works

tough abyss
#

Yes, I told you I want to attach a module

winter rose
#

?

tough abyss
#

It's a flare

#

It is a module or a grenade in arsenal

#

There are two versions of it

young current
#

is your testObject the same thing you are trying to create there?

tough abyss
#

Kind of. I spawned the thing in eden and gave it a name. Then used that name instead of testObject

young current
#

so no

tough abyss
#

Well I can't attach something that doesn't exist

young current
#

so how did you create the thing in eden?

tough abyss
#

drag and drop from the menu

young current
#

ModuleChemFlare_F is not a classname of any object

tough abyss
#

It's a mod

young current
#

drag and drop from what menu?

tough abyss
#

modules menu

#

When you hover your mouse over items in eden it shows classname correct?

young current
#

it should yes

tough abyss
#

That's the classname I get when I hover over that module

young current
#

then its the name of the module

#

not the object it creates

alpine ledge
#

why not just attach the chemlight itself

tough abyss
#

We just agreed that it shows classname though

#

@alpine ledge Why do you mean? Isn't that why I'm doing?

alpine ledge
#

it shows the classname of the module not the actual light

young current
#

it shows the classname of the module you got from some mod

tough abyss
#

oh

alpine ledge
#

zing

tough abyss
#

Well, how would I know that

alpine ledge
#

πŸ€·β€β™‚οΈ

tough abyss
#

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?

young current
#

I do know that the module is just a thing in editor that when you launch the mission plops down a flare object

alpine ledge
#

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

tough abyss
young current
#
        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";
        };```
alpine ledge
#

yeah, that there is the classname for the module ^^

young current
#

these would be the vanilla available chemlight items

alpine ledge
#

chemlight_red is the flare itself

tough abyss
#

Ok, how can I find this for the one I'm using?

young current
#

from config viewer if its some special chemlight not in the above list

tough abyss
#

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?

alpine ledge
#

Alt+G in EDEN

tough abyss
#

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

young current
#

if you want the lit one, then cfgAmmo

alpine ledge
tough abyss
#

ok I found it

#

should I double click it or what?

young current
#

just use the classname with the createvehicle command

alpine ledge
#

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

tough abyss
#

HuD_ChemFlare_Red_Ammo
HuD_ChemFlare_Red_Ammo3

young current
tough abyss
#

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?

alpine ledge
#

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

tough abyss
#

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

alpine ledge
#

that should attach them but it will also create them at their feet

tough abyss
#

I need to delete them afterwards

#

they seem to last forever

alpine ledge
#

deleteVehicle will do that

tough abyss
#

If I put delete vehicle in the script it will create and then delete

#

I want to delete at a later time

alpine ledge
#

when do you want them gone

tough abyss
#

like after 30 seconds

alpine ledge
#

sleep 30 then deleteVehicle?

tough abyss
#

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

alpine ledge
#

it should just sleep 30 for every person, not pause when it hits the first player

tough abyss
#

Can you put it in my code so I can test it later?

alpine ledge
#

could probably do something with isKindOf "HuD_ChemFlare_Red_Ammo" if you're inclined to go that route

tough abyss
#

I can try that one right now

#

deleteVehicle isKindOf "HuD_ChemFlare_Red_Ammo"
?

alpine ledge
#

don't think it's that straight forward, 1 sec

#

isKindOf returns a boolean, not an object

tough abyss
#

oh rip

#

if it's too complicated or adds a lot of processing then might as well go with sleep

#

if it works

cunning crown
#

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;
tough abyss
#

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;
cunning crown
#

^
This will do

attach the chemlight to player1
wait 30sec
delete the chemlight
attach the chemlight to player2
...
Maybe not what you want

tough abyss
#

Not what I want

cunning crown
#

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

winter rose
#
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;
tough abyss
#

My intention is for it to be deleted when the player touches ground

winter rose
#

now that's different

cunning crown
#

Yup

tough abyss
#

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

alpine ledge
#

might be able to use waitUntil {isTouchingGround _x}

winter rose
#

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

tough abyss
#

why is it still sleeping 30?

winter rose
#

it's not? πŸ˜‹

tough abyss
#

ok I will test this

alpine ledge
#

it's a bit tired after going round all those players 😴

cunning crown
#

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;
    };
};
alpine ledge
#

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

tough abyss
#

Yes, there will be no AI

winter rose
#

@cunning crown uiSleep is not nice for this in SP

cunning crown
#

But why use allPlayers if you're the only player?

winter rose
#

SP and MP compatibility πŸ˜‰

tough abyss
#

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

cunning crown
#

Yeah good point Lou πŸ˜„

tough abyss
#

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

cunning crown
#

Yeah, juste noticed that, 2s

tough abyss
#

I guess isTouchingGround is also inside an aircraft

#

Will probably have to execute airborne :P

alpine ledge
winter rose
#

but we are checking the unit here

#

not the attached chemlight

cunning crown
#

btw, I think the chemlight doesn't stay attached once you open your chute

tough abyss
#

Correct

winter rose
#

ah true, in vehicle

tough abyss
#

But when you touch ground it will reattach (if not deleted)

alpine ledge
#

wouldn't it still return true if they're in a vehicle because that counts as being on the ground

winter rose
#

waitUntil touching ground and not in vehicle

tough abyss
#

@cunning crown Did you fix it?

cunning crown
#

Fixed the undefined var bug but it will still detach itself once you open your parachute

tough abyss
#

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?

winter rose
#

params ["_unit", "_chemlight"]; does name it yes

#

post your code?

tough abyss
#

What code?

#

I was talking to Heyoxe

#

If that's what you're asking

cunning crown
#

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

tough abyss
#

Lou's version works fine

winter rose
#

\o/

wary field
#

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?

ebon ridge
#

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...)

winter rose
#

start in singleplayer, quit, restart in MP :-\ @ebon ridge

ebon ridge
#

oh, probably at least as slow as restarting the editor for me, thanks anyway πŸ™‚

winter rose
#

yep, not ideal at all!

worn forge
#

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?

ebon ridge
#

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);
worn forge
#

Thanks, I'll toy with that

ebon ridge
#

this is for attaching to player obviously

#

but should work for anything afaik

worn forge
#

Where is _rotation set?

ebon ridge
#

its a constant offset for placement

#

you can remove it i think?

worn forge
#

Yeah, I dig it

alpine ledge
#

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 weirdBruh

#

executing the doMove line with the in-game debug console makes him move as normal, so why doesn't it work in script form MYAAA

errant patio
#

obviously you can easily get the stuff from the profile variables file but that's rather separate.

worn forge
plain vale
#

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?

ebon citrus
#

Levels?

#

You mean terrains?

#

And you did copy ALL the files?

#

Anyways, it's hard to say when you just explain and show nothing

plain vale
#

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

ebon citrus
#

〽️

#

πŸ€”

#

You gace very little information all in all

#

Sorry i was nit of help, but i dont see how i couldve been

plain vale
#

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?

ebon citrus
#

If you REALLY want to do it that way

#

Then us a simple

if(!alive X) then {
  // Your code
};```
#

@plain vale

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"

ebon citrus
#

@plain vale // stands for comment

#

Lines starting with // are not interpreted by the engine

#

So you would use

if(!alive theTargetUnit) then {
  endMission "END1";
};
plain vale
#

Ah ok

ebon citrus
#

Make sure that A2 is a global variable

#

And rename it better, if it is

silent latch
#

@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 ()

ebon citrus
#

you dont need the extra brackets here

#

they wont do any harm, but they are not necessary @silent latch

silent latch
#

hmm

#

ok

#

thanks

ebon citrus
#

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

outer fjord
#

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?

hollow solstice
#

Is virtual garage the new / improved Virtual Vehicle Spawner?

outer fjord
#

It's the Splendid one built by BI. The one you can see in the Virtual arsenal.

cosmic lichen
#

@outer fjord It uses BIS_fnc_initVehicle so the textures should be global

open vigil
#

!issuewarning @plain vale for Profanity. See #rules channel for more information.

lyric schoonerBOT
#

Done.

ebon citrus
#

dont ask

#

just read the rules πŸ˜†

plush oriole
#

oh dear this again

outer fjord
#

Awesome thank you R3vo!

keen pewter
#

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 ?

cedar canopy
#

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

exotic flax
broken snow
#

How do I go about making a 3d player icon so players can see each other when playing and it limits friendly fire?

exotic flax
dark temple
#

Anyway to summon the lightning bolt without having to open the Zeus editor

#

?

still forum
#

yes

dark temple
#

Could someone walk me through it?

oblique arrow
#

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

dark temple
#

^ I still don’t get it

oblique arrow
dark temple
#

Where do I put the command?

cosmic lichen
#
[player,nil,true] spawn BIS_fnc_moduleLightning;
player setDamage 1;``` @dark temple
dark temple
#

In the init area

#

Like the attributes?

cosmic lichen
#

If you want the lightning to happen as soon as the unit is created then yes, otherwise no.

dark temple
#

I want to be able to spawn it on command.

cosmic lichen
#
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.

dark temple
#

And I enter this in attributes?

oblique arrow
#

ah neat so there is a command for that, thanks for sharing your wisdom blep @cosmic lichen

#

And init I'd assume @dark temple

#

a units init that is

cosmic lichen
#

@dark temple Put the above code in the init of the unit you want to have that action.

dark temple
#

β€œError invalid number expression β€œ

cosmic lichen
#

Remove the // comment, sorry for that.

dark temple
#

It says missing a bracket

oblique arrow
#

btw whats with arma 3 not liking comments heh ? noticed that myself with both the // and the comment tag

cosmic lichen
#

@dark temple There is no bracket missing, I just copied it into an init field.

ivory wren
#

Hi

dark temple
#

Oh I didn’t copy the fixed version

oblique arrow
#

ablobdoggowavereverse @ivory wren

ivory wren
#

I play arma 3

cosmic lichen
#

@oblique arrow call compile doesn't like comments =/

oblique arrow
#

yeah its quite annoying

cosmic lichen
#

Yep, it is.

dark temple
#

What button is attached to it?

cosmic lichen
#

No button, the scroll wheel action menu

dark temple
#

Nope. I just spawned injured

cosmic lichen
#

It only shows if you look at an object, otherwise it's hidden.

slate sapphire
#

it's possible to change stamina settings without use an addon ( script side ) ?

surreal peak
#
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

slate sapphire
#

@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

wary lichen
#

Arma 2 OA

oblique arrow
minor grotto
#

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?

alpine ledge
#

@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;
};```
exotic flax
#

or modify the Reflectors class in the configs

oblique arrow
#

psst if you add sqf behind the first 3 Β΄'s discord will color code the code @alpine ledge

alpine ledge
#

so that's how you folks do it E_MonkaHmmm

oblique arrow
#

Ye

#

should also work with editing messages

#

behind the `'s

#
...
alpine ledge
oblique arrow
#
[code]
#

and then brackets at the bottom of course

ruby breach
#

It's the top pin as well

oblique arrow
#
[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;
};
alpine ledge
#

that's what i'm doing AAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH

oblique arrow
#

weird

ruby breach
#

You can't have the sqf bit on a new line

alpine ledge
#

it's not, it's right after the ``

oblique arrow
#

works with editing aswell

alpine ledge
#

nailed it, first try ezClap

oblique arrow
alpine ledge
#

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
oblique arrow
#

when are you checking it?

#

oh wait nvm

alpine ledge
#

just that little snippet there

oblique arrow
#

am stupy its in the script

alpine ledge
#

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

velvet kernel
#
_pos = [] call BIS_fnc_randomPos;
hint format ["%1", _pos];
#

gives me "any"

#

i have added functions manager to mission

#

arma 2 btw

exotic flax
velvet kernel
#

right was actually using BIS_fnc_findSafePos

#

nvm figured it out, needed to close out the mission and restart

restive leaf
#

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

exotic flax
#

@restive leaf

// line 130
_checkPos getPos [_maxDistance * sqrt (_off + random _rem), random 360] call

Already 2x random in 1 line...

restive leaf
#

LOL... And everytime it runs on Altis it selects the salt flats πŸ˜‰

velvet kernel
#
#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

opal turret
#

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.
opal turret
#

...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;```
finite jackal
#

@velvet kernel Works fine in initPlayerLocal, replace local with private, your syntax is incorrect for A3

velvet kernel
#

Im not using arma 3

fair lava
#

How do i get the gear state of a vehicle?

#

i.e if the landing gear is deployed?

young current
#

AnimationSourceState

fair lava
#

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