#arma3_scripting

1 messages · Page 698 of 1

little raptor
#

Is the UI namespace somehow linked with the mission namespace and I don't know it?
no but arrays are passed as references

#

maybe that's your issue

dreamy kestrel
#

I'm not sure I understand. In this scenario, literally first time ever the function is invoked to my knowledge, uiNamespace should have no idea what the _oldFactoryView was. so should be []. But yet isEqualTo is reporting true, 'no change'.

copper raven
#

are you sure _newFactoryView is not an empty array then?

dreamy kestrel
#

This is the log:

13:03:22 [MY] [15511.9] [PRODUCTIONMGR] [fn_productionMgr_onChanged] Entering: [count _oldFactoryView, count _newFactoryView]: [21,21]
//                                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^    ^^^^^
copper raven
#

well then you're setting it somewhere else before this function is ran

dreamy kestrel
#

obviously, but I am scanning the code for those opportunities, I do not see it.

winter rose
#

uiNamespace doesn't reset with mission iirc

copper raven
#

that might very well be it

dreamy kestrel
#

oh wait what?

#

so I should explicitly nilify variables I know I would be using...

#

like onLoad, etc

dreamy kestrel
copper raven
#

i mean what are you even storing in there?

#

maybe you should just store it in missionamespace

winter rose
#

(or localNamespace if you fear storing UI elements)

dreamy kestrel
dreamy kestrel
#

now it works, beauty. thanks all.

finite sail
#

I use it a lot, but mostly in init, not in mission running time

past gazelle
#

Oh Arma you are so much fun...

#

I managed to almost get my script to disable looting of anything bluefor working last night, except for some reason the sidearm is still able to be taken once, but when you swap sidearms then your previous sidearm is put on the body is unable to be removed..

#

¯_(ツ)_/¯

winter rose
#

I call "script oversight" for 500$, Alex! 😄

#

(perhaps)

past gazelle
#

At this point...I'm tempted to code up a completely different kind of script: If player is holding any NATO items, just have nato soldiers shoot him if within 50m 😛

fair drum
hushed tendon
#

I'm trying to have different colors represent the difficulty based on the difficulty and this is my best attempt. Anyone able to point me in the right direction?

_difficulty = "Easy"; 
    _waveNum = 4; 
    {
        switch (_difficulty) do
        {
        case "Easy"      : { _waveColor = "#00FF00" };
        case "Moderate"  : { _waveColor = "#FFFF00" };
        case "Hard"      : { _waveColor = "#FF0000" };
        case "Nightmare" : { _waveColor = "#000000" };
        default { hint "!Error!\nChoosing Difficulty Color\n!Error!" };
        };

        titleText [
        format ["<t font='TahomaB' size='6.0' shadow='1' shadowColor='#000000' shadowOffset='0.05'>Wave %1</t>
                <br/>
                <t font='PuristaSemibold' size='2.0'><</t> <t font='PuristaSemibold' color='%3' size='2.5'>%2</t><t font='PuristaSemibold' size='2.5'>> Difficulty</t>",
        _waveNum, _difficulty, _waveColor], 
        "PLAIN", 
        3, 
        true, 
        true];
        titleFadeOut 3;
    } remoteExec ["call", 0];
#

It's displaying:

Wave 4
 Easy > Difficulty 

with no color change

hushed tendon
hushed tendon
final storm
#

you just had an extra ">"

#

and i made the code into a function

hushed tendon
#

Was trying to have it be like "<Easy> Difficulty"

hushed tendon
final storm
#

do you want the <> to change color?

#

or just the text inside?

hushed tendon
#

I was going to keep those white and change the color of the difficulty

wicked fulcrum
#

Question I couldn't find the answer to when googling and looking at CBA Wiki.

When using the XEH events like InitPost is that executed on a per unit basis or per client?

I'm trying to register CBA eventhandlers to specific AI units, but I don't seem to have wrapped my head around the relationship with AI units and adding eventhandlers just for them. How do I target specific AI units with code as part of "their" init?

I looked at CBAs Class Event Handler and then do an init version that registers the CBA eventHandlers, so I would be able to run targetEvent from other clients to be executed on the AI unit.

Context: Trying to use targetEvent on a specific type of AI unit, which should then run the corresponding code on the AI. e.g. disable part of the AI.

final storm
hushed tendon
wicked fulcrum
hushed tendon
barren pewter
#

When using the spawn ai module, it gives you the option to blacklist a group that you dont want to be able to spawn. But you need the classname of the group you want to blacklist. I cant find one for any group. I can only find classnames for individual men/objects/vehicles. Does anybody know where to look?

untold copper
#

Is there anyway I can return a list of all available Module Icons?

Something like:

"\a3\modules_f\data\portraitmodule_ca.paa"
"\a3\Modules_F_Curator\Data\iconCAS_ca.paa"
"\a3\Modules_F_Curator\Data\iconOrdnance_ca.paa"

Or, even better...
Is there a way I can view all available Module Icons from within Arma?

warm hedge
#

Using configClasses to get all modules, and get the icons path perhaps

cosmic lichen
#

3den Enhanced has a sweet Texture Finder😉

untold copper
#

Just "sweet", @cosmic lichen? Not "the best Texture Finder you will ever find"? 😆
I'll take a look. Thanks!

novel delta
#

Anyone know how i can make UAVs just be owned by a singular person instead of the entire team?

#

/UGVs

wicked fulcrum
#

If I was to add custom code that should be run on init for specific type of AI units, how would I go about that? So it also gets applied if zeus spawns new units of this type?

untold copper
wicked fulcrum
#

I am already using CBA. And was convinced it had something, but couldn't quite figure it out.

So using that, would I add that in init-code for all clients, or only the server? As I recall it would only run on clients where the units were local?

#

Or should I ideally add it to the XEH initPost as classname config?

untold copper
wicked fulcrum
#

alright Cheers. I'll try that

fluid void
#

Is there a way to grab the position of the muzzle of a players weapon?

winter rose
warm hedge
#

It's possible now? Via creating the weapon model, check the memory point, apply it to the player's position

fluid void
#

Trying to draw a line between player's muzzle position and the end point where the barrel is pointing

winter rose
fluid void
#

Thanks, will have a look into it

past gazelle
#

I'd love to be able to have the muzzle of the gun automatically rest on things like curbs or the tops of the solar towers properly...

winter rose
#

mussels of Belgian weapons I assume

past gazelle
#

I thought it was hillarious when I was watching the lambs-danger demonstration video and one AI was shooting at another ai but it was hitting the corner of the wall right in front of itself.

#

Sorry, early onset dementia from having 40 tabs of BI function calls across 3 chrome windows...

winter rose
#

…ouch

long hatch
#

Hello, I am currently trying to set up a vehicle so that it cannot be completely destroyed. I came across a solution in the forum, but the vehicle is still simply destroyed. Is it possible, since ACE is running, that I need something special here?

// First try
this addEventHandler ["HandleDamage",{!(_this#7 in ["HitHull","HitAmmo"])}];
// Second try
this addEventHandler ["HandleDamage",{!(_this in ["HitHull","HitAmmo"])}];
// Third try
spz_1 addEventHandler ["HandleDamage",{!(spz_1 in ["HitHull","HitAmmo"])}];

I was excute this code in the vehicle init field.

meager epoch
#

How can I change the icon of the task when making a task with the BIS_fnc_taskCreate command? I want to have the Intel one instead of the default GPS destination thingy.
[player1, "secretTask", ["Find any additional info about your Lieutenant.", "Find more intel", ""], [0,0,0], "CREATED", -1, false] call BIS_fnc_taskCreate;

meager epoch
#

went over that page like 5 times

#

still lost

little raptor
#

see example 3

meager epoch
#

but what's the file name of the intel icon

little raptor
#

you don't need to create one yourself

#

just find it in the config

meager epoch
#

alright, will check it out

#

thanks

little raptor
#

@meager epoch

#

is this what you wanted? (the icon I mean)

#

there's also this:

#

"documents"

little raptor
meager epoch
#

do i just type intel_ca.paa or the whole path?

#

under icon=..

winter rose
#

whole path

meager epoch
#

in the description

#

ait, thanks

wicked fulcrum
#

I notice the UGV have two AIs in them. One for driver and one for turret. Can they have different locality between them?

As currently I am executing the following in an event raised on target-client to the driver:

    {
        _x disableAI "all";
    } forEach (crew _unit);
    systemChat "disabled all AI";

However I notice on repeated toggle of "enableAI" and "disableAI" that sometimes the turret still fires some rounds after it has been disabled. But the driver always stops moving.

little raptor
#

that should work

meager epoch
#

oh

#

cool, thanks

copper raven
#

and yeah, pretty sure ACE adds handledamage too

umbral oyster
#

Stupid question: How compile sqf to bytecode (sqfc)?

wicked fulcrum
copper raven
umbral oyster
copper raven
#

use compileScript

grim wing
#

how can i get the pbo name of an object through debug console

cold pagoda
#

Any ideas as to how to make a popup target not go down until 2 rounds have hit the target? I know we would have to do an event handler. But Im not sure where to even start.
Also, I can make a target move in single player, but when I do multiplayer, it doesnt move but teleports to the position as if the animation is being played on the server but not the clients. This is the block of code placed in the Init of the Table Object that Im using with an addaction. Should this be in a remoteexec?

this addAction ["Move 35m", "[l3t, [l330m, l320m]] spawn BIS_animateMoveSmooth;"];
this addAction ["Move 30m", "[l3t, [l30m, l330m]] spawn BIS_animateMoveSmooth;"];}```
hollow plaza
#

Would there be a way to restrict spectating only to the same side?
I'm currently using MenuPosition and Spectator respawn templates and having respawn options next to the spectator options is working perfectly fine and I was able to make players unable to use freecam, etc. Now I just need to make sure that they couldn't spectate the opposing side.

I'm wondering if there's a variable or something I can add to initPlayerLocal.sqf or if I have to edit the spectator mode through another file. This is what I've got in it currently.

    missionNamespace setVariable [_x, true];
} forEach [                                    
    "BIS_respSpecShowFocus",            
    "BIS_respSpecShowCameraButtons",    
    "BIS_respSpecShowControlsHelper",    
    "BIS_respSpecShowHeader",            
    "BIS_respSpecLists"                    
];
#

I know of BIS_fnc_EGSpectator and I tested it but couldn't make it function properly alongside the respawn menu

#

Another option would be to disable the respawn menu and instead have players automatically respawn on new locations. Currently I have it set so that respawn locations are available only when the mission tasks are not in progress and then a new respawn pops up after a task has been completed, so people who die during the task would have to spectate until it is finished.

#

Might just go with that actually.

misty osprey
#

does anyone know a list of nearentities types

misty osprey
winter rose
#

like```sqf
private _westResult = _foundEntities select { side _x == west };

misty osprey
#

thank you

somber radish
#

Anone got any idea on how to get the AI to use rocket-launchers on buildings? F.ex

If (_Building IsTypeOF "CargoTower") then {
                                            Add building to target-list;
                                            };

So that The AI will use an rpg on the Building itself if he is not previously engaged with other enemies

winter rose
somber radish
#

Hmm so like a invisible(hideGlobal) turret attached to the structure, then delete it if the building is detsroyed?

#

Hmmm

#

Nice

#

I'll try that

past wagon
#

could I do something like this:

_location = selectRandom [
  [14085, 18347, 0],
  [12938, 13874, 0],
  [9028, 20100, 0]
] or [[], ["water"]] call BIS_fnc_randomPos;
``` would `_location` return either one of the given locations, or a random location with a 50% chance of each?
#

i feel like ive seen something like this before

meager epoch
#

So, I have this bad guy and I want a trigger to be activated only when he gets killed by a certain soldier.
How can I achieve that (if possible)?

past wagon
#

put the following code in onPlayerKilled.sqf:

params ["_oldUnit", "_killer"];
if ( _oldUnit == badGuy && _killer == certainSoldier ) then {
  //code
};
#

@meager epoch

meager epoch
#

will give it a shot, thanks

#

btw, does the onplayerkilled.sqf run on its own or do i need to run it with an execvm? @past wagon

past wagon
#

it runs on its own when a unit dies

meager epoch
#

cool, thanks

cunning oriole
#

If I have say 10 variables and I want to be able to pick a random var and for a statement to return true if that random var is the same as two others in my list of 10 could anyone give me some pointers on how I would do this?

Cheers

cunning oriole
#

gimme one min just making up an example

#
private _A = "This is A";
private _B = "This is B";
private _C = "This is C";
private _D = "This is D";
//etc

if ( (_A isEqualTo (_B && _C)) || (_A isEqualTo (_B && _D)) || (_A isEqualTo (_C && _D)) ) then {
    //its true so do some stuff...
};

not sure if that illustrates what I mean a bit better (its just a random example)

winter rose
#
5 check [1, 2, 3, 4, 5, 5, 6] // something like this?
{ _x == 5 } count [1, 2, 3, 4, 5, 5, 6] == 2 // could that be enough?
cunning oriole
#

ok thanks ill mess around with something like that tmrw 🙂

winter rose
#

okido! tell us here if needed

past wagon
#

I think I found a better way of doing what I was thinking:```sqf
_locationsArray = [
[14085, 18347, 0], 1,
[12938, 13874, 0], 1,
[12011, 13241, 0], 1,
[9028, 20100, 0], 1,
[8371, 18273, 0], 1
];

_randomLocation = [[], ["water"]] call BIS_fnc_randomPos;
_locationsArray pushBack _randomLocation;
_locationsArray pushBack 5;

_location = selectRandomWeighted _locationsArray;

#

how does that look?

winter rose
#

should work

#

50% between custom pos and auto pos
then either equal chances between custom pos
or
the auto pos
@past wagon

barren pewter
#

How to make it so when everyone in my group is dead (i have team switch on) my group respawns back at base so I can keep playing?

winter rose
winter rose
barren pewter
winter rose
barren pewter
winter rose
barren pewter
warm hedge
#

Event Handler, which is a script that will fire when the condition is met

past gazelle
#

If I do _target = cursorTarget; and do all the checks to verify that the target is a man, is there a way I can set a variable inside _target to tell if the target has already been checked once?

#

like _target hasBeenChecked = true; ?

past gazelle
#

Thanks.

little raptor
elder sail
#

Is there any way to pull a players profile/steam name and use it as a variable?

elder sail
#

I looked at that briefly but must've been using it incorrectly. I'll give it another go. Thanks

past gazelle
#

Cool beans...I got my script to identify dead soldiers and mark them for retrieval almost finished...

pulsar bluff
#

at scale this would be not optimal , but it would be a useful tool to have for custom scenes

upbeat quartz
#

Hello, little question about a script ... In my "addAction", I would like to see the Display name (??????) appear and not the Classname. Do you know how I should do it? (I begin...😆 )

ListVehicle=["B_Truck_01_Repair_F","B_Truck_01_covered_F","B_Quadbike_01_F"];

{
_this addAction [format ["Buy : ??????", _x],format ["
if (cash < 200) exitWith {hint 'Insufficient cash'};
_veh = '%1'createVehicle getMarkerPos 'Mrk';sleep 1; _veh setDir markerDir 'Mrk' ", _x]];
}forEach ListVehicle;```
warm hedge
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```

// your code here
hint "good!";
little raptor
warm hedge
warm hedge
little raptor
#

No 😛

warm hedge
#

Disregard then 🙂

upbeat quartz
#

Thaanks, I'm going to try ^^

little raptor
#

@upbeat quartz also that code is just written badly. pass the classname to the code:

{
  _this addAction [format ["Buy %1", getText(configFile >> "CfgVehicles" >> _x >> "DisplayName")], {
    params ["", "", "", "_type"];
    if (cash < 200) exitWith {hint 'Insufficient cash'};
    _veh = _type createVehicle getMarkerPos 'Mrk'; sleep 1; _veh setDir markerDir 'Mrk'
  }, _x];
} forEach ListVehicle;
upbeat quartz
#

@little raptor .... Perfection ! Thank you very much 🙂

#

params is classname ?

little raptor
#

no

#

params is a command

#

in simple terms, it maps the elements of an array to the given variables:

[1,2,3] params ["_var1", "_var2", "_var3"];
//now _var1 = 1, _var2 = 2, etc.
#

when you use that as a unary command (no array to the left, i.e. just params ["_var1",....]), the array is _this

#

so what I wrote above in that action code is actually:

_this params ["", "", "", "_type"];
upbeat quartz
#

It's quite complicated to understand, but I'm going to take it little by little

#

Your first code works perfectly, I'll take it from there to do more

little raptor
#

well in sqf you can pass arguments to the code like this:

[1,2,3] call {
  //_this in this code is [1,2,3]
};

when you call a code, you get a _this, which is what was passed to the code. in the above example, _this is [1,2,3]

upbeat quartz
#

I see, I'm going to practice more and go to the wiki

little raptor
#

object addAction [title, script, arguments,...]
and then inside the code:

params ["_target", "_caller", "_actionId", "_arguments"];

I just skipped _target and _caller and _actionID:

params ["", "", "", "_type"];
#

you fetch the argument like that

#

you could just write:

_type = _this#3;
upbeat quartz
#

For now I'm just going to do a simple trade addAction

little raptor
#

I just figured you'd be interested

#

¯_(ツ)_/¯

upbeat quartz
#

Yes!! But it's going too fast for the beginning, I started yesterday haha

past gazelle
#
_target setVariable ["markerstr", createMarkerLocal ["markername", _target]];
_target setVariable ["markerstr", setMarkerShapeLocal "ICON"];
_target setVariable ["markerstr", setMarkerTypeLocal "mil_dot_noShadow"];
_target setVariable ["markerstr", setMarkerAlphaLocal 0.5];```
#

Is it possible to create a marker inside _target this way or do I need to create a new function and pass _target as a variable then do it internally?

warm hedge
#

inside _target
Define?

past gazelle
#

_target = cursorTarget; (checked for man/tank/boat etc)

#

so it would be an object

warm hedge
#

I didn't said “what is the definition of _target”, but “what do you mean”

past gazelle
#

Oh, inside _target, well. I just don't want to reuse the same variable for each marker. So I figured internalizing it to the object was the way to go.

warm hedge
#
  1. setVariable doesn't take commands, just like every commands don't
  2. You can use ANY name (string) to create a marker (even if it doesn't make sense for humans)
  3. setMarker** commands do need the marker to run
  4. I assume the goal for you is sqf _marker createMarkerLocal ["somename",somewhere]; _target setVariable ["marker",_marker];
past gazelle
#

Oh that would work even when the function is run again and again? Oh! I just pass the whole marker after it's made?

#

Will try it!

#

Hmm, second time I go to run the function it doesn't create a new marker...

#

Oh well, got darkmode working in notepad++ so who cares if it's a long night!

proven charm
willow hound
#

A3 simulation is handled by a single thread as far as I know.
Aside from that: You have 200 AI. That means you have 200 separate threads (all of them more or less fairly simple FSMs), all competing for the same resource(s), causing increased scheduler load, overhead and congestion.

pulsar bluff
#

is also would require basically an engine rebuild

#

probably wont even get it in arma 4

pliant stream
#

for a cpu with N logical cores, N realtime threads is a solid choice. you can have more lower priority background threads for lower priority background work, I/O, etc. but more threads doesn't mean more faster. much of AI would be considered realtime work, though there might be some tasks which could be done in the background

past gazelle
#

Oddly, I wonder why they don't change single player Arma to do that...

pliant stream
#

because it wouldn't be helpful in any way

#

actually i lie. it might be helpful if the engine is limited to a single thread for realtime work

proven charm
#

hmm I wonder how multithreaded arma actually is

willow hound
#

The headless client does nothing but run AI that is local to it, thus taking that load off the actual server.
The performance increase originates in more efficient use of the available hardware: If you have 8 cores, A3 doesn't really use all 8 of them (at least not all the time); and as the community has figured out, it's actually beneficial to run a second A3 process (the HC) at the same time which then uses some of the remaining available cores.

pliant stream
proven charm
#

ok

willow hound
#

From what I've read: A single simulation thread, and the renderer is tied to that (which is why your FPS are also tied to that, which is why the A3 bottleneck is the CPU).
No doubt there are more threads for some other stuff, but from what I understand, that's the core.

still forum
still forum
# proven charm hmm I wonder how multithreaded arma actually is

Some jobs can be multithreaded but only if the task doesn't interfere with eachother.
For example AI simulation, take for example "I'm a AI and I need ammo, I want to pick up this ammo on the ground"
now if you simulate 200 AI's in parallel, and they all try to pick up that same ammo.... uh.

Same for getting into vehicle, and hundreds if not thousands of other things

#

But there are ofc also things that can be done in parallel. 50 AI groups want to pathfind from point A to point B.
Well the pathfinding doesn't actually modify any data, it can be done in parallel without interfering with eachother, and that is what Arma does.

proven charm
#

@still forum makes sense thx

pliant stream
#

maybe if they don't produce any SQF events with return values and you defer the rest

#

or you lock for any SQF event, which would be pretty bad

still forum
#

Most of the simulation multithreading is in form of micro jobs.
"I need to calculate this thing a thousand times, lets do it on all CPU cores" and there are tons of micro jobs running every frame.
I'm now upgrading some script commands to make use of it and they become like 5x as fast.

But again can only do that if the jobs don't interfere with eachother

proven charm
#

maybe you can make whole scripting engine run on its own thread?

still forum
#

no

#

well yes. if you pause the mainthread in the meantime

#

which wouldn't make any sense

proven charm
#

hmm ok

pliant stream
#

running untrusted user scripts concurrently would require an entirely different approach to scripting. it would be kernels with restrictions on what they can do, and they would have to declare up front the resources they touch and how they touch them

errant jasper
#

The synchronization overhead of that would probably results in even worse performance, since you can't declare many things up front. You don't know what object might trigger an event handler, and you don't know which objects a nearestObjects call will return. The alternative would require scripts to "lock" stuff and etc. and kill the entire scripting scene except for 1%

pliant stream
#

no you would never do this for events

#

it would be more like "each frame, for each vehicle: given read access to its position and rotation i want to mutate its damage"

still forum
#

You can do such things in Intercept if you really want to.
For some things it makes sense

All script commands can only be accessed in main thread, but you can do maths and logic and calculations all outside of script

scarlet flume
#

so if i was looking to have a script that will, spawn X then they move to Y when players enter Z, what am i looking for?

warm hedge
#

Several commands. createVehicle or createUnit, doMove or some move commands, some trigger commands

scarlet flume
#

but if i was to place said units in editer?

warm hedge
#

Then omit createVehicle/createUnit part

scarlet flume
#

is there script to make units disable simulation but also invisible?, then when activated it would make the unit visible and enable simulation? as a question

warm hedge
#

hideObject/hideObjectGlobal

scarlet flume
#

thanks

little raptor
#

as in they can move around

#

not sure

warm hedge
#

They are... I thought your question was just how to hide and you know how to disable simulation. To disable, enableSimulation/enableSimulationGlobal

scarlet flume
#

i want to place 4 squads down, with a set path, but i dont want them visiable or able to shoot/move untill the tigger is tripped

#

disableAI with hideobject?

upbeat quartz
#

Hello again, once I buy my unit, is it possible to have it join my group directly? With joinSilent for example?

ListUnit=["B_officer_F","B_Soldier_F","B_soldier_LAT_F"];

{
  _this addAction [format ["Buy %1", getText(configFile >> "CfgUnit" >> _x >> "DisplayName")], {
    params ["", "", "", "_type"];
    if (cash < 50) exitWith {hint 'Insufficient cash'};
    _veh = _type createUnit getMarkerPos "mrk_5";
  }, _x];
} forEach ListUnit```

I don't know where to place the line
little raptor
#

createUnit I mean

#

first of all, there are two syntaxes, and you use neither

#

second of all, one of them doesn't return anything, which you shouldn't use

upbeat quartz
#

Yes I think he's full of mistakes ^^

little raptor
upbeat quartz
#

Okey I'll try to do that 🙂 it's true that it's better to learn by yourself. I will come back to you in .... few hours 😆

winter rose
#

afaik arma 4 only has zombie-tier AI
@pulsar bluff

can you stop spreading nonsense? thank you.

wicked roostBOT
scarlet flume
#

DID IT YAY

little raptor
#

@upbeat quartz look in the rpt

#

!rpt

wicked roostBOT
#
Arma RPT

Arma generates a .rpt log file each time it's run, which contains a lot of information like the loaded mods, or any errors that appear, this log file can be very useful for troubleshooting problems.

To get to your RPT files press Windows+R and enter %localappdata%/Arma 3

Additionally see the wiki page for more info: https://community.bistudio.com/wiki/Crash_Files

To share an rpt log here, please use a website like https://sqfbin.com/ to upload the full log, that way the people helping you can take a look at it and try to figure out the problem you're having together with you.
Note: RPT logs can hold personal information relevant to your system, the game or others.

little raptor
little raptor
#

change it to _listUnits

upbeat quartz
#

Noted,

thick chasm
#

_pipcam setVectorDirAndUp [[0,0,0],[0,0,-10]];

#

what is this numbers

#

?

warm hedge
thick chasm
#

yes but what is vectorup

#

I know how work vectordir, but vectorup not

winter rose
#

the "point up" direction (e.g from feet to head for a soldier)
so [0,0,1] means "point up", [1,0,0] means "point right" etc

thick chasm
#

i know

#

but setVectorDirAndUp have two coordinates

#

if the vector would 1 coordinate it would very easy

winter rose
#

dir and up

#

setVectorDir and setVectorUp exist separately @thick chasm

thick chasm
#

I think I have already understood

#

the first coordinate is the vector and the second is the rotation of the vector

#

no?

winter rose
#
obj setVectorDirAndUp [theVectorDir, theVectorUp];
```at that point I think I don't know what you do not understand?
thick chasm
#

idk

little raptor
thick chasm
#

vectorDir select that if i want to see to X= +1 [1,0,0]

#

but i dont know what do vectorup

#

rotate the object?

#

Im configurating that script


_pipcam = "camera" camCreate [0,0,0];
_pipcam setVectorDirAndUp [[0,0.66,-0.33],[0,0.33,0.66]];
_pipcam cameraEffect ["Internal", "Back", "piprendertg"];
_pipcam camSetFov 0.4;

_campos = getposatl car;
_campos set [2,30]; 
_pipcam setpos _campos;```
#

is for a camera

little raptor
#

@thick chasm

#

the red one is vectorDir

#

green one is vectorUp

#

(in model)

#

for example, for the model to point to North ([0,1,0]) and lie on its left side:

_obj setVectorDirAndUp [[0,1,0], [-1,0,0]];
#

a model pointing north but standing upright:

_obj setVectorDirAndUp [[0,1,0], [0,0,1]];
#

if you still don't get it, you need to learn some space geometry

#

also one obvious fact: vectorUp dot vectorDir must be zero

#

(they must be perpendicular)

#

for cameras, vectorDir is where you want the camera to point

#

vectorUp usually sets the pitch/bank

thick chasm
#

AHHHHHH THANKS YOU

#

the vectors must be perpendicular

#

this is the key

little raptor
#

if you don't want the camera to bank (only pitch, i.e look up down) you can obtain vectorUp from this:

_vectorDir = _point1 vectorFromTo _point2;
_vectorUp = _vectorDir vectorCrossProduct [_vectorDir#1 * -1, _vectorDir#0, 0];
low remnant
#

stupid question probably, but i'm trying to get the classname of a fired projectile from unit _x .
i have therefor put the following in unit _x init
'_x addEventHandler ["Fired", {hint (typeOf (_this select 7));}];'

this however returns the classname of the unit (_x), not the projectile. What have i misunderstood about eventhandlers?

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```

// your code here
hint "good!";
low remnant
#

...because arrays start at 0 excuse me while i facepalm

winter rose
#

heh no worries 😄 hence params, doing all the dirty work for you 😉

proven charm
#

when using string as key for hashmap are there any special characters to worry about, which can't be used?

gusty bone
#

Ive been trying to script an A-10 strafe run and every time i think its correct i start the mission and instead of waiting to be called it starts flying right away

copper raven
#

well we can't help you without seeing any code so

proven charm
winter rose
#

try and thou shalt see I presume ^^ if that's the case, please tell so we can adjust either hashmap or its documentation

winter rose
#

thanks!

proven charm
#

np 🙂

willow hound
#

The hash function used in A3 applies directly to binary data 🙂

proven charm
#

well all special characters seem to work here but Idk about unicode and whatnot characters

winter rose
#

æÆ¥¿¡œŒˇ«»“”‹›‘’±‰ you're welcome 😄

proven charm
#

seems to work

winter rose
#

kewl! thanks for the tests again, and go for your script with your mind at ease! 👍

proven charm
#

🙂

dark pecan
#

Hello everyone. I'm having an issue lately wich is: In Editor i put an Insignia in a controllable unit. When i press respawn the Insignia doesn't appear on the arm.
Lou Montana provided me a code to add in .sqf file but so far didnt worked I dont know if i did something wrong in what i did or there is something that i am missing.

Code:
{
_x addMPEventHandler ["MPRespawn", {
params ["_unit", "_corpse"];
private _insignia = [_unit] call BIS_fnc_getUnitInsignia;
[_unit, _insignia] call BIS_fnc_setUnitInsignia;
}];
} forEach units playersGroup;

willow hound
dark pecan
#

they are all players

little raptor
dark pecan
#

yes

#

i defined the entire group

little raptor
#

not sure if you can get a dead unit's insignia

#

params ["_unit", "_corpse"];
private _insignia = [_unit] call BIS_fnc_getUnitInsignia;

#

probably should do [_corpse] call BIS_fnc_getUnitInsignia;

#

_unit is the new unit that spawned instead

#

so you're doing nothing (setting unit's insignia on unit) meowsweats

#

if that doesn't work either, store the unit's insignia in the unit's var space using setVariable and use that when it dies

dark pecan
#

ill make the first change and see

winter rose
#

ah true that

#

use corpse to get the info from the corpse, indeed

I fixed BIS_fnc_getUnitInsignia doc at the same time

dark pecan
#

so the code should be like this ? :

{
_x addMPEventHandler ["MPRespawn", {
params ["_unit", "_corpse"];
private _insignia = [_corpse] call BIS_fnc_getUnitInsignia;
[_unit, _insignia] call BIS_fnc_setUnitInsignia;
}];
} forEach units playersGroup;

little raptor
#

yes

dark pecan
#

nothing changes ;_;

little raptor
#

where did you put the code?

dark pecan
#

in a file called initServer.sqf

winter rose
#

oh, not "initServer.sqf.txt" ?

dark pecan
#

no

little raptor
#

are you the server?

dark pecan
#

yes

little raptor
#

I recommend that you put the code in initPlayerLocal.sqf, and change it as follows:

#
params ["_player"];
if (group _player == playersGroup) then {
  _player addMPEventHandler ["MPRespawn", {
    params ["_unit", "_corpse"];
    private _insignia = [_corpse] call BIS_fnc_getUnitInsignia;
    [_unit, _insignia] call BIS_fnc_setUnitInsignia;
  }];
};
dark pecan
#

roger that

little raptor
#

if all players are in that group you can omit the if

dark pecan
#

with the code that you provided, it didn't worked.

little raptor
#

are all players in that group?

dark pecan
#

yes

#

i even created a new world with only 1 player and 1 respawn in VR

#

and it didnt worked there.

little raptor
#

so this'll do:

params ["_player"];
_player addMPEventHandler ["MPRespawn", {
    params ["_unit", "_corpse"];
    private _insignia = [_corpse] call BIS_fnc_getUnitInsignia;
    [_unit, _insignia] call BIS_fnc_setUnitInsignia;
}];
dark pecan
#

ok

little raptor
little raptor
#

so still didn't work?

dark pecan
#

no ;_;

#

the squad leader is the one that (for now) has a insignia so im always testing that unit

#

but nothing..

#

does ACE have anything to do with it ?

little raptor
#

does ACE have anything to do with it ?
I don't think so
try this:

params ["_player"];
[] spawn {sleep 1; systemChat "init..."};
_player addMPEventHandler ["MPRespawn", {
    params ["_unit", "_corpse"];
    [] spawn {sleep 1; hint "activated..."};
    private _insignia = [_corpse] call BIS_fnc_getUnitInsignia;
    [_unit, _insignia] call BIS_fnc_setUnitInsignia;
}];

if the code actually executes you'll get a hint

#

hold on

#

added another one

#

you should see two messages: one saying init... which is shown at startup, and another one saying "activated..." when you respawn

dark pecan
#

im back, ok im going to test it now

#

both messages showed up

#

the init message and activated hint

#

but the insignia not there

little raptor
#

@dark pecan what about:

params ["_player"];
_player addMPEventHandler ["MPRespawn", {
    params ["_unit", "_corpse"];
    private _insignia = [_corpse] call BIS_fnc_getUnitInsignia;
    systemChat str _insignia;
    hint str ([_unit, _insignia] call BIS_fnc_setUnitInsignia);
}];
dark pecan
#

one second

little raptor
#

checking to see if it returns an insignia at all

#

and if it sets it

dark pecan
#

it says the name of the insignia

#

and the hint is false

little raptor
#

so it doesn't set it

dark pecan
#

nop

little raptor
#

it should say true

dark pecan
#

im using an insignia from Arma 3 itself

#

but it says false

little raptor
#

if (_unit call BIS_fnc_getUnitInsignia != _class) then

#

🤔

#

try this

dark pecan
#

where should i put that ?

little raptor
#

not that

#

what I'm about to write

#
params ["_player"];
_player addMPEventHandler ["MPRespawn", {
    params ["_unit", "_corpse"];
    private _insignia = [_corpse] call BIS_fnc_getUnitInsignia;
    [_unit, ""] call BIS_fnc_setUnitInsignia;
    [_unit, _insignia] call BIS_fnc_setUnitInsignia;
}];
#

this ^

dark pecan
#

insignia set

#

so what was basicly happening ?

little raptor
#

change it to this

params ["_player"];
_player addMPEventHandler ["MPRespawn", {
    params ["_unit", "_corpse"];
    private _insignia = [_corpse] call BIS_fnc_getUnitInsignia;
    _unit setVariable ["BIS_fnc_setUnitInsignia_class", nil];
    [_unit, _insignia] call BIS_fnc_setUnitInsignia;
}];
#

it's faster

little raptor
#

so first I remove the insignia

#

then set it

dark pecan
#

hm... alright

#

im going to try the latest one

little raptor
#

done

#

now it's better

#

less network traffic

dark pecan
#

ok thanks, ill save this one then

#

but Leopard since this subject about insignias is on the table

#

this is great

#

but what if i wanted to make for example, if a player profile name has "[OR-1]" it provides that unit that the player is using a specific insignia

#

If the Character name is [OR-1] the unit that he picks should have the insignia "Insigna name" if [OR-2] = "insignia name"

little raptor
#

you can use something like this:

_insignia = call {
  if ("[OR-1]" in name _unit) exitWith {
     "insignia1";
  };
  if ("[OR-2]" in name _unit) exitWith {
     "insignia2";
  };
  if ("[OR-3]" in name _unit) exitWith {
     "insignia3";
  };
  //default insignia in case none of the above match:
  "insignia0";
};
_unit setVariable ["BIS_fnc_setUnitInsignia_class", nil];
[_unit, _insignia] call BIS_fnc_setUnitInsignia;
#

you can also use profileName instead of name

dark pecan
#

and the word that should be replaced with "insignia1" is the actual name of the insignia right ?

wind hedge
#
   private _vObjectsArray = [];
                    private _vObjects = [];
                    private _vObject = objNull;
                    private _dist = 1.8;
                    if (cameraView == "EXTERNAL") then {_dist = 2.8};        
                    private _startPos = positionCameraToWorld [0,0,_dist];
                    private _radius = 3;
                    //_vObjectsArray =  nearestObjects [_startPos, ["ALL"], _radius];
                    _vObjectsArray =  nearestObjects [_startPos, ["ALL"], _radius];
                    if (_vObjectsArray isNotEqualTo []) then {                    
                        _vObjects = _vObjectsArray select {
                            ([player, _x, 0.1] call BIS_fnc_isInFrontOf &&
                            (((getPosVisual _x) select 2) >= 0) &&
                            {!isObjectHidden _x});
                        };
                    };
little raptor
wind hedge
#

It seems that _vObjectsArray = nearestObjects [_startPos, ["ALL"], _radius]; is even getting triggers and markers near the player?

dark pecan
#

alright and i should replace "name" with "profileName" ?

little raptor
#

idk

dark pecan
#

what if the person name is [OR-1] Hugo

little raptor
#

works

dark pecan
#

is going to change anyway ? cool

little raptor
#

let me make it case-insensitive

#

done

little raptor
#

but markers are not objects

#

¯_(ツ)_/¯

dark pecan
little raptor
#

done

dark pecan
#

can i put that code after the one that you did before about applying the insignia ?

#

Like this ?

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```

// your code here
hint "good!";
dark pecan
#
_player addMPEventHandler ["MPRespawn", {
    params ["_unit", "_corpse"];
    private _insignia = [_corpse] call BIS_fnc_getUnitInsignia;
    _unit setVariable ["BIS_fnc_setUnitInsignia_class", nil, true];
    [_unit, _insignia] call BIS_fnc_setUnitInsignia;
}];
_insignia = call {
  if ("[OR-1]" in name _unit) exitWith {
     "insignia_fap_5";
  };
  if ("[OR-2]" in name _unit) exitWith {
     "insignia2";
  };
  if ("[OR-3]" in name _unit) exitWith {
     "insignia3";
  };
  //default insignia in case none of the above match:
  "insignia0";
};
_unit setVariable ["BIS_fnc_setUnitInsignia_class", nil];
[_unit, _insignia] call BIS_fnc_setUnitInsignia;
little raptor
#

no

#

just replace everything after params ["_unit", "_corpse"] with this

dark pecan
#

could you show me ?

#

i feel so dumb 😅

little raptor
#
params ["_player"];
_player addMPEventHandler ["MPRespawn", {
    params ["_unit", "_corpse"];
    _insignia = call {
        if ("[OR-1]" in name _unit) exitWith {
            "insignia1";
        };
        if ("[OR-2]" in name _unit) exitWith {
            "insignia2";
        };
        if ("[OR-3]" in name _unit) exitWith {
            "insignia3";
        };
        //default insignia in case none of the above match:
        "insignia0";
    };
    _unit setVariable ["BIS_fnc_setUnitInsignia_class", nil];
    [_unit, _insignia] call BIS_fnc_setUnitInsignia;
}];
dark pecan
#

and both problems are solved?

little raptor
#

yes just fix the insignia names

dark pecan
#

ok im testing it

quick abyss
#

What’s the best way to add an image to a flag ? I have tried using slide show but it can’t find the image according to the error code, I have tried everything but it’s not working, I have even tried to use an init code but that ain’t working either - lemme know if this is the wrong channel for this thing

dark pecan
little raptor
#

np

dark pecan
#

i made a few fellow friends of mine joining and it didn't worked for them

#

yes, it only worked for them

wind hedge
#

How can I use the "Select" command to filter Triggers from my array_

#

?

#

I need something in the lines of : !isObjectHidden _x;

#

but: !isTriggerObject _x;

little raptor
dark pecan
#

ahaha

#

it only worked for me

#

not for them

#

i sended you a photo in DM

#

my bad 🤣

little raptor
#

They are reporting me that they can see the insignia from one guy, but not from another and they have the same name

#

not sure what you mean

dark pecan
#

so we are 5 people

#

2 of them can see an insignia on me and in player1

#

but i can only see the insignia on myself. Those who are reporting they cant see theyre own insignia

little raptor
#

idk let me look at the function again

dark pecan
#

ok

#

i used it with "name"

#

not with "profileName"

#

do you think it affects ?

little raptor
#

if they see the insignia on one another it's a network sync issue

#

@dark pecan can you test this too?

params ["_player"];
_player addMPEventHandler ["MPRespawn", {
    params ["_unit", "_corpse"];
    _insignia = call {
        if ("[OR-1]" in name _unit) exitWith {
            "insignia1";
        };
        if ("[OR-2]" in name _unit) exitWith {
            "insignia2";
        };
        if ("[OR-3]" in name _unit) exitWith {
            "insignia3";
        };
        //default insignia in case none of the above match:
        "insignia0";
    };
    [_unit, _insignia] spawn {
      params ["_unit", "_insignia"];
      sleep 3;
      isNil {
        _unit setVariable ["BIS_fnc_setUnitInsignia_class", nil];
        [_unit, _insignia] call BIS_fnc_setUnitInsignia;
      };
    };
}];
#

sets the insignia after 3 seconds

dark pecan
#

i will test but a bit later, right now im on an operation but when i do it i'll let you know

willow hound
#

Sure.

while {true} do {
  {
    Billboard setObjectTexture [0, _x];
    sleep 10;
  } forEach ["A.paa", "B.paa"];
};
tardy sand
#

So I have a script that gets the nearest marker to a trigger and then sets its color differently but if a player places a marker closer to the trigger it colors the players marker instead. How would I filter out the player placed markers?

willow hound
somber radish
#

Anyone know if it is possible to use the RTT feature to render text?
For the purpose of making something like an Ingame scoreBoard / message-Board?

final storm
#

I don't believe so but you could always use hidden selections and paa's of characters

somber radish
#

Or Is it possible to attach different textures to the same surface? Like making several jpg files with letters and then place them inside a billboard in the desired fashion

somber radish
#

Nice

#

You got any resources available I could read up on?

#

I've been googling but cant seem to find anything

final storm
#

No sorry

#

its more of an advanced thing

#

just kinda gotta play around with it

somber radish
#

ok

#

Any hints tho?

final storm
#

use hidden selections

#

and write a function to convert user input to a bunch of setobject texture stuff

#

but you would need to make the model also

somber radish
#

oooh, so I couldnt just use like the vanilla bigScreen, and then ```sqf
_Screen setTexture "H.jpg";
_Screen setTexture "e.jpg";
_Screen setTexture "l.jpg";
_Screen setTexture "l.jpg";
_Screen setTexture "o.jpg";

final storm
#

nope

somber radish
#

It would have to be some kind of mod rigth, not compatible with vanilla arma

final storm
#

as far as i know

somber radish
#

Oh ok

#

Well

#

Thanks anyway

final storm
#

np

final storm
tardy sand
#
call{
  _pos = getPosWorld thisTrigger; 
  _s = [allMapMarkers,[],{_pos distanceSqr getMarkerPos _x},"ASCEND"] call BIS_fnc_sortBy; 
  _s deleteAt (_s find "_USER_DEFINED"); // Tried something didn't work
  _s params ["_mark"]; 
 
  _mark SetMarkerColor "ColorWest"; 
  titleText ["<t size='5' valign='top' shadow='0'>Captured</t>", "PLAIN", -1, true, true]; 
  titleFadeOut 2;
}
tardy sand
willow hound
#

(the solution is simple: wrap the code in spawn)

somber radish
#

Yeah It's probably better to make an external function

willow hound
#
0 = [] spawn {
  //The code I sent
};
somber radish
#
_Handle = [] spawn {
                     while {true} do {
                                       {
                                        Billboard setObjectTexture [0, _x];
                                        sleep 10;
                                       } forEach ["A.paa", "B.paa"];
                                     }
                    };

Like this

final storm
#

yes but this less spaces

willow hound
#

Indeed.

#

Billboard is supposed to be the variable name of your billboard 🙂

#

Could be, yes. Try converting to .paa.

somber radish
#

So I think I might have a solution for making an ingame leaderBoard.
If you want to write 5 letters:

"Warning, pseudo code coming"
_CharSlot1 = CreateVehicle "UserTexture10m_F";
_CharSlot2 = CreateVehicle "UserTexture10m_F";
_CharSlot3 = CreateVehicle "UserTexture10m_F";
_CharSlot4 = CreateVehicle "UserTexture10m_F";
_CharSlot5 = CreateVehicle "UserTexture10m_F";
{
_x setObjectScale 0.1;
_x AttachTo _Billboard [x, y, z];
_x SetDir 180;
[_x] Call Fnc_SelectCHaracterTexture;
} ForEach [_CharSlot1, _CharSlot2, _CharSlot3, _CharSlot4, _CharSlot5];

That way you avoid Using a mod and you can make some function that will allow you To match the ingame letter (.paa file) with a character from a string (Such as playername, score etc etc)

final storm
#

I didnt think of that, smart move

somber radish
#

Thank you thank you! Love the praise!

crude vigil
somber radish
#

Thank you for pinting that

#

out

crude vigil
#

did you read the warning?

somber radish
#

Warning?

winter rose
#

"Warning, pseudo code coming"

crude vigil
#

Here lies the remains of @winter rose 's warning ignorance sent 2 mins ago. (or what's left of it after deleting it)

winter rose
#

no

somber radish
#

ah

meager epoch
#

i've put the following code in the onPlayerKilled.sqf file which is placed in the main mission folder

if ( _oldUnit == bandit2 && _killer == scout1 ) then {
    scout1 sideChat "(radio) Got him.";
};```
#

but nothing happens when my fellow scout1 over here shoots the bandit2 in the head

past wagon
#

try replacing == with isEqualTo

#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```

// your code here
hint "good!";
past wagon
#

@meager epoch

low remnant
#
_bomb = "groundweaponholder" createVehicle getPos this;
_bomb addMagazineCargoGlobal ["M16",1]; 
_bomb attachTo [this,[-0.1,0.05,0.6],"righthandmiddle1",true];

is saying local variable in global space but it is in ab objects init, so i have no clue what the issue is
anyone got a clue?

meager epoch
meager epoch
#

No

past wagon
#

sorry lol

crude vigil
#

Well if dying unit is not a player, then a playerKilled event wont help

meager epoch
past wagon
#

i can fix it

meager epoch
#

i believe in u

past wagon
#

gimme a bit

meager epoch
#

sure thing

past wagon
#
bandit2 addEventHandler ["Killed", {
  params ["", "_killer"];
  if ( _killer == scout1 ) then {
    scout1 sideChat "(radio) Got him.";
  };
}];
#

@meager epoch try this

#

put that in initServer.sqf i guess

meager epoch
#

Do i slap it in a trigger

#

Oh

#

Ok

meager epoch
graceful kelp
#

so im trying to make a script to sort radar and non radar vehicles and could use some help

params ["_unit"];

_Radarrange = getnumber (configFile >> "CfgVehicles" >> _unit >> "components" >> "SensorsManagerComponent" >> "Components" >> "ActiveRadarSensorComponent" >> "AirTarget">> "maxRange");
if !(_Radarrange == 0 && !(_unit isKindOf "Land")) exitwith {true};
false;

but im getting an error

_Radarrange = getnumber (configFile >> _unit >> "components" >> "SensorsMana>
 1:01:20   Error position: <>> _unit >> "components" >> "SensorsMana>
 1:01:20   Error >>: Type Object, expected String
 1:01:20 File fza_ah64_controls\scripting\functions\fn_targetisADA.sqf..., line 24
 1:01:22 Error in expression <];
crude vigil
graceful kelp
#

so just replacing it should do?

crude vigil
#

at least thats what I assume unless u didnt use an incorrect variable name

#

yeah, _unit -> typeof _unit

#

u want a class name of a unit to access its config properties

leaden haven
#

I am getting a zero divisor error with this code in Warlords Redux. I am not sure why.

        {
            if (count (WL_PLAYER_REQUISITION_LIST # _forEachIndex) > 0) then {
                _purchase_category lbAdd _x;
            };
            _purchase_category lbSetValue [(lbSize _purchase_category) - 1, _forEachIndex];
        } forEach [
            localize "STR_A3_cfgmarkers_nato_inf",
            localize "STR_dn_vehicles",
            localize "STR_A3_WL_menu_aircraft",
            localize "STR_A3_rscdisplaygarage_tab_naval",
            localize "STR_A3_WL_menu_defences",
            localize "STR_A3_rscdisplaywelcome_exp_parb_list4_title",
            localize "STR_A3_WL_menu_strategy"
        ];
warm hedge
#

Suspect the select part

past wagon
#

is there a way I can get an array of which "areas" (triggers or map markers) a unit is in? if I have 15 map markers/triggers, and I want code to run when the unit is not in any of them, how can I do that without doing something repetitive like this:

waitUntil { player not inArea "marker1" && player not inArea "marker2" && player not inArea "marker3" //etc...
little raptor
past wagon
#

so, something like this?

waitUntil { ["marker1", "marker2", "marker3", "marker4", "marker5"] findIf { player inArea _x } == -1 };
little raptor
#

Yes but since the array is constant save it into a variable outside the waitUntil

past wagon
#

okay

little raptor
#

Not changing meowsweats

past wagon
#

ok...

#

so that would only matter if I wanted to make a change to the array

#

right?

little raptor
past wagon
real tartan
#
private _unit = player;
private _uniforms = [];
private _haveUniform = [true, uniform _unit in _uniforms] select { _uniforms isEqualTo [] };
diag_log format ["_haveUniform: %1", _haveUniform];
#

returns _haveUniform: [true,false]

#

I should have _haveUniform as boolean

little raptor
#

and I don't see why you're not using if (doing that is slower than if)

real tartan
#

one-liners ❤️

little raptor
#

one liner still

#

although since the array is empty maybe not much performance diff:

_haveUniform  = [uniform _unit in _uniforms, true] select ( _uniforms isEqualTo [] );
#

should be benchmarked in the game. idk

copper raven
#

_uniforms isEqualTo [] || {uniform _unit in _uniforms}

little raptor
#

yeah that's even better

real tartan
#

thank you both, going with @copper raven's example

still forum
still forum
winter rose
#

Dedmen treating backlog requests 😄 good morning!

ornate oriole
#

can anyone help me with setting up !alive condition in setWaypointStatements because for some reason this doesn't work

_wp1 setWaypointStatements ["!alive thisList", " hint 'worked'"];

winter rose
ornate oriole
#

oh wow thank you so much i broke my head for hours on this

somber radish
still forum
#

you can use classnames

#

or
getText (configOf CreateVehicle "UserTexture10m_F" >> "model")

little raptor
#

UserTexture1m_F

little raptor
#

also why do you use attachTo?

#

if the billboard doesn't move just use setPosASL

ornate oriole
#

can anyone help me with this script it seems that everything works but the condition and i have no clue how to fix that

_grp4 = [getMarkerPos "spawn3", East, (configfile >> "CfgGroups" >> "East" >> "CWR3_RUS" >> "Armored" >> "cwr3_o_bmp1_section")] call BIS_fnc_spawnGroup;
_grp4 setVariable ["groupa", 123, true];
_wp1 = _grp4 addWaypoint [(getMarkerPos "Alpha"), 0];
_wp1 setWaypointType "MOVE";
_wp1 setWaypointSpeed "NORMAL";
_wp1 setWaypointStatements ["thislist findIf { alive _x } == -1","hint 'worked'"];

little raptor
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```

// your code here
hint "good!";
ornate oriole
#

what is this?

little raptor
#

you should post your code with a syntax highlighting here

ornate oriole
#

_grp4 = [getMarkerPos "spawn3", East, (configfile >> "CfgGroups" >> "East" >> "CWR3_RUS" >> "Armored" >> "cwr3_o_bmp1_section")] call BIS_fnc_spawnGroup;
_grp4 setVariable ["groupa", 123, true];
_wp1 = _grp4 addWaypoint [(getMarkerPos "Alpha"), 0];
_wp1 setWaypointType "MOVE";
_wp1 setWaypointSpeed "NORMAL";
_wp1 setWaypointStatements ["thislist findIf { alive _x } == -1", "hint 'worked'"];

#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```

// your code here
hint "good!";
ornate oriole
#

still doesn't work tho

little raptor
#

you have to do it manually

#

```sqf

#

then code
then end it with
```

ornate oriole
#

wdym

#
_grp4 = [getMarkerPos "spawn3", East, (configfile >> "CfgGroups" >> "East" >> "CWR3_RUS" >> "Armored" >> "cwr3_o_bmp1_section")] call BIS_fnc_spawnGroup;
_grp4 setVariable ["groupa", 123, true];
_wp1 = _grp4 addWaypoint [(getMarkerPos "Alpha"), 0];
_wp1 setWaypointType "MOVE";
_wp1 setWaypointSpeed "NORMAL";
_wp1 setWaypointStatements ["thislist findIf { alive _x } == -1", "hint 'worked'"];
little raptor
ornate oriole
#

i want it to trigger when everyone is dead is that not possible?

little raptor
#

with waypoint no

ornate oriole
#

ah shit is there another solution then?

little raptor
#

loops, or event handlers

winter rose
#

if the units die, the group gets deleted and its waypoints with it yeah 🙂

ornate oriole
#

big braindead moment from my side thank you very much for the help tho!

sullen hinge
#

trying to refer to a group name of _groupe that i spawn with the code below, but it says that the variable doesnt exist. Help?

_groupe = [getMarkerPos "SPAWN", EAST, 7] call BIS_fnc_spawnGroup;```
winter rose
sullen hinge
#

i have a loop in its own .sqf, i have this condition ```sqf
if ({alive _x} count units _groupe == 0) then {hint "dead"};

thats where the error happens
winter rose
#

yep, and it does not* know _group that is a local variable 🙂

sullen hinge
#

okay, any way i can refer to it? Set it to global, or....?

copper raven
#

global yes

#

!alive <group> instead

#

wait meowsweats it doesn't exist 🤔 why did i think it exists

sullen hinge
#

Okay, can you please help or explain how to do that?

#

the global thing

copper raven
#

just remove the _

#

infront of the variable name

sullen hinge
#

oOOOHHH

#

Let me try

meager epoch
#

The On Activation part returns a generic error in the expression. Can someone point out where I fucked up?
Thanks in advance.

Condition:

!(alive bandit1) && !(triggerActivated triggerX) && !(triggerActivated bonusChat3_1);

On Activation:

deleteVehicle bonusChat3_1;

waitUntil {triggerActivated triggerX};
0 = [] spawn {
    sleep 8;
    player1 sideChat "(radio) I know. He's already dead.";
    sleep 5;
    scout1 sideChat "(radio) Oh, good job. Carry on then.";
    bandit2 enableAI "MOVE";
}
copper raven
#

can't waitUntil in unscheduled

meager epoch
#

so uh, how do i schedule it

winter rose
#

just move the waitUntil one line below, it should do 😉

meager epoch
#

o ait, thanks

sullen hinge
copper raven
candid condor
#

Hey can someone help me with something.

Currently im working on a mission but I want the End Scenario to happen when the music is done playing

little raptor
#

alternatively, you can use sleep

#

which is safer

candid condor
#

Alright I will see what I can do

little raptor
#
playMusic "blabla";
sleep _musicDuration;
["end1"] call BIS_fnc_endMission;
candid condor
#

Alright thnx

mortal forum
#

I'm making a zeus module that will allow me to call in reinforcements and supply drops similar to how the fire support works. Got a bit stuck and would appreciate some input, I believe what I'm after has something to do with the velocity part / atan calculations. I'm a script noob and unsure how to adjust it so the flight path of the plane is a height of 200 or so above the logic module to simulate paratroopers jumping from the aircraft

#

this is the link to the code I have so far, copy paste from the current zeus fire support

real tartan
#

can I achieve recursion with some magic variable ?

// script.sqf
params ["_unit"];

[_unit] execVM "script.sqf";
// [_unit] execVM _thisScript;
copper raven
#

pass the function itself when calling it

#

and then use it

real tartan
#
// script.sqf
params ["_unit", ["_code", {}]];
[_unit] spawn _code;

// usage
[player, { [_this] execVM "script.sqf"; }];
copper raven
#

yea, but not really

#

don't execVm over and over again

#

you're recompiling the script everytime that way

#

compile it once, i.e compileScript

#

then use spawn/call accordingly

real tartan
#

will probably rewrite to wrap code to function and do recursion calling function

winter rose
#

CfgFunctions plz

real tartan
#

[] execVM _thisScript should work, but not sure how execVM handle full path

copper raven
#

no it wont work

real tartan
#

[] execVM str _thisScript

winter rose
#

stahp 🤣

little raptor
copper raven
#

its pseudocode kinda

#

he wants to recursively call the function again

little raptor
#

still

#

you can just call it inside the spawn (no need for new handle)

copper raven
#

and i mean i assume that he wont call it without a condition and crash his game 😄

real tartan
#

^

winter rose
#

explosion was heard in the distance

mortal forum
low remnant
#

quick question to check if i've understood something correctly concerning multiplayer scripting.
scenario is as follows: i wanna spawn something upon a units death via script. if i just put the "killed" eventhandler into the unit's init field in the editor, this will cause as many eventhandlers as there are players, and subsequently as many spawns.
Is this correct? and if so, how can i circumvent this?

winter rose
#

solution: add the event server-side only:
either withsqf if (isServer) then { this addEventHandler ... }; // bad or, more smarterest, initServer.sqf 🙂

low remnant
#

thats... suprisingly simple. initServer wouldnt work sadly as i won't know at mission start what unit to add the script to.

winter rose
#

how do you decide it then?

#

because init field is even worse in that regard 😃

low remnant
#

player action in mission

#

init is worse in what capacity?

winter rose
#

that you definitely set it from the beginning of a mission

#

in a script it can happen later

low remnant
#

it'll be a zeused mission, i've tested it on a player-hosted local mp server, adding the script into the init box via Zeus interface works.

#

thank you very much for the info

neon swift
#

Anybody know of a way to get the position of the closest trigger from an array of triggers?

little raptor
#

closest to what?

neon swift
#

to a marker or some other object I select

little raptor
#

I think nearestObject works 🤔
if not just use:

_triggers_sorted = [_triggers, [], {_x distance _pos}, "ASCEND"] call BIS_fnc_sortBy;
#

sorts them by distance to pos

#

the closest one is _triggers_sorted#0

neon swift
#

this looks awesome. Will check it out.

little raptor
#

@neon swift yes nearestObject works too:

_nearestTrigger = _pos nearestObject "EmptyDetector"

but:

#

Hardcoded radius is 50 meters

#

@wind hedge regarding the question you asked before: just do:

_objs select {!(_x isKindOf "EmptyDetector")};
little raptor
#

all commands are better than functions

#

altho I think BIS_fnc_selectRandom is now a wrapper for selectRandom...🤔

#

it's only there for backward compatibility

winter rose
neon swift
neon swift
#

I have several arrays defined in the mission description.ext, each array is a collection of triggers on the map. I'm bringing the array into the funtion by...

_fArray = getArray (missionConfigFile >> "arraysBeaverTrail" >> "myArrays" >> _array);

where _array is the name of the array I want to sort.
Then,
`
_distSortArray = [_fArray, [], { _pos distance _x }, "ASCEND"] call BIS_fnc_sortBy;

_trig = _distSortArray select 0;
`
_trig should be the trigger I want but the code gets stuck at the BIS_fnc_sortBy

little raptor
#

you're just bringing in an array of strings

neon swift
#

feared that

little raptor
#

you can convert it to an array of triggers if they're defined in the mission namespace like so:

_fArray = _fArray apply {missionNamespace getVariable [_x, objNull]};
#

but I recommend using array of triggers and not using config

#

that's not what config is for anyway

#

¯_(ツ)_/¯

neon swift
#

how would I define the array in the initServer.sqf? Would it be:
missionNamespace setVariable ["TAG_myArray", [trig_1, trig_2, trig_3]];

little raptor
neon swift
#

@little raptor sorry about all the pings I fixed it.

winter rose
#

yeah sorry @little raptor 😋

frosty cairn
#

Hey, I need some help mod making wise.
Me and @paper fulcrum are working on a ace drug extension mod, and we need some help:
We have setup a Medical Menu action, where they can take the drug. The thing is, we want some extra effects to apply after the action, such as stamina increase and chromatic aberration etc. However, we can't figure out how to get those effects to apply after usage (we don't know what and how to add and make sure the script runs). How do we do that?

frosty cairn
#

Ah, you misunderstood what I meant.

#

Lemme rephrase.

#

Okay, so I have my mod folder.

winter rose
#

taking drugs with your friend? this is not a quackhouse

frosty cairn
#

What I want to know is how to find out after the action is done, and how to apply the effects that I want.

#

Like how do I get an .sqf to run after the medical action is done

winter rose
#

you would have to check the ACE documentation for that I'm afraid

#

I only know vanilla Arma

little raptor
lusty oasis
#

I'm trying to put NMD sandbox on a few of my subscribed maps and I can't figure any of this out. The editor just doesn't make any sense

#

for instance, how do i put player slots down and why tf is this editor so counter-intuitive

gusty bone
#

How would i go about scripting fire on a static plane crash

dusk badger
#

Need help here I want to remove only the uniforms from the virtual arsenal but it deletes all the items I have a bunch of other codes but can't make them work

[Box_1, ["%ALL"], true] call BIS_fnc_addVirtualBackpackCargo;
[Box_1, ["_availableHeadgear", "_availableGoggles", "_availableVests", "_availableaccs"], true] call BIS_fnc_addVirtualItemCargo;
[Box_1, ["%ALL"], true] call BIS_fnc_addVirtualMagazineCargo;
[Box_1, ["%ALL"], true] call BIS_fnc_addVirtualWeaponCargo;
undone quiver
#

Does anyone know the best way to profile units for zeus jip?

pulsar bluff
#

@wind hedge fatigue does work yea

warm hedge
#

Is there anyway to apply a sound effect (just like deafness when player is in unconscious) which is defined in CfgSoundEffects or something, by a script command, not engine-side hardcoded something?

wind hedge
balmy lichen
#

Is there any way to whitelist the use of drones to specific roles? Because as far as I know if the role has access to the UAV Terminal they can access a drone. I just don't want to blacklist terminals and hand them out individually

pulsar bluff
#

@wind hedge iirc stamina controls sprint

#

fatigue controls effects (screen darkening)

#

dont know anymore tho

wind hedge
#

Both systems overlap and have different effects on players vs Ai units... too bad it is probably too late to overhaul and/or clarify the whole system....

#

Thank you for your input thou!

gusty bone
#

Does anyone know the script codes for different parts of the orca helicopter

warm hedge
#

Elaborate?

dusk badger
#

can some one help me I just want to delete the uniforms from the arsenal but only the uniforms

#

is for a SP mission

gusty bone
warm hedge
#

Doesn't make sense for me. You want what for those?

gusty bone
#

So a line of my code SetHitPointDamage[“HitVRotor”, 1]
Will disable the rear rotor of the helicopter. I was needing to know what other sections are able to be damaged in this way

dusk badger
#

Need help here I want to remove only the uniforms from the virtual arsenal but it deletes all the items I have a bunch of other codes but can't make them work

[Box_1, ["%ALL"], true] call BIS_fnc_addVirtualBackpackCargo;
[Box_1, ["_availableHeadgear", "_availableGoggles", "_availableVests", "_availableaccs"], true] call BIS_fnc_addVirtualItemCargo;
[Box_1, ["%ALL"], true] call BIS_fnc_addVirtualMagazineCargo;
[Box_1, ["%ALL"], true] call BIS_fnc_addVirtualWeaponCargo;

fair drum
#

use true instead of "%ALL"

dusk badger
fair drum
#

and what are these "_availableHeadgear" coming from?

#

if they are local variables, you are trying to make that a string which makes no sense

dusk badger
#

my scripting knowledge is minimal manege to read some forums put where to complex @fair drum

fair drum
#

i'll write something so you can fill in the rest real quick

dusk badger
#

basically I just cannibalize the from different codes

dusk badger
#

thanks @fair drum so from lines 4-24 ill just add the classnames right?

fair drum
#

yes, make sure they are individual STRINGS

#

be mindful of commas and brackets

#

keep in mind, if you use this in a init box in the editor, you have to take out the //comment

dusk badger
#

understood

elder sail
#

Can you populate a crates' cargo with the return value of getUnitLoadout?
Trying to make a script that spawns a crate with the contents of the players loadout but can't seem to get it to populate the items/magazines/weapons. Only the clothing.

Using the

SupplyCrate addItemCargoGlobal [vUniform, 1];

method currently.

fair drum
#
Can you populate a crates' cargo with the return value of getUnitLoadout?

not directly. It gives a loadout array that would be difficult to sift through, but not impossible, probably above the level of coding you want to do currently.

#

@elder sail

gusty bone
#

Is there a trigger code for when a vehicle is empty

fair drum
fair drum
gusty bone
#

I dont have a code yet. But a condition code that starts the “on activation” command string

elder sail
gusty bone
#

Along the same lines as the istouchingground condition

fair drum
gusty bone
#

Ok thank you

fair drum
fair drum
elder sail
# fair drum lets see your full code you have so far

SaveGear.sqf

if (isDedicated) exitWith {};
waitUntil {!isNull player};

vUniform = uniform player;
vVest = vest player;
vHeadgear = headgear player;
vGoggles = goggles player;
vItems = items player;
vAssignedItems = assignedItems player;
vBackpack = backpack player;
vBackpackItems = backpackItems player;

vPriAmmo = primaryWeaponMagazine player;
vSecAmmo = secondaryWeaponMagazine player;
vHandAmmo = handgunMagazine player;

vPriItems = primaryWeaponItems player;
vSecItems = secondaryWeaponItems player;
vHandItems = handgunItems player;

vMagazines = magazines player;
vCurrentMagazine = currentMagazine player;
vWeapons = weapons player;

vUnitLoadout = getUnitLoadout player;

vGearSaved = true;

hint format ["Currently equipped gear has been saved."];

SupplyDrop.sqf (Too long to fit entire script so I'll just post the relevant section)

SupplyDrop addItemCargoGlobal [vUniform, 1];
SupplyDrop addItemCargoGlobal [vVest, 1];
SupplyDrop addItemCargoGlobal [vBackpack, 1];
SupplyDrop addItemCargoGlobal [vHeadgear, 1];
SupplyDrop addItemCargoGlobal [vGoggles, 1];
#

Currently have it saving each part separately and then loading them in that way, though I can't seem to get the items/weapons/mags to work

fair drum
#

because your addItemCargoGlobal you are not using right. you are giving it an array of class names, it needs a single class name. you need to use apply or forEach

#

for example

#
vUniform apply {
    SupplyDrop addItemCargoGlobal [_x, 1];
};
elder sail
#

Ohhh I see

elder sail
gusty bone
#

So if my command is in the trigger box it should go
Condition box: Crew evaccrash isequalto [0]
On activation box: evaccrash allowdamage true; evaccrash setpointdamage[“hithull”, 1];

#

Im trying to make the helicopter blow up after everyone is out of it

dusk badger
#

not the best at scripting but make a trigger spawn in the position of the heli then set it blufor not present, onactivation: Heli setDamage 100 @gusty bone hope it helps

fair drum
#

remove the 0

dusk badger
#

@fair drum in the strings if I want to add everything what should I put because %ALL, true are not working for me

fair drum
dusk badger
#

@fair drum what does that mean if I name it Box_1 in the variable name?

fair drum
#

may or may not need a slight delay after that line though we shall see.

dusk badger
#

it says Init: Invalid Local variable in global space

fair drum
#

thats an old bug oversee from the engine. do this whole script external from the editor

dusk badger
#

external?

fair drum
#

like, make a file, name it, then call it from init.sqf. like this

if (isServer) then {
  call compile preprocessfilelinenumbers "scriptname.sqf"
};
fair drum
#

in init.sqf

dusk badger
#

my scripting skills are basic like kindergarten level

fair drum
#

time to learn kiddo

dusk badger
#

I know, so I saved the mission but I don't have that file

fair drum
#

got to create it yourself

#

the engine will look for that file automatically as with all event scripts

#

im headed to bed. ill help you tomorrow if you are still stuck

dusk badger
#

ok thanks I'll watch some YT videos

dusk badger
#

thank you

real tartan
#
private _isAlive = alive player;
while { _isAlive } do { ... };

vs

while { alive player } do { ... };

#1 example will continue check that condition or only first time ?

warm hedge
#

The first, shouldn't. It won't exit. The second, you should

winter rose
winter rose
mortal forum
#

if (typeOf _plane == ["classname1","classname2"]) then {}; Is it possible to have typeof with a list of classnames to check? the above doesn't work

still forum
#

if classname in list of classnames then..

mortal forum
#

brilliant thanks

still forum
#

keep in mind though that in check is case sensitive

#

so classname1 != cLaSsNaMe1

winter rose
#

use toLowerANSI typeOf _plane along with all lowercase classes to be sure 😉

still forum
#

or use proper case classnames :U

winter rose
#

yyyeah, no - here yes, but some commands return all lowercase things sooo 😅

little raptor
#

afaik they don't have hidden selections, so not possible

winter rose
#

You can change their border colour though, iirc

crude needle
little raptor
#

looks like this works (for some reason):

{
    _block setObjectTexture [_forEachIndex, "#(argb,8,8,3)color(0,0,0,0)"]
} forEach getObjectTextures _block;
#

only works if alpha is 0 (always black, even if you change the color)

#

¯_(ツ)_/¯

winter rose
#

e.g #(argb,8,8,3)color(1,0,1,1) doesn't work?

little raptor
#

nope

#

white

winter rose
#

heh - funny

little raptor
#

changing the material works!

#
{
    b setObjectMaterial [_forEachIndex, "\a3\data_f\default.rvmat"];
} forEach getObjectMaterials b;
{
    b setObjectTexture [_forEachIndex, "#(argb,8,8,3)color(1,1,0,1)"]
} forEach getObjectTextures b;
#

makes it yellow

#

you need to change b to this

cyan dust
#

Good day. If I want to move some sqf files out of the mission pbo because they are used only on server side, where do I start? What are the best practices?

fair drum
#

why would you want to do that?

winter rose
#

"so nobody can look at my sicrits"

little raptor
#

paa texture

cyan dust
little raptor
#

no
A.paa) is incorrect

cyan dust
winter rose
#

(warmer?)

cyan dust
fair drum
#

but really, how much you actually talking

little raptor
winter rose
#

now how many script files do you have krtecek

fair drum
#

cause I bet one sound file for your mission is bigger than all the script files combined

copper raven
little raptor
#

do you want it for a mission, or mod?

#

I think you need the absolute path then

#
b setObjectTexture [_forEachIndex, getMissionPath "A.paa"]
cyan dust
copper raven
#

no, an addon

#

and load it serverside with your code, then execute it normally in the mission

winter rose
little raptor
#

@torpid swift ok then just "A.paa". no need for getMissionPath

cyan dust
#

@copper raven Do you have have any docs or tutorials on that by chance? All I can find is how to install them. Also, would it work on Linux dedicated server?

fair drum
meager epoch
#

Why does nothing from inside the if statement gets executed? The only thing that pops up is the first sideChat from miller1 and that's it. Where did I fuck up?
Thanks in advance.

chat3.sqf

miller1 setRandomLip true;

miller1 sideChat "Good job, Sergeant. Thanks to the laptop you've found, we now know the location of the Lieutenant.";

if (triggerActivated makeDocumentsVisible==true) then {
 //unnecessary sideChats...
} else {
 //more unnecessary sideChats...
};
winter rose
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```

// your code here
hint "good!";
fair drum
winter rose
little raptor
winter rose
meager epoch
#

it does exist

meager epoch
#

the if?

cyan dust
winter rose
fair drum
winter rose
meager epoch
#

well, that's what i dont know. it's only a couple of sidechats in both

#

no error gets shown

meager epoch
winter rose
winter rose
fair drum
meager epoch
#

lol

little raptor
#

if you're testing it in eden it's always shown

winter rose
#

except in unscheduled scopes iirc or some funky stuff like that 😄

meager epoch
#

i am testing it, no black box pops up

little raptor
fair drum
#

does your unit have a radio?

meager epoch
#

ye boutta try that

#

they do, yes

fair drum
#

also your player has a radio right?

meager epoch
#

like i said, the first sideChat pops up, just the sidechats inside the if statement dont

#

the player has one as well

little raptor
fair drum
#

well now you know where your error is. its at the conditional

meager epoch
#

well yeah, but what's wrong with it

#

the trigger exists

fair drum
#

send pic of trigger menu

meager epoch
#

and it does its job

little raptor
#

see what it gives you

#

if it doesn't give you anything it's not defined

copper raven
#
  • cfgFunctions preferably
#

and that part is basically what you do in missions

meager epoch
#

gotta get to the point where it does first to see

#

but like i said, the trigger does its job

winter rose
#
hint format ["activated = -%1-", triggerActivated makeDocumentsVisible];
```to be sure 🙂
winter rose
winter rose
#

short answer: make sure your if condition returns a boolean (true/false)

little raptor
little raptor
little raptor
winter rose
#

OK, stop, hold on

#

you
post your full script to sqfbin.com

we'll see

meager epoch
#

just the chat3.sqf?

winter rose
#

just the file this one is in, I don't know what it is called 😐

#

you do realise I don't see your screen right 😄

little raptor
meager epoch
winter rose
#

I don't need names so it gets skipped 😃

#

so "just the file content" yes please

meager epoch
#

xd

#

yeye doing it rn

#

my pc is shitting itself from running arma 3 and chrome at the same time

#

So give it a sec

meager epoch
#

pasted, saved

fair drum
#

post linky

meager epoch
#

Oh

winter rose
#

now you keep the generated link for you
post the generated link here so we can see it

meager epoch
fair drum
#

so

meager epoch
#

enjoy my top notch coding

fair drum
#

you see the colors right?

little raptor
#

you have a "

winter rose
#

don't you see something wrong here? 🙂

meager epoch
#

uh oh

winter rose
#

L16: sleep 8;";

meager epoch
#

lol

#

i swear i went over the code like 10 times

#

how did i not see that

winter rose
#

use Visual Studio Code with the SQF plugin to save you (and us) some time

#

really, use it

little raptor
meager epoch
#

but, shouldnt it execute till that part

winter rose
#

no.

meager epoch
#

well thanks for the help lol :d

winter rose
#

(and don't look at line 34, either)

meager epoch
winter rose
#

with what do you edit SQF?

meager epoch
#

Notepad++

winter rose
#

…VSCode please
even N++ has a syntax highlighter for SQF if you want

meager epoch
#

How do I enable it

copper raven
winter rose
copper raven
#

map and _map?

#

are you sure that _map is defined?

#

no

#

if you want to add animations to the main map, use the commands without ctrl prefix

#

the ctrl ones are for user-defined map controls

#

?

#

did you even read?

south notch
#

Does anyone know what could possibly cause all of the code in missions various triggers, inits and such in call {} ?

#

I'm thinking it might be a mod or something

still forum
#

You updating your CBA version

#

CBA added that (but hid it from you because its confusing) to workaround a bug.
Bug was fixed, CBA removed it (and is also not hiding it anymore)

south notch
#

Ok so this is an intentional feature of CBA?

still forum
#

was* yes

south notch
#

Okay

#

thanks